SR-MPLS BE简单配置实例原理

pe1

pe1dis current-configuration

ip vpn-instance vpn

ipv4-family

route-distinguisher 100:100

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

mpls lsr-id 2.2.2.2

mpls

segment-routing //开启sr功能

interface Ethernet1/0/0

undo shutdown

ip address 10.0.23.2 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip binding vpn-instance vpn

ip address 172.16.0.1 255.255.255.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

ospf prefix-sid index 100 //node sid全局唯一

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

ipv4-family vpn-instance vpn

peer 172.16.0.2 as-number 65001

ospf 1

opaque-capability enable //启用10类扩展路由

segment-routing mpls //用mpls方式分配标签

segment-routing global-block 16000 23999 //设置SRGB范围,建议都配置相同范围

area 0.0.0.0

network 0.0.0.0 255.255.255.255

p

pdis current-configuration

mpls lsr-id 3.3.3.3

mpls

segment-routing

interface Ethernet1/0/0

undo shutdown

ip address 10.0.23.3 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip address 10.0.34.3 255.255.255.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 3.3.3.3 255.255.255.255

ospf prefix-sid index 200

interface NULL0

bgp 100

peer 2.2.2.2 as-number 100

peer 2.2.2.2 connect-interface LoopBack0

peer 4.4.4.4 as-number 100

peer 4.4.4.4 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 2.2.2.2 enable

peer 4.4.4.4 enable

ipv4-family vpnv4

undo policy vpn-target

peer 2.2.2.2 enable

peer 2.2.2.2 reflect-client

peer 4.4.4.4 enable

peer 4.4.4.4 reflect-client

ospf 1

opaque-capability enable

segment-routing mpls

segment-routing global-block 16000 23999

area 0.0.0.0

network 0.0.0.0 255.255.255.255

pe2

pe2dis current-configuration

ip vpn-instance vpn

ipv4-family

route-distinguisher 100:200

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

mpls lsr-id 4.4.4.4

mpls

segment-routing

interface Ethernet1/0/0

undo shutdown

ip binding vpn-instance vpn

ip address 192.168.0.1 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

ip address 10.0.34.4 255.255.255.0

undo dcn

undo dcn mode vlan

interface LoopBack0

ip address 4.4.4.4 255.255.255.255

ospf prefix-sid index 300

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

ipv4-family vpn-instance vpn

peer 192.168.0.2 as-number 65002

ospf 1

opaque-capability enable

segment-routing mpls

segment-routing global-block 16000 23999

area 0.0.0.0

network 0.0.0.0 255.255.255.255

如果路ldp又跑sr-mpls be,默认走ldp隧道,让其优先走sr-mpls be隧道,要用策略引:

tunnel-policy p1 //先定义策略

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

ip vpn-instance vpn //在vpn实例中引用

ipv4-family

tnl-policy p1 调用策略

查看

pe1dis segment-routing prefix mpls forwarding //查看标签等信息

pe1dis tunnel-info all //查看隧道

pe1dis ospf lsdb //查看10类lsa

pe1接口上捉包:48120是mp-bgp的私网标签,和mpls里面那个区别vpn-instance一样

相关推荐
其实防守也摸鱼23 分钟前
渗透--损坏的对象级别鉴权漏洞(Broken Object Level Authorization, BOLA)
大数据·网络·数据库·学习·tcp/ip·安全·安全威胁分析
FrameNotWork29 分钟前
HarmonyOS 6.0 输入法与键盘避让 — 聊天页面底部输入栏被键盘挡住的绝望
华为·计算机外设·harmonyos
hehelm34 分钟前
IO 多路复用 — Reactor
linux·服务器·网络·数据库·c++
线束线缆组件品替网35 分钟前
Amphenol ICC RJE1Y22610C42401线束组件应用解析
网络·数码相机·智能手机·计算机外设·电脑·电视盒子
IT小白杨1 小时前
多账号环境稳定性由什么决定:指纹、网络、存储如何共同决定账号安全
网络·安全·开源软件·业界资讯·指纹浏览器
刘某的Cloud2 小时前
手工配置nginx的systemd服务
linux·运维·网络·nginx·systemd
不羁的木木3 小时前
HarmonyOS APP实战-基于Image Kit的图像处理APP - 第8篇:图片编码与保存
图像处理·华为·harmonyos
春卷同学3 小时前
HarmonyOS掌上记账APP开发实践第2篇:从零搭建记账应用 — MoneyTrack 工程全景解析![
华为·harmonyos
数智化管理手记3 小时前
智能财务能替代人工核算吗?智能财务核心功能包含哪些?
大数据·网络·数据库·数据挖掘·精益工程
春卷同学3 小时前
HarmonyOS掌上记账APP开发实践第1篇:HarmonyOS 多模块 HAR 架构最佳实践 — MoneyTrack 多模块拆分之道
华为·架构·harmonyos