Chinaunix首页 | 论坛 | 博客
  • 博客访问: 871471
  • 博文数量: 275
  • 博客积分: 3904
  • 博客等级: 中校
  • 技术积分: 4605
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:10
文章分类

全部博文(275)

文章存档

2014年(9)

2013年(124)

2012年(142)

分类: 系统运维

2013-08-26 13:26:31

一:拓扑:

 

二:实验要求
1:R1和R2链路可能处于不稳定状态,可能断开,要求实验的效果,即使R1和R2断开之后,不会对网络造成很大的影响
2:area 123, area 25 的DR为R2
3: area 25中,如果扩展后加入新的路由器不会被选为DR
4:RIP,EIGRP完全分布到OSPF中,RIP为E1
5:EIGRP重分布到OSPF,E2 mtic值为40
6:实现全网互联互通,即在任何一个接口下ping任意一个IP地址都通
7:虚链路需要MD5认证

R1-R5走ospf a 0
相当于全网都走ospf,只在R3,R4回环接口下走eigrp和rip v2.

 


三:分析实验:
1:R1与R2断开做虚链路
   R1与R3 R2与R4 都需要创建虚链路
2:R2的优先级默认为1,R1与R3更改优先级为0 R5与R4优先级为0 ********** 将R2优先级改为最高

3:导入0SPF ,修改MTIC值

四:实验配置

rack150r1()#int s2/2

rack150r1(config-if)#ip add 15.0.0.1 255.255.255.0

rack150r1(config-if)#no sh

00:04:42: %LINK-3-UPDOWN: Interface Serial2/2, changed state to up

00:04:43: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/2, changed state to up

rack150r1(config-if)#int s3/0

rack150r1(config-if)#encapsulation frame-relay

00:05:05: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/2, changed state to down

rack150r1(config-if)#no frame-relay inv              

rack150r1(config-if)#ip add 123.0.0.1 255.255.255.0

rack150r1(config-if)#frame-relay map ip 123.0.0.2 102 b       

rack150r1(config-if)#frame-relay map ip 123.0.0.3 102 b

rack150r1(config-if)#int lo0

rack150r1(config-if)#ip add 1.1.1.1 255.255.255.0

 

rack150r2(config)#int s3/0

rack150r2(config-if)#encapsulation frame-relay

rack150r2(config-if)#no frame-relay inv    

rack150r2(config-if)#no sh

rack150r2(config)#int s3/0.123 mul

rack150r2(config-subif)#ip add 123.0.0.2 255.255.255.0

rack150r2(config-subif)#frame-relay map ip 123.0.0.1 201 b

rack150r2(config-subif)#frame-relay map ip 123.0.0.3 203 b

rack150r2(config-subif)#int f0/0

rack150r2(config-if)#ip add 25.0.0.2 255.255.255.0

rack150r2(config-if)#no sh

00:15:27: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up

00:15:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

rack150r2(config-if)#int lo0

rack150r2(config-if)#ip add 2.2.2.2 255.255.255.0

rack150r2(config-if)#^Z

00:23:52: %SYS-5-CONFIG_I: Configured from console by console

 

rack150r3(config)#int s3/0

rack150r3(config-if)#ip add 123.0.0.3 255.255.255.0

rack150r3(config-if)#encapsulation frame

rack150r3(config-if)#no frame-relay inv

rack150r3(config-if)#frame map ip 123.0.0.1 302 b

rack150r3(config-if)#frame map ip 123.0.0.2 302 b

rack150r3(config-if)#no sh

rack150r3(config-if)#int s2/2

rack150r3(config-if)#ip add 34.0.0.3 255.255.255.0

rack150r3(config-if)#no sh

rack150r3(config-if)#

rack150r3(config-if)#int lo0

rack150r3(config-if)#ip add 3.3.3.3 255.255.255.0

rack150r3(config)#int lo1

rack150r3(config-if)#ip add 3.3.1.3 255.255.255.0

 

rack150r4(config)#int s2/1

rack150r4(config-if)#ip add 34.0.0.4 255.255.255.0

rack150r4(config-if)#no sh

00:18:58: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/1, changed state to up

rack150r4(config-if)#int lo0

rack150r4(config-if)#ip add 4.4.4.4 255.255.255.0

rack150r4(config-if)#int f0/0

rack150r4(config-if)#ip add 25.0.0.4 255.255.255.0

rack150r4(config-if)#no sh

rack150r4(config)#int lo1

rack150r4(config-if)#ip add 4.4.1.4 255.255.255.0

 

rack150r5(config)#int s2/1

rack150r5(config-if)#ip add 15.0.0.5 255.255.255.0

rack150r5(config-if)#no sh

rack150r5(config-if)#int f0/0

rack150r5(config-if)#ip add 25.0.0.5 255.255.255.0

rack150r5(config-if)#no sh

00:22:55: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up

00:22:56: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

rack150r5(config-if)#int lo0

rack150r5(config-if)#ip add 5.5.5.5 255.255.255.0

 

对所有路由器的所有相关宣告OSPF

 

rack150r1(config)#router ospf 1

rack150r1()#network 123.0.0.1 0.0.0.0 a 123

