例7-26验证VRF蓝色中10.2.0.0已知路径数
PE1 #显示IP BGP VPN VRF蓝色10.2.0.0BGP routing table entry for 2:2:10.2.0.0/16, version 9 Paths:(2 available, best #1, table blue) Advertised to non peer-group peers: 192.168.4.4 65005 10.9.1.2 from 10.9.1.2 (10.9.1.2) Origin IGP, metric 0, localpref 100, valid, external, best Extended Community:RT:2:2, mpls labels in/out 20/nolabel 65005, imported path from 1:1:10.2.0.0/16 192.168.4.4 (metric 21) from 192.168.4.4 (192.168.4.4) Origin IGP, metric 0, localpref 100, valid, internal Extended Community: RT:1:1, mpls labels in/out 20/19
通过配置举例7-27所示的eiBGP多路径特性,PE1可以同时使用VRF蓝色的两条路径。
例7-27 PE1的eiBGP配置
PE1(配置)#65100年路由器边界网关协议PE1 (config-router) #地址族ipv4 VRF蓝色PE1 (config-router-af) #maximum-paths eibgp 2
当查看配置后10.2.2.0的BGP输出(如例7-28所示)时,路由器将这两条路径都标记为多路径,尽管eBGP路径是最好的。
例7-28检查多路径配置
PE1 #显示IP BGP VPN VRF蓝色10.2.2.0BGP routing table entry for 2:2:10.2.0.0/16, version 10 Paths:(2 available, best #1, table blue) Multipath: eiBGP Advertised to non peer-group peers: 192.168.4.4 65005 10.9.1.2 from 10.9.1.2 (10.9.1.2) Origin IGP, metric 0, localpref 100, valid, external, Multipath, best Extended Community:RT:2:2, mpls labels in/out 20/nolabel 65005, imported path from 1:1:10.2.0.0/16 192.168.4.4 (metric 21) from 192.168.4.4 (192.168.4.4) Origin IGP, metric 0, localpref 100, valid, internal, multipath Extended Community: RT:1:1, mpls labels in/out 20/19 PE1#
入方向的IP报文将共享两条已知路径(iBGP/eBGP)显示IP cef VRF蓝色命令示例7-29。
例7-29验证CEF
PE1 #显示IP cef VRF蓝色10.2.2.010.2.0.0/16, version 11, epoch 0, per-destination sharing 0 packets, 0 bytes tag information set local tag: 20 via 10.9.1.2, 0 dependencies, recursive traffic share 1 next hop 10.9.1.2, Serial3/0 via 10.9.1.0/30 valid adjacency tag rewrite with Se3/0, point2point, tags upon:{}通过192.168.4.4,0依赖,递归流量共享1下一跳172.16.2.2,Ethernet0/0通过192.168.4.4/32有效邻接标签改写与Et0/0, 172.16.2.2,标签强加:{17 19}0包,0字节交换通过前缀tmstats:外部0包,0字节内部0包,0字节
但是,入方向的MPLS报文将共享一条已知的eBGP路径,详见MPLS转发表。例7-30中VRF的MPLS转发表中只有一个表项。如果只有一个eBGP路径,则只有一个入口。
例7-30验证LFIB
PE1 #查看MPLS转发VRF蓝色10.2.2.0Untagged 10.2.0.0/16[V] 0 Se3/0 point2point . Local出接口前缀字节tag出接口下一跳tag或VC或Tunnel Id switched interface 20 Untagged 10.2.0.0/16[V] 0 Se3/0 point2point . Local出接口
使用BGP多路径的一个复杂性是,无论链路带宽如何不同,链路上的负载分担都是相同的。EIGRP中出现的不平等负载共享可以防止较小带宽链路的过载。因此,在Cisco IOS Release 12.2(2)T及以后的IOS版本中,通过BGP扩展团体属性,可以实现iBGP对等体之间的路径带宽差异。在Cisco.com上查看功能导航,查看您的思科IOS版本和思科平台的可用性。支持iBGP、eBGP多路径负载分担和MPLS vpn中的eiBGP多路径负载分担。
当BGP路由器在两条或多条有效的BGP路径之间进行不均等的负载分担时,路由器使用带宽团体值来设置链路的方差。的边界网关协议dmzlink-bw命令,配置BGP按照链路带宽的比例分配流量。每个包含可用于多路径负载共享的外部接口的路由器都应该启用此命令。如果不配置边界网关协议dmz-link命令时,路由器会在更新时向iBGP对等体发送链路带宽扩展团体属性,但如果存在多条BGP路径,路由器不会在本地使用DMZ-link带宽进行不相等开销的负载分担。
的邻居<地址> dmzlink-bw命令用来在链路带宽扩展团体中传播从指定外部邻居学到的路由的链路带宽属性。当路由器接收到链路带宽属性并使用BGP的DMZ-link带宽时,路由器会为多条路径设置合适的流量负载分担值,并将该值传递给CEF,就像EIGRP的不等成本负载分担一样。多路径路由器将向iBGP对等体通告聚合的带宽。
如图7-7所示,站点A有两台路由器CE1和CE2,通过外部BGP将前缀10.8.8.0/24通告给与其相连的提供商边缘路由器PE2和PE3。PE2和PE3与ce相连的接口都有固定的带宽。PE路由器通过BGP DMZ-link团体承载BGP外部邻居的BGP DMZ-link带宽。在PE2和PE3上传播带宽属性的配置举例7-31。
边界网关协议DMZ链接
例7-31修改PE2、PE3的配置,使其携带BGP DMZ-Link团体字
303 - pe2 #显示运行|b路由器边界网关协议router bgp 65100 no synchronization bgp log-neighbor-changes neighbor 192.168.10.1 remote-as 65100 neighbor 192.168.10.1 update-source Loopback0 no auto-summary !Address-family vpnv4邻居192.168.10.1激活邻居192.168.10.1 send-community extended exit-address-family !Address-family ipv4 VRF blue redistribute connected neighbor remote-as 65500 neighbor 10.1.1.5 activate neighbor 10.1.1.5 dmzlink-bw no auto-summary no synchronization exit-address-family !pe3 - 304 #显示运行|b路由器边界网关协议router bgp 65100 no synchronization bgp log-neighbor-changes neighbor 192.168.10.1 remote-as 65100 neighbor 192.168.10.1 update-source Loopback0 no auto-summary !Address-family vpnv4邻居192.168.10.1激活邻居192.168.10.1 send-community extended exit-address-family !Address-family ipv4 VRF blue redistribute connected neighbor 10.2.2.6 remote-as 65500 neighbor 10.2.2.6 activate neighbor 10.2.2.6 dmzlink-bw no auto-summary no synchronization exit-address-family . ipv4 VRF blue redistribute connected neighbor 10.2.2.6 remote-as 65500 neighbor 10.2.2.6 activate neighbor 10.2.2.6 dmzlink-bw no auto-summary no synchronization
从例7-32中可以看出,带宽由PE路由器承担。路由器以千字节(KBps)表示DMZ-link带宽,而接口带宽以千字节(KBps)表示。
example7 -32验证BGP携带带宽
303 - pe2 #显示IP BGP VPN VRF蓝色10.8.8.0BGP routing table entry for 100:100:10.8.8.0/24, version 13 Paths:(1 available, best #1, table blue) Advertised to update-groups: 1 65500 10.1.1.5 (via blue) from 10.1.1.5 (10.8.8.5) Origin IGP, metric 0, localpref 100, valid, external, best Extended Community: RT:100:100 DMZ-Link Bw 1250 kbytes PE3-304#显示IP BGP VPN VRF蓝色10.8.8.0BGP routing table entry for 100:100:10.8.8.0/24, version 6 Paths: (1 available, best #1, table blue) Advertised to update-groups: 1 65500 10.2.2.6 (via blue) from 10.2.2.6 (10.8.8.6) Origin IGP, metric 0, localpref 100, valid, external, best Extended Community: RT:100:100 DMZ-Link Bw 625 kbytes PE3-304# . png
在iBGP负载共享特性可用之前,Cisco IOS只会选择一个iBGP最佳路径。为了使iBGP负载分担成功,缺省情况下,路由必须具有相等的属性,如weight、local preference、as路径、origin code、IGP metric等。如果两个路径的属性不相同,则路由器不将其作为多条路径使用,而只选择最佳路径。
在这种情况下,PE1的配置允许通过iBGP负载分担使用这两条路径,并且属性是相等的。因此,PE1接收到这条路由,并通过多路径配置使用这两条路径。由于配置的原因,PE1在本地使用定义的DMZ-link带宽边界网关协议dmzlink-bw命令,在地址族VPNv4下。
example7 -33配置PE1接收和使用bgp携带带宽
302 - pe1 #显示运行|b路由器边界网关协议router bgp 65100 no synchronization bgp log-neighbor-changes neighbor 192.168.10.3 remote-as 65100 neighbor 192.168.10.3 update-source Loopback0 neighbor 192.168.10.4 remote-as 65100 neighbor 192.168.10.4 update-source Loopback0 no auto-summary !Address-family vpnv4 neighbor 192.168.10.3 activate neighbor 192.168.10.3 send-community extended neighbor 192.168.10.4 activate neighbor 192.168.10.4 send-community extended BGP dmzlink-bw exit-address-family !Address-family ipv4 VRF blue neighbor 10.6.6.1 remote-as 65200 neighbor 10.6.6.1 activate maximum-paths ibgp 2 no auto-summary no synchronization exit-address-family .日志含义
通过示例7-34所示的输出,路由器PE1接收到两条路径,包括DMZ-link带宽。
例7-34 PE1接收路径和带宽的BGP验证
302 - pe1 #显示IP BGP VPN VRF蓝色10.8.8.0BGP routing table entry for 100:100:10.8.8.0/24, version 11 Paths:(2 available, best #1, table blue) Multipath: iBGP Advertised to update-groups: 1 65500 192.168.10.3 (metric 65) from 192.168.10.3 (192.168.10.3) Origin IGP, metric 0, localpref 100, valid, internal, Multipath, best Extended Community:RT:100:100 DMZ-Link Bw 1250 kbytes 65500 192.168.10.4 (metric 65) from 192.168.10.4 (192.168.10.4) Origin IGP, metric 0, localpref 100, valid, internal, multipath Extended Community: RT:100:100 DMZ-Link Bw 625 kbytes 301 - pe1 #
PE1将此DMZ-link带宽传递给路由表和VRF表,示例7-35。注意,通过192.168.10.3的路径的流量计数是2,通过192.168.10.4的路径的流量计数是1。
example7 -35验证BGP通过路由表和CEF表的负载分担不均
302 - pe1 #显示IP route VRF blue 10.8.8.0路由表项for 10.8.8.0/24已知via "bgp 65100",距离200,metric 0 Tag 65500, type internal* 192.168.10.3 (Default-IP-Routing-Table),从192.168.10.3 04:09:31前路线指标是0,交通分享数是2,啤酒花1、边界网关协议网络版本0路线标记65500 192.168.10.4 (Default-IP-Routing-Table),从192.168.10.4 04:09:31前路线指标是0,流量份额数是1跳1,边界网关协议网络版本0 65500 302 - pe1 #路线标记显示IP cef VRF蓝色10.8.8.010.8.8.0/24, version 82, epoch 0, per-destination sharing 0 packets, 0 bytes tag information set, all rewrite owned local tag:VPN route head via 192.168.10.3, 0 dependencies, recursive traffic share 2 next hop 10.10.10.3, Serial2/0 via 192.168.10.3/32 (Default) valid adjacency tag rewrite with recursive rewrite via 192.168.10.3/32, tags强加{25}via 192.168.10.4, 0 dependencies, recursive traffic share 1 next hop 10.20.20.4,Serial3/0通过192.168.104 /32(默认)有效的邻接标签重写递归重写通过192.168.104 /32,标签强加{18}0包,0字节通过前缀tmstats交换:外部0包,0字节内部0包,0字节302-PE1#
P和P设备之间的负载共享
有时,网络架构师希望在P和P设备之间建立多个链接,以帮助分配负载。不同的配置是可能的。可以是同一个P设备之间存在多条链路,也可以是不同P设备之间存在多条链路。当从一个P设备到另一个P设备时,P设备基于MPLS标签进行转发决策。对于多条路径,CEF仍然是填充负载共享表和决定到达目的地的最终路径的基础。当具有多条出方向的等价路径的P路由器收到带有MPLS标签的报文时,它使用源地址和目的地址的散列作为CEF算法的输入,进行负载分担决策。哈希的输出决定使用哪个接口和标签。
在P路由器上,使用Show IP cef exact-route命令不适用,因为它需要在CEF表中存在目的IP地址。作为对P路由器负载分担的快速粗略检查,管理员可以检查LFIB计数器。然而,根据设计,这可能并不准确。在后续的Cisco IOS代码中,如IOS Release 12.0(28)S2查看MPLS转发表标签命令用于检查路径。
用于确定CEF路径的命令如表7-11所示。
表7-11确定流程CEF路径的命令
设备功能 | 大多数IOS路由器 | SUP720 |
IP-to-IP路由 | Show IP cef exact-route | 显示MLS cef的准确路线 |
IP-to-label切换 | 显示IP cef VRF<多联机>确切路线 | 显示MLS cef的准确路线<多联机> |
Label-to-label切换 | 查看MPLS转发表标签<标识>准确路径ipv4 |
- - - - - - |
CEF和MPLS VPN负载共享平台的依赖关系
在MPLS VPN场景中进行负载共享时,必须考虑一些平台依赖关系。在Cisco 12000系列路由器上,每个线卡使用基于硬件的CEF表进行独立的转发决策。因此,在软件中计算和查看的路由使用Show IP cef exact-route< src > < dst >在RP上执行的命令可能不是实际使用的路径。
另一点是,Engine 4 MPLS负载共享机制与其他线路卡不同。哈希使用目的下一跳地址来分担E4线路卡上的负载,而不是源-目的对。因此,在MPLS VPN环境中,可以通过PE的出口环回地址实现核心链路的负载分担。在E4+上,负载共享基于每个流的IP源地址和目的地址,可以更细粒度。