OSPF-MGRE实验

文章描述了如何配置IP路由器以实现全连接的多点GRE隧道(mgre)结构以及星型拓扑。在mgre结构中,R1、R4和R5通过GRE隧道互联,配置了NHRP进行动态地址解析。同时,R1、R2和R3构成星型拓扑,R1作为中心节点,使用OSPF协议确保私有网段间的通信。所有路由器都进行了相应的静态路由和OSPF配置以实现网络互通。
摘要由CSDN通过智能技术生成

ip
R1:

g0/0/1:116.0.0.1 24

g0/0/0:16.0.0.1 24

缺省路由:

lookback0:192.168.1.1 24

R2:

g0/0/0: 26.0.0.1 24

缺省路由:

lookback0:192.168.2.1 24

R3:

g0/0/0:36.0.0.1 24

缺省路由:

lookback0:192.168.3.1 24

R4:

g0/0/0:46.0.0.1 24

缺省路由:

lookback0:192.168.4.1 24

R5:

g0/0/0: 56.0.0.1 24

缺省路由:

lookback0:192.168.5.1 24

ISP(R6):

g0/0/0: 16.0.0.2 24

g0/0/1: 116.0.0.2 24

g0/0/2: 56.0.0.2 24

g2/0/0: 26.0.0.2 24

g3/0/0: 36.0.0.2 24

g4/0/0: 46.0.0.2 24

配置好上述i端口ip后,在相关路由下敲一以命令

R1:

ip route-static 0.0.0.0 0 16.0.0.2

ip route-static 0.0.0.0 0 116.0.0.2

R2:

ip route-static 0.0.0.0 0 26.0.0.2

R3:

ip route-static 0.0.0.0 0 36.0.0.2

R4:

ip route-static 0.0.0.0 0 46.0.0.2

R5:

ip route-static 0.0.0.0 0 56.0.0.2

分别在R1、R2、R3、R4、R5上ping相关端口的IP地址,实现相互ping通。

实现R1、R4、R5为全连的mgre结构,R1、R2、R3为星型的拓扑结构其中R1为中心站点,使用ospf完成私有网段相互通讯。
1.实现R1、R4、R5为全连的mgre结构
R1:

int t0/0/1

ip address 192.168.7.1 24

tunnel-protocol gre p2mp

source 116.0.0.1

nhrp network-id 110

nhrp entry multicast dynamic

nhrp entry network 192.168.7.2 46.0.0.1 register

nhrp entry network 192.168.7.3 56.0.0.1 register

R4:

int t0/0/0

ip address 192.168.7.2 24

tunnel-protocol gre p2mp

source 46.0.0.1

nhrp network-id 110

nhrp entry multicast dynamic

nhrp entry network 192.168.7.1 116.0.0.1 register

nhrp entry network 192.168.7.3 56.0.0.1 register

R5:

int t0/0/0

ip address 192.168.7.3 24

tunnel-protocol gre p2mp

source 56.0.0.1

nhrp network-id 110

nhrp entry multicast dynamic

nhrp entry network 192.168.7.1 116.0.0.1 register

nhrp entry network 192.168.7.2 46.0.0.1 register

2、R1、R2、R3为星型的拓扑结构其中R1为中心站点。
R1:

进入隧道端口:

int t0/0/0

配置ip:

ip address 192.168.6.1 24

定义封装类型:

tunnel-protocol gre p2mp

中心源端口地址

source 16.0.0.1

加入名为100的域

nhrp network-id 100

进行伪广播

nhrp entry multicast dynamic

R2:

int t0/0/0

ip address 192.168.6.2 24

tunnel-protocol gre p2mp

source g 0/0/0(由于分支地址不固定,因此直接标记端口号,R3同理)

nhrp network-id 100

R3:

int t0/0/0

ip address 192.168.6.3 24

tunnel-protocol gre p2mp

source g 0/0/0

nhrp network-id 100

ospf的相关命令
R1:

ospf 1 router-id 1.1.1.1

area 0

network 192.168.1.0 0.0.0.255

network 192.168.6.0 0.0.0.255

network 192.168.7.0 0.0.0.255

R2:

ospf 1 router-id 2.2.2.2

area 0

network 192.168.2.0 0.0.0.255

network 192.168.6.0 0.0.0.255

R3:

ospf 1 router-id 3.3.3.3

area 0

network 192.168.3.0 0.0.0.255

network 192.168.6.0 0.0.0.255

R4:

ospf 1 router-id 4.4.4.4

area 0

network 192.168.4.0 0.0.0.255

network 192.168.7.0 0.0.0.255

R5:

ospf 1 router-id 5.5.5.5

area 0

network 192.168.5.0 0.0.0.255

network 192.168.7.0 0.0.0.255:

R1:

int t 0/0/0

ospf network-type p2mp

R2、R3:

int t 0/0/0

ospf network-type p2mp

R1:

int t 0/0/1

ospf network-type broadcast

R4、R5:

int t 0/0/0

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ctrl+c or v

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值