要求:
R1-3为区域,R3R4为区域1;其中r3的环回也在区域0。R1,R2也各有一个环回
R1-R3 R3为DR设备,没有BDR
R4环回地址已固定,其他所有网段使用192.168.1.0 24进行合理的分配
R4环回不能宣告,全网可达,保障更安全,避免环路,减少路由条目
先划分网段,先分骨干链路,由于有一个骨干链路需要有三个接口需要分配ip地址,所以分配的IP需要三个主机位,而掩码29有6个,30有两个则分配两个骨干链路掩码为29
则有----再有骨干链路分配ip
骨干链路1:192.168.1.0 29
r1 0/0/0:1.1 29
r2 0/0/0:1.2 29
r3 0/0/0:1.3 29
骨干链路2:192.168.1.128 29
r3 0/0/1:1.9 29
区域划分:由于有两个区域area 0 和 area 1则192.168.1.0 24 借一个网络位---由于area上的需要分配的环回最多且位3个,则借两位。
area 0:192.168.1.0 25
r1 环回:192.168.1.32 27
r2 环回:192.168.1.64 27
r3 环回:192.168.1.96 27
area 1:192.168.1.128 25
r4环回:4.4.4.0 24
然后分配ip
Ospf
R1:
设置R1优先级:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
R2:
设置R2的优先级
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
R3:
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[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
[r3]ip route-static 192.168.1.0 25 NULL 0
[r3]ip route-static 192.168.1.128 25 NULL 0
R4:
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456