suppose we have 3 switches that are connected to a router , and we have 3 VLans defined on each switch.
VLan1 connected Hosts are in the range 192.168.1.0/24
VLan2 connected Hosts are in the range 192.168.2.0/24
VLan3 connected Hosts are in the range 192.168.3.0/24
switch A --%26gt; Has VLan1,VLan2 and VLan3 .
switch B --%26gt; Has VLan1,VLan2 and VLan3 .
switch C --%26gt; Has VLan1,VLan2 and VLan3 .
suppose that a host that is connected to switch A through a port that is in VLan1 sent data to a host that is connected to switch C through a port that is in VLan2 . How will the router know on which interface he must forward the data to ?? each interface is connected to a switch that has VLAN2 ??
Does the router - in this situation - keeps the information in its routing table per host ??
I mean , for example :
192.168.2.1 via interface 1
192.168.2.2 via interface 2
192.168.2.3 via interface 3 and so on ..
or does it forward data on each interface??
Hope i cleared my Question
Thanks in advance
Question about VLANS And router on the same environment?
In order for a router to route packets from one vlan to a different vlan on the same interface, the router has to be trunked to the switch using a protocol such as 802.1q.
Using a Cisco router as an example, you would configure a sub-interface for each vlan, and assign an IP address for each sub-interface:
Interface FastEthernet 0/0
no ip address
Interface FastEthernet 0/0.1
IP address 192.168.1.1 255.255.255.0
encapsulation dot1q vlan 1
Interface FastEthernet 0/0.2
IP address 192.168.2.1 255.255.255.0
encapsulation dot1q vlan 2
Interface FastEthernet 0/0.3
IP address 192.168.3.1 255.255.255.0
encapsulation dot1q vlan 3
This is a scenario known as "Router on a stick."
Hope this helps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment