实验需求:运营商网络配置SR-MPLS-TE,实现CE1和CE2之间的互访流量通过PE1-P2-P4-PE3。
步骤1:配置运营商网络的IGP协议(本实验采用ISIS协议)
PE1:
bash
isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0001.00
bash
interface Ethernet1/0/0
isis enable 1
interface Ethernet1/0/1
isis enable 1
interface LoopBack0
isis enable 1
P2:
bash
isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0002.00
interface Ethernet1/0/0
isis enable 1
interface Ethernet1/0/1
isis enable 1
interface Ethernet1/0/2
isis enable 1
interface LoopBack0
isis enable 1
PE3:
bash
isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0003.00
interface Ethernet1/0/0
isis enable 1
interface Ethernet1/0/1
isis enable 1
interface LoopBack0
isis enable 1
P4:
bash
isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0004.00
interface Ethernet1/0/0
isis enable 1
interface Ethernet1/0/1
isis enable 1
interface Ethernet1/0/2
isis enable 1
interface LoopBack0
isis enable 1
步骤2:开启AS100内的mpls功能。
PE1:
bash
mpls lsr-id 1.1.1.1
mpls
mpls te
P2:
bash
mpls lsr-id 2.2.2.2
mpls
mpls te
PE3:
bash
mpls lsr-id 3.3.3.3
mpls
mpls te
P4
bash
mpls lsr-id 4.4.4.4
mpls
mpls te
步骤3:
PE1:
bash
segment-routing
Isis
segment-routing mpls
segment-routing global-block 16000 16999
interface LoopBack0
isis enable 1
isis prefix-sid index 1
P2:
bash
segment-routing
Isis
segment-routing mpls
segment-routing global-block 16000 16999
interface LoopBack0
isis enable 1
isis prefix-sid index 2
PE3:
bash
segment-routing
Isis
segment-routing mpls
segment-routing global-block 16000 16999
interface LoopBack0
isis enable 1
isis prefix-sid index 3
PE4:
bash
segment-routing
Isis
segment-routing mpls
segment-routing global-block 16000 16999
interface LoopBack0
isis enable 1
isis prefix-sid index 4
步骤4:配置SR的显示路径
①配置P2和P4之间互联链路的邻接段SID
P2:
bash
segment-routing
ipv4 adjacency local-ip-addr 24.1.1.2 remote-ip-addr 24.1.1.4 sid 330000
P4:
bash
segment-routing
ipv4 adjacency local-ip-addr 24.1.1.4 remote-ip-addr 24.1.1.2 sid 330001
②在ISIS开启mpls te功能
PE1:
bash
Isis
traffic-eng level-2
P2:
bash
Isis
traffic-eng level-2
PE3:
bash
Isis
traffic-eng level-2
P4:
bash
Isis
traffic-eng level-2
③配置显示路径
PE1:
bash
explicit-path pe1-pe3
next sid label 16002 type prefix
next sid label 330000 type adjacency
next sid label 16003 type prefix
interface Tunnel1
ip address unnumbered interface LoopBack0
tunnel-protocol mpls te
destination 3.3.3.3
mpls te signal-protocol segment-routing
mpls te tunnel-id 1
mpls te path explicit-path pe1-pe3
PE3:
bash
explicit-path pe3-pe1
next sid label 16004 type prefix
next sid label 330001 type adjacency
next sid label 16001 type prefix
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 pe3-pe1
步骤5:配置PE之间的MP-BGP邻居
PE1:
bash
bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.3 enable
PE4:
bash
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
步骤6:配置PE和CE之间的BGP邻居
PE1:
bash
ip vpn-instance 1
ipv4-family
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
interface Ethernet1/0/2
ip binding vpn-instance 1
ip address 10.0.11.1 255.255.255.0
bgp 100
ipv4-family vpn-instance 1
peer 10.0.11.2 as-number 200
PE3:
bash
ip vpn-instance 1
ipv4-family
route-distinguisher 100:2
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
interface Ethernet1/0/2
ip binding vpn-instance 1
ip address 10.0.24.1 255.255.255.0
bgp 100
ipv4-family vpn-instance 1
peer 10.0.24.2 as-number 300
CE1:
bash
bgp 200
peer 10.0.11.1 as-number 100
network 10.10.10.10 255.255.255.255
CE2:
bash
bgp 300
peer 10.0.24.1 as-number 100
network 20.20.20.20 255.255.255.255
步骤7:配置隧道选择SR-te
PE1:
bash
tunnel-policy 1
tunnel select-seq sr-te load-balance-number 1
ip vpn-instance 1
ipv4-family
tnl-policy 1
PE3:
bash
tunnel-policy 1
tunnel select-seq sr-te load-balance-number 1
ip vpn-instance 1
ipv4-family
tnl-policy 1