R101的BGP表中显示所以去往Internet的流量都通过链R101-R103.
R101#sh ip bgp
BGP table version is 6, local router ID is 192.168.12.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i0.0.0.0 192.168.12.2 100 0 10 i
*> 10.10.13.3 0 10 i
*> 10.10.34.0/24 10.10.13.3 0 0 10 i
* i 192.168.12.2 100 0 10 i
* i192.168.11.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
* i192.168.12.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
R101#sh ip ro
Gateway of last resort is 10.10.13.3 to network 0.0.0.0
C 192.168.12.0/24 is directly connected, FastEthernet0/0
C 192.168.11.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.13.0 is directly connected, Serial1/1
B 10.10.34.0 [20/0] via 10.10.13.3, 00:02:39
B* 0.0.0.0/0 [20/0] via 10.10.13.3, 00:13:01 |
R102的BGP表中显示按照路由策略所以去往AS10的流量都通过R102-R104.
R102#sh ip bgp
BGP table version is 5, local router ID is 192.168.12.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.10.24.4 0 10 i
* i 192.168.12.1 100 0 10 i
* i10.10.34.0/24 192.168.12.1 0 100 0 10 i
*> 10.10.24.4 0 10 i
* i192.168.11.0 192.168.12.1 0 100 0 i
*> 0.0.0.0 0 32768 i
* i192.168.12.0 192.168.12.1 0 100 0 i
*> 0.0.0.0 0 32768 i
R102#sh ip ro
Gateway of last resort is 10.10.24.4 to network 0.0.0.0
C 192.168.12.0/24 is directly connected, FastEthernet0/0
C 192.168.11.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.24.0 is directly connected, Serial1/2
B 10.10.34.0 [20/0] via 10.10.24.4, 00:04:12
B* 0.0.0.0/0 [20/0] via 10.10.24.4, 00:12:08 |
验证从AS10进入AS11的流量。去往网络192.168.11.0的流量走链路R103-R101,去往网络162.168.12.0的流量走链路R104-R102.
R103# sh ip bgp
BGP table version is 5, local router ID is 10.10.34.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.34.0/24 0.0.0.0 0 32768 i
*> 192.168.11.0 10.10.13.1 0 0 11 i
*>i192.168.12.0 10.10.34.4 0 100 0 11 i
* 10.10.13.1 0 0 11 11 11 11 i
R103#sh ip ro
Gateway of last resort is not set
B 192.168.12.0/24 [200/0] via 10.10.34.4, 00:49:14
B 192.168.11.0/24 [20/0] via 10.10.13.1, 00:52:36
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.13.0 is directly connected, Serial1/0
C 10.10.34.0 is directly connected, FastEthernet0/0 |
在R104上情况相同。
当R101-R103的链路失效后,R102-R104成为其备分链路
R103(config)#int s1/0
R103(config-if)#sh
R101#sh ip bgp
BGP table version is 8, local router ID is 192.168.12.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i0.0.0.0 192.168.12.2 100 0 10 i
*>i10.10.34.0/24 192.168.12.2 100 0 10 i
* i192.168.11.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
* i192.168.12.0 192.168.12.2 0 100 0 i
*> 0.0.0.0 0 32768 i
R101#sh ip ro
Gateway of last resort is 192.168.12.2 to network 0.0.0.0
C 192.168.12.0/24 is directly connected, FastEthernet0/0
C 192.168.11.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.34.0 [200/0] via 192.168.12.2, 00:01:42
B* 0.0.0.0/0 [200/0] via 192.168.12.2, 00:01:42
R103#sh ip bgp
BGP table version is 7, local router ID is 10.10.34.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.34.0/24 0.0.0.0 0 32768 i
*>i192.168.11.0 10.10.34.4 0 100 0 11 11 11 11 i
*>i192.168.12.0 10.10.34.4 0 100 0 11 i
R103#sh ip ro
Gateway of last resort is not set
B 192.168.12.0/24 [200/0] via 10.10.34.4, 01:09:47
B 192.168.11.0/24 [200/0] via 10.10.34.4, 00:14:08
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.34.0 is directly connected, FastEthernet0/0 |