Principle Analysis of IP router Protocol

Source: Internet
Author: User

Next we will analyze some protocol applications on the Internet. In the network, a router is nothing more than a very important component. Now let's take a closer look at the use problems related to the IP router protocol. Internet Protocol (Internet Protocol) is a set of router protocols that regulate data transmission in computer networks. Currently, IPv4 is used, and IPv6 is in the trial phase. IPv4 is a Router Protocol (Internet Protocol, IP) the fourth version is also the first vro Protocol widely used to form the cornerstone of today's Internet technology. Jon Postel defined IP addresses in RFC791 in 1981 。

IPv4 uses a 32-bit address, so it may have a maximum of 4,294,967,296 (= 232) generally, four decimal places are separated by decimal places. Some people also digitize the four bytes into a giant integer, but this marking method is not common, currently, the 128-bit address used by IPv6 is not very popular. It is also used in IPv4, but the range is less. In the past, IANAIP addresses were divided into A, B, C, D Class 4: divide a 32-bit address into two parts: the previous part represents the network address, allocated by IANA, and the latter part represents the LAN address. For example, in a class C network, the first 24 bits are network addresses, the last 8 bits are LAN addresses, and 254 device addresses can be provided (because two addresses cannot be used by network devices: 255 is a broadcast address, 0 indicates the network itself). The Netmask limits the network range. 1 indicates the network, and 0 indicates the device address. For example, the common network mask for Class C addresses is 255.255.255.0 。

An IP packet consists of the header and the actual data part. The data part is generally used to transmit other router protocols, such as TCP, UDP, and ICMP. the maximum data part is 65515 bytes (bytes) (= 2xx16-1-the minimum length of the header is 20 bytes). Generally, the features of the Low-layer (Link Layer) limit the length of the supported IP packets. For example, the Ethernet protocol, there is a Router Protocol Parameter called Maximum Transfer Unit (MTU), which is 1518 bytes. The Ethernet frame header uses 18 bytes, only 1500 bytes are left for the entire IP packet (header + data). Some underlying networks can only support shorter packet lengths. In this case, the IP router Protocol provides a fragment) long IP packets are divided into many short IP packets, each carrying a flag (Fragmentid). The sender (such as a router) splits the long IP packets and sends them one by one, the shuttle party (such as another router) assembles and restores these short IP packets to the original long IP packets based on the corresponding IP addresses and segmentation marks 。

IP routing

Ipv4 is not distinguished as the host of the network terminal) different from intermediate devices in a network, such as routers. Each computer can be used as a host and a router. Routers are used to connect different networks. The sum of the networks associated with routers is internet. IPv4 technology is applicable to LAN) it is also applicable to wide area networks. An IP packet is sent from the sender to the receiver, and is often transmitted through many different networks connected through the router. Each router has the knowledge of how to transmit an IP packet, this knowledge is recorded in the routing table. the routing table records the paths to different networks, where each network is regarded as a target network, it may be static records such as those written by the network administrator or dynamically obtained by the vro protocol. Some vro protocols can run directly on the IP router protocol 。

When the network load is heavy or an error occurs, the router can discard the received IP packet. When the network load is heavy, the same IP packet may be determined by the router to go through different paths. The router selects routes for each IP packet separately, which also improves the reliability of IP communication. transmission, it cannot be completely reliable. IP packets may be lost; duplicate IP packets may be received by the recipient; IP packets may go through different paths, and the first come may not be guaranteed; the receiver may receive a split IP packet. Running the TCP router protocol on the IP address provides a reliable data path to solve these shortcomings 。

ICMP

Internet Control Message Router Protocol (ICMP) is used for error detection and Control (for example). It is an indispensable helper for the IP router Protocol) all are accompanied by the implementation of an ICMP Router Protocol. The ICMP Router Protocol is implemented on the IP address, ICMP packets are transmitted as IP data. An important application of ICMP is network congestion control: When a router discards an IP packet, generally, ICMP is used to send a message to the original sender of the IP packet. The original sender can reduce the sending frequency of the IP packet accordingly, in order to reduce or avoid the possibility of IP packets being discarded. Another important application of ICMP is to set the IP packets that send ICMP messages to prohibit the Don't Fragment-Bit, you can use ICMP to measure the maximum transmission unit (MTU) of a network )。

ICMP

Ipv4 can run on a variety of underlying networks, such as end-to-end serial data links (PPP Router Protocol and SLIP protocol ), satellite links and so on. Ethernet is the most commonly used in Lan. An Ethernet data frame used for IP packets has a 14-byte Ethernet frame header before the IP packet header, A 32-bit (4-byte) CRC check is added after the IP data section. In addition to the 1518-byte maximum transmission unit (MTU) limit, Ethernet also has the limit of the minimum transmission unit: the total frame length cannot be less than 64 bytes. If the IP packet is too short, for example, if the IP data is shorter than 26 bytes, 0 (Padding) will be added later ), in this case, the "packet length" in the IP header indicates the actual packet length. Ethernet uses a 48-bit address. Each Ethernet NIC has a unique 48-bit hardware address. the IP address of 1 is an Ethernet broadcast address. The Ethernet NIC that sends data must know the ethernet address of the Data Transport party before sending data to it 。

Address Resolution Router Protocol ARP (Address Resolution Protocol) is used to convert an IP Address to an ethernet Address. Each computer has an ARP list, it stores the relationship between different IP addresses in the Ethernet and the ethernet address. If a computer finds that a destination IP address does not have a corresponding ethernet address, it sends an ARP Request) ask in Ethernet, the computer that owns this IP address will send an ARP response (Reply) to notify it of its own ethernet address 。

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.