此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何使用部分SR部署为基于LDP的流量提供SR优势,包括域间MPLS使用案例中可能应用SR。
Cisco 建议您了解以下主题:
本文档中的信息基于以下软件和硬件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
本文档概述了当支持SR的路由器和不支持SR的路由器混用在同一网络内,并且更准确地说是在同一路由域中时,SR与LDP交互的机制。
在节点上运行的组播控制平面客户端(MCC)必须确保它安装在节点的MPLS数据平面中的传入标签被唯一分配,并且分段路由使用分段路由全局块(SRGB)进行标签分配。使用SRGB可以使SR与任何其他MCC共存。
提示:此信息有助于您使用Inter-AS选项C为MPLS SR和MPLS LDP提供Inter-AS解决方案。
使用RFC 4364中定义的Inter-AS选项C,在具有SR MPLS控制平面的异类环境中的SR部署与MPLS LDP控制平面进行互操作。
本文档介绍服务提供商网络使用MPLS LDP和SR MPLS提供使用AS间选项C的虚拟专用网络的方法。
AS间选项C的简要概述:
AS间选项C是RFC 4364中介绍的用于互连多AS主干的第三个选项。这是迄今为止三种设计中最具可扩展性的选项,而且它有其自身的适用场景,要正确应用此设计,我们必须了解这些场景。
选项C是可伸缩的,因此是一个很好的候选选项。ASBR不传输任何VPN路由,它们只负责在自己的AS内分配PE的标记IPv4路由。
为了提高可扩展性,一个MP-EBGP VPNv4会话在PE或RR之间传输所有VPN路由(外部路由)。如果使用RR交换外部路由,则必须保留VPNv4路由的下一跳。
ASBR使用EBGP在AS(内部路由)之间交换内部PE路由信息。这些内部路由对应通过PE或RR之间的多跳MP-EBGP会话通告的外部路由的BGP下一跳。ASBR通告的内部路由可用于在PE之间建立MP-EBGP会话,并允许从入口到出口PE建立LSP。
从可扩展性角度来看,选项C是一个非常好的解决方案,是采用同一SP多AS网络的途径。
分段路由的简要概述:
分段路由(SR)利用源路由和隧道模式。节点通过一组受控的指令(称为数据段)引导数据包,方法是使用SR报头对数据包进行预置。网段可以表示任何指令、拓扑或基于服务。SR允许通过任何拓扑路径和服务链实施流量,同时仅在SR域的入口节点保持每个流量的状态。分段路由架构可以直接应用于MPLS数据平面,转发平面上变化很小。它需要对现有链路状态路由协议进行次要扩展。分段路由还可以使用新型路由扩展报头应用于IPv6。
将网段编码为MPLS标签。有序的数据段列表被编码为标签堆栈。要处理的数据段位于堆栈的顶部。完成数据段后,相关标签会从堆栈中弹出。 根据传统MPLS转发,分段路由MPLS数据平面操作是推送、交换和pop。在“段布线”中定义了以下段类型:
分段路由全局块(SRGB)是为LSD中的分段路由保留的标签值范围。SRGB标签值被指定为支持SR的节点的前缀段标识符(SID),并在整个域中具有全局意义。
映射服务器为部分或全部已知的前缀集中分配前缀SID。路由器必须能够充当映射服务器、映射客户端,或者同时充当这两者。
映射服务器的主要功能包括:
本部分帮助您了解并配置提供商网络之间的第3层虚拟专用网络(VPN)服务,该提供商网络具有支持SR的网络对等/连接到不支持SR的网络。在本节中,您将学习如何配置RFC“4364”和使用案例中定义的选项C。
在拓扑图的顶部,我们有一个由路由反射器、提供商边缘路由器和客户边缘路由器组成的支持SR的网络。
客户边缘路由器CE1和CE2分别具有VRF A和VRF B。这属于AS 65002。
在拓扑图底部,我们有一个支持LDP的网络,其中包含路由反射器、提供商边缘路由器和客户边缘路由器。
客户边缘路由器CE3和CE4分别具有VRF A和VRF B。这属于AS65001。
启用SR和LDP的网络两端的VRF A和VRF B需要相互通信。
主机名 | IP Address |
RR-01 | 10.0.0.1 |
RR-02 | 10.0.0.2 |
PE1 | 10.0.0.3 |
PE2 | 10.0.0.4 |
CE1 | 10.0.0.5 |
CE2 | 10.0.0.6 |
RR-03 | 10.0.1.1 |
RR-04 | 10.0.1.2 |
PE5 | 10.0.1.3 |
PE6 | 10.0.1.4 |
CE3 | 10.0.1.5 |
CE4 | 10.0.1.6 |
描述了设备的配置。
RR-1
segment-routing mpls
!
mapping-server
!
prefix-sid-map
address-family ipv4
10.0.0.1/32 index 200 range 10
exit-address-family
!
!
interface Loopback0
description Loopback0
ip address 10.0.0.1 255.255.255.255
ip router isis 65002
!
!
router isis 65002
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65002
bgp router-id 10.0.0.1
neighbor 10.0.0.3 remote-as 65002
neighbor 10.0.0.3 description rr client
neighbor 10.0.0.3 update-source Loopback0
neighbor 10.0.0.4 remote-as 65002
neighbor 10.0.0.4 description rr client
neighbor 10.0.0.4 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 description iBGP peer
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 ebgp-multihop 255
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 ebgp-multihop 255
neighbor 10.0.1.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.2 activate
neighbor 10.0.1.1 activate
neighbor 10.0.1.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 send-community extended
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 send-community extended
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community extended
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community both
neighbor 10.0.1.1 next-hop-unchanged
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community both
neighbor 10.0.1.2 next-hop-unchanged
exit-address-family
!
RR-2
segment-routing mpls
!
mapping-server
!
prefix-sid-map
address-family ipv4
10.0.0.2/32 index 200 range 10
exit-address-family
!
!
interface Loopback0
description Loopback0
ip address 10.0.0.2 255.255.255.255
ip router isis 65002
!
!
router isis 65002
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65002
bgp router-id 10.0.0.2
neighbor 10.0.0.3 remote-as 65002
neighbor 10.0.0.3 description rr client
neighbor 10.0.0.3 update-source Loopback0
neighbor 10.0.0.4 remote-as 65002
neighbor 10.0.0.4 description rr client
neighbor 10.0.0.4 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 description iBGP peer
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 ebgp-multihop 255
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 ebgp-multihop 255
neighbor 10.0.1.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.1 activate
neighbor 10.0.1.1 activate
neighbor 10.0.1.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 send-community extended
neighbor 10.0.0.3 route-reflector-client
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 send-community extended
neighbor 10.0.0.4 route-reflector-client
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community extended
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community both
neighbor 10.0.1.1 next-hop-unchanged
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community both
neighbor 10.0.1.2 next-hop-unchanged
exit-address-family
!
PE-1
interface Loopback0
description Loopback0
ip address 10.0.0.3 255.255.255.255
ip router isis 65002
!
vrf A # Define VRF A
address-family ipv4 unicast
import route-target
65000:1
!
export route-target
65000:1
!
!
vrf B # Define VRF B
address-family ipv4 unicast
import route-target
65000:2
!
export route-target
65000:2
!
!
router isis 65002 # ISIS Level 2
is-type level-2-only
net xx.xxxx.xxxx.xxxx.xx
address-family ipv4 unicast
metric-style wide
advertise link attributes
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
router-id Loopback0
segment-routing mpls sr-prefer
!
router bgp 65002 # BGP
bgp router-id 10.0.0.3
neighbor-group RR
remote-as 65002
update-source Loopback0
address-family vpnv4 unicast
!
!
neighbor 10.0.0.1
use neighbor-group RR
!
neighbor 10.0.0.2
use neighbor-group RR
vrf A
rd 65000:1
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.0.5 # IP address of CE1
remote-as 61001
ebgp-multihop 255
update-source Loopback100
address-family ipv4 unicast
!
vrf B
rd 65000:2
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.0.6 # IP address of CE2
remote-as 61001
ebgp-multihop 255
update-source Loopback101
address-family ipv4 unicast
!
interface GigabitEthernet1 # Link to CE-01
vrf A
ipv4 address x.x.x.x 255.255.255.0
!
interface GigabitEthernet2 # Link to CE-02
vrf B
ipv4 address x.x.x.x 255.255.255.0
!
segment-routing
global-block 16000 23999
!
RR-3
interface Loopback0
description Loopback0
ip address 10.0.1.1 255.255.255.255
ip router isis 65001
!
!
router isis 65001
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65001
bgp router-id 10.0.1.1
neighbor 10.0.1.3 remote-as 65001
neighbor 10.0.1.3 description rr client
neighbor 10.0.1.3 update-source Loopback0
neighbor 10.0.1.4 remote-as 65001
neighbor 10.0.1.4 description rr client
neighbor 10.0.1.4 update-source Loopback0
neighbor 10.0.1.2 remote-as 65001
neighbor 10.0.1.2 description iBGP peer
neighbor 10.0.1.2 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 ebgp-multihop 255
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 ebgp-multihop 255
neighbor 10.0.0.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.2 activate
neighbor 10.0.0.1 activate
neighbor 10.0.0.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 send-community extended
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 send-community extended
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 send-community extended
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community both
neighbor 10.0.0.1 next-hop-unchanged
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 next-hop-unchanged
exit-address-family
!
RR-4
interface Loopback0
description Loopback0
ip address 10.0.1.2 255.255.255.255
ip router isis 65001
!
!
router isis 65001
net xx.xxxx.xxxx.xxxx.xx
metric-style wide
segment-routing mpls
segment-routing prefix-sid-map advertise-local
!
router bgp 65001
bgp router-id 10.0.1.2
neighbor 10.0.1.3 remote-as 65001
neighbor 10.0.1.3 description rr client
neighbor 10.0.1.3 update-source Loopback0
neighbor 10.0.1.4 remote-as 65001
neighbor 10.0.1.4 description rr client
neighbor 10.0.1.4 update-source Loopback0
neighbor 10.0.1.1 remote-as 65001
neighbor 10.0.1.1 description iBGP peer
neighbor 10.0.1.1 update-source Loopback0
neighbor 10.0.0.1 remote-as 65002
neighbor 10.0.0.1 ebgp-multihop 255
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 ebgp-multihop 255
neighbor 10.0.0.2 update-source Loopback0
!
address-family ipv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.1 activate
neighbor 10.0.0.1 activate
neighbor 10.0.0.2 activate
exit-address-family
!
address-family vpnv4
neighbor 10.0.1.3 activate
neighbor 10.0.1.3 send-community extended
neighbor 10.0.1.3 route-reflector-client
neighbor 10.0.1.4 activate
neighbor 10.0.1.4 send-community extended
neighbor 10.0.1.4 route-reflector-client
neighbor 10.0.1.1 activate
neighbor 10.0.1.1 send-community extended
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 send-community both
neighbor 10.0.0.1 next-hop-unchanged
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 next-hop-unchanged
exit-address-family
!
PE-6
interface Loopback0
description Loopback0
ip address 10.0.1.3 255.255.255.255
ip router isis 65001
!
vrf A # Define VRF A
address-family ipv4 unicast
import route-target
65000:1
!
export route-target
65000:1
!
vrf B # Define VRF B
address-family ipv4 unicast
import route-target
65000:2
!
export route-target
65000:2
!
router isis 65001
is-type level-2-only
net xx.xxxx.xxxx.xxxx.xx
address-family ipv4 unicast
metric-style wide
advertise link attributes
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
router-id Loopback0
segment-routing mpls sr-prefer
!
router bgp 65001
bgp router-id 10.0.1.3
neighbor-group RR
remote-as 65002
update-source Loopback0
address-family vpnv4 unicast
!
!
neighbor 10.0.1.1
use neighbor-group RR
!
neighbor 10.0.1.2
use neighbor-group RR
vrf A
rd 65000:1
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.1.5 # IP address of CE3
remote-as 61001
ebgp-multihop 255
update-source Loopback100
address-family ipv4 unicast
!
vrf B
rd 65000:2
address-family ipv4 unicast
redistribute connected
allocate-label all
!
neighbor 10.0.1.6 # IP address of CE4
remote-as 61001
ebgp-multihop 255
update-source Loopback101
address-family ipv4 unicast
!
interface GigabitEthernet1 # Link to CE3
vrf A
ipv4 address x.x.x.x 255.255.255.0
!
interface GigabitEthernet2 # Link to CE4
vrf B
ipv4 address x.x.x.x 255.255.255.0
!
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
05-Aug-2021 |
初始版本 |