华为sr-mpls te手动隧道模型配置案例

NE1(pe1)

ip vpn-instance vpn

ipv4-family

route-distinguisher 100:100

tnl-policy p1 //把vpn实例引入到定义的p1策略中的te隧道

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

mpls lsr-id 1.1.1.1

mpls

mpls te //开mpls te功能

explicit-path te1 //定义显示标签路径,一条线各sid+SRGB过去对端,这里如何定义,ce的数据包就怎么走。

next sid label 16200 type prefix //先到中间的net2(P)设备

next sid label 16400 type prefix //再到对端net4(pe2)设备

segment-routing //全局开户段路由功能

interface Ethernet1/0/0

undo shutdown

ip binding vpn-instance vpn //绑定对端ce实例

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.12.1 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/2

undo shutdown

ip address 10.0.13.1 255.255.255.0

undo dcn mode vlan

interface LoopBack0

ip address 1.1.1.1 255.255.255.255

ospf prefix-sid index 100 //自己本设备的node sid标签

interface Tunnel1                  //和对端pe2建立隧道

ip address unnumbered interface LoopBack0   //借用自己的loop地址

tunnel-protocol mpls te             //指定隧道协议

destination 4.4.4.4               //对端pe地址

mpls te signal-protocol segment-routing     //选择sr协议

mpls te tunnel-id 1              //本地有效

mpls te path explicit-path te1          //手工指定前面指定的显示路径,用于配合下面的隧道负载分担。

(如果有控制器这里就这样配:mpls te pce delegate 托管给pce server)

interface NULL0

bgp 100

peer 2.2.2.2 as-number 100

peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 2.2.2.2 enable

ipv4-family vpnv4   //全网建立vpnv4的bgp邻居

policy vpn-target

peer 2.2.2.2 enable

ipv4-family vpn-instance vpn

peer 192.168.0.2 as-number 65001

ospf 1

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

segment-routing mpls    //开段路由标签分发功能

segment-routing global-block 16000 23999   //定义SRGB范围

area 0.0.0.0

network 0.0.0.0 255.255.255.255

mpls-te enable     //开启TE功能

undo dcn

tunnel-policy p1   //定义策略,假设有2条路实现负载分担

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

NE2(P)

mpls lsr-id 2.2.2.2

mpls

mpls te

segment-routing

interface Ethernet1/0/1

undo shutdown

ip address 10.0.12.2 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/2

undo shutdown

ip address 10.0.24.2 255.255.255.0

undo dcn mode vlan

interface Ethernet1/0/3

undo shutdown

undo dcn mode vlan

interface LoopBack0

ip address 2.2.2.2 255.255.255.255

ospf prefix-sid index 200

interface NULL0

bgp 100

peer 1.1.1.1 as-number 100

peer 1.1.1.1 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 1.1.1.1 enable

peer 4.4.4.4 enable

ipv4-family vpnv4

undo policy vpn-target

peer 1.1.1.1 enable

peer 1.1.1.1 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

mpls-te enable

undo dcn

NE4(PE2)

ip vpn-instance vpn

ipv4-family

route-distinguisher 100:200

tnl-policy p1

vpn-target 1:1 export-extcommunity

vpn-target 1:1 import-extcommunity

mpls lsr-id 4.4.4.4

mpls

mpls te

explicit-path te1

next sid label 16200 type prefix

next sid label 16100 type prefix

segment-routing

interface Ethernet1/0/0

undo shutdown

ip binding vpn-instance vpn

ip address 192.168.1.1 255.255.255.0

undo dcn

undo dcn mode vlan

interface Ethernet1/0/1

undo shutdown

undo dcn

undo dcn mode vlan

interface Ethernet1/0/2

undo shutdown

ip address 10.0.24.4 255.255.255.0

undo dcn mode vlan

interface Ethernet1/0/3

undo shutdown

ip address 10.0.34.4 255.255.255.0

undo dcn mode vlan

interface LoopBack0

ip address 4.4.4.4 255.255.255.255

ospf prefix-sid index 400

interface Tunnel1

ip address unnumbered interface LoopBack0

tunnel-protocol mpls te

destination 1.1.1.1

mpls te signal-protocol segment-routing

mpls te tunnel-id 1

mpls te path explicit-path te1

interface NULL0

bgp 100

peer 2.2.2.2 as-number 100

peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 2.2.2.2 enable

ipv4-family vpnv4

policy vpn-target

peer 2.2.2.2 enable

ipv4-family vpn-instance vpn

peer 192.168.1.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

mpls-te enable

undo dcn

tunnel-policy p1

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

查看:

tracert lsp segment-routing te Tunnel 1

查看标签计算分配情况

display tunnel-info all

查看所有的隧道

display ip routing-table vpn-instance vpn 22.1.1.1 verbose

查看到对端22.1.1.1走的是哪个隧道

查看用了策略后走的是te隧道,默认会走下面的be隧道

相关推荐
等保桃夭夭3 分钟前
企业如何评估自身网络安全等级?
网络·安全·web安全
SofterICer20 分钟前
pre-installed TS.48 test profile
服务器·网络
GGBondlctrl1 小时前
【JavaEE初阶】网络原理—关于TCP协议值滑动窗口与流量控制,进来看看吧!!!
网络·网络协议·tcp/ip·滑动窗口·流量控制·拥塞控制·tcp协议特性
qs11379818432 小时前
怎么提取视频里的音频?关于提取视频里音频的几种方法
linux·网络·ffmpeg
SuperHeroWu72 小时前
【HarmonyOS】判断应用是否已安装
华为·微信·harmonyos·qq·微博·应用是否安装·canopenlink
SoraLuna2 小时前
「Mac畅玩鸿蒙与硬件7」鸿蒙开发环境配置篇7 - 使用命令行工具和本地模拟器管理项目
macos·华为·harmonyos
CXDNW2 小时前
【网络面试篇】TCP与UDP类
网络·笔记·tcp/ip·面试·udp
知孤云出岫3 小时前
华为配置手工负载分担模式链路聚合实验
java·linux·网络
C_player_0018 小时前
HttpContext模块 --- http上下文模块
linux·服务器·网络·网络协议·http
ZachOn1y11 小时前
计算机网络:网络层 —— 网络层(网际层)概述
网络·计算机网络·网络层·1024程序员节