跨域的OptionC配置和标签分配分析 联系客服

发布时间 : 星期六 文章跨域的OptionC配置和标签分配分析更新完毕开始阅读

跨域的OptionC配置和标签分配分析

5.3 说明

见图5.1,报文从PE1转出时,需要压上三层标签,从内到外分别的VPN路由的标签,BGP LSP的标签,公网LSP的标签。到ASBR1时,就只剩下两层标签了,分别是VPN的路由标签和BGP LSP的标签,进入ASBR1后,BGP LSP就终结掉了,就剩下VPN路由的标签和公网LSP的标签了,以后就是普通的MPLS VPN的转发流程了。在RR上公网LSP标签下一跳弹出,最后PE2收到了只有私网标签的报文。 图5.2是图5.1的反方向过程,标签的分配原理一样。

6 简单的互通测试

在PE1上的Ping测试:

[PE1]ping -vpn-instance vpna -a 200.1.1.1 201.1.1.1

PING 201.1.1.1: 56 data bytes, press CTRL_C to break Reply from 201.1.1.1: bytes=56 Sequence=1 ttl=251 time=13 ms Reply from 201.1.1.1: bytes=56 Sequence=2 ttl=251 time=7 ms Reply from 201.1.1.1: bytes=56 Sequence=3 ttl=251 time=7 ms Reply from 201.1.1.1: bytes=56 Sequence=4 ttl=251 time=6 ms Reply from 201.1.1.1: bytes=56 Sequence=5 ttl=251 time=7 ms --- 201.1.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 6/8/13 ms

华为技术有限公司 第 8 页

跨域的OptionC配置和标签分配分析

在PE2上的Ping测试:

ping -vpn-instance charles -a 201.1.1.1 200.1.1.1 PING 200.1.1.1: 56 data bytes, press CTRL_C to break Reply from 200.1.1.1: bytes=56 Sequence=1 ttl=251 time=11 ms Reply from 200.1.1.1: bytes=56 Sequence=2 ttl=251 time=6 ms Reply from 200.1.1.1: bytes=56 Sequence=3 ttl=251 time=5 ms Reply from 200.1.1.1: bytes=56 Sequence=4 ttl=251 time=6 ms Reply from 200.1.1.1: bytes=56 Sequence=5 ttl=251 time=6 ms --- 200.1.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 5/6/11 ms

7 报文转发过程中标签的作用

原则:转发过程中路由器只分析报文中的最外层标签,不区分该标签是公网标签还是私网标签。

7.1 域内

域内标签报文转发只用到公网LSP标签的交换,报文中的BGP标签、私网标签保持不变。

7.2 域间

域间标签报文转发时报文有2层标签,从内到外为BGP标签、私网标签,到达对端ASBR时,BGP标签交换为对端AS内的公网LSP标签。

8 配置中涉及的特殊命令

8.1 peer label-route-capability

华为技术有限公司 第 9 页

跨域的OptionC配置和标签分配分析

peer label-route-capability命令用来使能处理带标签的IPV4路由的能力,在ASBR、RR和PE上配置该命令,使PE能够通过RR的反射,获得BGP+路由(路由+标签),从而能够给去往对端PE的报文打上BGP标签。 该条命令的应用例:

bgp 100 undo synchronization group PE1 internal peer PE1 advertise-community peer PE1 connect-interface LoopBack0

peer PE1 label-route-capability

peer 1.1.1.10 group PE1 group ASBR1 internal peer ASBR1 connect-interface LoopBack0

peer ASBR1 label-route-capability

peer 1.1.1.3 group ASBR1 group RR external peer RR ebgp-max-hop peer RR connect-interface LoopBack0 peer 1.1.1.1 group RR as-number 200

通过display bgp routing-table label 命令,可以显示BGP+标签的分配情况 例:

[PE1]disp bgp r l Flags: # - valid ^ - active I - internal D - damped H - history S - aggregate suppressed In/out Dest/Mask Next-Hop Label ------------------------------------------------------------------------------- #^I 1.1.1.1/32 1.1.1.3 -/- # I 1.1.1.8/32 1.1.1.3 -/- #^I 1.1.1.9/32 1.1.1.3 -/1025 # I 1.1.1.10/32 1.1.1.3 -/- #^ 100.1.1.1/32 0.0.0.0 -/-

disp bgp r l Flags: # - valid ^ - active I - internal D - damped H - history S - aggregate suppressed In/out Dest/Mask Next-Hop Label ------------------------------------------------------------------------------- #^ 1.1.1.1/32 10.0.0.25 -/- #^ 1.1.1.8/32 0.0.0.0 -/- #^ 1.1.1.9/32 10.0.0.25 1025/1024

华为技术有限公司 第 10 页

跨域的OptionC配置和标签分配分析

#^ 1.1.1.10/32 0.0.0.0 1024/- #^I 100.1.1.1/32 1.1.1.10 -/-

8.2 peer next-hop-invariable

peer next-hop-invariable命令指明向EBGP邻居发送路由时,不改变路由的下一跳。缺省情况下,向ebgp邻居发送路由,会改变路由的下一跳为自己。

这项配置一般用于第三种跨域VPN方式使用反射器通告VPNV4路由的组网环境。跨域的反射器之间通告VPNV4路由时,配置不改变路由的下一跳。 应用例:

bgp 100

undo synchronization group RR external peer RR ebgp-max-hop peer RR connect-interface LoopBack0 peer 1.1.1.1 group RR as-number 200

ipv4-family vpnv4 peer RR enable peer RR next-hop-invariable peer 1.1.1.1 group RR

通过在PE上的display bgp vpn-instance all routing-tabel命令,可以看到在RR1、RR2上配置的peer next-hop-invariable命令生效,如下例,分别为在AS100内的PE1和AS200内的PE2上的显示,其中1.1.1.10,1.1.1.9分别为PE1,PE2的loopback接口 0的地址。

例:

[PE1]disp bgp v a r Flags: # - valid ^ - active I - internal D - damped H - history S - aggregate suppressed Dest/Mask Next-Hop Med Local-pref Origin Path -------------------------------------------------------------------------- Route Distinguisher:1:1 (VPN instance:vpna) #^ 200.1.1.0 0.0.0.0 INC #^I 201.1.1.0 1.1.1.9 100 INC 200

华为技术有限公司 第 11 页