ospf第二次实验
1.先配IP
各个接口的IP以及环回的IP先配好
具体配IP的指令
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 1.1.1.1 32.
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 89.1.1.1 24
2.区域划分
[R4]ospf 100 router-id 4.4.4.4 配置进程和router-id
[R4-ospf-100]area 0 进入区域0
[R4-ospf-100-area-0.0.0.0]network 0.0.0.0 255.255.255.255 宣告(注意0.0.0.0 255.255.255.255 是全部宣告 宣告单独IP需要 xxx.xxx.xxx.xxx 0.0.0.0)
R4的环回不能划入area2需要进行强制下方缺省方法:
[R4]ospf 100
[R4-ospf-100]default-route-advertise always
3.保证更新安全加快收敛速度
保证更新安全就是做认证
明文:
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123
密文:
[R2-GigabitEthernet0/0/1]ospf authentication-mode simple cipher 123
[R2-GigabitEthernet0/0/1]ospf authentication-mode md5
接口之间的认证一定要一致
加快收敛速度
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ospf timer hello 5
[R2-GigabitEthernet0/0/0]ospf timer dead 20
仅加快接口,如果想全部加快就需要每个接口都操作一遍
4.区域安全
区域明文认证
[R2]ospf 100
[R2-ospf-100]area 1
[R2-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123
区域密文认证
[R3]ospf 100
[R3-ospf-100]area 1
[R3-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123
[R3-ospf-100-area-0.0.0.1]authentication-mode md5
每个区域内的路由器都要进行区域认证
5.只有dr没有bdr
修改4 5 6路由器上的g0/0/0接口优先级改为0表示不参选
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ospf dr-priority 0