rack150r1(config-router)#network 15.0.0.1 0.0.0.0 a 0

rack150r1(config-router)#network 1.1.1.1 0.0.0.0 a 0

 

rack150r2(config-if)#router ospf 1

rack150r2(config-router)#nei 123.0.0.1

rack150r2(config-router)#nei 123.0.0.3

rack150r2(config-router)#network 123.0.0.2 0.0.0.0 a 123

rack150r2(config-router)#network 2.2.2.2 0.0.0.0 a 123

rack150r2(config-router)#network 25.0.0.2 0.0.0.0 a 25

 

rack150r3(config-if)#router ospf 1

rack150r3(config-router)#network 123.0.0.3 0.0.0.0 a 123

rack150r3(config-router)#network 34.0.0.3 0.0.0.0 a 34

rack150r3(config-router)#network 3.3.3.3 0.0.0.0 a 34

rack150r4(config-if)#router ospf 1

rack150r4(config-router)#network 34.0.0.4 0.0.0.0 a 34

rack150r4(config-router)#network 4.4.4.4 0.0.0.0 a 34

rack150r4(config-router)#network 25.0.0.4 0.0.0.0 a 25

 

rack150r5(config-if)#router ospf 1

rack150r5(config-router)#network 15.0.0.5 0.0.0.0 a 0

*Mar 26 22:39:43.755: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Serial2/1 from LOADING to FULL, Loading Done

rack150r5(config-router)#network 5.5.5.5 0.0.0.0 a 0

rack150r5(config-router)#network 25.0.0.5 0.0.0.0 a 25

 

搭建虚链路

首先先搭建R1—R2—R5的虚链路

rack150r1(config)#router ospf 1

rack150r1(config-router)#area 123 virtual-link 2.2.2.2

rack150r2(config)#router ospf 1

rack150r2(config-router)#area 123 v 1.1.1.1

rack150r2(config-router)#area 25 v 5.5.5.5

rack150r5(config)#router ospf 1

rack150r5(config-router)#area 25 v 2.2.2.2

链接完成,现在测试一下,断掉R1的int s2/2口,将主干网断开,发现各路由器的路由条目没有发生任何改变,说明,虚链路发生了作用,配置正确。

为保证主干网的链路稳定性,再搭建一个虚链路R1—R3—R4—R5

rack150r1(config-router)#area 123 v 3.3.3.3

rack150r3(config-router)#area 123 v 1.1.1.1

rack150r3(config-router)#area 34 v 4.4.4.4

rack150r4(config-router)#area 34 v 3.3.3.3

rack150r4(config-router)#area 25 v 5.5.5.5

rack150r5(config-router)#area 25 v 4.4.4.4

验证配置:

在R1上检查路由表

rack150r1#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

 

     34.0.0.0/24 is subnetted, 1 subnets

O IA    34.0.0.0 [110/128] via 123.0.0.3, 00:00:11, Serial3/0

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

O IA 25.0.0.0/24 [110/65] via 123.0.0.2, 00:00:11, Serial3/0

                  [110/65] via 15.0.0.5, 00:00:11, Serial2/2

     2.0.0.0/32 is subnetted, 1 subnets

O       2.2.2.2 [110/65] via 123.0.0.2, 00:01:40, Serial3/0

     3.0.0.0/32 is subnetted, 1 subnets

O IA    3.3.3.3 [110/65] via 123.0.0.3, 00:00:11, Serial3/0

     4.0.0.0/32 is subnetted, 1 subnets

O IA    4.4.4.4 [110/66] via 15.0.0.5, 00:00:11, Serial2/2

     5.0.0.0/32 is subnetted, 1 subnets

O       5.5.5.5 [110/65] via 15.0.0.5, 00:00:29, Serial2/2

     123.0.0.0/24 is subnetted, 1 subnets

C       123.0.0.0 is directly connected, Serial3/0

     15.0.0.0/24 is subnetted, 1 subnets

C       15.0.0.0 is directly connected, Serial2/2

 

发现多了三条没有链接到主干网的路由条目,证明虚链路配置正确

 

为虚链路配置认证:

为area123配置认证

rack150r1(config-router)#area 123 au

 

rack150r1(config-router)#area 123 v 2.2.2.2 message-digest-key 1 md5 cisco

rack150r2(config-router)#area 123 v 1.1.1.1 message-digest-key 1 md5 cisco

rack150r3(config-router)#area 123 v 2.2.2.2 message-digest-key 1 md5 cisco

 

 

 

将R3,R4       的回环口lo1分别运行RIP V2以及EIGRP

rack150r3(config-router)#router rip

rack150r3(config-router)#ver 2

rack150r3(config-router)#network 3.3.1.3

rack150r4(config-if)#router eigrp 100

rack150r4(config-router)#network 4.4.1.4 0.0.0.0

在R3,R4上将RIP V2以及EIGRP重分布到OSPF中

rack150r3(config)#router ospf 1

rack150r3(config-router)#redistribute rip subnets metric-type 1

rack150r4(config-router)#router ospf 1

rack150r4(config-router)#redistribute eigrp 100 sub metric-type 2 metric 40

 

 

实验结果经验证完全符合要求!

阅读(1617) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~