Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

When to use the default gateway (ARP)


Here's a scenario. Two separate IP networks ( and connected via a router.

When I ping host from, what happens first?

Does ARP try to request the hardware address of via a broadcast? Obviously, the broadcast will produce no response so does the host then send the frame to the default gateway?

I'm not quite clear what happens at this initial stage - how the host knows when to try the default gateway.




Re: When to use the default gateway (ARP)

This is what happens:

The IP stack in your PC knows that 192.168.20.x is not on your network.

It calculates this using the subnet mask (24 bits = I suppose)

When the subnet part of the IP address matches your own network address, its local. Everything not on your network is sent to the default GW.

So, your PC will ARP for the IP address of the local router when needed and send the packet to that mac-address. It knows what IP address to use while you specified the default gateway. The router "routes" the packet to its destination network. The router on that LAN will ARP for and use that mac adress to sent the packet. The source mac address will be the mac address of the remote router. This enables to respond and the process repeats itself in opposite direction.

New Member

Re: When to use the default gateway (ARP)

Thanks for the quick response.

So basically the subnet mask of dictates that my network address of is the only local network available? Therefore if the destination host is anything other than then it uses the default gateway?

Similarly on a class B network if we have networks and the same rules apply - i.e. a host of pinging is a local echo and is a remote echo.


New Member

Re: When to use the default gateway (ARP)

Actually, once your pc realizes that the IP address is remote (via subnet mask), it looks in it's local ARP cache for the MAC address of the default gateway. If it doesn't have the entry listed, it sends an ARP broadcast and the router responds. The PC then sends the Frame to the default gateway, the DESTINATION MAC is that of the default gateway and the DESTINATION IP is that of the original IP address. If the router receives the packet on interface E0 and then sends it out S0, before it goes out interface s0, the router strips the frame, puts its MAC address (for interface S0) as the SOURCE MAC address and the destination IP stays the same. This happens at every router along the way and on its way back.

CreatePlease login to create content