OSPF多区域配置

一.实验要求
二、实验思路及步骤

1.先数广播域个数然后再将192.168.1.0/24 进行合理的子网划分

192.168.1.00000000/24
    192.168.1.00 0 00000/26 --- 骨干
        192.168.1.00 0 00000/27 --- 192.168.1.0/27
        192.168.1.00 1 00000/27 --- 192.168.1.32/27
    192.168.1.01 000000/26 --- R1
        192.168.1.01 0 00000/27 -- 192.168.1.64/27
        192.168.1.01 1 00000/27 -- 192.168.1.96/27
    192.168.1.10 000000/26 --- R2
        192.168.1.10 0 00000/27 --- 192.168.1.128/27
        192.168.1.10 1 00000/27 --- 192.168.1.160/27
    192.168.1.11 000000/26 --- R3
        192.168.1.11 0 00000/27 --- 192.168.1.192/27
        192.168.1.11 1 00000/27 --- 192.168.1.224/27

2.设备配置

 1) 对R1-R4进行IP配置

<Huawei>sys
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 27
[R1-GigabitEthernet0/0/1]interface loopback 0
[R1-LoopBack0]ip address 192.168.1.65 27


以R1为例 其余同理

R2

R3

R4

2)进行OSPF基本配置

R1

[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.1 0.0.0.255 --- 反掩码
[r1-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0  ---精准宣告

随后使R1 R2 R4接口优先级为零放弃DR/BDR选举 使R3成为BR设备

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

[r1]display ospf peer --- 查看OSPF的邻居表

 

以R1为例 其余同理  

R2

 

R3

 

 R4

[ r4-ospf-1]default-route-advertise always ---强制下发 使全网可达

3)设置空接口避免发生闭环

[R1]ip route-static 192.168.1.64 26 NULL 0
[R2]ip route-static 192.168.1.128 26 NULL 0
[R3]ip route-static 192.168.1.192 26 NULL 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 2 cipher 123456
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 2 cipher 123456

注意:两边的认证类型,KEY ID,口令必须相

测试全网可达


 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值