Tcpip Protocol 3

Source: Internet
Author: User

1. Why are IP (IPv4) sharding required? How do I control parts? Where is the shard? Why? Where can I reorganize parts? Is the larger the data packet to be split, the better? Is the smaller the data packet to be split, the better? Why?
Partition reasonThe maximum transmission unit limit (MTU) exists in the physical network. When an IP packet is large, an IP packet cannot be encapsulated in a physical frame. Therefore, IP data must be split into multiple packets and sent multiple times. The MTU of Ethernet is generally 1500 bytes (excluding the end of the frame header frame of the physical network, the actual data transmitted cannot reach 1500 ). IP data can be up to 64 KB (the length field in the IP protocol is 16 bits, so the maximum packet can be 2 ^ 16 = 64 KB)
IP shard Control: There are three fields in the IP header for partition control. The three fields are identificatoin, 16 bits, flags (3 bits), and Fragment offset (13 BITs, in bytes ). Identificatoin uniquely identifies a datagram. identificatoin is globally unique to the sender. The three fields can be used to reorganize different parts of the same packet into a complete packet.
IP sharding is generally performed at the vro.: When a large MTU physical network reaches a small MTU physical network, the router will split the datagram so that it can be transmitted through the small MTU physical network. The reason for not sharding on the sender is that the sender cannot know the minimum MTU in the path.
Reorganizing IP addresses on the target host: Because it allows each shard to be able to select a route independently, it does not need to store or reorganize the shard on the intermediate router. However, it also has disadvantages: the loss of a piece of data means the loss of the entire datagram; small data packets use a large MTU physical network with a low aging rate.
The larger the IP segment, the better:The larger the number of parts, the smaller the number of parts, the less burden of routing will be reduced; the smaller the number of parts, the lower the chance of errors. In addition, the smaller the number of parts, the less data the first packet, the higher the channel utilization.

IPv6. IP fragmentation is no longer performed on the intermediate router. A shard is an end-to-end part. The destination site is reorganized when the source Shard is sent. The source station responsible for segmentation can select the minimum MTU of 1280 bytes, or execute the path MTU discovery technology to obtain the minimum MTU from the source station to the target station. The purpose of using end-to-end sharding is to reduce the burden on the router, so that the router can process the packets that can be sent. An end-to-end slice also causes a consequence: the MTU whose data packet length exceeds the physical network will be discarded (because the route may be changed), and an ICMP packet will be returned to the origin site.

2. TCP congestion control
Congeston collapse, after the datagram times out, the host usually responds with retransmission. packet retransmission will not reduce the congestion, but will only increase the congestion.

Congestion response from the sending Source: TCP standard recommended processing technology: slow start, decreasing Acceleration
Acceleration decline Policy: In the event of congestion (ICMP source station suppression messages will be sent when the router discards the packets), the congestion window will be halved immediately (the congestion window will affect the window size of the Sliding Window Protocol ); for packet segments retained in the sending window, double the retransmission timer's time limit (this can tolerate greater network latency and reduce the possibility of retransmission due to packet timeout)
Slow start recovery: When the communication volume is increased after the transmission or congestion of the new connection is started, only one packet segment is used as the initial value of the congestion window. When a confirmation is received, the congestion window is increased by 1.
Slow Start is used to prevent sharp fluctuations in the communication volume between 0 and congestion. Imagine that if all the windows are restored directly, a large number of packets will be sent instantly, which may immediately lead to congestion. After congestion, the communication volume will immediately decrease. After the communication volume decreases, the traffic will be restored immediately, it will immediately cause congestion.

Congestion avoidance:When the congestion window reaches half of the congestion window size, TCP will enter the congestion avoidance state, reducing the window increase speed. At this time, after all the message segments in the window are confirmed, the window size can only increase by 1.
Congestion prevention is to avoid increasing the number of windows so that more congestion occurs.

Router response to congestion: discarded packets
The discard policy hasTail discard and random early discard red. Tail discard: When the router cache is full, all subsequent packets are directly discarded.

Early random discarding is a random packet discarded when the router cache is about to be full. This allows some sending hosts to control the congestion in advance to avoid global synchronization.
Red's detailed policy: when the data is reported, if the cache is full, the packet is discarded. If the cache is not full, but the size has exceeded the upper threshold, the packet is discarded by probability P.

 

Layer-3 switching: layer-2 switching technology + layer-3 forwarding technology

UDP checksum
UDP optional
TCP mandatory
UDP checksum covers the UDP pseudo header, UDP header and the UDP data
Unlike IP addresses, IP addresses only calculate the first checksum.
Purpose: Let UDP double-check that the data has arrived at the correct destination.
Checksum error: silently discarded, no error message is generated.
The Checksum is calculated only at the sender and receiver, but not at the intermediate node.
The pseudo header includes the source IP address, destination IP address, protocol, UDP length, and 0 padding.

 

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.