Monday, December 13, 2010

Routing Between VLANs, Best Cisco CCNA Training Institute in Delhi Gurgaon

Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192


Routing Between VLANs
Routing is the process of determining where to send data packets destined for addresses
outside of the local network. Routers gather and maintain routing information to enable the
transmission and receipt of data packets. For traffic to cross from one VLAN to another, a
Layer 3 process is necessary.
This section describes the operation of inter-VLAN routing using a router on a stick.
Understanding Inter-VLAN Routing
Inter-VLAN communication occurs between broadcast domains via a Layer 3 device. In a
VLAN environment, frames are switched only between ports within the same broadcast
domain. VLANs perform network partitioning and traffic separation at Layer 2. Inter-
VLAN communication cannot occur without a Layer 3 device, such as a router. Use IEEE
802.1Q to enable trunking on a router subinterface.
Example: Router on a Stick
Figure 2-31 illustrates a router attached to a core switch. The configuration between a router
and a core switch is sometimes referred to as a router on a stick.
Figure 2-31 Router on a Stick
The router can receive packets on one VLAN and forward them to another VLAN. To
perform inter-VLAN routing functions, the router must know how to reach all VLANs
being interconnected. Each VLAN must have a separate connection on the router, and you
must enable 802.1Q trunking on those connections. The router already knows about
directly connected networks. The router must learn routes to networks to which it is not
directly connected.
10.1.1.2
VLAN 1 VLAN 2
802.1Q
Router on
a Stick
10.2.2.2
Routing Between VLANs 65
To support 802.1Q trunking, you must subdivide the physical FastEthernet interface of the
router into multiple, logical, addressable interfaces, one per VLAN. The resulting logical
interfaces are called subinterfaces. This is illustrated in Figure 2-32.
Figure 2-32 Subinterfaces
Without this subdivision, you would have to dedicate a separate physical interface to each
VLAN.
Example: Subinterfaces
In the figure, the FastEthernet 0/0 interface is divided into multiple subinterfaces:
FastEthernet 0/0.1, FastEthernet 0/0.2, and FastEthernet 0/0.3.
Configuring Inter-VLAN Routing
To be able to route between VLANs on a switch, you will need to be able to configure inter-
VLAN routing.
In Figure 2-33, the FastEthernet 0/0 interface is divided into multiple subinterfaces:
FastEthernet 0/0.1 and FastEthernet 0/0.2. Each subinterface represents the router in each
of the VLANs for which it routes.
Figure 2-33 Inter-VLAN Routing Configuration
Use the encapsulation dot1q vlan identifier command (where vlan identifier is the VLAN
number) on each subinterface to enable 802.1Q encapsulation trunking. The subinterface
number does not have to be the same as the dot1Q VLAN number. However, management
is easier when the two numbers are the same.
FastEthernet0/0.1
FastEthernet0/0
FastEthernet0/0.2
FastEthernet0/0.3
10.1.1.2
VLAN 1 VLAN 2
Fa0/0
802.1Q
10.2.2.2
interface fastethernet 0/0
ip address 10.1.1.1 255.255.255.0
interface fastethernet 0/0.2
ip address 10.2.2.1 255.255.255.0
encapsulation dot1q 2
66 Chapter 2: Medium-Sized Switched Network Construction
The native VLAN frames in 802.1Q do not carry a tag. Therefore, the native VLAN
subinterface is configured with the encapsulation dot1Q vlan identifier native command.
Ensure that the VLAN assigned to the native VLAN subinterface matches the native VLAN
on the switch it connects to. Each subinterface will have a unique IP address for the VLAN
it is associated with. This address will be used as the gateway address for workstations in
that VLAN.
Summary of Routing Between VLANs
This list that follows summarizes the key points that were discussed in this section.
■ Inter-VLAN routing using a router on a stick utilizes an external router to pass traffic
between VLANs.
■ A router on a stick is configured with a subinterface for each VLAN and 802.1Q trunk
encapsulation.

No comments:

Post a Comment