IBM Cloud Docs
Managing classic infrastructure VLANs (ibmcloud sl vlan)

Managing classic infrastructure VLANs (ibmcloud sl vlan)

Virtual local area networks (VLANs) are used by IBM Cloud® to isolate broadcast traffic on the public and private networks. VLANs are assigned as needed to fulfill other offerings.

Use the following commands from the IBM Cloud Command Line Interface to manage classic infrastructure VLANs.

ibmcloud sl vlan create

Create a new VLAN:

ibmcloud sl vlan create [OPTIONS]

Command options:

-t, --vlan-type
The type of the VLAN, either public or private.
-r, --router
The host name of the router.
-d, --datacenter
The short name of the datacenter.
-n, --name
The name of the VLAN.
-f, --force
Force operation without confirmation.

Examples:

ibmcloud sl vlan create -t public -d dal09 -n myvlan

This command creates a public VLAN that is located in datacenter dal09 and name is myvlan.

ibmcloud sl vlan cancel

Cancel a VLAN:

ibmcloud sl vlan cancel IDENTIFIER [OPTIONS]

Command options:

-f, --force
Force operation without confirmation.

Examples:

ibmcloud sl vlan cancel 12345678 -f

This command cancels VLAN with ID 12345678 without asking for confirmation.

ibmcloud sl vlan detail

Get details about a VLAN:

ibmcloud sl vlan detail IDENTIFIER [OPTIONS]

Command options:

--no-vs
Hide virtual server listing.
--no-hardware
Hide hardware listing.

Examples:

ibmcloud sl vlan detail 12345678  --no-vs --no-hardware

This command shows details of VLAN with ID 12345678, and not list virtual server or hardware server.

ibmcloud sl vlan edit

Edit the details about a VLAN:

ibmcloud sl vlan edit IDENTIFIER [OPTIONS]

Command options:

-n, --name
The name of the VLAN.

Examples:

ibmcloud sl vlan edit 12345678 -n myvlan-rename

This command updates vlan with ID 12345678 and gives it a new name myvlan-rename.

ibmcloud sl vlan list

List all the VLANs on your account:

ibmcloud sl vlan list [OPTIONS]

Command options:

--sortby
Column to sort by. Options are: id, number, name, firewall, datacenter, hardware, virtual_servers, public_ips.
-d, --datacenter
Filter by datacenter shortname.
-n, --number
Filter by VLAN number.
--name
Filter by VLAN name.
--order
Filter by ID of the order that purchased the VLAN.

Examples:

ibmcloud sl vlan list -d dal09 --sortby number

This commands lists all VLANs on current account, and filtering by datacenter that equals to dal09, and sorts them by VLAN number.

ibmcloud sl vlan options

List all the options for creating VLAN:

ibmcloud sl vlan options

Examples:

ibmcloud sl vlan options

This command lists all options for creating a VLAN, eg. VLAN type, datacenters, subnet size, routers, etc.