Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

routing over VLANs

Hi

Can anybody please explain why would one need a layer 3 switch/router to route between multiple VLANs??

For instance, let's say you have 2 switchs A and B. A and B have 2 VLANs each. Now I connect A and B with a trunk link. Wouldn't the trunking protocol take care of delivering the frames to the appropriate destinations?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: routing over VLANs

Hi Friend,

Yes in my example you do not need a trunk but I tried to explain how source mac address will be carried in same vlan between 2 switches.

Layer 2 switc will not maintain a forwarding table but will only maintain a cam table which has all mac addresses listed with interface id and vlan also. Switches maintain cam table per vlan basis so any machine in vlan 1 will not be able to talk to machine in vlan 2 without a routing capable device which maintain a forwarding table.

HTH

Ankur

*Pls rate all helpfull post

6 REPLIES
Cisco Employee

Re: routing over VLANs

Hi Friend,

The functionality of trunk links is to carry multiple vlans from one switch to another which access link cannot because when data passes from access link it does not have any tag but when data passes trunk link it carries vlan tag with data which identifies the data when it reaches other switch.

But it never let data of one vlan to move into other vlan so you need a router or layer 3 switch which can route between vlans changing the mac addresses in frame and vlan tag.

HTH

Ankur

*Pls rate all helpfull post

Community Member

Re: routing over VLANs

Thanks for the feedback.

The key phrase here is "changing the mac addresses in frame", which I did not realize at first.

looking here at the ethernet frame:

http://upload.wikimedia.org/wikipedia/commons/1/13/Ethernet_Type_II_Frame_format.svg

When a frame gets from switch A to B the source MAC will be of the interface from which the frame left at switch A. Therefore switch B will never know the actual source, requiring a help of a smarter device to handle the hassle.

did I get the picture right?

Thanks

Cisco Employee

Re: routing over VLANs

Hi Friend,

Till the time frame exist in same vlan no matter on which switch and number of switch it passes by source mac address will never change and will always be of the source device which generated data. It will never be of the interface from which the frame left switch A.

Let's say you have machine 1 on vlan 1 connected to swith A which generated some data for machine 2 on vlan 1 on switch B. The source mac address will always be of machine 1 and destination mac address will always be of machine 2. Even when data will leave switch A and reach switch B source and destination mac address will not change.

HTH

Ankur

*Pls rate all helpfull post

Community Member

Re: routing over VLANs

aha

ok, so using your example, where switch A has vlan1 and switch B has vlan1, how would you connect the two?

I would guess that you probably do not need a trunk link for this case.

My confusion is that switch would keep a forwarding table, associating an interface to a MAC. But since when you connect a switch to a switch, one interface should be associated with multiple MACs.

Cisco Employee

Re: routing over VLANs

Hi Friend,

Yes in my example you do not need a trunk but I tried to explain how source mac address will be carried in same vlan between 2 switches.

Layer 2 switc will not maintain a forwarding table but will only maintain a cam table which has all mac addresses listed with interface id and vlan also. Switches maintain cam table per vlan basis so any machine in vlan 1 will not be able to talk to machine in vlan 2 without a routing capable device which maintain a forwarding table.

HTH

Ankur

*Pls rate all helpfull post

Community Member

Re: routing over VLANs

ok I got the full picture.

Many thanks for the explanation.

148
Views
0
Helpful
6
Replies
CreatePlease to create content