0

When packet gets converted into a frame, it gets a "Destination hardware address", "Source Hardware address", "Ether-type field" or "length", "data field" and a "Frame check sequence field".

Now, at this particular point, if the destined host is on the local network, then a request for Hardware address of the local host via an ARP is made by IP at network layer, and once it is received, the hardware address is handed down to data link layer so that it can convert it into a frame and perform trustworthy transmission over physical link.

If, however, the packet is destined for a remote host, then how would it get the hardware address of the default gateway (or next router)? because each time a packet is sent between routers , it is converted into frames by Data Link Layer . and stripped-off to the packet at receiving router. so, from where the Data Link Layer will get the hardware address of the Default Gateway (router) to fill the "destination Hardware address" field as it did in the case of local host?

0

Each router's job is to address a packet to the next router. For that, only the hardware address of the next router is needed. You don't need to know the hardware addresses (or even the type of hardware) of systems further down the line.

A typical end node only needs the hardware addresses of other machines on its LAN, because those are the only machines it sends layer 2 packets to. For Ethernet, it uses ARP to get this information.

  • 1
    To clarify, it is the router's responsibility to figure out how to get the packet to the next hop. This responsibility includes discovering the next hop's physical address when necessary. – lzam Sep 2 '14 at 3:38
0

so, from where the Data Link Layer will get the hardware address of the Default Gateway (router) to fill the "destination Hardware address" field as it did in the case of local host?

From the same place as with local hosts – the operating system. The Ethernet frame header, including the destination address, is filled by the operating system, not by any lower layers.

The operating system can see from its routing table that the destination needs to be a gateway, performs ARP or ND for the gateway's IP address, and crafts an Ethernet frame that has the gateway's link address while keeping the original target host in the IP header.

The "data link layer" merely transmits it to the specified destination.

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.