此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何在Nexus环境中配置基于策略的重定向(PBR)服务和IPSLA。
图1显示了连接到不同核心交换机的典型的DC到DR多条ISP链路。
图 1.DC-DR网络拓扑
数据中心和DR位置将Nexus 9K系列交换机作为核心和接入交换机。核心和接入交换机配置为双面vPC。DC核心交换机具有带HSRP的VLAN10的网关。DR核心交换机具有使用HSRP的VLAN20的网关。vPC Peer-Gateway命令在DC和DR核心交换机上配置。DC和DR核心交换机之间有两个ISP链路。DC核心01和DC核心02通过VLAN50配置了点对点IP地址。 DR Core-01和DR Core-02使用VLAN50配置了点对点IP地址。ISP-A连接在DC Core-01和DR Core-01之间,ISP-B连接在DC Core-02和DR Core-02之间。服务器连接到DC/DR中的两台接入交换机。DC核心交换机上配置了VLAN-10和VLAN-20的服务器网关。 DR核心交换机上配置了VLAN-30和VLAN-40的服务器网关。
1. 主机A和主机C之间的通信必须使用ISP-A链路。如果ISP-A出现故障,流量必须交换到ISP B。
图 2.主机A到主机C的流量通过ISP-A
图 3.在ISP-A链路发生故障的情况下,主机A到主机C的流量会流经ISP-B
2. 主机A和主机D之间的通信必须使用ISP-B链路。 如果ISP-B出现故障,流量必须交换到ISP-A。
图 4.主机A到主机D的流量通过ISP-B
图 5.在ISP-B链路发生故障的情况下,主机A到主机D的流量会通过ISP-A
3. 主机B和主机C之间的通信必须使用ISP-B链路。如果ISP-B出现故障,流量必须交换到ISP-A。
图 6.主机B到主机C的流量通过ISP-B
图 7.在ISP-B链路发生故障的情况下,主机B到主机C的流量会通过ISP-A
4. 主机B和主机D之间的通信必须使用ISP-A链路。如果ISP-A出现故障,流量必须交换到ISP-B。
图 8.主机B到主机D的流量通过ISP-A
图 9在ISP-A链路发生故障的情况下,主机B到主机D的流量会通过ISP-B
5. 如果出现任何链路故障,必须发送链路关闭通知。
IPSLA配置,用于跟踪来自两个核心交换机的两个WAN链路。
图 10.来自DC-CORE-01的ISP-A和ISP-B链路跟踪
表 1.从DC-CORE-01跟踪ISP-A和ISP-B链路的IPSLA配置
DC-CORE-01# show run track 跟踪1 ip sla 1可达性 延迟上升1下降1 途径2 ip sla 2可达性 延迟上升1下降1 DC-CORE-01# show run sla sender 功能sla发送器 ip sla 1 icmp-echo 192.168.100.2 source-ip 192.168.50.1 ip sla schedule 1 life forever start-time now ip sla 2 icmp-echo 192.168.200.2 source-ip 192.168.50.1 ip sla schedule 2 life forever start-time now |
图 11.来自DC-CORE-02的ISP-A和ISP-B链路跟踪
表 2.从DC-CORE-02跟踪ISP-A和ISP-B链路的IPSLA配置
DC-CORE-02# show run track 跟踪1 ip sla 1可达性 延迟上升1下降1 途径2 ip sla 2可达性 延迟上升1下降1 DC-CORE-02# show run sla sender 功能sla发送器 ip sla 1 icmp-echo 192.168.100.2 source-ip 192.168.50.2 ip sla schedule 1 life forever start-time now ip sla 2 icmp-echo 192.168.200.2 source-ip 192.168.50.2 ip sla schedule 2 life forever start-time now |
图 12.来自DR-CORE-01的ISP-A和ISP-B链路跟踪
表 3.从DR-CORE-01跟踪ISP-A和ISP-B链路的IPSLA配置
DR-CORE-01# show run track 跟踪1 ip sla 1可达性 延迟上升1下降1 途径2 ip sla 2可达性 延迟上升1下降1 DR-CORE-01# show run sla sender 功能sla发送器 ip sla 1 icmp-echo 192.168.100.2 source-ip 192.168.60.1 ip sla schedule 1 life forever start-time now ip sla 2 icmp-echo 192.168.200.2 source-ip 192.168.60.1 ip sla schedule 2 life forever start-time now |
图 13.来自DR-CORE-02的ISP-A和ISP-B链路跟踪
表 4.从DR-CORE-02跟踪ISP-A和ISP-B链路的IPSLA配置
DR-CORE-02# show run track 跟踪1 ip sla 1可达性 延迟上升1下降1 途径2 ip sla 2可达性 延迟上升1下降1 DR-CORE-02# show run sla sender 功能sla发送器 ip sla 1 icmp-echo 192.168.100.2 source-ip 192.168.60.2 ip sla schedule 1 life forever start-time now ip sla 2 icmp-echo 192.168.200.2 source-ip 192.168.60.2 ip sla schedule 2 life forever start-time now |
我们必须将DC-CORE-01中指向DC-CORE-02的静态路由配置为ISP-B DR-CORE-02 IP地址。我们必须配置两个不同的路由以到达DR核心点对点IP地址VLAN60,一个路由将添加到DR核心ISP-A,具有默认管理值,另一个路由将添加到DC-CORE-02,具有更高的AD值。我们必须将IP SLA 1附加到通向ISP-A的路由。如果ISP-A链路发生故障,则必须使用指向DC-CORE-02的DR核心点对点子网更新路由表。
图 14. 从DC-CORE-SW01到ISP-B和DR核心点对点子网的连通性
表 5.DC-CORE-01中的静态路由配置
ip route 192.168.60.0/30 192.168.50.2 100 ip route 192.168.60.0/30 192.168.100.2 track 1 ip route 192.168.200.0/30 192.168.50.2 |
我们必须在DC-CORE-02中将目的地的静态路由配置为ISP-A DR-CORE-01 IP地址。我们必须配置两个不同的路由以到达DR核心点对点IP地址VLAN60,一个路由将添加到DR核心ISP-B,使用默认管理值,另一个路由将添加到DC-CORE-01,AD值更高。我们必须将IP SLA 2附加到通向ISP-B的路由。如果ISP-B链路发生故障,则必须使用指向DC-CORE-01的DR核心点对点子网更新路由表。
图 15. 从DC-CORE-02到ISP-A和DR核心点对点子网的可达性
表 6.DC-CORE-02中的静态路由配置
ip route 192.168.60.0/30 192.168.50.1 100 ip route 192.168.60.0/30 192.168.200.2 track 1 ip route 192.168.200.0/30 192.168.50.1 |
我们必须在DR-CORE-01中配置指向DR-CORE-02的静态路由,目的地为ISP-B DC-CORE-02 IP地址。我们必须配置两个不同的路由以到达DC核心点对点IP地址VLAN50,一个路由将添加到DC核心ISP-A,具有默认管理值,另一个路由将添加到DR-CORE-02,具有更高的AD值。我们必须将IP SLA 1附加到通向ISP-A的路由。如果ISP-A链路发生故障,则必须使用指向DR-CORE-02的DC核心点对点子网更新路由表。
图 16. 从DR-CORE-01到ISP-B和DC核心点对点子网的可达性
表 7.DR-CORE-01中的静态路由配置
ip route 192.168.60.0/30 192.168.60.2 100 ip route 192.168.60.0/30 192.168.100.1 track 1 ip route 192.168.200.0/30 192.168.60.2 |
我们必须在DR-CORE-02中配置指向DR-CORE-01的静态路由,目的地为ISP-A DC-CORE-01 IP地址。我们必须配置两个不同的路由以到达DC核心点对点IP地址VLAN50,一个路由将添加到DC核心ISP-B,具有默认管理值,另一个路由将添加到DR-CORE-01,具有更高的AD值。我们必须将IP SLA 2附加到通向ISP-B的路由。如果ISP-B链路发生故障,必须使用指向DR-CORE-01的DC核心点对点IP地址更新路由表。
图 17. 从DR-CORE-02到ISP-A和DC核心点对点子网的可达性
表 8. DR-CORE-02中的静态路由配置
ip route 192.168.60.0/30 192.168.60.1 100 ip route 192.168.60.0/30 192.168.200.1 track 1 ip route 192.168.200.0/30 192.168.60.1 |
表 9. 检验所有核心交换机上的跟踪。它适用于所有核心交换机。
DC-CORE-01# show track 途径1 IP SLA 1可达性 可接通性已启用 14个更改,最后一个更改21:38:57 最新操作返回代码:OK 最新RTT(毫秒):2 跟踪者: IPv4静态路由1 路由映射配置 延迟增加1秒,减少1秒 途径2 IP SLA 2可达性 可接通性已启用 12个更改,上次更改07:08:56 最新操作返回代码:OK 最新RTT(毫秒):1 跟踪者: 路由映射配置 延迟增加1秒,减少1秒 |
必须根据源-目的IP地址将主机之间的流量重定向到ISP-A和ISP-B。要完成多项配置才能实现基于策略的重定向:
我们必须在DC-CORE-01上配置访问列表,以便主机A/主机B和主机C/主机D之间进行通信
表 10. DC-CORE-01上的访问列表配置
ip access-list EndpointA-to-EndpointC 10 permit ip 192.168.10.10/32 192.168.30.10/32 ip access-list EndpointA-to-EndpointD 10 permit ip 192.168.10.10/32 192.168.40.10/32 ip access-list EndpointB-to-EndpointC 10 permit ip 192.168.20.10/32 192.168.30.10/32 ip access-list EndpointB-to-EndpointD 10 permit ip 192.168.20.10/32 192.168.40.10/32 跟踪1 ip sla 1可达性 |
我们必须在DC-CORE-02上配置访问列表,以便主机A/主机B和主机C/主机D之间进行通信
表 11. DC-CORE-02上的访问列表配置
ip access-list EndpointA-to-EndpointC 10 permit ip 192.168.10.10/32 192.168.30.10/32 ip access-list EndpointA-to-EndpointD 10 permit ip 192.168.10.10/32 192.168.40.10/32 ip access-list EndpointB-to-EndpointC 10 permit ip 192.168.20.10/32 192.168.30.10/32 ip access-list EndpointB-to-EndpointD 10 permit ip 192.168.20.10/32 192.168.40.10/32 |
我们必须在DR-CORE-01上配置访问列表,以实现HostC/HostD与HostA/HostA之间的通信
表 12. DR-CORE-01上的访问列表配置
ip access-list EndpointC-to-EndpointA 10 permit ip 192.168.30.10/32 192.168.10.10/32 ip access-list EndpointC-to-EndpointB 10 permit ip 192.168.30.10/32 192.168.20.10/32 ip access-list EndpointD-to-EndpointA 10 permit ip 192.168.40.10/32 192.168.10.10/32 ip access-list EndpointD-to-EndpointB 10 permit ip 192.168.40.10/32 192.168.20.10/32 |
我们必须在DR-CORE-02上配置访问列表,以实现HostC/HostD与HostA/HostA之间的通信。
表 13. DR-CORE-02上的访问列表配置
ip access-list EndpointC-to-EndpointA 10 permit ip 192.168.30.10/32 192.168.10.10/32 ip access-list EndpointC-to-EndpointB 10 permit ip 192.168.30.10/32 192.168.20.10/32 ip access-list EndpointD-to-EndpointA 10 permit ip 192.168.40.10/32 192.168.10.10/32 ip access-list EndpointD-to-EndpointB 10 permit ip 192.168.40.10/32 192.168.20.10/32 |
我们必须在DC-CORE-01上配置路由映射、附加访问列表、设置下一跳以及跟踪命令。ISP-A和ISP-B的下一跳都必须是路由映射的一部分。
表 14. DC-CORE-01上的路由映射配置
route-map PBR permit 10 match ip address EndpointA-to-EndpointC set ip next-hop verify-availability 192.168.100.2 track 1 set ip next-hop verify-availability 192.168.200.2 track 2 force-order route-map PBR permit 20 match ip address EndpointA-to-EndpointD set ip next-hop verify-availability 192.168.200.2 track 2 set ip next-hop verify-availability 192.168.100.2 track 1 force-order route-map PBR permit 30 match ip address EndpointB-to-EndpointC set ip next-hop verify-availability 192.168.200.2 track 2 set ip next-hop verify-availability 192.168.100.2 track 1 force-order route-map PBR permit 40 match ip address EndpointB-to-EndpointD set ip next-hop verify-availability 192.168.100.2 track 1 set ip next-hop verify-availability 192.168.200.2 track 2 force-order |
我们必须在DC-CORE-02上配置Route-map,附加访问列表,设置下一跳以及track命令。ISP-A和ISP-B的下一跳都必须是Route-Map的一部分。
表 15. DC-CORE-02上的路由映射配置
route-map PBR permit 10 match ip address EndpointA-to-EndpointC set ip next-hop verify-availability 192.168.100.2 track 1 set ip next-hop verify-availability 192.168.200.2 track 2 force-order route-map PBR permit 20 match ip address EndpointA-to-EndpointD set ip next-hop verify-availability 192.168.200.2 track 2 set ip next-hop verify-availability 192.168.100.2 track 1 force-order route-map PBR permit 30 match ip address EndpointB-to-EndpointC set ip next-hop verify-availability 192.168.200.2 track 2 set ip next-hop verify-availability 192.168.100.2 track 1 force-order route-map PBR permit 40 match ip address EndpointB-to-EndpointD set ip next-hop verify-availability 192.168.100.2 track 1 set ip next-hop verify-availability 192.168.200.2 track 2 force-order |
我们必须在DR-CORE-01上配置路由映射、附加访问列表并设置下一跳以及track命令。ISP-A和ISP-B的下一跳都必须是路由映射的一部分。
表 16. DR-CORE-01上的路由映射配置
route-map PBR permit 10 match ip address EndpointC-to-EndpointA set ip next-hop verify-availability 192.168.100.1 track 1 set ip next-hop verify-availability 192.168.200.1 track 2 force-order route-map PBR permit 20 match ip address EndpointD-to-EndpointA set ip next-hop verify-availability 192.168.200.1 track 2 set ip next-hop verify-availability 192.168.100.1 track 1 force-order route-map PBR permit 30 match ip address EndpointC-to-EndpointB set ip next-hop verify-availability 192.168.200.1 track 2 set ip next-hop verify-availability 192.168.100.1 track 1 force-order route-map PBR permit 40 match ip address EndpointD-to-EndpointB set ip next-hop verify-availability 192.168.100.1 track 1 set ip next-hop verify-availability 192.168.200.1 track 2 force-order |
我们必须在DR-CORE-01上配置路由映射、附加访问列表并设置下一跳以及track命令。ISP-A和ISP-B的下一跳都必须是路由映射的一部分。
表 17. DR-CORE-02上的路由映射配置
route-map PBR permit 10 match ip address EndpointC-to-EndpointA set ip next-hop verify-availability 192.168.100.1 track 1 set ip next-hop verify-availability 192.168.200.1 track 2 force-order route-map PBR permit 20 match ip address EndpointD-to-EndpointA set ip next-hop verify-availability 192.168.200.1 track 2 set ip next-hop verify-availability 192.168.100.1 track 1 force-order route-map PBR permit 30 match ip address EndpointC-to-EndpointB set ip next-hop verify-availability 192.168.200.1 track 2 set ip next-hop verify-availability 192.168.100.1 track 1 force-order route-map PBR permit 40 match ip address EndpointD-to-EndpointB set ip next-hop verify-availability 192.168.100.1 track 1 set ip next-hop verify-availability 192.168.200.1 track 2 force-order |
路由映射必须应用于交换虚拟接口(服务器GW)。我们还需要在核心交换机点对点接口上应用路由映射,以在ISP链路发生故障或数据包到达不具备必要ISP链路的vPC对等交换机时重定向流量。
我们必须在DC-CORE-01中的接口VLAN10、接口VLAN20和接口VLAN50上应用路由映射。
表 18. 在DC-CORE-01上应用路由映射
interface Vlan10 no shutdown no ip redirects ip address 192.168.10.2/24 no ipv6 redirects ip policy route-map PBR hsrp 10 ip 192.168.10.1 interface Vlan20 no shutdown no ip redirects ip address 192.168.20.2/24 no ipv6 redirects ip policy route-map PBR hsrp 20 ip 192.168.20.1 interface Vlan50 no shutdown no ip redirects ip address 192.168.50.1/30 no ipv6 redirects ip policy route-map PBR |
我们必须在DC-CORE-02中的接口VLAN10、接口VLAN20和接口VLAN50上应用路由映射。
表 19. 在DC-CORE-02上应用路由映射
interface Vlan10 no shutdown no ip redirects ip address 192.168.10.3/24 no ipv6 redirects ip policy route-map PBR hsrp 10 ip 192.168.10.1 interface Vlan20 no shutdown no ip redirects ip address 192.168.20.3/24 no ipv6 redirects ip policy route-map PBR hsrp 20 ip 192.168.20.1 interface Vlan50 no shutdown no ip redirects ip address 192.168.50.2/30 no ipv6 redirects ip policy route-map PBR |
我们必须在DR-CORE-01中的接口VLAN30、接口VLAN40和接口VLAN60上应用路由映射。
表 20. 在DR-CORE-01上应用路由映射
interface Vlan30 no shutdown no ip redirects ip address 192.168.30.2/24 no ipv6 redirects ip policy route-map PBR hsrp 30 ip 192.168.30.1 interface Vlan40 no shutdown no ip redirects ip address 192.168.40.2/24 no ipv6 redirects ip policy route-map PBR hsrp 40 ip 192.168.40.1 interface Vlan60 no shutdown no ip redirects ip address 192.168.60.1/30 no ipv6 redirects ip policy route-map PBR |
我们必须在DR-CORE-02中的接口VLAN30、接口VLAN40和接口VLAN60上应用路由映射。
表 21. 在DR-CORE-02上应用路由映射
interface Vlan30 no shutdown no ip redirects ip address 192.168.30.3/24 no ipv6 redirects ip policy route-map PBR hsrp 30 ip 192.168.30.1 interface Vlan40 no shutdown no ip redirects ip address 192.168.40.3/24 no ipv6 redirects ip policy route-map PBR hsrp 40 ip 192.168.40.1 interface Vlan60 no shutdown no ip redirects ip address 192.168.60.2/30 no ipv6 redirects ip policy route-map PBR |
验证DC-CORE-01上的路由映射、配置的访问列表和跟踪状态必须为UP。
表 22. 检验DC-CORE-01上的路由映射
DC-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order |
验证DC-CORE-02上的路由映射、配置的访问列表和跟踪状态必须为UP。
表 23. 检验DC-CORE-02上的路由映射
DC-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order |
验证DR-CORE-01上的路由映射、配置的访问列表和跟踪状态必须为UP。
表 24. 检验DR-CORE-01上的路由映射
DR-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order |
验证DR-CORE-02上的路由映射、配置的访问列表和跟踪状态必须为UP。
表 25. 检验DR-CORE-02上的路由映射
DR-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order |
表 26.从主机A ping主机C
从192.168.10.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=251 time=1.016 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=251 time=0.502 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=251 time=0.455 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=251 time=0.424 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=251 time=0.682 ms |
表 27.从主机A到主机C的Traceroute输出
192.168.10.10 (192.168.10.10)到192.168.30.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.10.2 (192.168.10.2) 0.634毫秒0.59毫秒0.521毫秒 2 * * * 3 192.168.30.10 (192.168.30.10) 0.856毫秒0.546毫秒0.475毫秒 |
图 18.从主机A到主机C的流量
表 28.从主机A ping主机D
从192.168.10.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=252 time=0.902 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=252 time=0.644 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=252 time=0.423 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=252 time=0.565 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=252 time=0.548 ms |
表 29.从主机A到主机D的Traceroute输出
192.168.10.10 (192.168.10.10)到192.168.40.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 0.963毫秒0.847毫秒0.518毫秒 2 192.168.50.2 (192.168.50.2) 0.423毫秒0.383毫秒0.369毫秒 3 * * * 4 192.168.40.10 (192.168.40.10) 1.094毫秒0.592毫秒0.761毫秒 |
图 19.从主机A到主机D的流量
表 30.从主机B ping主机C
从192.168.20.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=252 time=0.773 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=252 time=0.496 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=252 time=0.635 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=252 time=0.655 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=252 time=0.629 ms |
表 31.从主机B到主机C的Tracroute输出
192.168.20.10 (192.168.20.10)到192.168.30.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 1.272毫秒0.772毫秒0.779毫秒 2 192.168.50.2 (192.168.50.2) 0.536毫秒0.49毫秒0.359毫秒 3 * * * 4 192.168.30.10 (192.168.30.10) 0.937毫秒0.559毫秒0.446毫秒 |
图 20.从主机B到主机C的流量
表 32.从主机B ping主机D
从192.168.20.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=251 time=1.052 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=251 time=0.516 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=251 time=0.611 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=251 time=0.498 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=251 time=0.487 ms |
表 33.从主机B到主机D的Traceroute输出
192.168.20.10 (192.168.20.10)到192.168.40.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.20.2 (192.168.20.2) 0.804毫秒0.467毫秒0.44毫秒 2 * * * 3 192.168.40.10 (192.168.40.10) 1.135毫秒0.617毫秒0.74毫秒 |
图 21.从主机B到主机D的流量
表 34.关闭ISP-A链路
DC-CORE-01(config)# int e1/3 DC-CORE-01(config-if)# shut DC-CORE-01# show int e1/3 以太网接口1/3关闭(管理性关闭) 管理状态为down,专用接口 硬件:100/1000/10000/25000以太网,地址:c4b2.3942.2b67 (bia c4b2.3942.2b6a) Internet address is 192.168.100.1/30 |
图 22.ISP-A链路断开
表 35.跟踪所有核心交换机的输出。
DC-CORE-01# show track 途径1 IP SLA 1可达性 可达性关闭 15个更改,上次更改00:00:08 最新操作返回代码:超时 跟踪者: IPv4静态路由1 路由映射配置 延迟增加1秒,减少1秒 途径2 IP SLA 2可达性 可接通性已启用 12个更改,上次更改07:48:12 最新操作返回代码:OK 最新RTT(毫秒):2 跟踪者: 路由映射配置 延迟增加1秒,减少1秒 |
表 36.DC-CORE-01上的路由映射验证
DC-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order |
表 37.DC-CORE-02上的路由映射验证
DC-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.2 track 2 [ UP ] force-order |
表 38.DR-CORE-01上的路由映射验证
DR-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order |
表 39.DC-CORE-02上的路由映射验证
DR-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ DOWN ] ip next-hop verify-availability 192.168.200.1 track 2 [ UP ] force-order |
表 40.从主机A ping主机C
从192.168.10.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=252 time=0.923 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=252 time=0.563 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=252 time=0.591 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=252 time=0.585 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=252 time=0.447 ms |
表 41.从主机A到主机C的Traceroute输出
192.168.10.10 (192.168.10.10)到192.168.30.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 1.08 ms 0.603 ms 0.559 ms 2 192.168.50.2 (192.168.50.2) 0.385毫秒0.367毫秒0.363毫秒 3 * * * 4 192.168.30.10 (192.168.30.10) 1.205毫秒0.597毫秒0.45毫秒 |
图 23.从主机A到主机C的流量
表 42.从主机A ping主机D
从192.168.10.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=252 time=0.893 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=252 time=0.459 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=252 time=0.421 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=252 time=0.582 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=252 time=0.588 ms |
表 43.从主机A到主机D的Traceroute输出
192.168.10.10 (192.168.10.10)到192.168.40.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 1.012毫秒0.724毫秒0.801毫秒 2 192.168.50.2 (192.168.50.2) 0.567毫秒0.4毫秒0.381毫秒 3 * * * 4 192.168.40.10 (192.168.40.10) 0.929毫秒0.6毫秒0.466毫秒 |
图 24.从主机A到主机D的流量
表 44.从主机B ping主机C
从192.168.20.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=252 time=0.899 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=252 time=0.496 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=252 time=0.511 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=252 time=0.447 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=252 time=0.58 ms |
表 45.从主机B到主机C的Traceroute输出
192.168.20.10 (192.168.20.10)到192.168.30.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 1.147毫秒0.699毫秒0.525毫秒 2 192.168.50.2 (192.168.50.2) 0.443毫秒0.415毫秒0.386毫秒 3 * * * 4 192.168.30.10 (192.168.30.10) 0.731毫秒0.506毫秒0.465毫秒 |
图 25.从主机B到主机C的流量
表 46.从主机B ping主机D
从192.168.20.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=252 time=0.797 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=252 time=0.479 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=252 time=0.439 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=252 time=0.416 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=252 time=0.411 ms |
表 47.从主机B到主机D的Traceroute输出
192.168.20.10 (192.168.20.10)到192.168.40.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.50.2 (192.168.50.2) 1.092毫秒0.706毫秒0.627毫秒 2 192.168.50.2 (192.168.50.2) 0.537毫秒0.389毫秒0.378毫秒 3 * * * 4 192.168.40.10 (192.168.40.10) 0.939毫秒0.52毫秒0.459毫秒 |
图 26.从主机B到主机D的流量
表 48. No shut ISP-A Link
DC-CORE-01(config)# int e1/3 DC-CORE-01(config-if)# no shut DC-CORE-01(config-if)# exit DC-CORE-01(config)# show int e1/3 Ethernet1/3处于工作状态 管理状态为up,专用接口 硬件:100/1000/10000/25000以太网,地址:c4b2.3942.2b67 (bia c4b2.3942.2b6a) Internet address is 192.168.100.1/30 |
图 27.ISP-A链路接通
表 49.关闭ISP-B链路
DC-CORE-02(config)# int e1/5 DC-CORE-02(config-if)# shut DC-CORE-02(config-if)# show interface e1/5 以太网接口1/5关闭(管理性关闭) 管理状态为down,专用接口 硬件:100/1000/10000/25000以太网,地址:4ce1.7517.03c7 (bia 4ce1.7517.03cc) Internet address is 192.168.200.1/30 |
图 28.ISP-B链路关闭
表 50.跟踪所有核心交换机的输出。
DC-CORE-01# show track 途径1 IP SLA 1可达性 可接通性已启用 16个更改,上次更改00:02:16 最新操作返回代码:OK 最新RTT(毫秒):1 跟踪者: IPv4静态路由1 路由映射配置 延迟增加1秒,减少1秒 途径2 IP SLA 2可达性 可达性关闭 13个更改,上次更改00:00:10 最新操作返回代码:超时 跟踪者: 路由映射配置 延迟增加1秒,减少1秒 |
表 51.DC-CORE-01上的路由映射验证
DC-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] force-order |
检验DC-CORE-02上的路由映射
表 52.DC-CORE-02上的路由映射验证
DC-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointA-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointA-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip address (access-lists):EndpointB-to-EndpointC 设置子句: ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointB-to-EndpointD 设置子句: ip next-hop verify-availability 192.168.100.2 track 1 [ UP ] ip next-hop verify-availability 192.168.200.2 track 2 [ DOWN ] force-order |
检验DR-CORE-01上的路由映射
表 53.DR-CORE-01上的路由映射验证
DR-CORE-01# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] force-order |
检验DR-CORE-02上的路由映射
表 54.DR-CORE-02上的路由映射验证
DR-CORE-02# show route-map route-map PBR, permit, sequence 10 匹配子句: ip address (access-lists):EndpointC-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] force-order route-map PBR, permit, sequence 20 匹配子句: ip address (access-lists):EndpointD-to-EndpointA 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 30 匹配子句: ip地址(访问列表):EndpointC到EndpointB 设置子句: ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] force-order route-map PBR, permit, sequence 40 匹配子句: ip address (access-lists):EndpointD到EndpointB 设置子句: ip next-hop verify-availability 192.168.100.1 track 1 [ UP ] ip next-hop verify-availability 192.168.200.1 track 2 [ DOWN ] force-order |
表 55.从主机A ping主机C
从192.168.10.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=251 time=1.011 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=251 time=0.555 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=251 time=0.754 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=251 time=0.495 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=251 time=0.484 ms |
表 56.从HostA到HostC的tracerout输出
DR-CORE-01# traceroute 192.168.30.10 source 192.168.10.10 vrf DC-EPA 192.168.10.10 (192.168.10.10)到192.168.30.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.10.2 (192.168.10.2) 0.684毫秒0.393毫秒0.38毫秒 2 * * * 3 192.168.30.10 (192.168.30.10) 1.119毫秒0.547毫秒0.496毫秒 |
图 29.从主机A到主机C的流量
表 57.从主机A ping主机D
从192.168.10.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=251 time=0.785 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=251 time=0.606 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=251 time=0.43 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=251 time=0.549 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=251 time=0.538 ms |
表 58.从HostA到HostD的tracerout输出
192.168.10.10 (192.168.10.10)到192.168.40.10 (192.168.10.10)的traceroute,最长30跳,48字节数据包 1 192.168.10.2 (192.168.10.2) 0.746毫秒0.486毫秒0.395毫秒 2 * * * 3 192.168.40.10 (192.168.40.10) 0.994毫秒0.537毫秒0.569毫秒 |
图 30.从主机A到主机D的流量
表 59.从主机A ping主机D
从192.168.20.10 PING 192.168.30.10 (192.168.30.10):56个数据字节 64 bytes from 192.168.30.10: icmp_seq=0 ttl=251 time=0.928 ms 64 bytes from 192.168.30.10: icmp_seq=1 ttl=251 time=0.539 ms 64 bytes from 192.168.30.10: icmp_seq=2 ttl=251 time=0.456 ms 64 bytes from 192.168.30.10: icmp_seq=3 ttl=251 time=0.441 ms 64 bytes from 192.168.30.10: icmp_seq=4 ttl=251 time=0.548 ms |
表 60.从主机B到主机C的tracerout输出
192.168.20.10 (192.168.20.10)到192.168.30.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.20.2 (192.168.20.2) 0.764毫秒0.463毫秒0.482毫秒 2 * * * 3 192.168.30.10 (192.168.30.10) 0.979毫秒0.697毫秒0.578毫秒 |
图 31.从主机B到主机C的流量
表 61.从主机A ping主机D
从192.168.20.10 PING 192.168.40.10 (192.168.40.10):56个数据字节 64 bytes from 192.168.40.10: icmp_seq=0 ttl=251 time=0.859 ms 64 bytes from 192.168.40.10: icmp_seq=1 ttl=251 time=0.623 ms 64 bytes from 192.168.40.10: icmp_seq=2 ttl=251 time=0.637 ms 64 bytes from 192.168.40.10: icmp_seq=3 ttl=251 time=0.449 ms 64 bytes from 192.168.40.10: icmp_seq=4 ttl=251 time=0.446 ms |
表 62.从主机B到主机C的tracerout输出
192.168.20.10 (192.168.20.10)到192.168.40.10 (192.168.20.10)的traceroute,最大30跳,48字节数据包 1 192.168.20.2 (192.168.20.2) 0.783毫秒0.446毫秒0.4毫秒 2 * * * 3 192.168.40.10 (192.168.40.10) 1.216毫秒0.559毫秒0.504毫秒 |
图 32.从主机B到主机D的流量
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
07-Oct-2024 |
初始版本 |