Chinaunix首页 | 论坛 | 博客

qsh

  • 博客访问: 4036854
  • 博文数量: 1015
  • 博客积分: 15904
  • 博客等级: 上将
  • 技术积分: 8572
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-04 19:16
文章分类

全部博文(1015)

文章存档

2019年(1)

2017年(1)

2016年(19)

2015年(27)

2014年(30)

2013年(95)

2012年(199)

2011年(72)

2010年(109)

2009年(166)

2008年(296)

分类:

2009-01-18 04:31:40

关于什么是MSS以及MTU,他们是如何工作的请参考我的资源中心的PDF文档。

ip tcp mss

设置router再发起tcp连接时所要设定的MSS值,当然这个MSS值还是会和MSS buffer以及MTU计算的MSS值,收到的MSS值比较,取最小的来advertise。

ip tcp adjust-mss

这个端口模式下的命令只对需要穿越此router的TCP SYN中的MSS值进行修改。当然,如果原本的值小于这个,那么就无需改动这个值。

所以MSS的比较发生再下面的几个参数间:

1. local route: MTU-40
   non-local route: 536 versus MTU-40/MTU-40

Since PMTUD can detect the minimum link mtu, some implementation will not use 536 default value. This depends on tcp implementation.

2. per-route metric (except for default route, this metric can be changed following path mtu value)
3. MSS defined
4. received MSS (only happened on receiving host)

Since routes can change dynamically, when some time has passed since the last decrease of the path MTU, a larger value (up to the minimum of the MSS announced by the other end, or the outgoing interface MTU) can be tried. RFC 1191 recommends this time interval be about 10 minutes.

=====================================

Cisco router上的两个修改mtu的命令的区别:

1. 端口mtu命令

R1_CE_A(config-if)#mtu 1099

修改改端口链路层的MTU,所以包含所有的上层协议。(不单单只针对IP)

2. 端口ip mtu命令

R1_CE_A(config-if)#ip mtu 100

只针对三层协议为IP的MTU大小。

ip mtu命令的最大值是受到mtu端口命令的限制的。ip tcp adjust-mss也是受到它的限制。(也就是说,不能超过端口mtu)。

=====================================

如果router发起一个TCP连接,会有如下的两种情况:

1. 目标地址为本地网络,那么MSS就按照本地端口MTU进行比较,得出MSS结果。(1460)
2. 如果为远端网络,那么就按照RFC791的576为MTU来进行比较。


MPLS MTU
=========


Usage Guidelines
•Setting the MPLS MTU to a high number can lead to packets being dropped on some devices, because the labeled packet is larger than the interface physical MTU.

•ATM interfaces cannot accommodate packets that exceed the Segmentation and Reassembly (SAR) buffer size, because labels are added to the packet. The bytes argument refers to the number of bytes in the packet before the addition of any labels. If each label is 4 bytes, the maximum value of bytes on an ATM interface is the physical MTU minus 4*x bytes, where x is the number of labels expected in the received packet.

•If a labeled IPv4 packet exceeds the MPLS MTU size for the interface, Cisco IOS software fragments the packet. If a labeled non-IPv4 packet exceeds the MPLS MTU size, the packet is dropped.

•All devices on a physical medium must have the same MPLS MTU value in order for MPLS to interoperate.

•The MTU for labeled packets for an interface is determined as follows:

–If the mpls mtu bytes command has been used to configure an MPLS MTU, the MTU for labeled packets is the bytes value.

–Otherwise, the MTU for labeled packets is the default MTU for the interface.

•Because labeling a packet makes it larger due to the label stack, you may want the MPLS MTU to be larger than the interface MTU or IP MTU in order to prevent the fragmentation of labeled packets, which would not be fragmented if they were unlabeled.

•Changing the interface MTU value (using the mtu interface configuration command) can affect the MPLS MTU of the interface. If the MPLS MTU value is the same as the interface MTU value (this is the default), and you change the interface MTU value, the MPLS MTU value will automatically be set to this new MTU as well. However, the reverse is not true; changing the MPLS MTU value has no effect on the interface MTU.

 

阅读(2622) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~