OSPF综合实验
作者:互联网
1.先对子网进行划分
192.168.1.0/24
Area0:
骨干网络: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
R1:192.168.1.32/27
R2:192.168.1.64/27
R3:192.168.1.96/27
Area2: 192.168.1.128/25
2、配置区域0的环回
[r1]int lo0
[r1-LoopBack0]ip add 192.168.1.33 27
配置区域0的骨干
[r1-LoopBack0]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ad 192.168.1.1 29
R2,r3同上
配置area1环回
[r4]int lo0
[r4-LoopBack0]ip ad 192.168.1.193 27
[r4-LoopBack0]int lo1
[r4-LoopBack1]ip ad 4.4.4.4 24
配置r3-r4网路
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip ad 192.168.1.129 30
[r4-LoopBack1]int g0/0/0
[r4-GigabitEthernet0/0/0]ip ad 192.168.1.130 30
3、配置ospf
[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]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]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-0.0.0.0]network 192.168.1.97 0.0.0.0
[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.129 0.0.0.0
[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.0 0.0.0.255
4、修改优先级
[r1-GigabitEthernet0/0/0]ospf dr-priority 0
[r2-GigabitEthernet0/0/0]ospf dr-priority 0
5、配置缺省路由
[r4-ospf-1]default-route-advertise always
6、做认证
[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
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
7、对r3进行汇总
[r3-GigabitEthernet0/0/0]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-
[r3-ospf-1-area-0.0.0.1]abr-summary 192.168.1.128 255.255.255.128
[r3-ospf-1-area-0.0.0.1]q
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]abr-
[r3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128
8、做空接口防环
[r3]ip route-static 192.168.1.0 25 null 0
[r3]ip route-static 192.168.1.128 25 null 0
9、
标签:r4,r3,ospf,area,192.168,实验,0.0,OSPF,综合 来源: https://blog.csdn.net/weixin_58163202/article/details/122004814