标签:
Topology
Objective
Step 1: 配置基本路由器接口
R1(config)#interface loopback0
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config)#interface f0/0
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface s1/0
R1(config-if)#ip address 21.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#interface loopback0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R2(config)#interface f0/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface s1/0
R2(config-if)#ip address 21.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 12.1.1.1 YES manual up up
Serial1/0 21.1.1.1 YES manual up up
Loopback0 1.1.1.1 YES manual up up
R2#show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 2.1.1.2 YES manual up up
Serial1/0 21.1.1.2 YES manual up up
Loopback0 2.2.2.2 YES manual up up
step 2: 在R2上配置静态路由与浮动静态路由
R2(config)#ip route 1.1.1.0 255.255.255.0 12.1.1.1
R2(config)#ip route 1.1.1.0 255.255.255.0 21.1.1.1 20
step 3: 在R1上配置IP SLAs ICMP Path Echo Operation
R1(config)#ip sla monitor 10 // specifies an ID number for the operation beign configured and enters IP SLA Monitor configuration mode
R1(config-rtr)#type pathEcho protocol ipIcmpEcho 12.1.1.2 source-ip 12.1.1.1
R1(config-rtr)#exit
R1(config)#track 10 rtr 10 reachability
R1(config)#ip sla monitor schedule 10 life forever start-time now
R1#show ip sla statistics
Round Trip Time (RTT) for Index 10
Latest RTT: 12 milliseconds
Latest operation start time: *14:10:52.791 UTC Fri Jul 10 2015
Latest operation return code: OK
Number of successes: 468
Number of failures: 415
Operation time to live: Forever
Step 4: 指定ip静态路由,并在主路由上调用track跟踪工程
R1(config)#ip route 2.2.2.0 255.255.255.0 12.1.1.2 track 10
R1(config)#ip route 2.2.2.0 255.255.255.0 21.1.1.2 20
R1#show ip route | b Ga
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 [1/0] via 12.1.1.2
21.0.0.0/24 is subnetted, 1 subnets
C 21.1.1.0 is directly connected, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, FastEthernet0/0
R2#show ip route static
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 [1/0] via 12.1.1.1
step 5: 在R2上关闭以太网接口f0/0
R2(config)#interface f0/0
R2(config-if)#shutdown
R1#show ip route static
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 [20/0] via 21.1.1.2
R1#show ip route 2.2.2.0
Routing entry for 2.2.2.0/24
Known via "static", distance 20, metric 0
Routing Descriptor Blocks:
* 21.1.1.2
Route metric is 0, traffic share count is 1
R2#show ip route sta
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 [20/0] via 21.1.1.1
R2#show ip route 1.1.1.0
Routing entry for 1.1.1.0/24
Known via "static", distance 20, metric 0
Routing Descriptor Blocks:
* 21.1.1.1
Route metric is 0, traffic share count is 1
Step 6: 将R2上f0/0接口开了
R1#show ip route static
2.0.0.0/24 is subnetted, 1 subnets
S 2.2.2.0 [1/0] via 12.1.1.2
R2#show ip route sta
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 [1/0] via 12.1.1.1
标签:
原文地址:http://www.cnblogs.com/elewei/p/4635624.html