Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Interfaces and Hardware Component Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

VLAN subinterfaces example

Want to summarize with AI?

Log in

This topic provides configuration examples that show how to create VLAN subinterfaces on the Cisco 8000 Series Router, including subinterfaces on a physical Ethernet interface and on an Ethernet bundle.


The following example shows how to create three VLAN subinterfaces at one time:

Router# configure
Router(config)# interface TenGigE 0/2/0/4.1
Router(config-subif)# encapsulation dot1q 100
Router(config-subif)# ipv4 address 10.0.10.1/24
Router(config-subif)# interface TenGigE0/2/0/4.2
Router(config-subif)# encapsulation dot1q 101
Router(config-subif)# ipv4 address 10.0.20.1/24
Router(config-subif)# interface TenGigE0/2/0/4.3
Router(config-subif)# encapsulation dot1q 102
Router(config-subif)# ipv4 address 10.0.30.1/24
Router(config-subif)# commit
Router(config-subif)# exit
Router(config)# exit

Router# show ethernet trunk bundle-Ether 1
Trunk                                Sub types        Sub states
VLAN trunks: 1,
  1 are 802.1Q (Ether)
Sub-interfaces: 3,
  3 are up.
802.1Q VLANs: 3,
  3 have VLAN Ids,

Router# show vlan interface
Interface     St Ly   MTU   Subs   L3       Up   Down  Ad-Down
Te0/2/0/4.1         802.1Q              10  up
Te0/2/0/4.2         802.1Q              20  up
Te0/2/0/4.3         802.1Q              30  up

Router# show vlan trunks brief
BE1           Up L3   1514    1000        0    1000     1000       0       0
Summary                       1000        0    1000     1000       0       0
Te0/2/0/4           802.1Q (Ether)        up

The following example shows how to create two VLAN subinterfaces on an Ethernet bundle:

Router# configure
Router(config)# interface bundle-ether 2
Router(config-if)# ipv4 address 192.168.2.1/24
Router(config-if)# exit
Router(config)# interface bundle-ether 2.1
Router(config-subif)# encapsulation dot1q 100
Router(config-subif)# ipv4 address 192.168.100.1/24
Router(config-subif)# exit
Router(config)# interface bundle-ether 2.2
Router(config-subif)# encapsulation dot1q 200
Router(config-subif)# ipv4 address 192.168.200.1/24
Router(config-subif)# exit
Router(config)# commit