If a client wants to send somthing to a server, the sequece is this:
- He needs to know its own IP address using DHCP
- He need to know server’s IP address using DNS
- He need to see if the server is in the same network with him via comparing the net id of their IP address;
If yes, it will not need the help of routers
If no, it will need the help of routers
- Either situation of 3, it firstly need to find the mac address of a router or the server, which need ARP
- If its need the help of router, the router will look up its routing table. If the router does not contain the IP address of the requested router, the router will find which next router could help.
- ARP packet
- ARP is located in bottom of the lay-3, providing help for IP module
- ARP request is broadcast, but the ARP reply is unicast.
- After getting ARP request, the send get the MAC address and tell it to IP modular.
- Only for host, not for router
- DNS is a client/server application, over UDP
- well-know port #: 53
- DNS client（resolver）：will check the cache if contain the IP address
- DNS server: local DNS server(firstly), then two methods:
- recursive DNS
- iterative DNS
- recursive DNS
- DHCP is a client/server application designed to provide a centralized approach to configuring and maintaining IP addresses
- DHCP server does not have to exist in every network and one network can have several DHCP server
- DHCP is a exception since its port number in client and server side are well-know; For other protocal, only the port numbers of server side are well-know.
- DHCP runs over UDP, it is on lay-5
- If a machine in a network that does not have a DHCP server, then the router plays a DHCP relay agent (relay means that pass on).The router knows the ip address of DHCP server(s) and tell the DHCP server(s) its own IP address on the side of machine. Then, it will unicast or broadcast the DHCP discover message