Principles of IP/ARP/ICMP/UDP

Source: Internet
Author: User

1: The main program sends a text message at the application layer.
2: After arriving at the transport layer (tcp), send text in a udp packet and wait for three messages to be accepted. Ethernet packet arrival information, ARP heavy load information, ARP aging Information
3: udp protocol package> udp_send Program
4: Group IP protocol package-> IP_send Program
Call the ARP parsing program (ARP_resolve) in the IP_send program. If the MAC address is obtained, run the Ethernet sending program. Eth_send. If yes, the sent information is cached. Wait exists.
5: Convert the ARP_reslove program. Enter the IP address and search for the MAC address in the ARP table. If the MAC address is found, IP_send is returned. If the ARP request broadcast command cannot be found.
6: Send the ARP broadcast command and call the ARP_send program: group a arp packet B calls eth_send
7: The status changes from sending to receiving, and the wait for arp flag is set.
8: return to the main program and wait for receiving the package. Then, the system receives a protocol package and unpacks the package. The packet may be an IP protocol package or an ARP packet.
9: if an arp packet is received, it may be an arp response packet or an arp request packet.
10: if it is an arp request packet, take out the sender's IP address and mac address and store it in our arp table.
A: Look up the arp table to see if it exists.
B: If the age is changed, set it to the youngest one. If the age does not exist, check whether the arp table is empty. If yes, set it to the optimum age. If there is no empty seat, the oldest will be squeezed out.
Send an arp response packet to notify the recipient of Our mac address.
11: if it is an arp response packet, we get the mac address, cancel the wait for arp flag, store the arp table, and convert it to the IP_send program.

From snicolashe's column

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.