OSPF-MGRE练习

网络拓扑即IP规划

在这里插入图片描述

AR1------------------------------------------------------------
sys
int g 0/0/1
ip add 10.0.0.1 24
int g 0/0/0
ip add 11.0.0.1 24
interface LoopBack 1
ip a 192.168.1.1 24

# 静态路由
ip route-static 0.0.0.0 0 10.0.0.2
ip route-static 0.0.0.0 0 11.0.0.2

# nat
acl 2000
rule permit source 192.168.1.0 0.0.0.255
int g 0/0/1
nat outbound 2000
int g 0/0/0
nat outbound 2000

AR2------------------------------------------------------------
sys
int g 0/0/0
ip add 20.0.0.1 24
interface LoopBack 1
ip a 192.168.2.1 24
# 静态路由
ip route-static 0.0.0.0 0 20.0.0.2
# nat
acl 2000
rule permit source 192.168.2.0 0.0.0.255
int g 0/0/0
nat outbound 2000

AR3------------------------------------------------------------
sys
int g 0/0/0
ip add 30.0.0.1 24
interface LoopBack 1
ip a 192.168.3.1 24
# 静态路由
ip route-static 0.0.0.0 0 30.0.0.2
# nat
acl 2000
rule permit source 192.168.3.0 0.0.0.255
int g 0/0/0
nat outbound 2000

AR4------------------------------------------------------------
sys
int g 0/0/0
ip add 40.0.0.1 24
interface LoopBack 1
ip a 192.168.4.1 24
# 静态路由
ip route-static 0.0.0.0 0 40.0.0.2
# nat
acl 2000
rule permit source 192.168.4.0 0.0.0.255
int g 0/0/0
nat outbound 2000

AR5------------------------------------------------------------
sys
int g 0/0/0
ip add 50.0.0.1 24
interface LoopBack 1
ip a 192.168.5.1 24
# 静态路由
ip route-static 0.0.0.0 0 50.0.0.2
# nat
acl 2000
rule permit source 192.168.5.0 0.0.0.255
int g 0/0/0
nat outbound 2000

AR6------------------------------------------------------------
sys
int g 4/0/2
ip add 10.0.0.2 24
int g 0/0/0
ip add 11.0.0.2 24
int g 0/0/1
ip add 20.0.0.2 24
int g 0/0/2
ip add 30.0.0.2 24
int g 4/0/0
ip add 40.0.0.2 24
int g 4/0/1
ip add 50.0.0.2 24
interface LoopBack 1
ip add 60.0.0.1 24

MGRE(AR1,AR2,AR3)

AR1------------------------------------------------------------
sys
int t 0/0/0
ip add 192.168.6.1 24
tunnel-protocol gre p2mp 
source 11.0.0.1
nhrp entry multicast dynamic
nhrp network-id 100

#OSTP
ospf 1 router-id 192.168.1.1
area 0
network 192.168.6.0 0.0.0.255
area 1
network 192.168.1.0 0.0.0.255
int t 0/0/0
ospf network-type broadcast


AR2------------------------------------------------------------
int t 0/0/0
ip add 192.168.6.2 24
tunnel-protocol gre p2mp 
source g 0/0/0
nhrp entry 192.168.6.1 11.0.0.1 register
nhrp network-id 100

#OSTP
ospf 1 router-id 192.168.2.1
area 0
network 192.168.6.0 0.0.0.255
area 2
network 192.168.2.0 0.0.0.255
int t 0/0/0
ospf network-type broadcast
ospf dr-priority 0

AR3------------------------------------------------------------
int t 0/0/0
ip add 192.168.6.3 24
tunnel-protocol gre p2mp 
source g 0/0/0
nhrp entry 192.168.6.1 11.0.0.1 register
nhrp network-id 100

#OSTP
ospf 1 router-id 192.168.3.1
area 0
network 192.168.6.0 0.0.0.255
area 3
network 192.168.3.0 0.0.0.255
int t 0/0/0
ospf network-type broadcast
ospf dr-priority 0

MGRE(AR1,AR4,AR5)

AR1------------------------------------------------------------
sys
int t 0/0/1
ip add 192.168.7.1 24
tunnel-protocol gre p2mp 
source 10.0.0.1
nhrp entry multicast dynamic
nhrp network-id 200

#OSTP
ospf 2 router-id 192.168.1.1
area 0
network 192.168.7.0 0.0.0.255
area 1
network 192.168.1.0 0.0.0.255
int t 0/0/1
ospf network-type broadcast

AR4------------------------------------------------------------
int t 0/0/1
ip add 192.168.7.2 24
tunnel-protocol gre p2mp 
source g 0/0/0
nhrp entry 192.168.7.1 10.0.0.1 register
nhrp entry 192.168.7.3 50.0.0.1 register
nhrp network-id 200

#OSTP
ospf 2 router-id 192.168.4.1
area 0
network 192.168.7.0 0.0.0.255
area 2
network 192.168.4.0 0.0.0.255
int t 0/0/1
ospf network-type broadcast

AR5------------------------------------------------------------
int t 0/0/1
ip add 192.168.7.3 24
tunnel-protocol gre p2mp 
source g 0/0/0
nhrp entry 192.168.7.1 10.0.0.1 register
nhrp entry 192.168.7.2 40.0.0.1 register
nhrp network-id 200

#OSTP
ospf 2 router-id 192.168.5.1
area 0
network 192.168.7.0 0.0.0.255
area 3
network 192.168.5.0 0.0.0.255
int t 0/0/1
ospf network-type broadcast

测试

在这里插入图片描述
在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值