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

网络规划设计

1、不开ldp协议,只开mpls

2、使用ospf 10类lsa传递

3、私网互通

NE1配置

pe1\]dis 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配置 \[pe2\]dis 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配置,比较简单省略!!! 结果验证 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/026943c873a641d0b19f7f4a78fded07.png) ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/7d46eb1c284f434d8135b796bfa8e8a4.png) 互通测试 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/7f2d8d920c2c48179ac2dd0d1aeacfa8.png) ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/61253306f6134ce5835ec7eb067dba77.png)

相关推荐
等风来不如迎风去17 分钟前
【win11】最佳性能:fix 没有壁纸,一直黑屏
网络·人工智能
Harvy_没救了35 分钟前
【网络部署】 Win11 + VMware CentOS8 + Nginx 文件共享服务 Wiki
运维·网络·nginx
春风有信1 小时前
【2026.05.01】Windows10安装Docker Desktop 4.71.0.0步骤及问题解决
运维·docker·容器
汤愈韬1 小时前
NAT Server 与目的Nat
网络·网络协议·网络安全·security
2401_873479402 小时前
断网时如何实时判断IP归属?嵌入本地离线库,保障风控不中断
运维·服务器·网络
守城小轩2 小时前
基于Chrome140的Yahoo自动化(关键词浏览)——需求分析&环境搭建(一)
运维·自动化·chrome devtools·浏览器自动化·指纹浏览器·浏览器开发
handler012 小时前
Linux 内核剖析:进程优先级、上下文切换与 O(1) 调度算法
linux·运维·c语言·开发语言·c++·笔记·算法
7ACE2 小时前
Wireshark TS | TLP 超时时间
网络·网络协议·tcp/ip·wireshark·tcpdump
其实防守也摸鱼3 小时前
CTF密码学综合教学指南--第三章
开发语言·网络·python·安全·网络安全·密码学
其实防守也摸鱼3 小时前
CTF密码学综合教学指南--第四章
网络·笔记·安全·网络安全·密码学·ctf