Technical documentation
发布日期:2023-06-13 浏览次数:1354 来源:崔志鹏
HCIP培训Datacom网络技术学习-NDP-PMTU路径MTU的发现
WOLFLAB官方微信:17316362402,关注【WOLFLAB】实验室,了解华为认证HCIP培训Datacom课程!
华为认证HCIP培训Datacom课程-PMTU:路径MTU的发现
①ipv4针对报文进行分片,通过头部当中的ID+FLAG+OFFSET来实现,ipv6要想针对报文进行分片,需要通过扩展头部分段报头44来实现;
②IPV6的报文超过出接口的MTU就会进行分片,IPV6为了提高转发效率,仅在源节点进行分片,在目的节点进行重组,在转发的过程中是不进行分片操作的,当然也不进行分片报文的整合工作。
③此时源节点到底将报文分成多大呢?就需要用到PMTU,PMTU也是Icmpv6的高级特性;
④IPv6要求链路层所支持的最小MTU为1280,所以源节点直接按照1280进行分片就OK;
实验:R1/R2/R3/R4编址如下,底层运行OSPFV3确保AR1和AR4的loop0接口可以ping通,将接口的MTU设置如下,观察现象;
[AR2-GigabitEthernet0/0/1]dis this
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2001:23::2/64
ipv6 mtu 1400
ospfv3 1 area 0.0.0.0
ospfv3 mtu-ignore
[AR3-GigabitEthernet0/0/0]dis this
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2001:34::3/64
ipv6 mtu 1300
ospfv3 1 area 0.0.0.0
ospfv3 mtu-ignore
AR1发送一个1500字节的数据包,此时丢两个包:
[AR1]ping ipv6 -a 2001::1 -s 1500 2004::4
PING 2004::4 : 1500 data bytes, press CTRL_C to break
Request time out
Request time out
Reply from 2004::4
bytes=1500 Sequence=3 hop limit=62 time = 40 ms
Reply from 2004::4
bytes=1500 Sequence=4 hop limit=62 time = 40 ms
Reply from 2004::4
bytes=1500 Sequence=5 hop limit=62 time = 60 ms
----------------------------------------------
AR1发送一个1500字节的数据包到了AR2上,AR2发现数据包比如出接口的MTU要大,此时就会给AR1回复一个icmpv6 packet too big的数据包,里面携带自己出接口的MTU,AR1收到后就按照1400进行分片:
Frame 68: 1294 bytes on wire (10352 bits), 1294 bytes captured (10352 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_2a:2c:f3 (00:e0:fc:2a:2c:f3), Dst: HuaweiTe_0b:49:19 (00:e0:fc:0b:49:19)
Internet Protocol Version 6, Src: 2001:23::2, Dst: 2001::1
Internet Control Message Protocol v6
Type: Packet Too Big (2)
Code: 0
Checksum: 0x3664 [correct]
[Checksum Status: Good]
MTU: 1400
Internet Protocol Version 6, Src: 2001::1, Dst: 2004::4
Data (1184 bytes)
---------------------------------------------
AR1发送的第二个数据包就按照1400字节进行分片,数据包到了AR2上通过,到了AR3上发现数据包比如出接口的MTU要大,此时就会给AR1回复一个icmpv6 packet too big的数据包,里面携带自己出接口的MTU,AR1收到后就按照1300进行分片:
Frame 71: 1294 bytes on wire (10352 bits), 1294 bytes captured (10352 bits) on interface -, id 0
Ethernet II, Src: HuaweiTe_2a:2c:f3 (00:e0:fc:2a:2c:f3), Dst: HuaweiTe_0b:49:19 (00:e0:fc:0b:49:19)
Internet Protocol Version 6, Src: 2001:34::3, Dst: 2001::1
Internet Control Message Protocol v6
Type: Packet Too Big (2)
Code: 0
Checksum: 0x3716 [correct]
[Checksum Status: Good]
MTU: 1300
Internet Protocol Version 6, Src: 2001::1, Dst: 2004::4
Data (1184 bytes)
------------------------------------------------
AR1发送的第三个数据包按照1300字节进行分片,数据包到了AR2和AR3都能通过,并发送给目的节点AR4上,AR4将数据包进行重组,给AR1回复REPLY,AR1收到之后表明报文已经到了目的节点,此时会将PMTU的信息记录下来,以后在访问2004::4就按照1300字节进行分片;
[AR1]dis ipv6 pathmtu all
IPv6 Destination Address ZoneID PathMTU LifeTime(M) Type FF
2004::4 0 1300 6 Dynamic No
-------------------------------------------
Total: 1 Dynamic: 1 Static: 0
https://www.wolf-lab.com/
WOLFLAB官方微信:17316362402
WOLFLAB官方QQ:2569790740
我们提供CCNA|CCNP|EI CCIE;HCIA|HCIP|HCIE Datacom|VMware等培训