OSPF实验

 

1.子网划分

192.168.1.0/25   区域0

192.168.1.0/27  骨干

192.168.1.0/29   第一个即可使用

192.168.1.8/29

192.168.1.16/29

192.168.1.24/29

192.168.1.32/27  R1

192.168.1.64/27  R2

192.168.1.96/27  R3

192.168.1.128/25 区域1

因为只有一条链路所以没有必要划分

2.分别为四个路由器配置接口

 按照如图所示配置

3.配置OSPF

分别为R1R2R3R4配置

R1:

[r1]ospf 1 router-id 1.1.1.1

[r1-ospf-1]area  0

[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255

R2:

[r1]ospf 1 router-id 2.2.2.2

[r2-ospf-1]area  0

[r2-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255

R3:

[r3]ospf 1 router-id 3.3.3.3

[r3-ospf-1]area  0

[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0

[r3-ospf-1]area  1

[r3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.0

R4:

[r4]ospf 1 router-id 4.4.4.4

[r4-ospf-1]area  1

[r4-ospf-1-area-0.0.0.1]network 192.168.1.130 0.0.0.0

4.干涉选举 题目中要求只能区域0有一个DR

所以我们只需将R1R2的优先级修改为0即可只让R3做DR

R1:

[r1]interface GigabitEthernet 0/0/0

[r1-GigabitEthernet0/0/0]ospf dr-priority  0

 R2:

[r2]interface GigabitEthernet 0/0/0

[r2-GigabitEthernet0/0/0]ospf dr-priority  0 

 

5.R4环回不能被宣告 而且我们要全网可达 所以只需在R4上设置缺省路由即可

[r4]ospf 1
[r4-ospf-1]default-route-advertise always

6.保障更新安全 所以要求我们要做好认证

在区域0的骨干和区域1上分别做两个认证

[r1]int    
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5  1 cipher 123456

[r2]int    
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5  1 cipher 123456

[r3]int    
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5  1 cipher 123456

[r3]int    
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5  1 cipher 654321

[r4]int    
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5  1 cipher 654321

7.防环

在R3上

[r3]ip route-static 192.168.1.0 25 NULL 0 即可防止环路生成

8.区域汇总 减少路由表条目

区域1不需要汇总 所以只需汇总区域0 来给区域1

[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128

9.测试:

 得到结果

ping通

END

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值