OSPF开放式最短路径优先实验报告

实验需求

1.整个网络使用192.168.1.8/24,进行地址分配。

2.Area 0区域中,R1为 DR,R2为BDR。

3.R3与R4之间使用密文认证,密码为Admin@huawei.com

4.R1、R2、R5之间各自配置一个环回接口 ,R1和R2的环回接口可以宣告到OSPF网络。

5.设备的RID为每台设备的名称编号(AR1--1.1.1.1)。

6.全网可达。

基本配置(R1、R2、R5之间各自配置一个环回接口 )

AR1~AR5

[r1]interface GigabitEthernet 0/0/0	
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 27
[r1-LoopBack1]ip address 192.168.1.33 27

[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 27
Jul 26 2024 20:56:01-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.65 27
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.3 27
Jul 26 2024 21:01:14-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 

[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.97 27
Jul 26 2024 21:02:06-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.98 27
Jul 26 2024 21:03:03-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state.

[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.129 27
Jul 26 2024 21:03:45-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.130 27
Jul 26 2024 21:04:22-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 


[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.161 27

一、实验拓扑图

二、子网划分

AR1~AR2~AR3

192.168.1.0/27

AR1环回接口

192.168.1.32/27

AR2环回接口

192.168.1.64/27

AR3~AR4

192.168.1.96/27

AR4~AR5

192.168.1.128/27

AR5环回接口

192.168.1.160/27

三、Area 0区域中,R1为 DR,R2为BDR。

[r1]display ospf peer 

	 OSPF Process 1 with Router ID 1.1.1.1

	 OSPF Process 2 with Router ID 1.1.1.1
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.1(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    //在区域0中AR1为DR,AR2为BDR
   Dead timer due in 30  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:19:56     
   Authentication Sequence: [ 0 ] 

 Router ID: 3.3.3.3          Address: 192.168.1.3     
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 32  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:17:34     
   Authentication Sequence: [ 0 ] 

四、R3与R4之间使用密文认证,密码为Admin@huawei.com

[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher admin@huawei.com
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher admin@huawei.com

五、5.设备的RID为每台设备的名称编号(AR1--1.1.1.1)。

[r1]ospf 1 router-id 1.1.1.1
[r2]ospf 1 router-id 2.2.2.2
[r3]ospf 1 router-id 3.3.3.3
[r4]ospf 1 router-id 4.4.4.4
[r5]ospf 1 router-id 5.5.5.5
[r3]display ospf peer 

	 OSPF Process 1 with Router ID 3.3.3.3
		 Neighbors 

 Area 0.0.0.0 interface 192.168.1.3(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.1.1     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 0 
   Neighbor is up for 00:50:41     
   Authentication Sequence: [ 0 ] 

 Router ID: 2.2.2.2          Address: 192.168.1.2     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 6 
   Neighbor is up for 00:50:47     
   Authentication Sequence: [ 0 ] 

		 Neighbors 

 Area 0.0.0.1 interface 192.168.1.97(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.4          Address: 192.168.1.98    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.1.98  BDR: 192.168.1.97  MTU: 0    
   Dead timer due in 39  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:33:48     
   Authentication Sequence: [ 5640] 

六、R1和R2的环回接口可以宣告到OSPF网络。

七、全网可达

<r1>ping 192.168.1.2
  PING 192.168.1.2: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=40 ms
    Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=50 ms
    Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms
    Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=50 ms

  --- 192.168.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/44/50 ms

<r1>ping 192.168.1.3
  PING 192.168.1.3: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=255 time=50 ms
    Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=255 time=50 ms
    Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=255 time=50 ms
    Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.1.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/42/50 ms

<r1>ping 192.168.1.97
  PING 192.168.1.97: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.97: bytes=56 Sequence=1 ttl=255 time=40 ms
    Reply from 192.168.1.97: bytes=56 Sequence=2 ttl=255 time=50 ms
    Reply from 192.168.1.97: bytes=56 Sequence=3 ttl=255 time=50 ms
    Reply from 192.168.1.97: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 192.168.1.97: bytes=56 Sequence=5 ttl=255 time=40 ms

  --- 192.168.1.97 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/44/50 ms

<r1>ping 192.168.1.98
  PING 192.168.1.98: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.98: bytes=56 Sequence=1 ttl=254 time=50 ms
    Reply from 192.168.1.98: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 192.168.1.98: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.1.98: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 192.168.1.98: bytes=56 Sequence=5 ttl=254 time=40 ms

  --- 192.168.1.98 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/44/50 ms

<r1>ping 192.168.1.130
  PING 192.168.1.130: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.130: bytes=56 Sequence=1 ttl=253 time=50 ms
    Reply from 192.168.1.130: bytes=56 Sequence=2 ttl=253 time=40 ms
    Reply from 192.168.1.130: bytes=56 Sequence=3 ttl=253 time=40 ms
    Reply from 192.168.1.130: bytes=56 Sequence=4 ttl=253 time=50 ms
    Reply from 192.168.1.130: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 192.168.1.130 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/42/50 ms

<r2>ping 192.168.1.129
  PING 192.168.1.129: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=254 time=50 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=30 ms
    Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=254 time=40 ms

  --- 192.168.1.129 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/42/50 ms

<r2>ping 192.168.1.130
  PING 192.168.1.130: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.130: bytes=56 Sequence=1 ttl=253 time=40 ms
    Reply from 192.168.1.130: bytes=56 Sequence=2 ttl=253 time=30 ms
    Reply from 192.168.1.130: bytes=56 Sequence=3 ttl=253 time=60 ms
    Reply from 192.168.1.130: bytes=56 Sequence=4 ttl=253 time=70 ms
    Reply from 192.168.1.130: bytes=56 Sequence=5 ttl=253 time=50 ms

  --- 192.168.1.130 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/50/70 ms

  • 10
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值