Java教程

OSPF实验

本文主要是介绍OSPF实验,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
  • 实验内容
  1. R1-R3为区域0,R3-R4为区域1﹔其甲R3的环回也在区域0。
  2. R1,R2也各有一个环回R1-R3 R3为DR设备,没有BDR
  3. R4环回地址已固定,其他所有网段使用192.168.1.0/24进行合理的分配
  4. R4环回不能宣告,全网可达,保障更新安全,避免环路,减少路由条目

网段划分

192.168.1.0/24 --- 总网段

192.168.1.0/25 --- area0

192.168.1.128/25 --- area1

192.168.1.0/25 --- area0

192.168.1.0/27 --- R2环回地址

192.168.1.32/27 --- R1环回地址

192.168.1.64/27 --- 骨干链路

192.168.1.96/27 --- R3环回地址

1.实验拓扑图

2.划分区域

  Area0

R1:

[r1]ospf 1 router-id 192.168.1.33

Info: The configuration succeeded. You need to restart the OSPF process to valid

ate the new router ID.

[r1-ospf-1]area 0

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

R2:

[r2]ospf 1 router-id 192.168.1.1

[r2-ospf-1]area 0

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

R3:

[r3]ospf 1 router-id 192.168.1.97

[r3-ospf-1]area 0

[r3-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.127

Area1

R3:

[r3-ospf-1-area-0.0.0.0]q

[r3-ospf-1]area 1

[r3-ospf-1-area-0.0.0.1]network 192.168.1.128 0.0.0.127

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.128 0.0.0.127

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

3.DR/BDR选举

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

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

4.手工认证

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

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

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

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

[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456

5.全网可达

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

6.减少路由条目并防环

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

[r3]ip route-static 192.168.1.0 25 null0

7.实验配图

例:

 

 

这篇关于OSPF实验的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!