网络基础(十三)----实操----MGRE环境下的OSPF综合实验

问题描述:

一.配置路由接口、环回的IP地址以及缺省

二.R1、R2、R3逻辑链路配置------2.2.2.0/24

 R1:

[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip add 2.2.2.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/0]source 16.0.0.1
Sep 28 2021 23:21:48-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 
[r1-Tunnel0/0/0]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]display nhrp peer all 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
2.2.2.2         32    26.0.0.1        2.2.2.2         dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:03:20
Expire time     : 01:56:40
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
2.2.2.3         32    36.0.0.1        2.2.2.3         dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:00:28
Expire time     : 01:59:32

Number of nhrp peers: 2

 R2:

[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 2.2.2.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/0
Sep 28 2021 23:24:27-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 2.2.2.1 16.0.0.1 register 

 R3:

[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 2.2.2.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source GigabitEthernet 0/0/0
Sep 28 2021 23:28:16-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 2.2.2.1 16.0.0.1 register 

三.R1、R4、R5 -----1.1.1.0/24 

 R1:

[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 1.1.1.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]source 116.0.0.1
Sep 28 2021 23:38:31-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r1-Tunnel0/0/1]nhrp network-id 200
[r1-Tunnel0/0/1]nhrp entry multicast dynamic 
[r1-Tunnel0/0/1]nhrp entry 1.1.1.2 46.0.0.1 register 
[r1-Tunnel0/0/1]nhrp entry 1.1.1.3 56.0.0.1 register 
[r1-Tunnel0/0/1]q
[r1]display nhrp peer all 
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
2.2.2.2         32    26.0.0.1        2.2.2.2         dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:20:08
Expire time     : 01:39:52
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
2.2.2.3         32    36.0.0.1        2.2.2.3         dynamic      route tunnel 
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/0
Created time    : 00:17:16
Expire time     : 01:42:44
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
1.1.1.2         32    46.0.0.1        1.1.1.2         static       hub          
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/1
Created time    : 00:03:50
Expire time     : --
------------------------------------------------------------------------------- 
Protocol-addr   Mask  NBMA-addr       NextHop-addr    Type         Flag         
------------------------------------------------------------------------------- 
1.1.1.3         32    56.0.0.1        1.1.1.3         static       hub          
------------------------------------------------------------------------------- 
Tunnel interface: Tunnel0/0/1
Created time    : 00:03:22
Expire time     : --

Number of nhrp peers: 4

 R4:

[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip add 1.1.1.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r4-Tunnel0/0/0]source 46.0.0.1
Sep 28 2021 23:40:14-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r4-Tunnel0/0/0]nhrp network-id 200
[r4-Tunnel0/0/0]nhrp entry multicast dynamic 
[r4-Tunnel0/0/0]nhrp  entry 1.1.1.1 116.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[r4-Tunnel0/0/0]nhrp entry 1.1.1.3 56.0.0.1

 R5:

[r5]int t 0/0/0
[r5-Tunnel0/0/0]ip add 1.1.1.3 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source 56.0.0.1
Sep 28 2021 23:41:57-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[r5-Tunnel0/0/0]nhrp network-id 200
[r5-Tunnel0/0/0]nhrp entry multicast dynamic 
[r5-Tunnel0/0/0]nhrp entry 1.1.1.1 116.0.0.1 register 
Info: This peer protocol address conflicts with hub register peer protocol addre
ss. 
[r5-Tunnel0/0/0]nhrp entry 1.1.1.2 46.0.0.1 register 

四. 配置OSPF

R1:

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]A 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 2.2.2.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
Sep 28 2021 23:57:47-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEv
ent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r1-ospf-1]
Sep 28 2021 23:57:49-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEv
ent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart) 
[r1-ospf-1]
Sep 28 2021 23:57:49-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEv
ent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchang
e) 
[r1-ospf-1]
Sep 28 2021 23:57:49-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEv
ent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading) 
[r1-ospf-1]
Sep 28 2021 23:57:49-08:00 r1 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEv
ent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

 R2:

[r2]ofp	
[r2]ofp
[r2]osp	
[r2]ospf 1 r	
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]net	
[r2-ospf-1]net
[r2-ospf-1]a 0
[r2-ospf-1-area-0.0.0.0]ne	
[r2-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]ne
Sep 28 2021 23:57:48-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r2-ospf-1-area-0.0.0.0]ne
Sep 28 2021 23:57:48-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart) 
[r2-ospf-1-area-0.0.0.0]ne
Sep 28 2021 23:57:48-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchang
e) 
[r2-ospf-1-area-0.0.0.0]ne
Sep 28 2021 23:57:48-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading) 
[r2-ospf-1-area-0.0.0.0]ne
Sep 28 2021 23:57:48-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 
[r2-ospf-1-area-0.0.0.0]net	
[r2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255

R3:

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 
Sep 28 2021 23:59:29-08:00 r3 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.2.2.2, NeighborEv
ent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255

R4:

[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]a 0
[r4-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]
Sep 29 2021 00:02:01-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r4-ospf-1-area-0.0.0.0]
Sep 29 2021 00:02:01-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart) 
[r4-ospf-1-area-0.0.0.0]
Sep 29 2021 00:02:01-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchang
e) 
[r4-ospf-1-area-0.0.0.0]
Sep 29 2021 00:02:01-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading) 
[r4-ospf-1-area-0.0.0.0]
Sep 29 2021 00:02:01-08:00 r4 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 
[r4-ospf-1-area-0.0.0.0]ne	
[r4-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255

R5:

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]network 1.1.1.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 
Sep 29 2021 00:03:54-08:00 r5 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.1.1.1, NeighborEv
ent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r5-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255

五.R1、R2、R3-----p2mp

R1:

[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ospf network-type p2mp

[r1]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 5        Routes : 5        

OSPF routing table status : <Active>
         Destinations : 5        Routes : 5

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        2.2.2.2/32  OSPF    10   1562        D   2.2.2.2         Tunnel0/0/0
        2.2.2.3/32  OSPF    10   1562        D   2.2.2.3         Tunnel0/0/0
    192.168.2.1/32  OSPF    10   1562        D   2.2.2.2         Tunnel0/0/0
    192.168.3.1/32  OSPF    10   1562        D   2.2.2.3         Tunnel0/0/0
    192.168.4.1/32  OSPF    10   1562        D   1.1.1.2         Tunnel0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

R2:

[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ospf network-type p2mp

R3:

[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ospf network-type p2mp

 六.R1、R4、R5全连的MGRE

 R1:

[r1]interface  Tunnel 0/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast 

R4:

[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ospf network-type broadcast 

R5:

[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast 

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值