I have a very rudimentary doubt. We know that a LAN has addresses in the same subnet. The LAN ends at the gateway router with that interface also belonging to the same subnet. But what exactly will break in the forwarding operation if we assign LAN addresses that belong to different subnets.

5 Answers 5


The PC's in the other subnet should be able to communicate with each other. However if they attempt to ping an IP on a different subnet, it won't work unless the default gateway is setup on the router and some form of routing (static/dynamic) is setup on the router.

  • U mean PC's in the same subnet should be able to ping each other ?
    – john
    Commented Feb 18, 2017 at 20:18
  • Yes that is correct. The pc thinks, hmm my destination is in same subnet, however I don't know it's MAC address for it. The pc then sends an ARP request out, and the destination Pc should see this and say hey that's my IP and respond to the ARP with it's MAC address. The source Pc should then be able to forward packets to the destination Pc in the same subnet! When packets are detined for an IP in a different subnet, the ARP is sent to the default gateway, and routing must be setup to the destination subnet for it to receive this and forward back to the source on the other side.
    – ViperX
    Commented Feb 18, 2017 at 20:50

Having more than one subnet on a LAN used to be more common than it is today. You can configure the router interface with a secondary* address. This will allow the router to be the gateway for both subnets, and it will be able to route between them.

Depending on the type of router and software version, some features may not be available on the secondary interface. For example, Cisco routers would not establish OSPF or EIGRP neighbor relationships on secondary addresses.

*You can have more than just two subnets on a LAN. Cisco refers to them all as secondary addresses although they technically should be called tertiary, quartenary, etc.

  • "Cisco routers would establish OSPF or EIGRP neighbor relationships on secondary addresses." I think you mean "would not."
    – Ron Maupin
    Commented Feb 18, 2017 at 21:30
  • 1
    Head moves faster than my fingers. Fixed it. Thanks.
    – Ron Trunk
    Commented Feb 18, 2017 at 21:35

The subnet is used to determine what hosts are "assumed to be on link". If a host wants to communicate with a host outside it's subnet then (assuming there is nothing special in the host's routing table) it will try and send the packet to it's default gateway.

If the default gateway knows about all the subnets and is prepared to send packets back out on the same interface they came in through then communication will work fine. Otherwise things are going to break.

When the default gateway notices that it is sending a packet back out the way it came in it may send ICMP redirect packets to inform the host that it can send the packet by a more direct route. The sending host may or may not take notice of said redirect.


The sending device will send an ARP request broadcast frame on to the network asking for the MAC address of the intended recipient based on the IP address of the destination. The holder of that IP address will respond to the sender advertising the MAC address. They will then be able to communicate with each other with out their traffic having to be routed through a Layer 3 device which is where things start to break down. As already mentioned.

  • 1
    If the destination address is on a different network, the source host will use the MAC address of its configured gateway. It will not ARP for the destination MAC address of a host not on its network.
    – Ron Maupin
    Commented Feb 18, 2017 at 11:43
  • @RonMaupin So the task of finding ot whether the destination IP is within the same subnet or not is done by the host device ?
    – john
    Commented Feb 18, 2017 at 20:17
  • 1
    It is,but the idea of three different networks on the same VLAN means that to send from one subnet to another requires involving the router, even though they are on the same VLAN.
    – Ron Maupin
    Commented Feb 18, 2017 at 20:26
  • If the destination IP is in the same subnet as the senders IP and subnet mask then it will look locally for the destination MAC address. Otherwise it will send it to the senders configured default gateway (router) to find out where the traffic needs to go.
    – Jackthedog
    Commented Feb 18, 2017 at 21:10
  • Right, but your answer sounds like you are saying the opposite; that having different networks on the same VLAN doesn't involve the router. It does for everything but the same network. You should probably edit your answer to clarify that, then maybe whoever gave you a down vot will reverse it.
    – Ron Maupin
    Commented Feb 18, 2017 at 21:26

This also has to do with how IP Routing works based on IP subnets.

Consider the following example

HostA     ------------- Router ------------- HostB     LAN 1                 LAN 2
  1. When Host A wants to talk to Host B it sends the packet to the default gateway router asking it to direct it to the correct LAN.

  2. The router is configured with a subnet on each of its link. It uses this configuration to build its routing table (these are called connected routes). The router looks up its routing table to find that it needs to use LAN 2 to reach any host in the network.

  3. The router then uses ARP to find the MAC for Host B in LAN 2. Once it figures out the MAC for Host B it rewrites the MAC header in the original packet to Host B's MAC and sends the packet out on LAN 2.

Now imagine if the Host B was assigned IP address belonging to a different subnet.

HostA     ------------- Router ------------- HostB     LAN 1                 LAN 2

If Host A sends a packet to Host C, the Router will drop the packet since it will not know the LAN to reach 30 network.

This answer is a bit simplified by assuming that Host B does not send any ARP.

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.