How to Configure Layer 3 Subinterfaces You can configure one or more subinterfaces on a routed interface. Configure the parent interface as a routed interface by using the no switchport command. The parent interface can have its own IP address, policies, and configurations attached to it. Untagged traffic and any tagged traffic or VLAN (not handled by the subinterface) that comes into the port are handled by the parent interface. Procedure Configuring Layer 3 Subinterfaces How to Configure Layer 3 Subinterfaces Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password, if prompted. Step 2 configure terminal Example:
Device# configure terminal Enters global configuration mode. Step 3 interface {type switch / slot / port.subinterface} Example: Device(config)# interface HundredGigabitEthernet 1/0/33.201 Or Device(config)# interface range HundredGigabitEthernet1/0/33.201- HundredGigabitEthernet1/0/33.204 Selects an interface or interface range and enters subinterface configuration mode. (To remove an interface, use the no form of this command.) • You can also specify a range of interfaces along with the associated dot1q VLAN IDs as shown in this example. Step 4 encapsulation dot1q vlan-id [native] Example:
Device(config-subif)# encapsulation dot1q 201 native Configures 802.1Q encapsulation for the subinterface. The range is from 1 to 4000. (To remove 802.1Q encapsulation for the subinterface, use the no form of this command.) • native: To make a subinterface the default handler of untagged packets coming to the port, use this keyword. If you configure this keyword on the subinterface, and IP and other configurations are also configured on the parent interface, this keyword overwrites the configurations on the parent interface. Configure either this keyword on the subinterface or the configurations on the parent interface at a time.
Note shutdown and no shutdown commands can be used to shutdown or reverse the shutdown on a specific subinterface without affecting the VLAN Configuration Guide, Cisco IOS XE 17.16.x (Catalyst 9300 Switches) 101