cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1643
Views
7
Helpful
28
Replies

Lan Switching

Hello,
As per the below diagram I have two switches S1 & S2. Hosts H1 & H2 are connected to the switches and are in different vlan but same subnet. 
So, by default they will not communicate as they are in two different broadcast domain.
To make them communicate either bring both the host in same vlan or add respective vlans on the interface connected between S1 and S2. But, when we do that we have a native vlan mismatch errors.
So, my questions is do we have any other mechanism in which these two hosts can communicate with each other?
Please note we cannot add vlan 20 on S1 and vlan 10 on S2 that's one condition over here.

SupritChinchodikar_0-1712901586703.png

 




2 Accepted Solutions

Accepted Solutions

I agree with my colleagues that in terms ob Best Practice what is suggested in the OP is not a good idea. But the OP is not about Best Practice but is about preparation for Interviews. In that context it is a valid question and it has a simple answer. If the connection S1 to S2 is an access port on both sides then the hosts will communicate without any problem, and without requiring any other configuration. One side calls it vlan 10 while the other side calls it vlan 20. But it does not matter that there are 2 names, there is a single broadcast domain and the hosts will communicate without any problem. It is true that CDP will report a vlan mismatch. But that is a reporting issue and not an operational issue. Since this is preparation for Interview I would not worry about it.

HTH

Rick

View solution in original post

This Q like 3 body problem question of network 

If you know answer then you are in high level of acknowledgement of network 

Let back 

What is make broadcast domain separate 

Vlan 10 is native in sw1 and 

Vlan 20 is native in sw2 

Config the link connect two SW as access 

Then traffic from hostA in SW1 in vlan10 will pass untag to SW2 and SW2 will assume it in vlan20 and flood it to hostB.

If you config trunk between SW then only make native different' in SW1 nativr is vlan10 and in SW2 is vlan20.

The ping success.

Only you need to image how frame pass from hostA to hostB 

MHM

View solution in original post

28 Replies 28

Torbjørn
Spotlight
Spotlight

Is this a production scenario? Is the link between S1 and S2 a routed link?

If they cannot be connected to the same VLAN I would move them into separate subnets and route traffic between the subnets. If this is a theoretical excercise you could use proxy-arp as long as your gateway device is connected to both VLANs.

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

No this is not a production environment. This is just for the interview preparation I'm doing. 
Also this a layer 2 flat network. So any other mechanism other than proxy-arp or routing. 

I see, that makes sense. You could use private VLANs, making vlan 10 primary and VLAN 20 a secondary community VLAN. This way switching will work as "intended" and you can maintain a functioning trunk between the switches.

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

It work' you can ping from host to host even if hosts in different VLAN' 

For cdp native mismatch' disable cdp and/or config  access port between two SW.

MHM

This does not ping by default as these two host are in different broadcast domain.

This Q like 3 body problem question of network 

If you know answer then you are in high level of acknowledgement of network 

Let back 

What is make broadcast domain separate 

Vlan 10 is native in sw1 and 

Vlan 20 is native in sw2 

Config the link connect two SW as access 

Then traffic from hostA in SW1 in vlan10 will pass untag to SW2 and SW2 will assume it in vlan20 and flood it to hostB.

If you config trunk between SW then only make native different' in SW1 nativr is vlan10 and in SW2 is vlan20.

The ping success.

Only you need to image how frame pass from hostA to hostB 

MHM

Joseph W. Doherty
Hall of Fame
Hall of Fame

What you're proposing is WRONG assuming you want to maintain the L2 domains as separate L2 domains.  This because if there's same network, it should be in the same L2 domain.

BTW, what you propose is a fine interview question, but IMO, the first correct answer should be why do you want this done because it violates expected network practice.  An interviewee can explain why doing this would normally be bad practice.  Finally, interviewee could explain a couple of ways to accomplish this.

I agree with my colleagues that in terms ob Best Practice what is suggested in the OP is not a good idea. But the OP is not about Best Practice but is about preparation for Interviews. In that context it is a valid question and it has a simple answer. If the connection S1 to S2 is an access port on both sides then the hosts will communicate without any problem, and without requiring any other configuration. One side calls it vlan 10 while the other side calls it vlan 20. But it does not matter that there are 2 names, there is a single broadcast domain and the hosts will communicate without any problem. It is true that CDP will report a vlan mismatch. But that is a reporting issue and not an operational issue. Since this is preparation for Interview I would not worry about it.

HTH

Rick

So, the vlan mismatch issue is just a warning and it will not impact anything?

Rick is 100% correct, connecting the two switches via access port should work fine, excluding CDP complaining.

Likewise, using a trunk port, using native VLANs should work too, along with CDP complaining again.  (Trunk and CDP complaining noted in OP.)

I will add I recall when you actually do this you can run into other issues on Cisco switch platforms such as PVST BPDUs also having mismatched VLANs.

So, unlike Rick who believes this is not worth worrying about (perhaps only in the context of an interview question), doing this intentionally, generally is a very bad idea.  Another issue, it tends to muddy the waters for later maintenance.

I do agree with Rick, that if the only point of such an interview question is to establish someone knows you can do this, well it does.  However, personally, I believe it's very informative if the person asked such a question understands all the implications.  Otherwise you might have someone knowledgeable enough just to be dangerous.

Lastly, OP didn't identify the capabilities of the switches, so we don't know if they are Cisco (non-Cisco switches trunks may not support untagged frames), or if there are other L2 transport options available.

I tried wit natvie vlan as well. But, it still throws the error of vlan mismatch when I add the native 10 & 20 of S1 connected to S2.

Yup, that should be mostly CDP.  If you disable CDP (on the port), CDP errors should stop.

Frames can, and should, flow between the two VLANs.

However, you may still have other issues to contend with, which may throw their own errors.

I do not think that you should be surprised that there is a reported issue about vlan mismatch. After all there IS a mismatch in vlan between the switches.

If the purpose here is preparation for Interview then it should work, and the reported issue is trivial (and disabling CDP on the port will suppress the message). If the purpose is something other than Interview preparation then I agree with my colleagues that this is not a good idea.

HTH

Rick
Review Cisco Networking for a $25 gift card