- 积分
- 985
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
   
|
一个下午都在反复实验,最后通过与实例相同步骤终于成功,之前为什么不成功事后我也想不通。

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.2 0.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 [110/5000] 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 [110/501] 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 |
-
|