Home >Common Problem >What are the four protocols used in conjunction with the IP protocol?
The four protocols used in conjunction with the IP protocol are: 1. Address Resolution Protocol ARP; 2. Reverse Address Resolution Protocol RARP; 3. Internet Control Message Protocol ICMP; 4. Internet Group Management Protocol IGMP.
The four protocols used in conjunction with the IP protocol are:
1. Address Resolution Protocol ARP
Explanation:
ARP Each host has an ARP cache (ARP cache), which contains the IP addresses to hardware addresses of each host and router on the local area network. The mapping table
Function:
Get the physical address through the IP address
Steps:
Note:
Other hosts on the network do not respond to ARP queries. Only when the receiving host receives this frame will it make such a request to the sending host. Response
ARP is to solve the mapping problem between the IP address and the hardware address of the host or router on the same LAN. If the host you are looking for and the source host are not on the same LAN, then You need to find the hardware address of a router on this LAN through ARP, then send the packet to this router, and let the router forward the packet to the next network. The next network will do the rest of the work
The resolution from the IP address to the hardware address is performed automatically, and the user of the host is unaware of this address resolution process.
The host or The router wants to communicate with another host or router with a known IP address on the network. The ARP protocol will automatically resolve the IP address to the hardware address required by the link layer
Four typical situations:
The sender is a host and wants to send the IP datagram to another host on the network. At this time, use ARP to find the hardware address of the destination host
The sender is a host that wants to send IP datagrams to hosts on other networks. At this time, ARP finds the hardware address of a router on this network. The rest of the work is completed by this router
The sender is a router, which wants to forward the IP datagram to a host on this network. At this time, use ARP to find the hardware address of the destination host.
The sender is The router needs to forward the IP datagram to a host on another network. At this time, ARP is used to find the hardware address of a router on this network. The rest of the work is completed by this router
Header format:
Description:
The hardware type field indicates the type of hardware address. Its value is 1, that is Indicates the Ethernet address
The protocol type field indicates the type of protocol address to be mapped. Its value is 0x0800, which means the IP address
Hardware address Length and protocol address length respectively indicate the length of the hardware address and protocol address in bytes. For ARP requests or responses to IP addresses on Ethernet, their values are 6 and 4 respectively
The operation field indicates four types of operations, which are ARP request (value is 1), ARP response (value is 2), RARP request (value is 3) and RARP response (value is 4)
The next four fields are the hardware address of the sender (in this case, the Ethernet address), the protocol address (IP address) of the sender, the hardware address of the destination, and the protocol address of the destination.
2. Reverse Address Resolution Protocol RARP
Definition:
Reverse Address Resolution Protocol RARP enables only A host that knows its own hardware address can know its IP address
Purpose:
This kind of host is often a diskless workstation. Therefore, the RARP protocol is rarely used
RARP and RAP:
3. Internet Control Message Protocol ICMP
Purpose:
In order to improve IP datagram Chance of Delivery Success
Note:
Allow hosts and routers to report error conditions and provide reports on exceptions
ICMP is not a high-level protocol, but an IP layer protocol
The ICMP message is used as the data of the IP layer datagram, plus the header of the datagram, to form an IP datagram and sent out
The first 4 bytes of the ICMP message are in a unified format and have three fields: type, code and checksum. The content of the next 4 bytes is related to the ICMP type
Type:
ICMP error report message:
Endpoint unreachable
Source quench
Time exceeds
Parameter problem
Change Routing (Redirect)
ICMP Query Message:
Echoback request and reply messages
Time stamp request and reply messages
Message format:
4. Internet Group Management Protocol IGMP
Message format:
Function:
It is a protocol responsible for IP multicast member management in the TCP/IP protocol suite. It is used to establish and maintain multicast groups between IP hosts and their directly adjacent multicast routers. Membership
Function:
When a host joins a new group, it sends an IGMP message to the group address to announce its membership. Multicast routers and switches can Learn the group members. Using the information obtained from IGMP, routers and switches maintain a list of multicast group members on each interface.
Two phases:
Join: When a host joins a new multicast group, it sends an IGMP message to the multicast address of the multicast group, declaring that it wants to become a member of the group. After the local multicast router receives the IGMP message, Forward group membership to other multicast routers on the Internet
Query: Periodically query hosts on the local LAN to know whether they continue to be members of the group
Note:
Because group membership is dynamic, the local multicast router only needs one host to respond to a certain group, then the multicast router will consider this group is active
But if a group still does not have a host response after several inquiries, the membership of the group will no longer be forwarded to other multicast routers
Data packets:
IGMP uses IP datagrams to transmit its messages (that is, IGMP messages plus IP headers constitute IP datagrams), but it also provides services to IP
Specific measures:
All communication between the host and the multicast router uses IP multicast
When the multicast router inquires about group membership, it only needs to All groups send a query message requesting information, instead of sending a query message to each group. The default query rate is once every 125 seconds
When there are several multicast routers connected to the same network, they can quickly and efficiently select one of them to query the host. Membership
There is a value N in the IGMP query message, which specifies a maximum response time (the default value is 10 seconds). When a query is received, the host randomly selects a delay between 0 and N before sending a response. The response corresponding to the minimum delay is sent first
Every host in the same group must listen for responses. As long as other hosts in the group send responses first, they can No more sending responses
#If you want to learn more about programming, please pay attention to the php training column!
The above is the detailed content of What are the four protocols used in conjunction with the IP protocol?. For more information, please follow other related articles on the PHP Chinese website!