华为+sr-mpls BE简单配置案例

网络规划设计

1、不开ldp协议,只开mpls

2、使用ospf 10类lsa传递

3、私网互通

NE1配置

pe1dis current-configuration

sysname pe1

ip vpn-instance a

ipv4-family

route-distinguisher 1:1

tnl-policy p1 //调用隧道策略,让本实例走这个隧道策略

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

mpls lsr-id 1.1.1.1

mpls //只开mpls不开ldp

segment-routing //开段路由功能

interface Ethernet1/0/0

undo shutdown

ip address 10.0.12.1 255.255.255.0

ospf enable 1 area 0.0.0.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip binding vpn-instance a

ip address 10.0.11.1 255.255.255.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

ospf enable 1 area 0.0.0.0

ospf prefix-sid index 1 //SID偏移值,每台设备都不能一样

interface NULL0

bgp 100

peer 3.3.3.3 as-number 100

peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 3.3.3.3 enable

ipv4-family vpnv4

policy vpn-target

peer 3.3.3.3 enable //建立vpnv4邻居

ipv4-family vpn-instance a

peer 10.0.11.2 as-number 65100 //和ce设备建立 实例bgp

ospf 1

opaque-capability enable //开10类lsa功能

segment-routing mpls //支持段路由mpls

segment-routing global-block 16000 23999 //SRGB范围设置,所设备最好是一样,通过这个加上偏移值进行区分

area 0.0.0.0

tunnel-policy p1 //定义隧道策略强制使用sr-lsp,并设置ecmp负载

tunnel select-seq sr-lsp load-balance-number 2

NE2配置

sysname p

mpls lsr-id 2.2.2.2

mpls

segment-routing

interface Ethernet1/0/0

undo shutdown

ip address 10.0.12.2 255.255.255.0

ospf enable 1 area 0.0.0.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip address 10.0.23.2 255.255.255.0

ospf enable 1 area 0.0.0.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

ospf enable 1 area 0.0.0.0

ospf prefix-sid index 2

interface NULL0

ospf 1

opaque-capability enable

segment-routing mpls

segment-routing global-block 16000 23999

area 0.0.0.0

NE3配置

pe2dis current-configuration

sysname pe2

ip vpn-instance a

ipv4-family

route-distinguisher 2:1

tnl-policy p1

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

segment-routing

interface Ethernet1/0/0

undo shutdown

ip address 10.0.23.3 255.255.255.0

ospf enable 1 area 0.0.0.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip binding vpn-instance a

ip address 10.0.32.3 255.255.255.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

ospf enable 1 area 0.0.0.0

ospf prefix-sid index 3

interface NULL0

bgp 100

peer 1.1.1.1 as-number 100

peer 1.1.1.1 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 1.1.1.1 enable

ipv4-family vpnv4

policy vpn-target

peer 1.1.1.1 enable

ipv4-family vpn-instance a

peer 10.0.32.2 as-number 65101

ospf 1

opaque-capability enable

segment-routing mpls

segment-routing global-block 16000 23999

area 0.0.0.0

tunnel-policy p1

tunnel select-seq sr-lsp load-balance-number 2

CE就是普通bgo配置,比较简单省略!!!

结果验证

互通测试

相关推荐
JJJennie77713 分钟前
MAI Gateway技术揭秘:大模型网关能做什么?从原理到落地
linux·服务器·网络·ai网关
Allen_LVyingbo25 分钟前
医疗人工智能项目全生命周期管理系统:监管知识建模、工程实现与实证评估(上)
网络·人工智能·机器学习·语言模型·自动化
新时代牛马6 小时前
嵌入式网络完整篇:从LwIP/以太网驱动到 Linux netdev 与排障
linux·网络·php
IT从业者张某某6 小时前
【鸿蒙PC命令行适配】GitUI 移植的工程实践:双 Git 引擎(libgit2/gitoxide)的鸿蒙适配之路
git·华为·harmonyos
lqj_本人6 小时前
WinPcap 鸿蒙 PC 适配全记录:从 NPF 原始抓包到 VPN_TUN 与 libpcap 双通路
qt·华为·harmonyos
前端世界6 小时前
Linux服务器实战:NTP时间同步、SELinux权限与rsyslog日志管理,一次搞懂三大运维问题
linux·运维·服务器
Android系统攻城狮7 小时前
Linux Gstreamer深度解析之gst_audio_converter_new调用流程与实战(二十)
linux·运维·服务器·gstreamer音视频·音视频进阶
海宇服务7 小时前
零信任架构实战:基于海宇对外投资历史查询服务构建自动化供应商准入网关
运维·人工智能·架构·自动化
上海云盾-小余7 小时前
BGP 高防底层原理:TCP 异常流量识别与清洗机制
运维·网络·tcp/ip
captain3767 小时前
▲网络原理(2)-TCP
java·服务器·网络·tcp/ip·java-ee