Now suppose that if we enter http://www.baidu.com in the client (client) browser, and baidu.com is the server (server) to be accessed, the following is a detailed analysis of a series of protocol operations performed by the client in order to access the server:
1, the client browser through the DNS resolution to the Www.baidu.com IP address 220.181.27.48, through this IP address to find the client-to-server path. The client browser initiates an HTTP session to 220.161.27.48, and then encapsulates the packet via TCP, which is entered into the network layer.
2, in the client's transport layer, the HTTP session request into the message segment, add the source and destination port, such as the server use 80 port to listen to the client's request, the client by the system randomly select a port such as 5000, and the server to exchange, the server to return the corresponding request to the client's 5000 port. Then use the IP address of the IP layer to find the destination.
3, the client's network layer does not have the relationship between the application layer or the transport layer of things, the main thing is to find a route table to determine how to reach the server, the period may pass through a number of routers, these are the work done by the router, I do not make too much description, nothing more than to find the route through the path to the server
4, the link layer of the client, the packet is sent through the link layer to the router, through the neighbor protocol to find the MAC address of the given IP address, and then send the ARP request to find the destination address, if the response will be able to use the ARP request to answer the exchange of IP packets can now be transferred, The IP packet is then sent to the address of the server.
From for notes (Wiz)
All procedures performed after entering www.baidu.com in the browser