当前位置: 首页 > news >正文

华为mpls vpn hubspoke经典案例组网

在这里插入图片描述

AR4总部CE和isp的R1用一条物理链路,做成两条线连接,一条用子接口,2条一个是进入的流量,一个是出去的流量

主要是靠RT和RD来实现,有两种方法:
第一种:
原理是AR5和AR6发出的RT export报文全部对应R1上面的RT import,也就是说R1上面RT import设个队列(本身RT就可以设置多个),一个对应R5的出RT,一个对应R6的出RT,AR1上面的出RT export思路刚好相反,同样配置。

第二种:
如果R5和R6都设置相同的出和入RT,那R1就只设备一个出和入RT就可以了,同时可以接收和发送给两台设备,本案例配置就是这样,这样最简单。

分部R6的as号和总部重复了,用sub替换AS号解决,isp区域R1和总部R4用双线in和out也有as重复的问题,一个口子用sub替换as号做,一个口子用allow-so-loop来允许重复次数来做,思路是所有的as冲突问题都在isp部分来做,ce客户端不做配置。

ospf在发布loopback口子网络时,只支持32位,不支持24位,要支持就得打一条命令:
ospf network-type broadcast

实现效果:AR5和AR6的bgp路由来回都走总部AR4绕行

R1配置:

router id 1.1.1.1

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

ip vpn-instance in
ipv4-family
route-distinguisher 100:1
vpn-target 100:101 import-extcommunity

ip vpn-instance out
ipv4-family
route-distinguisher 100:11
vpn-target 100:100 export-extcommunity

mpls lsr-id 1.1.1.1
mpls

mpls ldp

isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0001.00
is-name r1

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip binding vpn-instance out
ip address 172.16.1.1 255.255.255.0

interface GigabitEthernet0/0/0.10
dot1q termination vid 10
ip binding vpn-instance in
ip address 172.16.10.1 255.255.255.0
arp broadcast enable

interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.0
isis enable 1
isis circuit-type p2p
isis ppp-negotiation 3-way only
mpls
mpls ldp

interface GigabitEthernet0/0/2
ip address 10.0.13.1 255.255.255.0
isis enable 1
isis circuit-type p2p
isis ppp-negotiation 3-way only
mpls
mpls ldp

interface NULL0

interface LoopBack0
ip address 1.1.1.1 255.255.255.255
isis enable 1

bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
peer 3.3.3.3 enable

ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
peer 3.3.3.3 enable

ipv4-family vpn-instance in
peer 172.16.10.2 as-number 65000
peer 172.16.10.2 substitute-as

ipv4-family vpn-instance out
peer 172.16.1.2 as-number 65000
peer 172.16.1.2 allow-as-loop 2

R2

router id 2.2.2.2

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

ip vpn-instance vpn
ipv4-family
route-distinguisher 100:2
vpn-target 100:101 export-extcommunity
vpn-target 100:100 import-extcommunity

mpls lsr-id 2.2.2.2
mpls

mpls ldp

isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0002.00
is-name r2

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
isis enable 1
isis circuit-type p2p
isis ppp-negotiation 3-way only
mpls
mpls ldp

interface GigabitEthernet0/0/1
ip binding vpn-instance vpn
ip address 172.16.2.1 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 2.2.2.2 255.255.255.255
isis enable 1

bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 3.3.3.3 enable

ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
peer 3.3.3.3 enable

ipv4-family vpn-instance vpn
import-route ospf 1 route-policy test

ospf 1 vpn-instance vpn
import-route bgp
area 0.0.0.0
network 172.16.2.1 0.0.0.0

route-policy test permit node 10
if-match ip-prefix test

ip ip-prefix test index 10 permit 5.5.5.0 24

R3:

router id 3.3.3.3

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

ip vpn-instance vpn
ipv4-family
route-distinguisher 100:3
vpn-target 100:101 export-extcommunity
vpn-target 100:100 import-extcommunity

mpls lsr-id 3.3.3.3
mpls

mpls ldp

isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0003.00
is-name r3

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 10.0.13.3 255.255.255.0
isis enable 1
isis circuit-type p2p
isis ppp-negotiation 3-way only
mpls
mpls ldp

interface GigabitEthernet0/0/1
ip binding vpn-instance vpn
ip address 172.16.3.1 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 3.3.3.3 255.255.255.255
isis enable 1

bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
peer 2.2.2.2 enable

ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
peer 2.2.2.2 enable

