Configuring Static VLAN Subinterfaces Within VLAN Subranges

The example procedures in this section show how to configure static VLAN subinterfaces within VLAN subranges by using the same loopback interface referenced by multiple unnumbered IP interfaces. Instead of assigning a different IP address to each physical interface, the first example assigns an IP address to a loopback interface (loopback 0). Each physical interface is then configured as an unnumbered IP interface, referencing the same loopback interface.

The following topics describe how to configure static VLAN subinterfaces within VLAN subranges:

Creating a Static VLAN Subinterface Within a VLAN Subrange

You can configure a static VLAN subinterface with a VLAN whose VLAN ID falls within an existing bulk-configured VLAN subrange.

To create a static VLAN subinterface within a VLAN subrange:

  1. Create the VLAN major interface. For more information, see Configuring VLAN as the Encapsulation Method for the Interface.
    host1(config)#interface gigabitEthernet 0/0 host1(config-if)#encapsulation vlan
  2. Create a bulk-configured VLAN range that includes one or more VLAN subranges. For more information, see Creating a Bulk-Configured VLAN Range on a Static VLAN Major Interface.
    host1(config-if)#vlan bulk-config test vlan-range 200 250
  3. Create a static VLAN subinterface by adding a subinterface number to the interface identification command. For more information, see Selecting a Gigabit Ethernet Interface or a 10-Gigabit Ethernet Interface.
    host1(config-if)#interface gigabitEthernet 0/0.2100
  4. Do one of the following:
    • Assign a VLAN ID for the subinterface.
      host1(config-if)#vlan id 201
    • Assign a VLAN ID and the optional unique MAC address for the subinterface.
      host1(config-if)#vlan id 201 mac-address 0090.1a01.1234
  5. To fully configure the VLAN subinterface, assign an IP address, or make it unnumbered. For more information, see Setting Up an Unnumbered Interface.
    host1(config-if)#ip unnumbered loopback 0

Creating a VLAN Subrange that Includes a Static VLAN Subinterface

You can configure a bulk-configured VLAN subrange that includes the VLAN ID belonging to an existing VLAN on a static VLAN subinterface.

To create a VLAN subrange that includes a static VLAN subinterface:

  1. Create the VLAN major interface. For more information, see Configuring VLAN as the Encapsulation Method for the Interface.
    host1(config)#interface gigabitEthernet 3/1 host1(config-if)#encapsulation vlan
  2. Specify a static VLAN subinterface. For more information, see Selecting a Gigabit Ethernet Interface or a 10-Gigabit Ethernet Interface.
    host1(config-if)#interface gigabitEthernet 3/1.201
  3. Do one of the following:
    • Assign a VLAN ID for the subinterface.
      host1(config-if)#vlan id 201
    • Assign a VLAN ID and the optional unique MAC address for the subinterface.
      host1(config-if)#vlan id 201 mac-address 0090.1a01.1234
  4. Create a bulk-configured VLAN range that includes the VLAN ID of the previously configured VLAN. In this example, the VLAN range 100–250 includes VLAN ID 201. For more information, see Creating a Bulk-Configured VLAN Range on a Static VLAN Major Interface.
    host1(config)#interface gigabitEthernet 3/1 host1(config-if)#vlan bulk-config test2 vlan-range 100 250
  5. To fully configure the VLAN subinterface, assign an IP address or make it unnumbered. For more information, see Setting Up an Unnumbered Interface.
    host1(config-if)#ip unnumbered loopback 0

Related Documentation