Documente Academic
Documente Profesional
Documente Cultură
21 – Aaron Balchunas 1
- Multilayer Switching -
Routing Between VLANs
By default, a switch will forward both broadcasts and multicasts out every
port but the originating port. However, a switch can be logically segmented
into separate broadcast domains, using Virtual LANs (or VLANs).
Each VLAN represents a unique broadcast domain:
• Traffic between devices within the same VLAN is switched.
• Traffic between devices in different VLANs requires a Layer-3
device to communicate.
There are three methods of routing between VLANs. The first method
involves using an external router with a separate physical interface in each
VLAN. This is the least scalable solution, and impractical for environments
with a large number of VLANs:
The second method involves using an external router with a single trunk
link to the switch, over which all VLANs can be routed. The router must
support either 802.1Q or ISL encapsulation. This method is known as
router-on-a-stick:
The final method involves using a multilayer switch, which supports both
Layer-2 and Layer-3 forwarding:
Configuring Router-on-a-Stick
Consider the following router-on-a-stick example:
SwitchA
gi0/1 gi1/10
< Trunking VLANs 101,102 >
gi1/14 gi1/15
RouterA
HostA HostB
VLAN 101 VLAN 102
HostA HostB
VLAN 101 VLAN 102
A routed port behaves exactly like a physical router interface, and is not
associated with a VLAN. The no switchport command configures an
interface as a routed port, allowing an IP address to be assigned:
Switch(config)# interface gi1/20
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.101.101.1 255.255.255.0
SVIs are the most common method of configuring inter-VLAN routing. The
logical VLAN interface will not become online unless:
• The VLAN is created.
• At least one port is active in the VLAN.
***
All original material copyright © 2014 by Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
Multilayer Switching v1.21 – Aaron Balchunas 5
The IP address on each SVI represents the gateway for hosts on each
VLAN. The two networks will be added to the routing table as directly
connected routes.
Remember: an SVI requires at least one port to be active in the VLAN:
SwitchA(config)# interface gi1/14
SwitchA(config-if)# switchport mode access
SwitchA(config-if)# switchport access vlan 101
SwitchA(config-if)# no shut
***
All original material copyright © 2014 by Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
Multilayer Switching v1.21 – Aaron Balchunas 7
***
All original material copyright © 2014 by Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.
Multilayer Switching v1.21 – Aaron Balchunas 8
The most specific entries are installed at the top of the table. Note that each
FIB entry contains the following information:
• The destination prefix
• The destination mask
• The next-hop address
• The local interface where the next-hop exists
***
All original material copyright © 2014 by Aaron Balchunas (aaron@routeralley.com),
unless otherwise noted. All other material copyright © of their respective owners.
This material may be copied and used freely, but may not be altered or sold without the expressed written
consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.