ipv4-family vpn-instance vpn
peer 172.16.3.2 as-number 65000
peer 172.16.3.2 substitute-as

R4

router id 4.4.4.4

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 172.16.1.2 255.255.255.0

interface GigabitEthernet0/0/0.10
dot1q termination vid 10
ip address 172.16.10.2 255.255.255.0
arp broadcast enable

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 10.0.4.4 255.255.255.0

bgp 65000
peer 172.16.1.1 as-number 100
peer 172.16.10.1 as-number 100

ipv4-family unicast
undo synchronization
network 10.0.4.0 255.255.255.0
peer 172.16.1.1 enable
peer 172.16.10.1 enable

R5:

interface GigabitEthernet0/0/0
ip address 172.16.2.2 255.255.255.0

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 5.5.5.5 255.255.255.0
ospf network-type broadcast
ospf enable 1 area 0.0.0.0

ospf 1
area 0.0.0.0
network 172.16.2.2 0.0.0.0

R6

router id 6.6.6.6

interface GigabitEthernet0/0/0
ip address 172.16.3.2 255.255.255.0

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2

interface NULL0

interface LoopBack0
ip address 6.6.6.6 255.255.255.255

bgp 65000
peer 172.16.3.1 as-number 100

ipv4-family unicast
undo synchronization
network 6.6.6.6 255.255.255.255
peer 172.16.3.1 enable

相关文章:

  • Linux的7个运行级别
  • No matching client found for package name ‘com.unity3d.player‘
  • docker部署自己的网站wordpress
  • [Vue3]父子组件相互传值数据同步
  • 【linux】通过脚本、系统服务监控开机时间和 cpu 温度
  • wins 安装 tensorflow keras
  • HuTool工具使用(JSONUtil+JSONObject+JSONArray)
  • 3593 蓝桥杯 查找最大元素 简单
  • Leetcode—42. 接雨水【困难】
  • 项目02《游戏-08-开发》Unity3D
  • HarmonyOS鸿蒙ArkTS证件照生成模板(适合二次开发,全套源码版)
  • 面试复盘6——后端开发
  • 进程控制(Linux)
  • 【蓝桥杯冲冲冲】[NOIP2003 普及组] 栈
  • C++ 语法文件
  • 【翻译】babel对TC39装饰器草案的实现
  • 2017 年终总结 —— 在路上
  • CSS实用技巧干货
  • Debian下无root权限使用Python访问Oracle
  • golang 发送GET和POST示例
  • iOS 系统授权开发
  • JavaScript工作原理(五):深入了解WebSockets,HTTP/2和SSE,以及如何选择
  • java取消线程实例
  • php的插入排序,通过双层for循环
  • webpack入门学习手记(二)
  • 搞机器学习要哪些技能
  • 基于 Ueditor 的现代化编辑器 Neditor 1.5.4 发布
  • 项目实战-Api的解决方案
  • LevelDB 入门 —— 全面了解 LevelDB 的功能特性
  • # MySQL server 层和存储引擎层是怎么交互数据的?
  • #git 撤消对文件的更改
  • #Lua:Lua调用C++生成的DLL库
  • #我与Java虚拟机的故事#连载05:Java虚拟机的修炼之道
  • $GOPATH/go.mod exists but should not goland
  • (1)(1.9) MSP (version 4.2)
  • (17)Hive ——MR任务的map与reduce个数由什么决定?
  • (2)Java 简介
  • (4)Elastix图像配准:3D图像
  • (Redis使用系列) SpirngBoot中关于Redis的值的各种方式的存储与取出 三
  • (附源码)springboot宠物医疗服务网站 毕业设计688413
  • **PyTorch月学习计划 - 第一周;第6-7天: 自动梯度(Autograd)**
  • .md即markdown文件的基本常用编写语法
  • .Net Core 中间件验签
  • .NET delegate 委托 、 Event 事件
  • .net mvc 获取url中controller和action
  • .net php 通信,flash与asp/php/asp.net通信的方法
  • .NET 中 GetHashCode 的哈希值有多大概率会相同(哈希碰撞)
  • .NET 中让 Task 支持带超时的异步等待
  • .one4-V-XXXXXXXX勒索病毒数据怎么处理|数据解密恢复
  • /var/lib/dpkg/lock 锁定问题
  • @AutoConfigurationPackage的使用
  • @RequestMapping 的作用是什么?
  • @WebService和@WebMethod注解的用法
  • [<死锁专题>]
  • [2009][note]构成理想导体超材料的有源THz欺骗表面等离子激元开关——