1

For me it is not clear how the internet is working. Let's say we have host (local IP:192.168.12) and the gateway/router (local IP: 192.168.0.1 / extern IP: 62.1.2.134)

Now the client (192.168.0.12) wants to visit http://www.facebook.com.

  1. The client makes an arp request
  2. The router replies the arp request and returns his MAC-address.
  3. The client sends the package to the router over ethernet with the MAC-address.
  4. The router sends a DNS Request for facebook.com. Let's say the first DNS-Server returns the IP of facebook.com (example: 45.2.3.1). The DNS-Server returns the IP-Address to the router.

Now, makes the router also en ARP-Request to find the MAC-address of the server (IP-address: 45.2.3.1)? If not, does this only work with the IP-Address? Does ARP only play a role in the local network?

Thank you very much!

1
  • 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 post and accept your own answer.
    – Ron Maupin
    Dec 31, 2020 at 4:20

2 Answers 2

2

Number 4 is wrong. The source host makes the DNS request for the destination IP address, and it addresses the IP packet with the destination IP address.

The source host then will test the destination address to see if it is on the same local network. If so, it uses ARP to get the MAC address of the destination and sends the frame directly to the destination. If the destination is on a different IP network, then it uses ARP to find the MAC address of its gateway (router), and it sends the frame to its gateway.

The router will strip off the frame to route the IP packet to its next interface. It will then build a new frame for the new interface.

ARP is for IEEE LAN protocols. A MAC address is only relevant on the local network. The IP packet will have different frames for the different hops on its way to the destination. Some of those frames may be for protocols that do not use MAC addressing. For example, DSL often uses PPPoA so there would be no MAC addressing on a frame from that router to the ISP router.

0

No router will not send dns request for www.facebook.com

When users is accessing "www.facebook.com" from PC . Pc will initiàte dns request to local dns which is configured in network adapter of pc primary dns ip address or secondary dns ipaddress .

Firstly DNS request for resolving www.facebook.com domain to ip address will intiàte dns traffic from pc to local dns is called recursive querry as local dns is connected to internet local dns will resolve url to public ip ..

Now pc has public ip of facebook.com . Now actually traffic will intiàte from source as source as pc private ip adress and destination as Facebook (public ip) further router will forward traffic to internet ..

Address resolution protocol (ARP) mapped ip address to mac address of devices or host. Based on this ARP table layer3 devices will forward traffic to next layer ..

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.