cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2010
Views
15
Helpful
8
Replies

Broadcoast, subnets in a L2 switch or bridge - (same or different subnet) ?

SJ K
Level 5
Level 5

Hi all,

 

It started when I read about bridges bridging/connect multiple network segments together; but it was not mentioned that the different network segments, do they belong to the same subnet or not. It is also said that switches and bridges are basically the same, just that switches has more ports. So I wanted to start a simple test to see if different subnets on the same switch can communicate.

 

-----------------------------------------------------------------------------------

As what we all know, we need L2+L3 address in order for a packet/frame to be send or receive.

I have setup a L2 switch and 3 PCs (A,B,C) connected to the switch in default VLAN to see if different hosts in different subnets can communicate with each other; and if not why.

                                                           

Host A - 192.168.3.1/24 (no gw set)

Host B - 192.168.3.2/24 (no gw set)

Host C - 192.168.5.1/24 (no gw set)

 

So A and B can ping to each other, but can't to C and vice versa.

 

This brought me to think that, why cant C ping to them just because they are in different subnet ? since L2 switching is via MAC address communication and they are all physically in the same switch. If C is able to get the MAC address of Host A, then the packet/frame itself should be completed and is able to transverse through the switch to A.

 

T1) Host C prepare ICMP packet src = 5.1, dst = 3.1 (Host  A)

T2) TCP/IP stack in OS realize they belong to different network after applying subnet mask; hence packet must go to gateway

T3) Retrieve gateway's IP to for sending ARP broadcast request to get gateway MAC address

T4) No gateway set; hence ICMP ping fail

T5) If i set the gateway to 192.168.3.1 on Host C and gateway to 5.1 on Host A , it still fail, because 3.1 and 5.1 belong to different subnet and I think the stack still does not allow this.

(if the layer 2 ARP request broadcast (ff:ff:ff:ff:ff:ff:ff) for Mac Address on 192.168.3.1 is allow to be send out, then there will be no problem in getting the mac address of.3.1 and sending the packet to Host A itself)

=======================================================================================================

 

q1) Hence; can I say theoretically, A, B, and C should be able to communicate with one another if they are able to get each other mac addresses ?

 

q2) and the primarily reason not being able to send the packet is not because of the switch but rather caused by the TCP/IP stack in the OS which enforce that destination to different subnet will have to go through a gateway and the gateway must be in the range of the current source subnet.

 

q3) I tried using packettracer and set the gateway to 255.255.255.255 on both Host C and A, and they are able to ping to 1 another. Is this behaviour correct ? why am i able to set 255.255.255.255 on a gateway's IP ?

 

q4) Now we know that different subnets on the same switch cannot communicate without router, then what does a bridge do ? does it bridge 2 network segments together but the 2 network must be in the same subnet  ? I have heard about bridging in home router and it seems to be bridging 2 different subnets together.  How does it applies here then ?

 

Regards,
Noob

 

1 Accepted Solution

Accepted Solutions

Correct, and its the most common deployment model today. On normal enterprise/DC networks, you won't usually see bridges unless they are really old networks or with specific requirements.

 

If you want to know a little more about campus design, you can take a look at the Cisco Validated Design (CVD) for campus wired networks

 

http://www.cisco.com/c/dam/en/us/td/docs/solutions/CVD/Aug2014/CVD-CampusWiredLANDesignGuide-AUG14.pdf

View solution in original post

8 Replies 8

eduardopozo56
Level 1
Level 1

q1) Yes, as they are on the same logical domain (VLAN) if C asks for B or A MAC address, they would answer, but as they are on different subnets, C WONT ask for their MAC. Thats why you have the subnet mask, to control ARP broadcast.

On HOST C, you have a /24 mask configured, therefore, HOST C will only do ARP requests for IPs on the range between 192.168.5.1 and 192.168.5.254, for all connection attempts to IPs outside this range, HOST C will try to communicate with its DG, if no DG is set, communication fails.

 

q2) Correct. The switch, as you said, is a L2 switch and wont go beyond the Frame headers, it will only look into mac addresses and use the L2 Broadcast domain (VLAN) to isolate frames.

 

q3) It must be a PacketTracer bug, as in most OS implementations (Windows, for example) you cannot set a DG outside your subnet scope

 

q4) A bridge is basically a low-end switch. Usually bridges are not configurable (all the ports are on the same VLAN) and have a lower number of ports (1,2,3,4 ports).
They are called "bridges" as they usually join two different media-types together, for example, Ethernet on one side and Coax on the other side

 

Hi Eduard,


Thanks for replying.

q1) So can i confirm, it is not the switch that is blocking the communication to take place, but the TCP/IP stack/protocol itself that forbids different subnets from communicating directly (must go through gateway) - Assuming if there is a "hack" to set the gateway of host C to host A and vice versa, the packet/frame can actually be push down the stack and be send out through the switch to its intended destination -> am i right ?

 

q2) So for bridges , even though they join 2 network together, the 2 networks still must be in the same subnet in order to communicate right ?

 

q3) you mentioned bridge connect two different media type together. e.g Ethernet on 1 side and Coax on another.  I thought Ethernet is a layer 2 protocol and Coax is a layer 1 physical material ?
Can you elaborate further ?

 

Regards,

Noob

 

Sorry my bad, i mixed the bridge as a device with routing bridging on q3

 

q1) Yes you are right

 

q2) Yes, the two networks must be on the same subnet,

 

q3) My bad, you are right. When i said media-types i meant joining networks like Token-ring networks, for those cases a "bridge" device is used. This devices join both media-types but they still are within the constrain of the L2 design.

 

http://docwiki.cisco.com/wiki/Mixed-Media_Bridging

 

Hi Ecduardo,

Thanks for the fast reply.

 

I chance across a diagram earlier on that describe what a bridge do as shown below in Choice. Joining 2 network segment so that they can communicate with one another.  But it bothers me why use a bridge in between and not connect the switch to switch directly ?

 

 

I am not so sure if it is because of the different "media type" as I am still very new to network.  But from what i see is token ring and ethernet are layer 2 protocol, how are they related to "physical media" ?

 

q2) Also, I have seen in vmware or window , they have this so call internal/virtual bridge functionality. Why call it a bridge ? why not a switch ? Since by adding a "virtual switch" it will achieve the same effect of connecting 2 network together; sharing a same subnet and furthermore there is no physical constraint here.

 

Regards,
Noob

Hi,

You are just over complicating your thoughts.


Basically, years ago, bridges where used to join network segments that usually contained hubs because they were cheaper than switches. Also, sometimes, the signal needed to get retransmitted due to link lengths and as mentioned, bridges were cheaper than switches.

Right now, bridges are almost non-existent or we use only very specific bridges as the one mentioned (Token Ring - Classic Ethernet)

q2) Is just semantics, they chose to call it a bridge as for users is easier to see the word "bridge" with simplicity and bridging two network together. The word "switch" usually invokes more advanced technologies (vlans/acl/arp, etc) into users mindset.


 

Hi Eduardo,

 

Thanks for your reply. So in final, can I say that between the 2 choices earlier, we could have easily use choice 2 to achieve the same effect (bridge 2 network together).

 

Regards,
Noob

Correct, and its the most common deployment model today. On normal enterprise/DC networks, you won't usually see bridges unless they are really old networks or with specific requirements.

 

If you want to know a little more about campus design, you can take a look at the Cisco Validated Design (CVD) for campus wired networks

 

http://www.cisco.com/c/dam/en/us/td/docs/solutions/CVD/Aug2014/CVD-CampusWiredLANDesignGuide-AUG14.pdf

Thanks alot eduardo!