System Administration Guide: Network Interfaces and Network Virtualization

ProcedureHow to Remove a VLAN

  1. 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.

  2. Determine which VLAN you want to remove.


    # dladm show-vlan
    
  3. Unplumb the VLAN's IP interface.


    # ifconfig vlan-interface unplumb
    

    where vlan-interface is the IP interface that is configured over the VLAN.


    Note –

    You cannot remove a VLAN that is currently in use.


  4. Remove the VLAN by performing one of the following steps:

    • To delete the VLAN temporarily, use the -t option as follows:


      # dladm delete-vlan -t vlan
      
    • To make the deletion persist, perform the following:

      1. Remove the VLAN.


        # dladm delete-vlan vlan
        
      2. Remove the /etc/hostname.vlan-interface file.


Example 5–3 Removing a VLAN


# dladm show-vlan
LINK       VID     OVER          FLAGS
sales      5       subitops0     ----
managers   7       net0          ----

# ifconfig managers unplumb
# dladm delete-vlan managers
# rm /etc/hostname.managers