实验要求
子网划分
<br class="Apple-interchange-newline"><div></div>
192.168.1.0 24主干网段192.168.1.00 000000192.168.1.00001 000 --- 8192.168.1.00010 000 --- 16192.168.1.00011 000 --- 24环回网段192.168.1.01 000000192.168.1.64192.168.1.100 00000192.168.1.100 ----- 192.168.1.128192.168.1.101 ----- 192.168.1.160预留网段192.168.1.11 000000
拓补图
主要配置
配置IP与环回
[r1]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.17/29 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.65/26 up up(s)
NULL0 unassigned up up(s)[r2]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.18/29 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.161/27 up up(s)
NULL0 unassigned up up(s)[r3]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.19/29 up up
GigabitEthernet0/0/1 192.168.1.9/29 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[r4]Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.10/29 up up
GigabitEthernet0/0/1 192.168.1.25/29 up up[r5]
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.26/29 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.129/27 up up(s)
NULL0 unassigned up up(s)
设置OSPF以及RID
[r1]ospf 1 router-id 5.5.5.5
[r2]ospf 1 router-id 4.4.4.4
[r3]ospf 1 router-id 3.3.3.3
[r4]ospf 1 router-id 2.2.2.2
[r5]ospf 1 router-id 1.1.1.1
查看area 0 的DR与BDR
Area 0.0.0.0 interface 192.168.1.18(GigabitEthernet0/0/0)'s neighbors
Router ID: 5.5.5.5 Address: 192.168.1.17
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.1.17 BDR: 192.168.1.18
手工认证设置
[r3-GigabitEthernet0/0/1]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/1
ip address 192.168.1.9 255.255.255.248
ospf authentication-mode md5 1 cipher %$%$$jV6QdGK!I2>C.&NL[9C;(X@%$%$[r4-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 192.168.1.10 255.255.255.248
ospf authentication-mode md5 1 cipher %$%$7CbG<5Z*OJojhCUi\l/4;3Nl%$%$
#[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/1
ip address 192.168.1.25 255.255.255.248
ospf authentication-mode md5 1 cipher %$%$cp-R"[VHu)"xZk;<lqfX;4a:%$%$
#
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 192.168.1.26 255.255.255.248
ospf authentication-mode md5 1 cipher %$%$\`Y)KuKE:'dq|BS'OZ^,;(ne%$%$
r3的邻居表
可以看到r5的1.1.1.1 是不在里面的 说明密文验证成功
给r5配置缺省
[r5-ospf-1]default-route-advertise always
测试
总结
使用了一下知识点
OSPF的缺省配置
OSPF的基本配置
OSPFDR设备的配置
OSPF的手工认证