This section describes the usage of new dladm subcommands for other VLAN tasks. These dladm commands also work with link names.
Assume the System Administrator role or become superuser.
The System Administrator role includes the Network Management profile. To create the role and assign the role to a user, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.
Display VLAN information.
# dladm show-vlan [vlan-link] |
If you do not specify a VLAN link, the command displays information about all configured VLANs.
The following example shows the available VLANs in a system.
# dladm show-vlan LINK VID OVER FLAGS sales 7 subitops0 ---- managers 5 net0 ---- |
Configured VLANs also appear when you issue the dladm show-link command. In the command output, the VLANs are appropriately identified in the CLASS column.
# dladm show-link LINK CLASS MTU STATE OVER subitops0 phys 1500 up -- sales vlan 1500 up subitops0 net0 phys 1500 up -- managers vlan 1500 up net0 |
Assume the System Administrator role or become superuser.
The System Administrator role includes the Network Management profile. To create the role and assign the role to a user, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.
Determine which VLAN you want to remove.
# dladm show-vlan |
Unplumb the VLAN's IP interface.
# ifconfig vlan-interface unplumb |
where vlan-interface is the IP interface that is configured over the VLAN.
You cannot remove a VLAN that is currently in use.
Remove the VLAN by performing one of the following steps:
# dladm show-vlan LINK VID OVER FLAGS sales 5 subitops0 ---- managers 7 net0 ---- # ifconfig managers unplumb # dladm delete-vlan managers # rm /etc/hostname.managers |