IP Route Selection

Source: Internet
Author: User
IP Route Selection IP protocol provides an unreliable and connectionless data transmission service: 1. unreliable: IP datagram cannot be ensured to reach the destination; if an error occurs, for example, if the buffer of the vro is full, the datagram is directly discarded and an ICMP message is sent to the source. 2. connectionless: the processing of each datagram is independent of each other, IP datagram can be received not in the sending order; each datagram is selected independently, and different lines may be selected; IP datagram format

 

The purpose of an IP address is to provide a virtual network that can contain multiple physical networks and provide connectionless datagram delivery services.

When one host a sends a data report to another host B, it must first check whether the target host B is connected to source host a on the same network:

If yes, the datagram is directly delivered to the destination host B without passing through the router;

If not, the datagram should be sent to a vro on the current network, which forwards the datagram to the next vro according to the route indicated in the forwarding table. This is called indirect delivery.

 

 

To sum up:

1. IP datagram transmission between two servers (with the same network address) connected to the same network does not involve a router. The sender encapsulates the datagram in a physical frame, bind the destination IP address and a physical address to send the generated frames directly to the destination site.

2. Indirect delivery is more difficult than direct delivery, because the sender must identify a vro to which the datagram is sent, and the vro must forward the datagram to its target network.

Next we will focus on indirect delivery, that is, the routing of IP datagram.

 

 

Routers in the TCP/IP Internet form a Collaborative interconnection structure. Data is transmitted from one vro to the next vro until it reaches a route that can directly deliver data packets.

The following is a typical vro structure:

 

 

 

The router works at the network layer. After the data link layer removes the frame header and tail, it sends the datagram to the queue at the network layer for waiting for processing (a certain delay will occur)

 

The common IP address routing algorithm is to use an IP address routing table on each machine, which stores information about the possible destination site and how to reach the destination site;
During group delivery, the vro has two phases: 1,How to reach the network of the target host2. After being grouped into the target network, the terminal router sends the group to the target host.
Generally, the first stage is the actual stage of routing, which is related to the path between different networks through groups. Therefore, the route is based on the network number in the target IP address, so that you can only care about the information of the target network, instead of the information of the target host, so as to simplify the route table and improve the routing efficiency.

Typically, the route table contains many (n, R) vectors, where N is the IP address of the destination network, and r is the IP address of the next router (Next Hop) to reach the target network.

 

 

For example, the IP layer has a route table in the memory. It contains 1. The destination IP address, which can be a complete host address (with a non-zero host number ), it is also a network address (that is, the network segment, the host number is 0); 2. the IP address of the next-hop router, or the IP address of the directly connected network; 3. Mark, specify whether the next route entry is a router or a directly connected interface. 4. Network Interface (NIC). Note: In the routing table, the default route entry is 0.0.0.0 ). If the table does not reach the next hop of the target network, the group is sent to the default router. Using the default vro helps keep the routing table small, especially for hosts that can only access one vro. When forwarding data reports, search the route table to find the table that matches the destination IP address. Priority: Host address match --> network address match --> Default table (default ); if none of the above matches, the datagram cannot be transmitted. In this case, an "host inaccessible" or "Network inaccessible" error is generally returned to the application that generates the datagram;

IP address routing only modifies the TTL field in the IP Message (each hop passes through, TTL is reduced by 1, and the group is discarded when the value is 0), but does not change other content of the packet.

When the vro receives the datagram to be forwarded, it sends the IP address of the next hop router to the lower-layer network interface instead of the IP address;

The network interface is responsible for converting the IP address of the next hop router to a MAC address Based on ARP, placing the MAC address in the header of the MAC frame on the link layer, and then finding the next hop router based on the MAC address.

IP Route Selection

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.