cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1139
Views
0
Helpful
15
Replies

Can computer A talks to Computer B?

guo6688
Level 1
Level 1

Maybe this is stupid question. But I really need you help. Please see attachment. Can computer A talks to computer B? If yes or no, please give explanation. Thanks.

1 Accepted Solution

Accepted Solutions

Absolutely A should be able to talk to B. This question confuses many people, but if the link between Sw1 and Sw2 is NOT a trunk, then A can talk to B.

Why? Okay, when A wants to talk to B it does a calculation and finds that B is on the same subnet. So, A would then ARP for B. The ARP comes into SW1 on Vlan8, thus SW1 would broadcast the ARP out all interfaces in Vlan8 (including the connection to SW2 if it is not a trunk, thus untagged). So, then the ARP comes into Vlan9 in SW2 (keep in mind it is not tagged since this is an access link). SW2 will then broadcast the ARP to all interfaces in Vlan9, which would include computer B. The reply would flow in a similar fashion.

See the attachment. Hope this helps,

Ryan

View solution in original post

15 Replies 15

Leo Laohoo
Hall of Fame
Hall of Fame

Nope because the link between switch 1 & 2 are on different VLANs.

You can get it to work by making this a Trunk link and allowing the two vlans.

Thank you for your quick reply. But my question is why this different VLAN interconnection can prevent their communication. Please see attachement. I put a hub in between. So the computer A can talks to computer C. Computer B can talks to computer c as well. What mechanism (vtp, stp or else?) prevent computer A from talking computer B?

Computer C can talk to A because the data packet is tagged with VLAN 8. VLAN C can talk to B because data packet is also tagged with VLAN 9.

Computer B can't talk to A (and vice versa) because their data packet tagging is not the same. It's like talking to your office mate when you can speak Cantonese and your office mate can only speak in German.

If you want Computer A & B to talk to each other, you can either make one of the switch have the same VLAN or you configure VLAN Trunking.

Creating Ethernet VLANs on Catalyst Switches

http://www.cisco.com/en/US/tech/tk389/tk689/technologies_configuration_example09186a008009478e.shtml

Thank you very much, Leolaohoo.

From my understanding when the frame enter switch it is tagged by VLAN NO and when it exit switch the VLAN tag is removed. Therefore I think when computer B talks to computer A, its frame has no VLAN tag 9 when it exits switch 2. And when the frame enters switch 1, it retages with VLAN 8. This is similar to computer C talking to computer A. My point is when the frame leaves the switch the VLAN tag is removed. Is this correct?

Thank you again. I am thinking this for long time. But still not clear.

See below, sorry I replied to wrong remark.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Is the link between switches 1 and 2 configured as a VLAN trunk on either/both switches?

Absolutely A should be able to talk to B. This question confuses many people, but if the link between Sw1 and Sw2 is NOT a trunk, then A can talk to B.

Why? Okay, when A wants to talk to B it does a calculation and finds that B is on the same subnet. So, A would then ARP for B. The ARP comes into SW1 on Vlan8, thus SW1 would broadcast the ARP out all interfaces in Vlan8 (including the connection to SW2 if it is not a trunk, thus untagged). So, then the ARP comes into Vlan9 in SW2 (keep in mind it is not tagged since this is an access link). SW2 will then broadcast the ARP to all interfaces in Vlan9, which would include computer B. The reply would flow in a similar fashion.

See the attachment. Hope this helps,

Ryan

So are you saying that A can ping B even though they are on different VLANs and the interlink is NOT a trunk?

Exactly right. Because the link is not a trunk, SW2 isnt aware of which VLAN A is in, and vice versa.

Tagging only occurs on trunk links, and thus the two switches have no idea what VLAN's exist on eachother.

VLAN tags are stripped when traffic leaves a switchport.

If the addressing is correct for the function, traffic passes.

Just to clarify...

VLAN tags are stripped when traffic leaves an access port.

Hi Ryan,

As per my understanding there is no tag involved here but CAM table has 3 entries MAC, VLAN, Port on the basis of which it switches.

I agree with ur nice explnation that when A wants to talk to B and sends out an ARP and it reaches switch 2 vlan 9. Host B on switch 2 in vlan 9 answers that ARP.

Sw2 have entry of host B MAC with vlan 9. When sw2 pass this info to sw1 that MAC address of B (mapped to IP)is on vlan 9.

after all this learning Switch 1 has to decide it has A MAC in vlan 8 and it has MAC of B with VLAN 9.

Now my question is will Switch 1, switch this frame or do something else as MAC match but not the Vlanin the CAM.

Your understanding is close.

"Sw2 have entry of host B MAC with vlan 9"

ANS: True, Sw2 sees the MAC of B in Vlan9.

"When sw2 pass this info to sw1 that MAC address of B (mapped to IP)is on vlan 9."

ANS: Not quite. The ARP reply leaves Sw2 (vlan9 interface to SW1), but is not tagged. So, when the frame arrives at SW1 it comes in on Vlan8, thus SW1 adds MAC entry for B to Vlan8.

"after all this learning Switch 1 has to decide it has A MAC in vlan 8 and it has MAC of B with VLAN 9"

ANS: Nope, they are both in Vlan8 on Sw1 and both in Vlan9 on Sw2. This is referred to as bridging Vlans, and can have some serious negative consequences as you have now merged two different broadcast domains.

"Now my question is will Switch 1, switch this frame or do something else as MAC match but not the Vlan in the CAM."

ANS: As per my answers above, Sw1 will switch traffic just the way a switch should. So, since both MAC's are in Vlan8 on SW1, then it will switch frames from A to SW2. SW2 has both MAC's in Vlan9 and thus would switch this traffic to B.

I hope I am making this clear. If not, lab this up and sniff traffic between the two switches and you shall see.

All mates, thank you for your answers and explanations. This is very tricky question and I really met this situation in real environment and felt very interesting. My personal view is same as rpfinneran. But in order to verify lab may need to be setup for testing.

Anyway, thank you all and happy Easter!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco