To transport packets between VLANs, you must use a Layer 3 device, which must use a physical or logical connection to each VLAN.
Layer 2 (Flat) Network:
A network with all nodes in a single broadcast domain. Multiple broadcast domains may exist on a single Layer 2 device in the form of multiple VLANs.
Multi-Layer Switch (MLS)
A powerful switch capable of performing both Layer 2 and Layer 3 traffic forwarding.
Switched Virtual Interface (SVI)
Multilayer switches can assign Layer 3 (IP) addresses to physical interfaces. Multilayer switches can also assign IP addresses to a logical interface that represents an entire VLAN. This is called a switched virtual interface (SVI). Hosts within a VLAN will use their configured SVI to communicate outside of their local broadcast domains.
Inter-VLAN routing may be performed in four ways:
Separate Physical Connections:
Using a physical link between a Layer 2 device and Layer 3 device for each VLAN.
Note: This configuration is possible, but impractical because it cannot scale.
Router-on-a-Stick:
Using a Layer 2 device, a Layer 3 device, and logical sub-interfaces.
Note: This configuration scales to suit the needs of a single site, but cannot handle the traffic of medium or large networks.
MLS with SVIs
Multi-Layer Switches internally create a logical interface with both Layer 2 and Layer 3 functions.
MLS with Routed Interfaces
Using routed (Layer 3) interfaces, Multi-Layer Switches can traffic VLAN frames to remote networks.
Types of Interfaces
Switch Ports (Layer 2)
Routed Ports (Layer 3)
Switch Virtual Interfaces (SVI)
Configuring Inter-VLAN Routing
Layer 2 Port Configuration
If an interface is in Layer 3 mode and you need to reconfigure it for Layer 2 functionality instead, use the following interface configuration command
Switch(config-if)# switchport
The switchport command puts the port in Layer 2 mode. Once the switchport command has been issued, the interface can then be configured as an access switch port or trunk switch port for a particular VLAN or group of VLANs.
Layer 3 Port Configuration
Physical switch ports also can operate as Layer 3 interfaces, where a Layer 3 network address is assigned and routing can occur. You must explicitly configure switch ports to enable Layer 3 functionality with the following command sequence:
Switch(config)# interface type member/module/number
Switch(config-if)# no switchport
Switch(config-if)# ip address ip-address mask [secondary]
The no switchport command takes the port out of Layer 2 operation. From there, you can assign a network address to the port (as if it were a router interface).
SVI Port Configuration
On a multilayer switch, you can enable Layer 3 functionality for an entire VLAN, using an SVI. When configured in this way, a network (IP) address is assigned to the logical SVI interface. This is useful when the switch has many ports assigned to a common VLAN, and inter-VLAN routing is needed.
The logical Layer 3 interface is known as an SVI, but is configured using the more intuitive vlan vlan-id command syntax. To configure an SVI and give Layer 3 functionality to it, issue the following commands:
Switch(config)# interface vlan vlan-id
Switch(config-if)# ip address ip-address mask [secondary]
The VLAN must be defined and active on the switch before the SVI may be used. In addition, it must be issued the no shut command to be placed in the enabled (up/up) state.