OSPF实验

文章讲述了在实验中进行子网划分,包括192.168.1.0/24的子网划分示例,以及路由器接口的IP配置、OSPF协议的配置,如设置router-id、DR/BDR、手工MD5认证和默认路由的广告。主要内容涉及OSPF基础配置和验证过程。
摘要由CSDN通过智能技术生成

实验要求

子网划分

<br class="Apple-interchange-newline"><div></div>

 
 
192.168.1.0 24
主干网段 
192.168.1.00 000000
   192.168.1.00001 000 --- 8
   192.168.1.00010 000 --- 16
   192.168.1.00011 000 --- 24
环回网段
192.168.1.01 000000
192.168.1.64
192.168.1.100 00000
192.168.1.100 ----- 192.168.1.128 
192.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的手工认证 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值