I have the following question confused, we suppose: in my lab I have 10 linux servers and one layer-2 switch, I tried to separate them to 5 groups:

Group one:  include server1(, server2(
Group two:  include server3(, server4(
Group three:  include server5(, server6(
Group four:  include server7(, server8(
Group five:   include server7(, server8(

So, in each group the two servers should be able to communicate very well? and also, all of the 10 servers can talk to each other very well, right?

  • 1
    It's Layer 2, not Level 2.
    – Ron Maupin
    Feb 6, 2019 at 21:01

2 Answers 2


So, in each group the two servers should be able to communicate?


And also, all of the 10 servers can talk to each other, right?

No. Because your groups are in different subnets, they will not be able to communicate. In order to communicate from one subnet to another, you need a router.

The problem has less to do with the switch, and more with your addressing plan.

  • hi Ron, thank you. I can understand group1 can't talk to group2. But why group1 can not talk to group5, or group5 can't talk to group1? I think group5 is /8 subnet witch includes /16 and /24, why they can not talk to each other either please?
    – Jack
    Feb 6, 2019 at 19:57
  • Group 5 can send packets to group 1, but group 1 won't reply because the destination ( is not in group 1's subnet.
    – Ron Trunk
    Feb 6, 2019 at 19:58
  • that means Group1 can receive and read Group5's messages, but Group1 cannot or say will not send message back to Group5, right please?
    – Jack
    Feb 6, 2019 at 20:06
  • To be specific, IP packets sent to group1 will be received, but no packets can be sent to group 5. If you intended to send messages via any application using TCP, for example, they would fail.
    – Ron Trunk
    Feb 6, 2019 at 20:17

Can Layer-2 Switch deal with different Segmented IP

Your problem is not related to the layer-2 switches at all:

A layer-2 switch is only interested in the destination MAC address of an Ethernet frame; for the layer-2 switch the (destination) IP address of the IP packet is nothing but some bytes of the data being sent.

Group one:  include server1( ...
Group five:   include server7( ...

... and also, all of the 10 servers can talk to each other very well, right?

With a high probability server 7 would be able to send packets to server 1, but server 1 would not be able to send packets to server 7:

If server 7 shall send some IP packet to server 1, it will check if the address of server 1 lies in the address range of its own "group". is in the address range, so server 7 will assume that server 1 is a member of "group five".

Therefore server 7 will broadcast an ARP packet to all computers in the Ethernet network. This packet contains the "ARP request" that wants to know the MAC address of Server 1 will answer with an ARP packet containing the own MAC address. (I'm not 100% sure if server 1 will check if server 7 is part of "group one". I'm assuming that server 1 will not check this.)

Now server 7 knows the MAC address of server 1 and it can send IP packets to that server.

However, if server 1 wants to send IP packets to server 7, it will find out that is not within the range and therefore server 7 is not a member of "group one".

Therefore server 1 will assume that server 7 cannot be reached "directly" over Ethernet but that it can only be reached using some router in between.

If the routing configuration of server 1 does not contain information about a router whose address is in the range and which is able to forward packets to server 7, the operating system of server 1 will refuse to send any IP packets to server 7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.