TCP/IP Detailed Volume One (chapter III IP: Internet Protocol)

Source: Internet
Author: User

IP is the most important protocol in the family of TCP/IP protocols. All TCP, UDP, ICMP, and IGMP data are transmitted in an IP datagram format.

IP provides unreliable, non-connected datagram delivery services.

1. Unreliable: It is not guaranteed that IP datagrams will successfully reach their destination. IP only provides the best transport service.

2. No connection: Each datagram processing is independent of each other, the IP datagram can not be received in order to send.

1.IP Header

Where the TTL (time-to-live) Time-to-live field sets the maximum number of routers that datagrams can pass through.

Once it passes through a router that handles it, its value is subtracted by 1. When the value of the field is 0 o'clock, the datagram is discarded.

2.IP Route Selection

IP routing is simple, and most hosts use the following simple mechanism.

If the destination host is directly connected to the source host (Point-to-point link) or on a shared network (Ethernet), then the IP datagram is sent directly to the destination host.

Otherwise, the host sends the datagram to a default router and the router forwards the datagram.

In the general system, the IP layer is in memory by a routing table. When a datagram is received and sent, it is searched once for the table.

Each entry in the routing table contains the following information:

1. Destination address. Either a full host address or a network address, specified by the table's flag field.

2. The IP address of the next-hop router, or a network IP address with a direct connection.

3. Logo

4. Specify a network interface for the data transmission

IP routing mainly accomplishes the following functions:

1. Search the routing table for a table that can match the destination IP address exactly. If found, the message is sent to the next-hop router or directly connected network interface specified in the table.

2. Search the routing table for a table that matches the destination network number. If found, the message is sent to the next-hop router or directly connected network interface specified by the table.

3. Search for the router and look for the entry labeled default. If found, the message is sent to the next-hop router specified in the table.

If none of the above steps are successful, then the datagram cannot be transmitted.

3. Subnet addressing

Now all hosts are required to support subnet addressing (the host number is divided into a subnet number and host number)

After InterNIC obtains some type of IP network number, it is assigned by the local system administrator, who decides whether to establish a subnet, and how many bits are assigned to the subnet number and host number.

Here is a seed mesh address for Class B addresses

4. Subnet mask

In addition to the IP address, the host also needs to know how many bits are used for the subnet number and how many bits are used for the period, which is determined by the subnet mask.

This mask is a 32bit value, where a bit with a value of 1 is left to the network number and subnet number, and the 0 bit is left to the host number. Is the two different subnet mask formats for a Class B address.

Given the IP address and subnet mask, the host can determine the purpose of the IP datagram:

1. Host on the book Web

2. Hosts in other subnets in this network

3. Hosts on other networks

TCP/IP Detailed Volume One (chapter III IP: Internet Protocol)

Related Article

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.