华为路由器:OSPF单区域实验

OSPF单区域实验

实验拓扑

在这里插入图片描述

OSPF配置

#R1的配置
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]q

#R2的配置
[R2]ospf 1 router-id 2.2.2.2	
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255	
[R2-ospf-1-area-0.0.0.0]network 192.168.23.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q

#R3的配置
[R3]ospf 1 router-id 3.3.3.3	
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.23.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]q

测试结果

PC1pingPC2

PC>ping 192.168.2.254

Ping 192.168.2.254: 32 data bytes, Press Ctrl_C to break
From 192.168.2.254: bytes=32 seq=1 ttl=253 time=78 ms
From 192.168.2.254: bytes=32 seq=2 ttl=253 time=15 ms
From 192.168.2.254: bytes=32 seq=3 ttl=253 time=16 ms
From 192.168.2.254: bytes=32 seq=4 ttl=253 time=31 ms
From 192.168.2.254: bytes=32 seq=5 ttl=253 time=31 ms

--- 192.168.2.254 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 15/34/78 ms

PC>

OSPF查看

邻居表查看

dis ospf peer   #邻居表查看

查看方法如图:
在这里插入图片描述
具体信息

#R1的配置
<R1>dis ospf peer 

	 OSPF Process 1 with Router ID 1.1.1.1
		 Neighbors 

 Area 0.0.0.0 interface 192.168.12.1(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.12.2    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.12.2  BDR: 192.168.12.1  MTU: 0    
   Dead timer due in 31  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:00:26     
   Authentication Sequence: [ 0 ] 

<R1>


#R2的配置
<R2>dis ospf peer

	 OSPF Process 1 with Router ID 2.2.2.2
		 Neighbors 

 Area 0.0.0.0 interface 192.168.12.2(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 192.168.12.1    
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.12.2  BDR: 192.168.12.1  MTU: 0    
   Dead timer due in 32  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:16:05     
   Authentication Sequence: [ 0 ] 

		 Neighbors 

 Area 0.0.0.0 interface 192.168.23.2(GigabitEthernet0/0/1)'s neighbors
 Router ID: 3.3.3.3          Address: 192.168.23.3    
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 192.168.23.2  BDR: 192.168.23.3  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:01:06     
   Authentication Sequence: [ 0 ] 

-------------------------------------------------

#R3的配置
[R3]dis ospf peer

	 OSPF Process 1 with Router ID 3.3.3.3
		 Neighbors 

 Area 0.0.0.0 interface 192.168.23.3(GigabitEthernet0/0/0)'s neighbors
 Router ID: 2.2.2.2          Address: 192.168.23.2    
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 192.168.23.2  BDR: 192.168.23.3  MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:00:43     
   Authentication Sequence: [ 0 ] 

邻居表接口查看

#R1的配置
<R1>dis ospf peer brief 

	 OSPF Process 1 with Router ID 1.1.1.1
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 ----------------------------------------------------------------------------

#R2的配置
<R2>dis ospf peer brief

	 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             1.1.1.1          Full        
 0.0.0.0          GigabitEthernet0/0/1             3.3.3.3          Full        
 ----------------------------------------------------------------------------
<R2>

#R3的配置
<R3>dis ospf peer brief 

	 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             2.2.2.2          Full        
 ----------------------------------------------------------------------------
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值