2016-04-09 Agreement

Source: Internet
Author: User

1. Structure of the IP header

IP header 20 bytes, including 4-bit version number, 4-bit header, 8-bit service type, 16-bit total length, 16-bit Identification field, 3-bit flag field and 13-bit offset field, 8-bit TTL, 8-bit protocol, 16-bit header check, and 32-bit source ip,32-bit destination IP.

8-bit service type (TOS) This I always ignore, notice that the front 3 bits have been discarded, the back 4 bits represent the minimum delay, the maximum throughput, the highest reliability and the minimum cost, 4 can only choose one position of 1, if 4 bits are 0, then the General Service unexpectedly.

The TTL represents the maximum number of routers that can be passed, which is the lifetime of the datagram.

2. IP Routing

The most important nature of IP is to choose the road, choose the way to rely on what? The routing table.

First look at the composition of the routing table:

Target (note: The destination can be a host address, or it can be a subnet address, network address, or default route, and so on)

Gateway (the address of the next article)

Flag (whether it is available, whether it is a path, whether it is to the host, etc.)

Interface

Reference count (refcnt), number of active processes that are using routing

Number of groupings (number of packets sent through this route)

So what are the steps for IP routing?

1) First of all, we must select an exact match address (host address)

2) if 1) does not match, it will look for network address matching

3) 1) 2) are not found, search default table entries.

4) 1) 2) 3) are not found, reply to the host is not reached.

2016-04-09 Agreement

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.