ip分配结果如下:
192.168.1.0 分为两段
192.168.1.0/25 分给a0
192.168.128/25 分给a1
192.168.1.0/25 再分为四段
192.168.1.0/27 此段给骨干
192.168.1.64/27
192.168.1.128/27
192.168.1.192/27 此三段给环回
输入以下命令:
[R3]ospf 1 router-id 3.3.3.3 创建ospf1告知路由器id
[R3-ospf-1]a 0 进入区域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.192 0.0.0.0
[R3-ospf-1-area-0.0.0.0]
[R3-ospf-1]a 1 进入区域1
[R3-ospf-1-area-0.0.0.1]net 192.168.1.129 0.0.0.0 宣告拥有网段
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ospf dr-priority 3 将此接口的DR优先级改为3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ospf dr-priority 3 将此接口的DR优先级改为3
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ospf dr-priority
R1>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:yR1>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
R4]ospf 1
[R4-ospf-1]default-route-advertise always
全网可达
r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
R3]ospf 1
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128
结束