Subinterface Support

Subinterfaces are logical L3 interfaces commonly used in the L2/L3 boundary device. They enable the division of a single ethernet interface into multiple logical L3 interfaces based on the incoming 802.1q tag (VLAN-ID).

For a subinterface to be operational on an Ethernet or port-channel interface, the parent interface must be configured as a routed port and be administratively up. Configure a VLAN on the subinterface. If the parent interface goes down, all subinterfaces automatically go down but will come back up with the same configuration once the parent interface is up.

Note that a port channel should not contain Ethernet interfaces with subinterfaces configured on them and that subinterfaces cannot be members of a port channel.

Name a subinterface by adding a period followed by a unique subinterface number to the name of the parent interface. Note that the subinterface number has no relation to the ID of the VLAN corresponding to the subinterface.

Configuring Routing Features on a Subinterface

After a subinterface is created, you can configure the following features on it:
  • IP Routing
  • VRF
  • IP ACL
  • Policy Map
  • Basic QOS
  • COS rewrite
  • VRRP

Creating a Subinterface

To create a subinterface on an Ethernet or port-channel interface:

  1. Bring up the parent interface and ensure it is configured as a routed port.
    router(config)# interface Ethernet1/1
    router(config-if-Et1/1)# no switchport
    router(config-if-Et1/1)# no shutdown

     

  2. Configure a VLAN on the subinterface. The encapsulation dot1q vlan command is also used for VLAN translation. Still, it associates a VLAN with the subinterface in this context.
    router(config-if-Et1/1)# interface Ethernet1/1.1
    router(config-if-Et1/1.1)# encapsulation dot1q vlan 100

     

  3. Configure an IP address on the subinterface (optional) and ensure it is up.
    router(config-if-Et1/1)# ip address 10.0.0.1/24
    router(config-if-Et1/1)# no shutdown
    router(config-if-Et1/1)#