InterVLAN Routing

This chapter provides information and commands concerning the following topics:

• Configuring Cisco Express Forwarding (CEF)

• Verifying CEF

• Troubleshooting CEF

• Inter-VLAN communication using an external router: router-on-a-stick

• Inter-VLAN communication tips

• Inter-VLAN communication on a multilayer switch through a switch virtual interface

— Removing L2 switchport capability of a switch port

— Configuring inter-VLAN communication

Configuring Cisco Express Forwarding

Switch(config)#ip cef

Enables standard CEF

Switch(config)#ip cef distributed

Enables distributed CEF (dCEF)

Switch(config)#no ip cef

Disables CEF globally

Switch(config)#interface fastethernet 0/1

Moves to interface configuration mode

Switch(config-if)#ip route-cache cef

Enables CEF on the interface

Verifying CEF

Switch#show ip cef

Displays entries in the Forwarding Information Base (FIB)

Switch#show ip cef summary

Displays a summary of the FIB

Switch#show ip cef unresolved

Displays unresolved FIB entries

Switch#show ip cef fastethernet 0/1

Displays the FIB entry for the specified interface

Switch#show ip cef fastethernet 0/1 detail

Displays detailed information about the FIB for the interface

Switch#show interface fastethernet 0/1 | begin L3

Displays switching statistics for the interface beginning at the section for L3

Switch#show interface gigabitethernet 1/1 | include switched

Displays switching statistics that show statistics for each layer

Switch#show adjacency fastethernet 0/20 detail

Displays the content of the information to be used during L2 encapsulation

Switch#show cef drop

Display packets that are dropped because adjacencies are incomplete or nonexistent

Switch#show ip interface vlan10

Verifies whether CEF is enabled on an interface

Troubleshooting CEF

Switch#debug ip cef

Displays debug information for CEF

Switch#debug ip cef drop

Displays debug information about dropped packets

Switch#debug ip cef access-list x

Displays information from specified access lists

Switch#debug ip cef receive

Displays packets that are not switched using information from the FIB but that are received and sent to the next switching layer

Switch#debug ip cef events

Displays general CEF events

Inter-VLAN Communication Using an External Router: Router-on-a-Stick 45

Switch#debug ip cef prefix-ipc

Displays updates related to IP prefix information

Switch#debug ip cef table

Produces a table showing events related to the FIB table

Switch#ping ip

Performs an extended ping

Inter-VLAN Communication Using an External Router: Router-on-a-Stick

Router(config)#interface fastethernet 0/0

Moves to interface configuration mode

Router(config-if)#duplex full

Sets interface to full duplex

Router(config-if)#no shutdown

Enables interface

Router(config-if)#interface fastethernet 0/0.1

Creates subinterface 0/0.1 and moves to subinterface configuration mode

Router(config-subif)#description Management VLAN 1

(Optional) Sets locally significant descriptor of the subinterface

Router(config-subif)#encapsulation dotlq 1 native

Assigns VLAN 1 to this subinterface. VLAN 1 will be the native VLAN. This subinterface will use the 802.1Q trunking protocol.

Router(config-subif)#ip address 192.168.1.1 255.255.255.0

Assigns IP address and netmask

Router(config-subif)#int fastethernet 0/0.10

Creates subinterface 0/0.10 and moves to subinterface configuration mode

Router(config-subif)#description Accounting VLAN 10

(Optional) Sets locally significant descriptor of the subinterface

Router(config-subif)#encapsulation dot1q 10

Assigns VLAN 10 to this subinterface. This subinterface will use the 802.1Q trunking protocol.

Router(config-subif)#ip address 192.168.10.1 255.255.255.0

Assigns IP address and netmask

Router(config-subif)#exit

Returns to interface configuration mode

Router(config-if)#exit

Returns to global configuration mode

Router(config)#

NOTE: The subnets of the VLANs are directly connected to the router. Routing between these subnets does not require a dynamic routing protocol. In a more complex topology, these routes would need to either be advertised with whatever dynamic routing protocol is being used, or be redistributed into whatever dynamic routing protocol is being used.

NOTE: Routes to the subnets associated with these VLANs will appear in the routing table as directly connected networks.

+1 0

Post a comment