The process of accessing a URL (domain name) behind

1. If a new computer is connected to the LAN, you will first use DHCP (Dynamic Host Configuration Protocol) for the computer assigned ip address. After this step, our computers have their own ip address.

2. Access www.baidu.com. This is a domain name, we need to know the ip address for access. Using the DNS protocol (dns cache -> local dns server -> authoritative dns server -> root dns servers), (which will go through the ARP protocol, because across the router) finally returns corresponding server ip address Baidu.

3. Then we can use this ip address to access the Baidu. So we http request will generate a TCP connection, which includes the purpose of IP. Then this segment is passed to the gateway router. After the source IP may be updated by NAT, it may not. After the segment is free from the subnet (LAN).

4. Then segment is between routers, switches through the ARP protocol, using forwarding table of each router, a step by step arrived at the destination server.

5. The purpose of the process port 80 http server http request received packet, returns a http response message back. On the way back or the use of ARP and forwarding, forward step by step to reach our ultimate computer.

Guess you like

Origin www.cnblogs.com/FdWzy/p/12459943.html