OSPF 实验

例图:

需求:

1 、整个网络使用192.168.1.0/24进行地址分配

2 、area 0中r1为DR,r2为BDR

3 、r3与r4之间使用密文认证,密码为Admin@huawei.com

4 、r1,r2,r5上各自配置一个环回接口。r1和r2的环回接口可以宣告到ospf网络

5、 设备RID为每台设备的编号

6、全网可达

需求分析

1、 先进行192.168.1.0/24网段的分化

2 、配置每个路由器的ip ,并且启动ospf协议

3 、使用密文认证 area 0中r1为DR,r2为BDR

4 、全网可达

实验步骤

1、 进行网段的划分

已知图中有3个广播域 再加上环回就为6个广播域。

把r3、 r4、 r5之间的网段看作成一个骨干所以划分5个广播域。

骨干为 192.168.1.0/27将骨干再划分别为192.168.1.0/30    192.168.1.4/30

2、配置IP地址

r1

r2

r3

r4

r5

​​​3、启动ospf协议使用密文认证area 0中r1为DR,r2为BDR

area 0中r1为DR,r2为BDR

[r1]display ospf peer 
 
	 OSPF Process 1 with Router ID 192.168.1.130
		 Neighbors 
 
 Area 0.0.0.0 interface 192.168.1.130(GigabitEthernet0/0/0)'s neighbors
 Router ID: 3.3.3.3          Address: 192.168.1.129   
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.130  BDR: 192.168.1.131  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:19:24     
   Authentication Sequence: [ 0 ] 
 Router ID: 2.2.2.2          Address: 192.168.1.131   
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.130  BDR: 192.168.1.131  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:21:30     
   Authentication Sequence: [ 0 ] 

4、实验结果

<r1>dis	
<r1>display os	
<r1>display ospf p	
<r1>display ospf peer b
 
	 OSPF Process 1 with Router ID 192.168.1.130
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             3.3.3.3          Full        
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------



​​​​​​

[r2]display ospf peer b
 
	 OSPF Process 1 with Router ID 2.2.2.2
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             3.3.3.3          Full        
 0.0.0.0          GigabitEthernet0/0/0             192.168.1.130    Full        
 ----------------------------------------------------------------------------
<r3>display ospf peer b
 
	 OSPF Process 1 with Router ID 3.3.3.3
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             192.168.1.130    Full        
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.1          GigabitEthernet0/0/1             4.4.4.4          Full        
 ----------------------------------------------------------------------------
[r4-ospf-1]display ospf peer b
 
	 OSPF Process 1 with Router ID 4.4.4.4
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             3.3.3.3          Full        
 0.0.0.1          GigabitEthernet0/0/1             5.5.5.5          Full        
 ----------------------------------------------------------------------------
[r5-ospf-1]display ospf peer b
 
	 OSPF Process 1 with Router ID 5.5.5.5
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.1          GigabitEthernet0/0/0             4.4.4.4          Full        
 ----------------------------------------------------------------------------

5 、全网可达

用r1 ping r3

<r1>ping 192.168.1.2
  PING 192.168.1.2: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=254 time=90 ms
    Reply from 192.168.1.129: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=254 time=80 ms
    Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=254 time=50 ms
 
  --- 192.168.1.129 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/62/90 ms

实验结束

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值