Addressing, segmentation, and gateway for Internet protocols

Source: Internet
Author: User

Today, we will learn about Internet protocols in terms of addressing, segmentation, and gateway. The addressing method is also the address method we currently use in the IPv4 protocol. With the continuous development of the network, we will replace the current IPv4 with the IPv6 protocol, and the address protocols of the two are also different. In the subsequent articles, we will also compare the two.

Addressing

There is a difference between the name, address, and route. The name is what we are looking for. The address indicates where the name is located and how the route solves the problem. IP addresses mainly handle address issues. The upper-layer protocol is used to map names and addresses. The IP Module maps the address and the local network address, and ing the local network address and route is a task of Low-layer protocol.

The address is 32-bit long and consists of a network number and a local address. There are three types of addresses: the highest bit of class A is 0, the last 7 bits represent the network number, the other 24 bits represent the local address, the first two bits of Class B are 10, and the last 14 bits represent the network address, the other 16 bits indicate the local address. The three bits in Class C are 110, the last 21 bits indicate the network number, and the other 8 bits represent the local address.

When you map a network address to a local network address, note that some hosts may use several different IP addresses. We can consider the local network address as a MAC address ). We must be able to process a host with several processing ports, and each port has several logical Internet Protocol Addresses.

Segmentation

For different networks, the size of packets transmitted may be different. Therefore, the function of dividing large packets into small ones is required. A datagram can also be marked as "non-segmented". If a datagram is marked, it cannot be segmented under any circumstances. If the destination cannot be reached without segmentation, the package will be abandoned halfway. The IP module is invisible to the IP address module for re-segmentation and re-reorganization within the region network. This method can also be used.

The segment and reorganization of the Region network add tags to the segment, and the receiver uses these tags to differentiate different segments. The segment offset field tells the receiver where to place the segment, and the multi-segment mark indicates the last segment. A datagram can be reorganized using different domains. A tag domain is used to uniquely mark a datagram. It is the original sender setting and must be unique throughout the network transmission process. The sender sets the multi-segment tag to zero and the segment offset to zero.

Let us assume that the Internet protocol module divides a large datagram into two small ones. The IP module first obtains the data header, then separates the data into two parts, and adds the data header to the two parts. Data is separated by 8 bytes. The second segment is not necessarily 8 bytes, but the first segment must be. We call the 8-bit bytes in the first section the number of blocks NFB ). The first newly generated data packet is the first data segment generated, and the multi-segment mark is 1. The second newly generated data packet is the second data segment generated, the multipart mark is equal to the value in the original datagram, and the segment offset is equal to the value in the original datagram plus NFB. The above process can be expanded from 2 to N.

For segment reorganization, the following four domains must have the same values: Tag, source address, target address, and protocol. Recombine different datagram data into a new segment based on its own offset. the offset of the first segment is 0, and the multi-segment of the last segment is marked as 0.

Gateway

The gateway transmits data packets between different networks, and the gateway also implements the gateway-to-Gateway Protocol GGP), which is used to transmit routing and other control information. The high-level protocols in the gateway do not need to be implemented at all. GGP functions can be implemented in the Internet protocol module.

;

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.