When a source node sends a packet to a unicast destination, what will be the entry in the frame destination address(layer2 mac address)? will it be default router's mac address?

  • possible duplicate of ping reply arp table – Mike Pennington Apr 3 '15 at 10:57
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 11 '17 at 14:44

It's depends whether the destination is within the subnet or not. If it's within the subnet, it'll put the destination device's MAC itself (assuming ARP has already done it's job). If the device is outside the network, then packet will be forwarded to the default gateway, hence, the MAC address of the default gateway.

| improve this answer | |
  • 3
    This is not completely correct. This router does not need to be the default gateway, it's the next hop towards the destination. Also, due to asymmetric routing the router delivering the packet to the destination doesn't need to be the best router towards the original source. So to be precise: it's the MAC address of the router delivering the packet to the destination. – Teun Vink Apr 3 '15 at 9:29
  • Hi, I just re-checked the post from my computer and I am confused about what you just said. Could you please elaborate this statement? This router does not need to be the default gateway, it's the next hop towards the destination. As far as I know, a host NEEDS to have a default gateway to communicate outside its network. – DigvijaySingh Apr 3 '15 at 15:55
  • 1
    The term 'default' is incorrect here. A host needs a next-hop for the networks it needs to reach, a default gateway to connect to the entire internet is not required. Also, a host can have multiple routes via various routers. – Teun Vink Apr 3 '15 at 22:04

When a node wants to send a packet it will look up the destination address in it's routing table. Based on that table it will determine the IP address and interface for the next hop. If the destination is on one of the local subnets then the next hop IP address will simply be the destination. Otherwise it will be the IP address of a router (most likely the default gateway).

The MAC address (if applicable) for the next hop IP address will be determined by arp (for IPv4) or neighbour discovery (for IPv6)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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