|
发表于 2009-8-1 15:11:28
|
显示全部楼层
本帖最后由 tianchunyu 于 2009-8-1 15:13 编辑
10.7.7.3 ?10.7.7.2? 你这是个什么样的网络?广播网络?
执行策略路由的路由器配置如下:
R1#sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial1/0 10.6.6.1 YES manual up up
Serial1/1 10.7.7.1 YES manual up up
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
Serial1/4 unassigned YES unset administratively down down
Serial1/5 unassigned YES unset administratively down down
Serial1/6 unassigned YES unset administratively down down
Serial1/7 unassigned YES unset administratively down down
FastEthernet2/0 192.168.1.254 YES manual up up
FastEthernet2/1 unassigned YES unset administratively down down
R1#sh access-list 1
Standard IP access list 1
10 permit 192.168.1.0, wildcard bits 0.0.0.255 (78 matches)
R1#sh route-map A
STATIC routemaps
route-map 1, permit, sequence 10
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map A, permit, sequence 10
Match clauses:
ip address (access-lists): 1
Set clauses:
ip next-hop 10.6.6.2 10.7.7.2
Policy routing matches: 21 packets, 2070 bytes
DYNAMIC routemaps
Current active dynamic routemaps = 0
R1#sh run int f2/0
Building configuration...
Current configuration : 121 bytes
!
interface FastEthernet2/0
ip address 192.168.1.254 255.255.255.0
ip policy route-map A
duplex full
speed auto
end
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 2 subnets
C 10.7.7.0 is directly connected, Serial1/1
C 10.6.6.0 is directly connected, Serial1/0
C 192.168.1.0/24 is directly connected, FastEthernet2/0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
策略验证:
PC#traceroute 10.6.6.2
Type escape sequence to abort.
Tracing the route to 10.6.6.2
1 192.168.1.254 252 msec 152 msec 48 msec
2 10.6.6.2 252 msec * 204 msec
PC#traceroute 10.7.7.2
Type escape sequence to abort.
Tracing the route to 10.7.7.2
1 192.168.1.254 208 msec 232 msec 60 msec
2 10.6.6.2 188 msec 96 msec 96 msec
3 10.6.6.1 140 msec 100 msec 204 msec
4 10.7.7.2 300 msec * 364 msec
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
手工关闭R1的s1/0--ip add :10.6.6.1 和关闭对端的效果是一致的
R1#sh ip
*Aug 1 15:08:44.355: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.7.7.0 is directly connected, Serial1/1
C 192.168.1.0/24 is directly connected, FastEthernet2/0
再次验证策略:
PC#traceroute 10.6.6.2
Type escape sequence to abort.
Tracing the route to 10.6.6.2
1 192.168.1.254 244 msec 84 msec 64 msec
2 10.7.7.2 148 msec 212 msec 76 msec
3 10.7.7.1 192 msec 256 msec 96 msec
4 10.7.7.1 !H * !H
PC#ping 10.6.6.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.6.6.2, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
PC#traceroute 10.7.7.2
Type escape sequence to abort.
Tracing the route to 10.7.7.2
1 192.168.1.254 284 msec 140 msec 52 msec
2 10.7.7.2 184 msec * 168 msec |
|