a123410856 发表于 2009-12-11 21:37:41

route-map control route updata

一个下午都在反复实验,最后通过与实例相同步骤终于成功,之前为什么不成功事后我也想不通。
http://p1.images22.51img1.com/6000/gzb7115037/1f6c999f911108e19aa1c8272fb6e249.jpg
R0:
interface loopback 0
ip add 30.0.0.1 255.255.255.0
interface loopback 1
ip add 40.0.0.1 255.255.255.0
interface loopback 2
ip add 50.0.0.1 255.255.255.0
interface serial0/0
ip add 20.0.0.1 255.255.255.0
clock rate 64000
no shutdown
router rip
version 2
network 20.0.0.0
network 30.0.0.0
network 40.0.0.0
network 50.0.0.0
R3:
interface fa0/0
ip add 10.0.0.2 255.255.255.0
no shutdown
interface loopback 0
ip add 192.168.1.1 255.255.255.0
router ospf 1
network 192.168.1.1 0.0.0.0 area 0
network 10.0.0.20.0.0.0 area 0
R1:
interface serial0/0
ip add 20.0.0.2 255.255.255.0
no shutdown
interface fa1/0
ip add 10.0.0.1 255.255.255.0
no shutdown
access-list 1 permit 30.0.0.0 0.0.0.255
access-list 2 permit 40.0.0.0 0.0.0.255
access-list 3 permit 50.0.0.0 0.0.0.255
route-map cisco permit 10
match ip add 1 2
set metric 100
set metric-type type-1
route-map cisco deny 20
match ip add 3
route-map cisco permit 30
set metric 200
set metric-type type-2
router rip
version 2
network 20.0.0.0
router ospf 1
network 10.0.0.1 0.0.0.0 area 0
redistribute rip route-map cisco subnets
以上路由配置都完成后,在路由器R3上SHOW IP ROUTE
R3#show ip route
<output omit!>
Gateway of last resort is not set
   20.0.0.0/24 is subnetted, 1 subnets
O E2    20.0.0.0 via 10.0.0.1, 00:21:52, FastEthernet0/0
   40.0.0.0/24 is subnetted, 1 subnets
O E1    40.0.0.0 via 10.0.0.1, 00:21:52, FastEthernet0/0
   10.0.0.0/24 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Loopback0
   30.0.0.0/24 is subnetted, 1 subnets

merenpuwu 发表于 2013-8-19 01:06:37

{:6_290:}
页: [1]
查看完整版本: route-map control route updata