ospf实验

[r1]interface l	
[r1]interface LoopBack 0
[r1-LoopBack0]
[r1-LoopBack0]ip add	
[r1-LoopBack0]ip address 192.168.1.1 25
[r1-LoopBack0]
[r1-LoopBack0]qu	
[r1-LoopBack0]quit 
[r1]int	
[r1]interface l	
[r1]interface LoopBack 1
[r1-LoopBack1]
[r1-LoopBack1]ip add	
[r1-LoopBack1]ip address 192.168.1.129 25
[isp-GigabitEthernet0/0/0]ip ad	
[isp-GigabitEthernet0/0/0]ip address 20.0.0.2 24
[isp]ping 10.0.0.1
  PING 10.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 10.0.0.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 10.0.0.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 10.0.0.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 10.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 10.0.0.1: bytes=56 Sequence=5 ttl=255 time=30 ms
 
  --- 10.0.0.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/22/30 ms
 
[isp]ping 20.0.0.1
  PING 20.0.0.1: 56  data bytes, press CTRL_C to break
    Reply from 20.0.0.1: bytes=56 Sequence=1 ttl=255 time=10 ms
    Reply from 20.0.0.1: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 20.0.0.1: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 20.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 20.0.0.1: bytes=56 Sequence=5 ttl=255 time=30 ms
[r1]ip route-static 0.0.0.0 0 10.0.0.2
[r1]ip route-static 0.0.0.0 0 20.0.0.2
[r2]ip route-static 0.0.0.0 0 30.0.0.2
[r3]ip route-static 0.0.0.0 0 40.0.0.2
[r4]ip route-static 0.0.0.0 0 50.0.0.2 
[r5]ip route-static 0.0.0.0 0 60.0.0.2

[r1-Tunnel0/0/0]dis th
[V200R003C00]
#
interface Tunnel0/0/0
 ip address 10.1.2.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 20.0.0.1
 nhrp entry multicast dynamic
[r2]display nhrp peer a
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.2.1        32    20.0.0.1        10.1.2.1        static       hub          
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:01:09
Expire time     : --
[r1]display nhrp peer a
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.2.2        32    30.0.0.1        10.1.2.2        dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:03:34
Expire time     : 01:56:26
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.2.3        32    40.0.0.1        10.1.2.3        dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:00:38
Expire time     : 01:59:22
 
Number of nhrp peers: 2
[r2-Tunnel0/0/0]ospf dr-priority 0
[r3-Tunnel0/0/0]ospf dr-priority 0
[r1]display 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          Tunnel0/0/0                      2.2.2.2          Full        
 0.0.0.0          Tunnel0/0/0                      3.3.3.3          Full        
 ----------------------------------------------------------------------------
[r5-Tunnel0/0/0]ip address 10.1.1.5 24
[r4-Tunnel0/0/0]ip address 10.1.1.4 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r4-Tunnel0/0/0]nhrp entry 10.1.1.1 10.0.0.1 register 
[r4-Tunnel0/0/0]ospf network-type broadcast
[r1]display nhrp peer all 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.2.2        32    30.0.0.1        10.1.2.2        dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 01:08:53
Expire time     : 01:51:07
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.2.3        32    40.0.0.1        10.1.2.3        dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 01:05:57
Expire time     : 01:54:03
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.1.5        32    60.0.0.1        10.1.1.5        static       hub          
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/1
Created time    : 00:47:16
Expire time     : --
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
10.1.1.4        32    50.0.0.1        10.1.1.4        static       hub          
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/1
Created time    : 00:47:05
Expire time     : --
[r1]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 4        Routes : 4        
 
OSPF routing table status : <Active>
         Destinations : 4        Routes : 4
 
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
 
    192.168.2.1/32  OSPF    10   1562        D   10.1.2.2        Tunnel0/0/0
    192.168.3.1/32  OSPF    10   1562        D   10.1.2.3        Tunnel0/0/0
    192.168.4.1/32  OSPF    10   1562        D   10.1.1.4        Tunnel0/0/1
    192.168.5.1/32  OSPF    10   1562        D   10.1.1.5        Tunnel0/0/1
[r4]display current-configuration interface t 0/0/0
[V200R003C00]
#
interface Tunnel0/0/0
 ip address 10.1.1.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type broadcast
 nhrp entry 10.1.1.5 60.0.0.1 register
 nhrp entry 10.1.1.1 10.0.0.1 register
#
return
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值