Content

| 4.2 |  | Configuring Inter-VLAN Routing |
| 4.2.5 |  | Configuring the router for the native VLAN |

With IOS 12.1(3)T and later, the subinterface of the router can be configured as the native VLAN.

Layer 2 Switch Commands:

> Switch(config)#interface vlan 10
> Switch(config-if)#description Management VLAN 10
> Switch(config-if)#ip address 192.168.10.2 255.255.255.0
> Switch(config-if)#no shutdown

> Switch(config)#interface fa 0/1
> Switch(config-if)#switchport mode trunk
> Switch(config-if)#switchport trunk native vlan 1

Router Commands:

> Router(config)#interface fa 0/0.1
> Router(config-subif)#description Control Traffic VLAN 1
> Router(config-subif)#encapsulation dot1q 1 native
> Router(config-subif)#ip address 192.168.1.1 255.255.255.0

> Router(config)#interface fa 0/0.10
> Router(config-subif)#description Management VLAN 10
> Router(config-subif)#encapsulation dot1q 10
> Router(config-subif)#ip address 192.168.10.1 255.255.255.0

> Router(config)#interface fa 0/0.20
> Router(config-subif)#description Engineering VLAN 20
> Router(config-subif)#encapsulation dot1q 20
> Router(config-subif)#ip address 192.168.20.1 255.255.255.0

> Router(config)#interface fa 0/0.30
> Router(config-subif)#description Marketing VLAN 30
> Router(config-subif)#encapsulation dot1q 30
> Router(config-subif)#ip address 192.168.30.1 255.255.255.0

The native option tells the router to accept any frames coming in untagged on fastethernet 0/0 as belonging to VLAN 1.

Prior to IOS 12.1(3)T the native VLAN had to be configured on the physical interface of the router.

> Router(config)#interface fa 0/0
> Router(config-if)#description VLAN 1
> Router(config-if)#ip address 192.168.10.1 255.255.255.0

> Router(config)#interface fa 0/0.10
> Router(config-subif)#description Management VLAN 10
> Router(config-subif)#encapsulation dot1q 10
> Router(config-subif)#ip address 192.168.91.1 255.255.255.0

> Router(config)#interface fa 0/0.20
> Router(config-subif)#description Engineering VLAN 20
> Router(config-subif)#encapsulation dot1q 20
> Router(config-subif)#ip address 192.168.20.1 255.255.255.0

> Router(config)#interface fa 0/0.30
> Router(config-subif)#description Marketing VLAN 30
> Router(config-subif)#encapsulation dot1q 30
> Router(config-subif)#ip address 192.168.30.1 255.255.255.0