Network Layer of Computer Network Series (2) Internet Protocol (IP)

1. IP address
The IP address (the default external network) is the unique identification address of the Internet. Its role is to provide a unique network address, in the sense that it connects computers all over the world through the network.

1.1. IP address format
IP address Prefix + Suffix, IP address is composed of prefix (Prefix) and suffix (Suffix). Among them, the prefix (Prefix) can be further divided into Class identifier bits and Network ID, and the suffix can be further divided into Subnet and Host ID. To use Subnet, you must have the corresponding Subnet Mask.

2. IP datagram
2.1. Packet
In computer communication, a packet is a basic unit of communication and is composed of : Header + Data. IP data packet is mainly composed of Header + Data part. The header size of the data packet is 20 bytes.

2.2. IP datagram
Different networks may adopt different packet formats. IP datagram uses a network-independent packet format. Header (20 bytes) + Data

Write the picture description here

Among them, pay attention to the Source IP address and Destination IP address in the IP datagram.

2.3. Delivery of IP datagram
Independent delivery + Best effort delivery

2.4. Maximum transmission unit (MTU) of IP datagram
each network has a maximum packet size. Each type of network has a different maximum packet value for IP packets.

2.5. Fragment
When the size of the data packet exceeds the Maximum transmission unit (MTU) of IP datagram, people need to fragment the large data packet into several Small packets. Divide an IP datagram into multiple smaller IP datagram (call fragments) for delivery across the network. Among them, each small data packet has a data packet header, and the data part of the data packet. In other words, each small data packet is a Logically functionally complete data package.

Of course, the small data packet after fragmentation is to distinguish who the predecessor data packet of the data packet is, whether there is a subsequent data packet, and if so, who is the subsequent data packet, etc., fragmentation The data packet has a corresponding format: Total length + fragment offset + More-fragment-bit

2.6. Reassembly
According to the format of the fragment data packet mentioned above, We can reassemble several fragmented data packets into a complete data packet.

3. IPV6
3.1. IPV4 and IPV6
IPV4: IP version 4 is being used in the Internet.
IPV6: IP version 6 is a new version for the Internet.

3.2. Tunneling
Currently IPV6 can be used in the form of “pipes”. An IPV6 datagram can be encapsulated into an IPV4 datagram for delivery across IPV4 systems. That is, IPV6 datagrams are encapsulated into a format that can be recognized by the IPV4 protocol, and then transmitted on the IPV4 network. In principle, it does not make much sense to encapsulate and transmit IPV6 data packets on the IPV4 network, because the IPV6 data packets are actually no different from the IPV4 data packets. Only by running the IPV6 protocol on a network that supports IPV6 can the features of the IPV6 protocol be brought into play, such as simplified headers, such as authentication privacy protection, such as strong scalability, and so on.

4. Questions
Q1: An organization has 20 computers, connects these computers to the Internet through a router, and gets a class C network ID of 200.1.1. Assign IP addresses for this organization.

Write the picture description here

Among them, 200.1.1.0 is reserved as the network address, and 200.1.1.255 is reserved as the broadcast address .

Q2: Suppose the following IP datagram is divided into three fragments of equal size:

Write the picture description here

Determine the following header fields in each of these fragments:
-Total length
-Offset
-More-fragment-bit

Fragment1: Write the picture description here

< p>Fragment 2: Write the picture description here

Fragment3: Write the picture description here

Write the picture description here

Q3: A computer receives the following four fragments. Perform reassembly to recover the original IP datagram(s).
Write the picture description here

IP datagram: Write the picture description here

IP datagram: Write the picture description here

Q4: In reassembly, the destination computer reassembles the fragments. Would it better if an intermedia router performs reassembly?

No. It may result in unnecessary operations among intermedia routers, such as Router 1 reassembles some IP diagrams and forward it to Router 2. Then, Router 2 may need to fragments it before forwarding to Router 3.

Q5: Discuss the major difficulties in upgrading from IPV4 to IPV6.
upgrading is costly.
upgrading IPV6 individually is hard to obtain the benefits of IPV6 if most of people do not use IPV6.

Q6: A student argued that IP is useless because IP does not ensure reliable communication but we need reliable communication through the Internet. Do you agree?

No. IP is used to find internet address. IP is like a best-effort postman. TCP like a secretary who can ensure reliable communication already.

5. Key Points
Key Point 1: The IPV4 address strictly follows the byte-by-byte solution As shown by the analysis, no matter how the subnet is divided, it is unlikely that a 1.5-byte resolution display will appear. Again, IPV4 addresses strictly follow the byte-by-byte resolution display. On this basis, the meaning of the IP address format is divided into prefixes and suffixes below. Among them, the prefix can be further divided into the identification bit of the type A, type B, and type C network type + Network ID; the suffix can be further divided into Subnet ID + Host ID. The Internet uses IP (Internet Protocol) to identify a unique public network address.

Key 2: Analyze the Internet Protocol (IP) set of protocols. The purpose of the IP protocol is to identify a unique public network address. This function is achieved through two important fields in the IP address header data message: the source IP address and the destination IP address.

Take a step further. According to Euclidean geometry, we know that any line segment has a start point and an end point. Among them, the start point and the end point are a relative concept. For example, two line segments share a vertex. At this time, this vertex is both the end point of line segment one and the start point of line segment two.

According to the Euclidean line segment, we know that the starting point and ending point of an IP address are also relative, relative to a connection you are focusing on.

Key 3: Fragmentation and reassembly of IP data packets. Because different network types have different limits on the maximum value of IP data packets, IP data packets often encounter the problem of being fragmented. Each IP datagram fragment is a complete IP datagram. Like the unsegmented datagram, they have a complete IP datagram header and complete IP datagram content—the only difference is that they are The contents of some fields in the header of the fragmented IP data message may be different, such as the offset field and the flags field. After receiving the fragments, the host reorganizes the IP data fragments in the buffer.

Leave a Comment

Your email address will not be published.