1.拓扑图
2.需求分析
需求:
1.整个网络IP地址为192.168.1.0/24自己分配
2.area0区域手工设置R1为DR,R2为BDR
3.R3-R5间使用密文认证方式
4.R1,R2,R5上配置环回接口,但是R5环回不宣进ospf
5.全网可达
分析:
1.分配IP
2.设R1为DR,R2为BDR
3.配置密文
4.配置环回
5.R5环回没有宣告,R5配置缺省
3.配置
R1:
<Huawei>sys
[Huawei]sys r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip ad 192.168.1.1 29
[r1]interface l 1
[r1-LoopBack1]ip address 192.168.1.65 26
[r1]ospf 1 router-id 3.3.3.3
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
R2:
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 29
[r2]interface l 1
[r2-LoopBack1]ip add 192.168.1.129 26
[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.129 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
R3:
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.3 29
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[r3]ospf 1 router-id 2.2.2.2
[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]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.9 0.0.0.0
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 88888888
R4:
[Huawei]sysname r4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[r4]ospf 1 router-id 1.1.1.1
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.13 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 192.168.1.10 0.0.0.0
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 88888888
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 88888888
[r4-ospf-1]default-route-advertise
R5:
[Huawei]sy r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[r5]interface l 1
[r5-LoopBack1]ip address 192.168.1.193 26
[r5]ospf 1 router-id 3.3.3.3
[r5-ospf-1-area-0.0.0.1]network 192.168.1.14 0.0.0.0
[r5]ip route-static 0.0.0.0 0.0.0.0 NULL 0
4.结果