IP Routing in the LAN

VLAN Routing with Router 802.1Q Trunks
  • Use a router, with one router LAN interface and cable connected to the switch for each and every VLAN (typically not used)
  • Use a router, with a VLAN trunk connecting to a LAN switch (known as router-on-a-stick, or ROAS)
  • Use a Layer 3 switch with switched virtual interfaces (SVI)
  • Use a Layer 3 switch with routed interfaces (which may or may not be Layer 3 EtherChannels)

Configuring ROAS

  • Step 1. Use the interface type number.subint command in global configuration mode to create a unique subinterface for each VLAN that needs to be routed.
  • Step 2. Use the encapsulation dot1q vlan_id command in subinterface configuration mode to enable 802.1Q and associate one specific VLAN with the subinterface.
  • Step 3. Use the ip address address mask command in subinterface configuration mode to configure IP settings (address and mask).

Example 17–1 Router Configuration for the 802.1Q Encapsulation Shown in Figure 17–2

B1#show running-config ! Only pertinent lines shown interface gigabitethernet 0/0 ! No IP address up here! No encapsulation up here! ! interface gigabitethernet 0/0.10 encapsulation dot1q 10 ip address 10.1.10.1 255.255.255.0 ! interface gigabitethernet 0/0.20 encapsulation dot1q 20 ip address 10.1.20.1 255.255.255.0
  • Configure the ip address command on the physical interface, but without an encapsulation command; the router considers this physical interface to be using the native VLAN.
  • Configure the ip address command on a subinterface and use the encapsulation dot1q vlan-id native subcommand to tell the router both the VLAN ID and the fact that it is the native VLAN.

Example 17–2 Router Configuration Using Native VLAN 10 on Router B1

! First option: put the native VLAN IP address on the physical interface interface gigabitethernet 0/0 ip address 10.1.10.1 255.255.255.0 ! interface gigabitethernet 0/0.20 encapsulation dot1q 20 ip address 10.1.20.1 255.255.255.0! Second option: like Example 17-1, but add thenative keyword interface gigabitethernet 0/0.10 encapsulation dot1q 10 native ip address 10.1.10.1 255.255.255.0 ! interface gigabitethernet 0/0.20 encapsulation dot1q 20 ip address 10.1.20.1 255.255.255.0

Verifying ROAS

Example 17–3 Connected Routes Based on Example 17–1 Configuration

B1#show ip route connected Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP ! Legend omitted for brevity 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks C 10.1.10.0/24 is directly connected, GigabitEthernet0/0.10 L 10.1.10.1/32 is directly connected, GigabitEthernet0/0.10 C 10.1.20.0/24 is directly connected, GigabitEthernet0/0.20 L 10.1.20.1/32 is directly connected, GigabitEthernet0/0.20

Example 17–4 Subinterface State Tied to Physical Interface State

B1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. B1(config)#interface g0/0 B1(config-if)#shutdown B1(config-if)#^Z B1#show ip interface brief | include 0/0 GigabitEthernet0/0 unassigned YES manual administratively down down GigabitEthernet0/0.10 10.1.10.1 YES manual administratively down down GigabitEthernet0/0.20 10.1.20.1 YES manual administratively down down

Example 17–5 Sample shows VLANs Command to Match Sample Router Trunking Configuration

R1#show vlans Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0 Protocols Configured: Address: Received: Transmitted: Other 0 83 69 packets, 20914 bytes input 147 packets, 11841 bytes output Virtual LAN ID: 10 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0.10 This is configured as native Vlan for the following interface(s) : GigabitEthernet0/0 Native-vlan Tx-type: Untagged Protocols Configured: Address: Received: Transmitted: IP 10.1.10.1 2 3 Other 0 1 3 packets, 722 bytes input 4 packets, 264 bytes output Virtual LAN ID: 20 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0.20 Protocols Configured: Address: Received: Transmitted: IP 10.1.20.1 0 134 Other 0 1 0 packets, 0 bytes input 135 packets, 10498 bytes output

Troubleshooting ROAS

  1. Is each non-native VLAN configured on the router with an encapsulation dot1q VLAN-id command on a subinterface?
  2. Do those same VLANs exist on the trunk on the neighboring switch (show interfaces trunk), and are they in the allowed list, not VTP pruned, and not STP blocked?
  3. Does each router ROAS subinterface have an IP address/mask configured per the planned configuration?
  4. If using the native VLAN, is it configured correctly on the router either on a subinterface (with an encapsulation dot1q VLAN-id native command) or implied on the physical interface?
  5. Is the same native VLAN configured on the neighboring switch’s trunk in comparison to the native VLAN configured on the router?
  6. Are the router physical or ROAS subinterfaces configured with a shutdown command?

--

--

At ITExamtools.com we help IT students and Professionals by providing important info. about latest IT Trends & for selecting various Academic Training courses.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Itexamtools

At ITExamtools.com we help IT students and Professionals by providing important info. about latest IT Trends & for selecting various Academic Training courses.