Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use of TCPMSS under Iptables

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Mtu is the largest packet transmitted over the network. Mss is the maximum value of data transmitted over the network. Mss plus packet header data is equal to mtu. To put it simply, take the TCP package as an example. If the message transmits 1400 bytes of data, then mss is 1400, plus 20-byte IP header, 20-byte tcp header, then mtu is 1400-20-20. Of course, when transmitting, other protocols have to add some packet headers in front, in short, mtu is the total size of the last message sent. Mss is the size of the data you need to send out.

1.MSS: maximum segment size of Maxitum Segment Size

The abbreviation for 2.MSS maximum transfer size is a concept in the TCP protocol.

3.MSS is the most big data segment that a TCP packet can transmit each time.

In order to achieve the best transmission performance, the TCP protocol usually negotiates the MSS value of both parties when establishing a connection, which is often replaced by the MTU value when the TCP protocol is implemented (the 20Bytes of the IP packet header and the header 20Bytes of the TCP data segment need to be subtracted), so the MSS is often 1460. Both sides of the communication will determine the maximum MSS value of this connection according to the minimum MSS value provided by both parties.

-- set-mss value # sets specific MSS values

-- clamp-mss-to-pmtu # automatically adjust MSS according to MTU

For example:

Iptables-A FORWARD-p tcp--tcp-flags SYN,RST SYN-j TCPMSS-- clamp-mss-to-pmtu

The purpose of this rule is to change TCP MSS to suit PMTU (Path MTU).

One is to set mss to a fixed value:

Iptables-A FORWARD-p tcp--tcp-flags SYN,RST SYN- j TCPMSS-- set-mss 1460

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report