Some views on the TCP/IP protocol: IP Routing

Source: Internet
Author: User

Before introducing the network layer protocol, I forgot to introduce a very important point of knowledge: IP routing.

Once said that if the IP address of the two communication parties is not within the same subnet, then the two to communicate, the packet needs to go through the router forwarding, may have to go through multiple routers to reach the receiver. So how does the router work? In fact, the core point is that the router has a routing table, which includes the following types of information:

1. Destination IP Address: It can be either a full host address or a network address.

2. The IP address of the next-hop router refers to a router on a direct-attached network.

3. Logo. One of the flags indicates whether the destination IP is the host address or the network address, and the other flag indicates if the next-hop router is a true next-hop router or a direct-attached network interface.

The steps for IP routing are as follows:

1. Search for the destination address in the routing table, and if present, send the IP packet directly to that address, otherwise go to 2.

2. Search the destination network corresponding subnet address, if present, then send to the subnet number corresponding to the next hop address, otherwise go 3.

3. The network number corresponding to the search destination network, if present, is sent to the network number corresponding to the scare-hop router, otherwise turn 4.

4. Find the default route and forward it if it is present, or discard it.

Therefore, the routing table includes dynamic routing control and static route control, obviously, dynamic routing strategy can be adaptively adjusted, but the cost is large. It also includes the Internal Gateway Protocol IGP (including the famous Rip and OSPF) and the External Network Management Protocol EGP (based on the Dijkstra algorithm). While the static route control is when the interface is configured, the route table entry is generated by default and can be generated or deleted by means of the route instruction. It is less expensive, but not adaptable to network changes.

Some views on the TCP/IP protocol: IP Routing

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.