OSPF、MGRE综合

在这里插入图片描述

1、左边三台设备配置OSPF 10,区域0;

2、右边为OSPF 1 中间是Area0,下挂Area1和Area2.


要点:

  1. 配置IP地址
  2. 配置静态路由
  3. 配置MGRE、NHRP
  4. 配置OSPF,MGRE部分ospf接口网络类型改为p2mp,hello时间改为10s
  5. 绑定NAT,配置OSPF下发缺省
  6. 两边打通GRE,并对用户网配置静态路由使其互通(如1.1.1.1-9.9.9.9)

配置:

R1:
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
 
 ospf 10 router-id 1.1.1.1 
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 192.168.1.1 0.0.0.0 
  
R2:
ospf 10 router-id 2.2.2.2 
 area 0.0.0.0 
  network 192.168.1.2 0.0.0.0

R3:
interface Tunnel0/0/0
 ip address 10.0.1.1 255.255.255.0 
 tunnel-protocol gre
 source 34.0.0.1
 destination 45.0.0.2
 
ip route-static 0.0.0.0 0.0.0.0 34.0.0.2
ip route-static 9.9.9.9 255.255.255.255 10.0.1.2
ip route-static 16.16.16.16 255.255.255.255 10.0.1.2

ospf 10 router-id 3.3.3.3 
 default-route-advertise
 area 0.0.0.0 
  network 192.168.1.3 0.0.0.0 

[r3]acl 2000
[r3-acl-basic-2000]rule permit source any
[r3-GigabitEthernet0/0/1]nat outbound 2000
R5:
interface Tunnel0/0/0
 ip address 10.0.1.2 255.255.255.0 
 tunnel-protocol gre
 source 45.0.0.2
 destination 34.0.0.1
 
ip route-static 0.0.0.0 0.0.0.0 45.0.0.1
ip route-static 1.1.1.1 255.255.255.255 10.0.1.1

ospf 1 router-id 5.5.5.5 
 default-route-advertise
 area 0.0.0.0 
  network 192.168.2.1 0.0.0.0 
  
rule 5 permit source 192.168.0.0 0.0.255.255 
nat outbound 2000

R6:
ip route-static 7.0.0.0 255.255.255.0 67.0.0.2
ip route-static 47.0.0.0 255.255.255.0 67.0.0.2
ip route-static 78.0.0.0 255.255.255.0 67.0.0.2

interface Tunnel0/0/0
 ip address 10.0.0.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 67.0.0.1
 ospf network-type p2mp
 ospf timer hello 10
 nhrp entry multicast dynamic

ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 10.0.0.1 0.0.0.0 
  network 192.168.2.2 0.0.0.0
 
R8:
ip route-static 7.0.0.0 255.255.255.0 78.0.0.2
ip route-static 47.0.0.0 255.255.255.0 78.0.0.2
ip route-static 67.0.0.0 255.255.255.0 78.0.0.2

ospf 1 router-id 8.8.8.8 
 area 0.0.0.0 
  network 10.0.0.2 0.0.0.0 
  network 192.168.3.1 0.0.0.0 
  
R9:
interface LoopBack0
 ip address 9.9.9.9 255.255.255.255
 
ospf 1 router-id 9.9.9.9 
 area 0.0.0.0 
  network 9.9.9.9 0.0.0.0 
  network 192.168.3.2 0.0.0.0
  
R10:
interface Tunnel0/0/0
 ip address 10.0.0.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf timer hello 10
 nhrp entry 10.0.0.1 67.0.0.1 register
 
ip route-static 47.0.0.0 255.255.255.0 7.0.0.2
ip route-static 67.0.0.0 255.255.255.0 7.0.0.2
ip route-static 78.0.0.0 255.255.255.0 7.0.0.2

ospf 1 router-id 10.10.10.10 
 area 0.0.0.0 
  network 10.0.0.3 0.0.0.0 
  network 192.168.6.1 0.0.0.0 
  
R11:
ospf 1 router-id 11.11.11.11 
 area 0.0.0.0 
  network 192.168.6.2 0.0.0.0 
 area 0.0.0.1 
  network 192.168.7.1 0.0.0.0 
  
R12:
ospf 1 router-id 12.12.12.12 
 area 0.0.0.1 
  network 192.168.7.2 0.0.0.0 
  network 192.168.8.1 0.0.0.0 
 
R13:
ospf 1 router-id 13.13.13.13 
 area 0.0.0.1 
  network 13.13.13.13 0.0.0.0 
  network 192.168.8.2 0.0.0.0 
  
R14:
interface Tunnel0/0/0
 ip address 10.0.0.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf timer hello 10
 nhrp entry 10.0.0.1 67.0.0.1 register
 
ip route-static 7.0.0.0 255.255.255.0 47.0.0.2
ip route-static 67.0.0.0 255.255.255.0 47.0.0.2
ip route-static 78.0.0.0 255.255.255.0 47.0.0.2

ospf 1 router-id 14.14.14.14 
 area 0.0.0.0 
  network 10.0.0.4 0.0.0.0 
  network 192.168.4.1 0.0.0.0 
  
R15:
ospf 1 router-id 15.15.15.15 
 area 0.0.0.0 
  network 192.168.4.2 0.0.0.0 
 area 0.0.0.2 
  network 192.168.5.1 0.0.0.0 
  
R16:
ospf 1 router-id 16.16.16.16 
 area 0.0.0.2 
  network 16.16.16.16 0.0.0.0 
  network 192.168.5.2 0.0.0.0 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值