Network Layer IP protocol of TCP/IP Series

Source: Internet
Author: User


Network Layer IP protocol of TCP/IP series when data is directly transmitted over the Internet, the router routes data according to the IP address datagram. when a host needs to send data, the target host is generally a host in the LAN or a host outside the network.
If it is a host in the LAN, the destination mac address of the header of the Ethernet frame sent by the host is the mac address of the target host, and no route is required. if it is a host outside the network, the data is sent to the default gateway, and the Gateway Router routes the data to the destination host. The destination mac address of the Ethernet frame header sent by the host is the mac address of the gateway. the format of the IP Datagram Protocol is as follows:

The IP protocol does not guarantee delivery, but does not guarantee the order. The reliability is ensured by the upper-layer protocol. The upper-layer protocol, such as TCP, UDP information, is in the data section of the IP datagram. www.2cto.com is a data packet captured through Wireshark:

The router needs to find a suitable destination for the IP packet through the IP packet information, such as a suitable host or a suitable route. the router or host will process an IP packet in the following way. If the TTL (lifecycle) of the IP packet is reached, the IP packet will be discarded.
Search for the route table. Search for the matched host first. If the target host is exactly the same as the IP address, send the packet to the target host to search for the route table. If the match fails, then match the vro of the same subnet, which requires the "subnet mask (1.3 .). if a vro is found, the package is sent to the vro. search the route table. If a vro with the same subnet fails to match, the vro with the same network ID is matched. If a vro is found, the package is sent to the vro. search for the route table. If all the preceding steps fail, search for the default route. If the default route exists, if all the sent packets fail, the packet will be discarded. author kkdelta

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.