设为首页收藏本站language 语言切换
查看: 2639|回复: 2
收起左侧

Modify the route management distance

[复制链接]
发表于 2009-12-11 21:35:22 | 显示全部楼层 |阅读模式
这几天都比较忙,空闲的时候就知道偷懒休息了,今天做一个修改路由管理距离的实验,在下面这个实例中我在ASBR R0、R2上面使用双向路由重分发,R0-R1-R2区域使用ospf链路状态路由协议,R0-R2-R3使用RIPv2距离矢量路由协议。具体看示例:

r1#show running
<otput omit!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
!
interface Loopback1
ip address 10.1.2.1 255.255.255.0
!
interface Loopback2
ip address 10.1.3.1 255.255.255.0
!
interface Serial0/0
ip address 10.11.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 10.11.2.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
network 10.1.1.1 0.0.0.0 area 0
network 10.1.2.1 0.0.0.0 area 0
network 10.1.3.1 0.0.0.0 area 0
network 10.11.1.2 0.0.0.0 area 0
network 10.11.2.2 0.0.0.0 area 0
!
end

r3#show running
Building configuration...

Current configuration : 976 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!

interface Loopback0
ip address 10.3.1.1 255.255.255.0
!
interface Loopback1
ip address 10.3.2.1 255.255.255.0
!
interface Loopback2
ip address 10.3.3.1 255.255.255.0
!
interface Serial0/0
ip address 10.11.3.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 10.11.0.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router rip
version 2
network 10.0.0.0
no auto-summary

line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
r0#show running
Building configuration...

Current configuration : 1188 bytes
!
version 12.4
!
hostname r0
!
interface Loopback0
ip address 10.0.1.1 255.255.255.0
!
interface Loopback1
ip address 10.0.2.1 255.255.255.0
!
interface Loopback2
ip address 10.0.3.1 255.255.255.0
!
interface Serial0/0
ip address 10.11.1.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 10.11.0.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
redistribute rip metric 50 subnets
network 10.11.1.1 0.0.0.0 area 0
distance 125 10.2.3.1 0.0.0.0 1
!
router rip
version 2
redistribute ospf 1 metric 5
network 10.0.0.0
no auto-summary
!
access-list 1 permit 0.0.0.0 255.255.255.0
!
line con 0
line aux 0
line vty 0 4
!
!
end

r2#show running
Building configuration...

Current configuration : 1190 bytes
!
version 12.4
!
hostname r2
!
interface Loopback0
ip address 10.2.1.1 255.255.255.0
!
interface Loopback1
ip address 10.2.2.1 255.255.255.0
!
interface Loopback2
ip address 10.2.3.1 255.255.255.0
!
interface Serial0/0
ip address 10.11.3.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial0/1
ip address 10.11.2.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
redistribute rip metric 100 subnets
network 10.11.2.1 0.0.0.0 area 0
distance 125 10.11.1.1 0.0.0.0 1
!
router rip
version 2
redistribute ospf 1 metric 5
network 10.0.0.0
no auto-summary
!
access-list 1 permit 0.0.0.0 255.255.255.0
!
line con 0
line aux 0
line vty 0 4
!
end


r0#show 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/8 is variably subnetted, 16 subnets, 2 masks
C       10.11.1.0/24 is directly connected, Serial0/0
C       10.11.0.0/24 is directly connected, Serial0/1
R       10.11.3.0/24 [120/1] via 10.11.0.2, 00:00:23, Serial0/1
O       10.11.2.0/24 [110/128] via 10.11.1.2, 00:43:01, Serial0/0
R       10.3.1.0/24 [120/1] via 10.11.0.2, 00:00:23, Serial0/1
O       10.1.2.1/32 [110/65] via 10.11.1.2, 00:43:01, Serial0/0
C       10.0.2.0/24 is directly connected, Loopback1
R       10.2.1.0/24 [120/2] via 10.11.0.2, 00:00:23, Serial0/1
O       10.1.3.1/32 [110/65] via 10.11.1.2, 00:43:01, Serial0/0
C       10.0.3.0/24 is directly connected, Loopback2
R       10.3.3.0/24 [120/1] via 10.11.0.2, 00:00:23, Serial0/1
R       10.2.2.0/24 [120/2] via 10.11.0.2, 00:00:23, Serial0/1
R       10.3.2.0/24 [120/1] via 10.11.0.2, 00:00:24, Serial0/1
R       10.2.3.0/24 [120/2] via 10.11.0.2, 00:00:24, Serial0/1
O       10.1.1.1/32 [110/65] via 10.11.1.2, 00:43:02, Serial0/0
C       10.0.1.0/24 is directly connected, Loopback0


r2#show 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/8 is variably subnetted, 16 subnets, 2 masks
O       10.11.1.0/24 [110/128] via 10.11.2.2, 00:47:20, Serial0/1
R       10.11.0.0/24 [120/1] via 10.11.3.2, 00:00:06, Serial0/0
C       10.11.3.0/24 is directly connected, Serial0/0
C       10.11.2.0/24 is directly connected, Serial0/1
R       10.3.1.0/24 [120/1] via 10.11.3.2, 00:00:06, Serial0/0
O       10.1.2.1/32 [110/65] via 10.11.2.2, 00:47:20, Serial0/1
R       10.0.2.0/24 [120/2] via 10.11.3.2, 00:00:06, Serial0/0
C       10.2.1.0/24 is directly connected, Loopback0
O       10.1.3.1/32 [110/65] via 10.11.2.2, 00:47:20, Serial0/1
R       10.0.3.0/24 [120/2] via 10.11.3.2, 00:00:06, Serial0/0
R       10.3.3.0/24 [120/1] via 10.11.3.2, 00:00:06, Serial0/0
C       10.2.2.0/24 is directly connected, Loopback1
R       10.3.2.0/24 [120/1] via 10.11.3.2, 00:00:07, Serial0/0
C       10.2.3.0/24 is directly connected, Loopback2
O       10.1.1.1/32 [110/65] via 10.11.2.2, 00:47:20, Serial0/1
R       10.0.1.0/24 [120/2] via 10.11.3.2, 00:00:07, Serial0/0
http_imgload.jpg
发表于 2010-5-3 10:11:20 | 显示全部楼层
沙发 2010-5-3 10:11:20 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2015-10-12 06:35:43 来自手机 | 显示全部楼层
谢谢分享!顶起!
板凳 2015-10-12 06:35:43 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-30 17:37 , Processed in 0.092152 second(s), 28 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表