实验要求:
预览配置图:
实验分析:
1、对整个网络IP地址进行子网划分
2、手工配置r1和r2的RID id 使r1的id大于r2的id
3、R3-R5在同一个区域,采用区域认证
4、配置时注意R5环回接口不进行宣告
5、除了R5接口不进行宣告外,其余接口均进行宣告,实现全网可达
子网划分
区域划分:
192.168.1.0 0000000——192.168.1.0/25
区域内划分:
-
192.168.1.0 00 00000——192.168.1.0/27
-
192.168.1.0 01 00000——192.168.1.32/27
-
192.168.1.0 10 00000——192.168.1.64/27
-
192.168.1.0 11 00000——192.168.1.96/27
区域划分:
192.168.1.1 0000000——192.168.1.128/25
区域内划分:
-
192.168.1.1 00 00000——192.168.1.128/27
-
192.168.1.1 01 00000——192.168.1.160/27
-
192.168.1.1 10 00000——192.168.1.192/27
-
192.168.1.1 11 00000——192.168.1.224/27
进行IP分配
对r1进行配置:
对接口0/0/0:
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.2 27
对环回接口0:
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 27
检查配置:
[r1-LoopBack0]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/27 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.33/27 up up(s)
NULL0 unassigned up up(s)
对r2进行配置:
对接口0/0/0:
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.3 27
对环回接口0:
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 27
检查配置:
[r2]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.3/27 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.65/27 up up(s)
NULL0 unassigned up up(s)
对r3进行分配:
对接口0/0/0:
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.1 27
对接口0/0/1:
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address192.168.1.129 27
检查配置:
[r3]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/27 up up
GigabitEthernet0/0/1 192.168.1.129/27 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
对r4进行分配:
对接口0/0/0:
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.130 27
对接口0/0/1:
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.161 27
检查配置:
[r4]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.130/27 up up
GigabitEthernet0/0/1 192.168.1.161/27 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
对r5进行分配:
对接口0/0/0:
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.192 27
对接口0:
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.193 27
检查配置:
[r5]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.162/27 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.193/27 up up(s)
NULL0 unassigned up up(s)
配置完成图:
进行OSPF配置:
区域0:
对r1:
[r1]ospf 1 router-id 2.2.2.2
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
对r2:
r2]ospf 1 router-id 1.1.1.1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
对r3:
[r3]ospf 1 router-id 3.3.3.33
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
区域1:
对r3:
[r3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.0
对r4:
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.130 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 192.168.1.161 0.0.0.0
对r5:
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]netw
配置密文认证:
对r3:
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
对r4:
[r4]ospf 1
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
对r5:
[r5]ospf 1
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456