首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

MPLS技术的L3VPN应用组网环境下的TTL处理行为

篇文章“

| MPLS技术基础 | 标签/Label帧结构字段

”中笔者在最后留了个小问题——“在MPLS VPN中,MPLS对TTL的操作又是怎样的呢?

那么通过本文,笔者来将问题说明一下!

其实这个问题,跟我们之前聊的MPLS网络域中的TTL处理行为“大同小异”,为什么呢?因为在MPLS技术范畴里,MPLS对TTL的处理行为它无外乎2种处理模式:

Uniform模式:IP报文经过MPLS网络时,在入节点,IP TTL减1映射到MPLS TTL字段,此后报文在MPLS网络中按照标准的TTL处理方式处理。在出节点将MPLS TTL减1后映射到IP TTL字段。

Pipe模式:在入节点,IP TTL值减1,MPLS TTL字段为固定值,此后报文在MPLS网络中按照标准的TTL处理方式处理。在出节点会将IP TTL字段的值减1。即IP分组经过MPLS网络时,无论经过多少跳,IP TTL只在入节点和出节点分别减1。

而在MPLS VPN的应用中,我们出于对网络安全的考虑,需要隐藏MPLS骨干网络的结构,此情况下,对于私网报文,建议在Ingress LSR上使用Pipe模式。

下面笔者用实验的方式来再次证明一下上面的这2句话的真实可信度!

我们得先准备一个MPLS VPN的组网实验环境,其组网拓扑如下:

如上图所示的MPLS VPN组网环境中,笔者己打通2个私网Site间的路由(192.168.5.0/24与192.168.6.0/24)。现笔者在沿路的节点上开启抓包功能,我们通过实验的方式来看一下在MPLS VPN中其TTL的处理情况,先看华为VRP系统默认的Uniform模式。

笔者在Site.A上做如下PING测试:

现在可以开始观察各节点上的抓包情况......

Figure: PE1_s1/0/0接口抓包

Figure: P1_g0/0/0接口抓包

Figure: P2_g0/0/1接口抓包

Figure: PE2_g0/0/0接口抓包

Figure: PE2_s1/0/0接口抓包

正如Uniform模式其特点,当你在Site.A处Tracert另一个节点(Site.B)时,会看到报文沿路所经过的所有节点情况,不信我们可以试试:

接下来我们继续测试Pipe模式下的MPLS VPN中TTL的处理行为,需要稍微修改一下配置,如下:

[PE1]undo ttl propagate

[PE2]undo ttl propagate

在PE1与PE2两台边缘LSRs节点上做了如上配置命令后,接下来我们看测试抓包结果:

Figure: PE1_s1/0/0接口抓包

Figure: P1_g0/0/0接口抓包

Figure: P2_g0/0/1接口抓包

Figure: PE2_g0/0/0接口抓包

Figure: PE2_s1/0/0接口抓包

总体来看,它与上篇文章中所讲的单纯的MPLS网络域中对TTL的处理行为没有什么太大的区别,只不过在MPLS的VPN应用场景组网环境中,多了一些标签(双标签)而己。举一反三,在有三层标签的MPLS应用环境中,MPLS对TTL的处理也是一样的。

最后我们也可以看一下在Pipe模式下,Tracert工具的结果与Uniform模式的区别之处,如下:

笔者针对MPLS VPN组网环境,现将MPLS对TTL的2种操作模式总结成如下的二张图(供参考)——

写到这里,笔者留道思考题给各位去发散一下脑力,问题如下:

在如下的MPLS VPN组网环境中(与本文的拓扑环境一样),笔者将PE1配置成Pipe模式,而PE2保持系统默认(Uniform模式),请问PE2在将业务报文封装发送给CE2时,其IP报文中的TTL值为多少?为什么?

在不做实验的前提下,能推算出此TTL的值,也就算你真正理解了MPLS网络中TTL的处理工作原理了,各位有兴趣试试吧!

考虑到有些小伙伴(特别是在校工科大学生)MPLS的基础不是太好,笔者把此问题的组网实验环境配置脚本放上,供参考!

附:MPLS VPN组网环境(本文中的实验环境)各设备配置脚本

[PE1]display current-configuration

[V200R003C00]

#

sysname PE1

#

ipvpn-instance vpna

ipv4-family

route-distinguisher 100:100

vpn-target 100:100 export-extcommunity

vpn-target 100:100 import-extcommunity

#

mplslsr-id 1.1.1.1

mpls

#

mplsldp

#

interfaceSerial1/0/0

link-protocol ppp

ip binding vpn-instance vpna

ip address 172.16.15.1 255.255.255.0

#

interfaceGigabitEthernet0/0/0

ip address 12.1.1.1 255.255.255.0

mpls

mplsldp

#

interfaceLoopBack0

ip address 1.1.1.1 255.255.255.255

#

bgp 4008

router-id 1.1.1.1

peer 4.4.4.4 as-number 4008

peer 4.4.4.4 connect-interface LoopBack0

#

ipv4-family unicast

undo synchronization

peer 4.4.4.4 enable

#

ipv4-family vpnv4

policy vpn-target

peer 4.4.4.4 enable

#

ipv4-family vpn-instance vpna

import-route direct

import-route static

#

ospf 1 router-id 1.1.1.1

area 0.0.0.0

network 1.1.1.1 0.0.0.0

network 12.1.1.1 0.0.0.0

#

ip route-static vpn-instancevpna192.168.5.0 255.255.255.0 172.16.15.5

displaycurrent-configuration

[V200R003C00]

#

sysname PE2

#

ip vpn-instance vpna

ipv4-family

route-distinguisher 200:200

vpn-target 100:100 export-extcommunity

vpn-target 100:100 import-extcommunity

#

mpls lsr-id 4.4.4.4

mpls

#

mpls ldp

#

interfaceSerial1/0/0

link-protocol ppp

ip binding vpn-instance vpna

ip address 172.16.46.4 255.255.255.0

#

interfaceGigabitEthernet0/0/0

ip address 34.1.1.4 255.255.255.0

mpls

mpls ldp

#

interfaceLoopBack0

ip address 4.4.4.4 255.255.255.255

#

bgp 4008

router-id 4.4.4.4

peer 1.1.1.1 as-number 4008

peer 1.1.1.1 connect-interface LoopBack0

#

ipv4-family unicast

undo synchronization

peer 1.1.1.1 enable

#

ipv4-family vpnv4

policy vpn-target

peer 1.1.1.1 enable

#

ipv4-family vpn-instance vpna

import-route direct

import-route static

#

#

ospf 1 router-id 4.4.4.4

area 0.0.0.0

network 4.4.4.4 0.0.0.0

network 34.1.1.4 0.0.0.0

#

ip route-static vpn-instancevpna192.168.6.0 255.255.255.0 172.16.46.6

[P1]displaycurrent-configuration

[V200R003C00]

#

sysname P1

#

mpls lsr-id 2.2.2.2

mpls

#

mpls ldp

#

interfaceGigabitEthernet0/0/0

ip address 12.1.1.2 255.255.255.0

mpls

mpls ldp

#

interfaceGigabitEthernet0/0/1

ip address 23.1.1.2 255.255.255.0

mpls

mpls ldp

#

interfaceLoopBack0

ip address 2.2.2.2 255.255.255.255

#

ospf 1 router-id 2.2.2.2

area 0.0.0.0

network 2.2.2.2 0.0.0.0

network 12.1.1.2 0.0.0.0

network 23.1.1.2 0.0.0.0

[P2]displaycurrent-configuration

[V200R003C00]

#

sysname P2

#

mpls lsr-id 3.3.3.3

mpls

#

mpls ldp

#

interfaceGigabitEthernet0/0/0

ip address 34.1.1.3 255.255.255.0

mpls

mpls ldp

#

interfaceGigabitEthernet0/0/1

ip address 23.1.1.3 255.255.255.0

mpls

mpls ldp

#

interfaceLoopBack0

ip address 3.3.3.3 255.255.255.255

#

ospf 1 router-id 3.3.3.3

area 0.0.0.0

network 3.3.3.3 0.0.0.0

network 23.1.1.3 0.0.0.0

network 34.1.1.3 0.0.0.0

[Site.A]displaycurrent-configuration

[V200R003C00]

#

sysname Site.A

#

interfaceSerial1/0/0

link-protocol ppp

ip address 172.16.15.5 255.255.255.0

#

interfaceLoopBack1

ip address 192.168.5.1 255.255.255.0

#

ip route-static 0.0.0.0 0.0.0.0 172.16.15.1

[Site.B]display current-configuration

[V200R003C00]

#

sysname Site.B

#

interfaceSerial1/0/0

link-protocol ppp

ip address 172.16.46.6 255.255.255.0

#

interfaceLoopBack1

ip address 192.168.6.1 255.255.255.0

#

ip route-static 0.0.0.0 0.0.0.0 172.16.46.4

您的支持就是我们开发最好课程的源始动力

ONE NETWORKS

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20180724A13DDD00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券