1. Inter-VLAN Routing
1.1 Whats is Inter-VLAN Routing?
Process of forwarding network traffic from
one VLAN to another VLAN using routing is known as inter-VLAN routing. L3
operation that can to done in tree way form.
1.2 Inter-Vlan routing Type:
·
Legacy: A router with many interfaces each interface own a VLAN ID and the
router takes the task to forwarding frame to VLAN ID destination.
·
Router-on-stick: Switch connected to a
router with only one interface configured as trunk. The router performs
inter-VLAN routing by accepting VLAN-tagged traffic. The internal routing is
accomplished using subinterfaces. (Software-based virtual interfaces).
·
Multilayer-switch: Multilayer switches
can perform Layer 2 and Layer 3 functions, replacing the need for dedicated routers.
Multilayer switches support dynamic routing and inter-VLAN routing.
2. Configure Legacy Inter-VLAN Routing
2.1 switch configuration
Each of its physical interfaces connected:
-
Unique VLAN
-
And IP address for the subnet
associated with the particular VLAN to which it is connected.
Devices use the interface IP as a gateway
to access the devices connected to the other VLANs.
The routing process requires the source
device to determine if the destination device is local or remote to the local
subnet. Done by comparing the source and
destination IP addresses against the subnet.
|
|
S1(config)#vlan 10
S1(config-vlan)#vlan 30
S1(config-vlan)#interface f0/11
S1(config-if)#switchport access vlan 10
S1(config-if)#interface f0/4
S1(config-if)#switchport access vlan 10
S1(config-if)#interface f0/6
S1(config-if)#switchport access vlan 30
S1(config-if)#interface f0/5
S1(config-if)#switchport access vlan 30
S1(config-if)#end
|
2.2 router configuration
The process is repeated for all router
interfaces. Each router interface must be assigned to a unique subnet for
routing to occur.
After
the IP addresses are assigned to the physical interfaces and the interfaces
are enabled, the router is capable of performing inter-VLAN
Routing table using the show ip route.
|
R1(config)#interface g0/0
R1(config-if)#ip address 172.17.10.1
255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface g0/1
R1(config)#ip address 172.17.30.1
255.255.255.0
R1(config)#no shutdown
R1(config)#end
|
3. Configure Router-on-a-Stick
Inter-VLAN Routing
3.1 Switch configuration
This technique is termed router-on-a-stick
and uses virtual subinterfaces on the router to overcome the hardware
limitations based on physical router interfaces.
Each subinterface is configured
independently with its own IP address and subnet mask.
The physical interface of the router must
be connected to a trunk link on the adjacent switch
|
|
S1(config)#vlan 10
S1(config-vlan)#vlan 30
S1(config-vlan)#interface f0/5
S1(config-if)#switchport mode trunk
S1(config-if)#end
Note: The router does not
support the Dynamic Trunking Protocol (DTP), which is used by switches, so
the following commands cannot be used: S1(config-if)#switchport mode dynamic
auto
S1(config-if)#switchport mode dynamic
desirable.
|
3.2 Configure Router-on-a-Stick: Router
Subinterface Configuration
Individual subinterfaces can be
administratively shut down with the shutdown command.
By default, Cisco routers are configured
to route traffic between local subinterfaces.
R1# show vlans
Verify:
Ping: End to end device ICMP pakets
Traceroute: Hops information path+ICMP
|
R1(config)#interface g0/0.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 172.17.10.1
255.255.255.0
R1(config-subif)#interface g0/0.30
R1(config-subif)#encapsulation dot1q 30
R1(config-subif)#ip address 172.17.30.1
255.255.255.0
R1(config)#interface g0/0
R1(config-if)#no shutdown
|
4. Troubleshoot Inter-VLAN Routing
4.1 Switch Port Issues
- Legacy:
verify the correct VLAN on all interfaces
- Router-on-a-Stick:
Verify connection between switch and router is correctly set on mode trunk.
Verify the entire path correctly setup VLAN
to reach the router final destination.
4.2 Verify Switch Configurations
S1#show interfaces interface-id switchport
S1#show running-config
Verify :
-Administrative mode:
-Access mode vlan:
4.3 Interface Issues
Verify: Physical router interface is not in
wrong switch port.
4.4 Verify Router Configurations
With router-on-a-stick configurations, a
common problem is assigning the wrong VLAN ID to the subinterface. Using the show interfaces and the show running-config commands can be
useful in troubleshooting this type of issue, as shown in the figure.
Verify correct setup: encapsulation dot1q
(correct vlan). Shows up with show
interfaces and show run
4.5 IP Addressing Issues - IP Address and
Subnet Mask
Each interface, or subinterface, must be
assigned an IP address corresponding to the subnet to which it is connected.
R1# show ip interface
5. Layer 3 switching
5.1 Introduction to Layer 3 Switching
Layer 3 switches usually have
packet-switching throughputs in the millions of packets per second (pps),
whereas traditional routers provide packet switching in the range of 100,000
pps to more than 1 million pps.
All Catalyst multilayer switches support
the following types of Layer 3 interfaces:
-
Routed port: Layer 3 port
-
Switch Virtual Interface (SVI): A
virtual VLAN interface for inter-VLAN routing
High-performance switches (Layer 3 + Cisco
Express Forwarding):
- Catalyst 6500
- Catalyst 4500
Catalyst 2960 : IOS < 12.2(55) support
Static routing.
All members of the Catalyst 3560 and 4500
families of switches use Layer 2 interfaces by default.
Members of the Catalyst 6500 family of
switches running Cisco IOS use Layer 3 interfaces by default
5.2 Inter-VLAN Routing with Switch Virtual
Interfaces
In the early days speed of switchs
prompted designer to extend layer 2 to access, distribution and core layer. This
topology created loop issues. To solve these issues, spanning-tree
technologies were used to prevent loops while still enabling flexibility and
redundancy in inter-switch connections.
Today, routing can be performed at
hardware speed. One consequence of this evolution is that routing can be
transferred to the core and the distribution layers without impacting network
performance.
Users on VLAN and on different subnets
are routed with distribution switches as Layer 3 gateways.
Every VLAN have this own IP address.
|
|
||
By default, an SVI is created for the
default VLAN (VLAN 1) to permit remote switch administration
|
|||
Whenever the SVI is created, ensure that
particular VLAN is present in the VLAN database
|
Reasons to configure SVI:
·
To provide a gateway for a VLAN
so that traffic can be routed into or out of that VLAN
·
To provide Layer 3 IP
connectivity to the switch
·
To support routing protocol and
bridging configurations
Advantages of SVIs (the only disadvantage
is that multilayer switches are more expensive):
·
It is much faster than
router-on-a-stick, because everything is hardware switched and routed.
·
No need for external links from
the switch to the router for routing.
·
Not limited to one link. Layer
2 EtherChannels can be used between the switches to get more bandwidth.
·
Latency is much lower, because
it does not need to leave the switch.
5.3 Inter-VLAN Routing with Routed Ports
Routed Ports and Access Ports on a Switch
Routed is a physical port that acts like
an interface in router.
Routed port is not associated with a
particular VLAN
Layer 2 functionality has been removed
(STP)
Routed ports on a Cisco IOS switch do not
support subinterfaces.
Routed ports are used for point-to-point
links.
configure routed ports:
S1(config-if)#no switchport
|
|
Following are some of the advantages of
routed ports: A multilayer switch can
have both SVI and routed ports in a single switch. Multilayer switches forward
either Layer 2 or Layer 3 traffic in hardware, helping to perform routing
faster.
Note: Routed ports are not supported on
Catalyst 2960 Series switches.
|
A Catalyst 2960 switch can function as a
Layer 3 device and route between VLANs and a limited number of static routes.
The Cisco Switch Database Manager (SDM)
provides multiple templates for the 2960 switch. The templates can be enabled
to support specific roles depending on how the switch is used in the network.
For example, the sdm lanbase-routing template can be enabled to allow the
switch to route between VLANs and to support static routing.
show sdm prefer
The SDM template can be changed in global
configuration mode with the sdm prefer
command.
Enabling routing IPv4 routing functionality
on a 2960
S1(config)#interface f0/6
S1(config-if)#switchport access vlan 2
S1(config-if)#interface vlan 1
S1(config-if)#ip address 192.168.1.1
255.255.255.0
S1(config-if)#interface vlan 2
S1(config-if)#ip address 192.168.2.1
255.255.255.0
S1(config-if)#no shutdown
IPv4:S1(config)#ip routing
IPv6:S1(config)# ipv6 unicast-routing
Verify:
Show ip route
|
|





No hay comentarios:
Publicar un comentario