一、拓补图
二、需求
1.整个网络使用192.168.1.0/24,进行地址分配
2.Area 区域中,R1为DR,R2为BDR
3.R3与R4之间使用密文认证,密码为Admin@huawei.com
4.R1、R2、R5上各自配置个环回接口。R1和R2的环回接口可以宣告到0SPF网络
5.设备的RID为每台设备的名称编号(AR1--1.1.1.1)
6.全网可达
三、需求分析
1.划分网域
2.配IP地址
3.配置动态路由
4.修改R1,R2的优先级
5.R3,R4ospf密文认证
6.R1,R2配环回接口,并宣告到ospf网络
7.修改每台路由器的rid的名称编号
四、所有配置的截图或文字
1.划分网域
192.168.1.0/24
11000000.10101000.00000001 000 00000--->192.168.1.0/27
192.168.1.0/30 192.168.1.4/30
11000000.10101000.00000001 001 00000--->192.168.1.32/27
11000000.10101000.00000001 011 00000--->192.168.1.64/27
11000000.10101000.00000001 100 00000--->192.168.1.96/27
11000000.10101000.00000001 100 00000--->192.168.1.128/27
2.配IP
R1
[r1]in g 0/0/0[r1-GigabitEthernet0/0/0]ip ad 192.168.1.34 27
R2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip ad 192.168.1.35 27
R3
[r3]in g 0/0/0
[r3-GigabitEthernet0/0/0]ip ad 192.168.1.33 27
[r3-GigabitEthernet0/0/0]interface g 0/0/1
[r3-GigabitEthernet0/0/1]ip ad 192.168.1.1 30
R4
[r4]in g 0/0/0
[r4-GigabitEthernet0/0/0]ip ad 192.168.1.2 30
[r4-GigabitEthernet0/0/0]in g 0/0/1
[r4-GigabitEthernet0/0/1]ip ad 192.168.1.5 30
[r4-GigabitEthernet0/0/1]q
R5
[r5]in g 0/0/0
[r5-GigabitEthernet0/0/0]ip ad 192.168.1.6 30
3.配置动态路由
eg:
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]undo summary
[r1-rip-1]network 192.168.1.34
[r1-rip-1]network 192.168.1.64
[r1-rip-1]q
4.修改R1,R2的优先级
[r1-GigabitEthernet0/0/0]ospf dr-priority 10
<r1>reset ospf process
<r2>reset ospf proces
<r3>reset ospf process
[r1]display ospf peer
5.R3,R4ospf密文认证
R3:
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher Admin@huawei.com
R4:
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher Admin@hauwei.com
6.R1,R2,R5配环回接口,并宣告到ospf网络
R1:
[r1]interface LoopBack 0
[r1-LoopBack0]ip ad 192.168.1.64 27
Error: The specified address conflicts with another address.
[r1-LoopBack0]q
[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.34 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.64 0.0.0.0
[r1-ospf-1-area-0.0.0.0]
R2:
[r2]interface LoopBack 0
[r2-LoopBack0]ip ad 192.168.1.96 27
[r2]ospf 2 router-id 2.2.2.2
[r2-ospf-2]area 0
[r2-ospf-2-area-0.0.0.0]network 192.168.1.35 0.0.0.0
[r2-ospf-2-area-0.0.0.0]network 192.168.1.96 0.0.0.0
[r2-ospf-2-area-0.0.0.0]
R5:
[r5]interface LoopBack 0
[r5-LoopBack0]ip ad 192.168.1.128 27
Error: The specified address conflicts with another address.
[r5-LoopBack0]
[r5]ospf 5 router-id 5.5.5.5
[r5-ospf-5]area 1
[r5-ospf-5-area-0.0.0.1]network 192.168.1.6 0.0.0.0
[r5-ospf-5-area-0.0.0.1]network 192.168.1.128 0.0.0.0
[r5-ospf-5-area-0.0.0.1]q
[r5-ospf-5]
7.修改每台路由器的rid的名称编号
[r1]ospf 1 router-id 1.1.1.1
[r2]ospf 2 router-id 2.2.2.2
[r3]ospf 3 router-id 3.3.3.3
[r4]ospf 4 router-id 4.4.4.4
[r5]ospf 5 router-id 5.5.5.5
五、测试结果
全网通
R1
环回接口:
R2:
环回接口:
R3
R4
R5
环回接口: