Huawei Simulator SR MPLS BE Experimental Configuration

Experimental requirements: Establish an mp-bgp neighbor relationship between PE1 and PE3 to transfer private network routes of CE1 and CE2, and use SR mpls BE to transfer private network traffic.

Experimental procedure

Step 1: Configure the device interface ip address and the igp protocol in AS 100 (omitted)

Step 2: Enable mpls on devices in AS 100 and configure mpls lsr-id

Configuration of PE1:

mpls lsr-id 1.1.1.1
mpls

Configuration of P2:

mpls lsr-id 2.2.2.2
mpls

Configuration of PE3:

mpls lsr-id 2.2.2.2
mpls

Configuration of P4:

mpls lsr-id 2.2.2.2
mpls

Step 3: Enable SR function and establish SR lsp

Configuration of PE1:

segment-routing //全局开启SR功能
ospf 1
 opaque-capability enable //使能ospf的opaque-lsa能力
 segment-routing mpls //使能OSPF对应拓扑的Segment Routing功能
 segment-routing global-block 16000 16999 //配置SRGB的范围(每台设备的范围空间需要一致)
interface LoopBack0
ospf prefix-sid index 1 //配置Loopback接口IP地址的Prefix SID

In the Segment Routing technology, the IGP protocol is used to collect topology information of the entire network and distribute labels to each router. Therefore, enabling the Segment Routing function under the IGP protocol is a necessary configuration. If the IGP protocol uses OSPF, run the segment-routingmpls command in the OSPF view.

After creating a loopback interface, you can configure an IP address for the interface, so that the IP address of the loopback interface can be advertised to the outside world. However, the prefix SID can take effect only when an IP address with a 32-bit mask is configured on the loopback interface.

Only valid for the primary IP address of the loopback interface.

If the Prefix SID value exceeds the SRGB range, the Prefix SID will not be issued.

Configuration of P2:

segment-routing
ospf 1
 opaque-capability enable
 segment-routing mpls
 segment-routing global-block 16000 16999
interface LoopBack0
ospf prefix-sid index 2 

Configuration of PE3:

segment-routing
ospf 1
 opaque-capability enable
 segment-routing mpls
 segment-routing global-block 16000 16999
interface LoopBack0
ospf prefix-sid index 3

Configuration of P4:

segment-routing
ospf 1
 opaque-capability enable
 segment-routing mpls
 segment-routing global-block 16000 16999
interface LoopBack0
ospf prefix-sid index 4

Check the establishment of the tunnel, you can see that PE1 and several other devices have established SRBE lsp

View ospf type 10 lsa

Step 4: Configure the vpn instance

PE1:

ip vpn-instance 1
 ipv4-family
 route-distinguisher 100:1
 vpn-target 100:1 export-extcommunity
 vpn-target 100:1 import-extcommunity

PE3:

ip vpn-instance 1
 ipv4-family
 route-distinguisher 100:2
 vpn-target 100:1 export-extcommunity
 vpn-target 100:1 import-extcommunity

Step 5: Establish MP-BGP neighbor relationship

PE1:

bgp 100
 peer 3.3.3.3 as-number 100
 peer 3.3.3.3 connect-interface LoopBack0
ipv4-family vpnv4
 peer 3.3.3.3 enable

PE3:

bgp 100
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 connect-interface LoopBack0
ipv4-family vpnv4
 peer 1.1.1.1 enable

Step 6: Configure the BGP neighbor relationship between PE and CE,

PE1:

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:

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:

bgp 200
 peer 10.0.11.1 as-number 100 
 network 10.10.10.10 255.255.255.255 

CE2:

bgp 300
 peer 10.0.24.1 as-number 100 
 network 20.20.20.20 255.255.255.255

View the routing information of vpnv4:

The display shows that the routing information of the peer end can be learned normally.

Step 7: Configure Tunnel Selection SR LSP

PE1:

tunnel-policy 1
 tunnel select-seq sr-lsp load-balance-number 2
ip vpn-instance 1
 ipv4-family
 tnl-policy 1

PE3:

tunnel-policy 1
 tunnel select-seq sr-lsp load-balance-number 2
ip vpn-instance 1
 ipv4-family
 tnl-policy 1

test:

Capture packets and view the results

The outer label is generated by ospf:

Guess you like

Origin blog.csdn.net/2301_76769137/article/details/129731272