Example: Configuring SR-MPLS inter-AS option C (III). Aruba FlexNetwork MSR958X_2003X Routers Comware 9 Segment Routing, S0P11A, S0W31A
Reklam
Reklam
[PE2-bgp-default] peer 2.2.2.9 ebgp-max-hop 10
# Configure peer 2.2.2.9 as a VPNv4 peer.
[PE2-bgp-default] address-family vpnv4
[PE2-bgp-default-vpnv4] peer 2.2.2.9 enable
[PE2-bgp-default-vpnv4] quit
# Configure CE 2 as an EBGP peer of PE 2 and install the learned BGP routes in the routing table of the VPN instance.
[PE2-bgp-default] ip vpn-instance vpn1
[PE2-bgp-default-vpn1] peer 20.0.0.2 as-number 65001
[PE2-bgp-default-vpn1] address-family ipv4 unicast
[PE2-bgp-default-ipv4-vpn1] peer 20.0.0.2 enable
7. Configure CE 2:
# Assign an IP address to interface GigabitEthernet 0/0/1.
<CE2> system-view
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] ip address 20.0.0.2 24
[CE2-GigabitEthernet0/0/1] quit
# Establish an EBGP peer relationship with PE 2, and redistribute VPN routes.
[CE2] bgp 65002
[CE2-bgp-default] peer 20.0.0.1 as-number 600
[CE2-bgp-default] address-family ipv4 unicast
[CE2-bgp-default-ipv4] peer 20.0.0.1 enable
[CE2-bgp-default-ipv4] import-route direct
[CE2-bgp-default-ipv4] quit
[CE2-bgp-default] quit
Verifying the configuration
# Execute the display ip routing-table command on CE 1 and CE 2 to verify that they have a route to each other. (Details not shown.)
# Verify that CE 1 and CE 2 can ping each other. (Details not shown.)
# Display MPLS LSP information on PE1.
[PE1] display mpls lsp
FEC Proto In/Out Label Out Inter/NHLFE/LSINDEX
2.2.2.9/32 BGP 3/- -
5.5.5.9/32 BGP -/16050 NHLFE1
5.5.5.9 BGP -/- GE0/0/5
1.1.1.1 Local -/- GE0/0/5
2.2.2.9/32 OSPF 16020/- -
3.3.3.9/32 OSPF 16030/3 GE0/0/5
3.3.3.9/32 OSPF -/3 GE0/0/5
Example: Configuring SR-MPLS inter-AS option C (III)
Network configuration
As shown in Figure 26 , complete the following tasks:
•
Start OSPF and enable OSPF-based SR-MPLS on the PEs in the same AS.
•
Configure PE 1, ASBR-PE 1, and ASBR-PE 2 to exchange labeled IPv4 routes through IBGP.
88
•
Configure PE 2, ASBR-PE 3, and ASBR-PE 4 to exchange labeled IPv4 routes through IBGP.
•
Configure ASBR-PE 1 and ASBR-PE 3 to use their loopback interfaces to establish an EBGP relationship to exchange labeled IPv4 routes. Enable BGP-based SR-MPLS.
•
Configure ASBR-PE 2 and ASBR-PE 4 to use their loopback interfaces to establish an EBGP relationship to exchange labeled IPv4 routes. Enable BGP-based SR-MPLS.
•
Configure dynamic SID allocation on loopback interfaces of the devices. Then, establish
SRLSPs based on the allocated SIDs and configure a multisegmented MPLS TE tunnel over the SRLSPs to transmit data.
Figure 26 Network diagram
MP-EBGP
Loop0 Loop0 MPLS backbone
AS 100
MPLS backbone
AS 600
GE0/0/4
Loop0
PE 1
GE0/0/1
GE0/0/4
GE0/0/1
GE0/0/3
ASBR-PE 1 ASBR-PE 3
GE0/0/1
GE0/0/3
Loop0
GE0/0/1
GE0/0/2
Loop0 Loop0 GE0/0/2
PE 2
GE0/0/3
GE0/0/2
GE0/0/3
GE0/0/2
GE0/0/4 GE0/0/4
ASBR-PE 2 ASBR-PE 4
MP-EBGP
Site 1
CE 1
Table 9 Interface and IP address assignment
CE 2
Site 2
Device
PE1
Interface IP address
Loop0 1.1.1.1/32
GE0/0/1
GE0/0/2
ASBR-PE1 Loop0
11.0.0.1/24
12.0.0.1/24
2.2.2.1/32
GE0/0/1
GE0/0/3
GE0/0/4
ASBR-PE2 Loop0
GE0/0/2
GE0/0/3
GE0/0/4
11.0.0.2/24
13.0.0.1/24
14.0.0.1/24
3.3.3.1/32
12.0.0.2/24
13.0.0.2/24
24.0.0.1/24
Procedure
Device
PE2
Interface IP address
Loop0 6.6.6.1/32
GE0/0/1
GE0/0/2
ASBR-PE3 Loop0
21.0.0.1/24
22.0.0.1/24
4.4.4.1/32
GE0/0/1
GE0/0/3
GE0/0/4
ASBR-PE4 Loop0
GE0/0/2
GE0/0/3
GE0/0/4
21.0.0.2/24
23.0.0.1/24
14.0.0.2/24
5.5.5.1/32
22.0.0.2/24
23.0.0.2/24
24.0.0.2/24
1. Configure IP addresses and masks for interfaces. (Details not shown.)
2. Configure PE 1:
# Start OSPF on PE 1, set the LSR ID, and enable MPLS and MPLS TE.
<PE1> system-view
89
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 1.1.1.1 32
[PE1-LoopBack0] ospf 1 area 100
[PE1-LoopBack0] quit
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls te
[PE1-te] quit
[PE1] interface gigabitethernet 0/0/1
[PE1-GigabitEthernet0/0/1] ospf 1 area 100
[PE1-GigabitEthernet0/0/1] mpls enable
[PE1-GigabitEthernet0/0/1] mpls te enable
[PE1-GigabitEthernet0/0/1] quit
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] ospf 1 area 100
[PE1-GigabitEthernet0/0/2] mpls enable
[PE1-GigabitEthernet0/0/2] mpls te enable
[PE1-GigabitEthernet0/0/2] quit
# Enable SR-MPLS in OSPF view and configure an OSPF prefix SID.
[PE1] ospf 1
[PE1-ospf-1] segment-routing mpls
[PE1-ospf-1] quit
[PE1] interface loopback 0
[PE1-LoopBack0] ospf 1 prefix-sid index 10
[PE1-LoopBack0] quit
# Start BGP on PE 1.
[PE1] bgp 100
# Configure IBGP peer group 1, add peers 2.2.2.1 and 3.3.3.1 to the group, and enable the capability to exchange labeled routes for the group.
[PE1-bgp-default] group 1
[PE1-bgp-default] peer 1 connect-interface loopback 0
[PE1-bgp-default] peer 2.2.2.1 group 1
[PE1-bgp-default] peer 3.3.3.1 group 1
[PE1-bgp-default] address-family ipv4 unicast
[PE1-bgp-default-ipv4] peer 1 enable
[PE1-bgp-default-ipv4] peer 1 label-route-capability
3. Configure ASBR-PE 1:
# Start OSPF on ASBR-PE 1, set the LSR ID, and enable MPLS and MPLS TE.
<ASBR-PE1> system-view
[ASBR-PE1] interface loopback 0
[ASBR-PE1-LoopBack0] ip address 2.2.2.1 32
[ASBR-PE1-LoopBack0] ospf 1 area 100
[ASBR-PE1-LoopBack0] quit
[ASBR-PE1] mpls lsr-id 2.2.2.1
[ASBR-PE1] mpls te
[ASBR-PE1-te] quit
[ASBR-PE1] interface gigabitethernet 0/0/1
[ASBR-PE1-GigabitEthernet0/0/1] ospf 1 area 100
[ASBR-PE1-GigabitEthernet0/0/1] mpls enable
90
[ASBR-PE1-GigabitEthernet0/0/1] mpls te enable
[ASBR-PE1-GigabitEthernet0/0/1] quit
[ASBR-PE1] interface gigabitethernet 0/0/3
[ASBR-PE1-GigabitEthernet0/0/3] ospf 1 area 100
[ASBR-PE1-GigabitEthernet0/0/3] mpls enable
[ASBR-PE1-GigabitEthernet0/0/3] mpls te enable
[ASBR-PE1-GigabitEthernet0/0/3] quit
[ASBR-PE1] interface gigabitethernet 0/0/4
[ASBR-PE1-GigabitEthernet0/0/4] mpls enable
[ASBR-PE1-GigabitEthernet0/0/4] mpls te enable
[ASBR-PE1-GigabitEthernet0/0/4] quit
# Enable SR-MPLS in OSPF view and configure an OSPF prefix SID.
[ASBR-PE1] ospf 1
[ASBR-PE1-ospf-1] segment-routing mpls
[ASBR-PE1-ospf-1] quit
[ASBR-PE1] interface loopback 0
[ASBR-PE1-LoopBack0] ospf 1 prefix-sid index 20
[ASBR-PE1-LoopBack0] quit
# Create a routing policy and specify a label index value.
[ASBR-PE1]ip prefix-list 1 permit 1.1.1.1 32
[ASBR-PE1] route-policy policy1 permit node 1
[ASBR-PE1-route-policy-policy1-1] if-match ip address prefix-list 1
[ASBR-PE1-route-policy-policy1-1] apply label-index 10
[ASBR-PE1-route-policy-policy1-1] quit
# Start BGP on ASBR-PE 1.
[ASBR-PE1] bgp 100
# Configure IBGP peer group 1, add peers 1.1.1.1 and 3.3.3.1 to the group, and enable the capability to exchange labeled routes for the group.
[ASBR-PE1-bgp-default] group 1
[ASBR-PE1-bgp-default] peer 1 connect-interface loopback 0
[ASBR-PE1-bgp-default] peer 1.1.1.1 group 1
[ASBR-PE1-bgp-default] peer 3.3.3.1 group 1
[ASBR-PE1-bgp-default] address-family ipv4 unicast
[ASBR-PE1-bgp-default-ipv4] peer 1 enable
[ASBR-PE1-bgp-default-ipv4] peer 1 label-route-capability
# Redistribute routes from OSPF process 1 to BGP and apply the routing policy.
[ASBR-PE1-bgp-default-ipv4] import-route ospf 1 route-policy policy1
# Enable SR-MPLS.
[ASBR-PE1-bgp-default-ipv4] segment-routing mpls
[ASBR-PE1-bgp-default-ipv4] quit
# Configure directly connected peer 14.0.0.2 as an EBGP peer. Advertise only the route of local loopback interface 0 to the peer.
[ASBR-PE1-bgp-default] peer 14.0.0.2 as-number 600
[ASBR-PE1-bgp-default] address-family ipv4 unicast
[ASBR-PE1-bgp-default-ipv4] network 2.2.2.1 32 route-policy policy2
[ASBR-PE1-bgp-default-ipv4] peer 14.0.0.2 enable
[ASBR-PE1-bgp-default-ipv4] peer 14.0.0.2 route-policy policy2 export
[ASBR-PE1-bgp-default-ipv4] quit
91
# Create a multihop EBGP neighbor relationship with ASBR-PE 3 by using the loopback interfaces. Enable the capability to exchange labeled routes with peer 4.4.4.1. Set the preferred value to 100 for routes received from peer 4.4.4.1.
[ASBR-PE1-bgp-default] peer 4.4.4.1 as-number 600
[ASBR-PE1-bgp-default] peer 4.4.4.1 connect-interface loopback 0
[ASBR-PE1-bgp-default] peer 4.4.4.1 ebgp-max-hop 10
[ASBR-PE1-bgp-default] address-family ipv4 unicast
[ASBR-PE1-bgp-default-ipv4] peer 4.4.4.1 enable
[ASBR-PE1-bgp-default-ipv4] peer 4.4.4.1 label-route-capability
[ASBR-PE1-bgp-default-ipv4] peer 4.4.4.1 preferred-value 100
[ASBR-PE1-bgp-default-ipv4] quit
# Enable BGP EPE for neighbor 4.4.4.1 and specify a routing policy to assign a label to the neighbor.
[ASBR-PE1-bgp-default] peer 4.4.4.1 egress-engineering route-policy epe
[ASBR-PE1-bgp-default] quit
[ASBR-PE1-bgp] quit
# Create routing policy policy2 and epe to assign label index 20 and label 245555.
[ASBR-PE1]ip prefix-list 2 permit 2.2.2.1 32
[ASBR-PE1] route-policy policy2 permit node 1
[ASBR-PE1-route-policy-policy2-1] if-match ip address prefix-list 2
[ASBR-PE1-route-policy-policy2-1] apply label-index 20
[ASBR-PE1-route-policy-policy2-1] quit
[ASBR-PE1] route-policy epe permit node 1
[ASBR-PE1-route-policy-epe-1] apply label-value 245555
[ASBR-PE1-route-policy-epe-1] quit
4. Configure ASBR-PE 2:
# Configure ASBR-PE 2 in the same way you configure ASBR-PE 1. (Details not shown.)
5. Configure ASBR-PE 3:
# Start OSPF on ASBR-PE 3, set the LSR ID, and enable MPLS and MPLS TE.
<ASBR-PE3> system-view
[ASBR-PE3] interface loopback 0
[ASBR-PE3-LoopBack0] ip address 4.4.4.1 32
[ASBR-PE3-LoopBack0] ospf 1 area 200
[ASBR-PE3-LoopBack0] quit
[ASBR-PE3] mpls lsr-id 4.4.4.1
[ASBR-PE3] mpls te
[ASBR-PE3-te] quit
[ASBR-PE3] interface gigabitethernet 0/0/1
[ASBR-PE3-GigabitEthernet0/0/1] ospf 1 area 200
[ASBR-PE3-GigabitEthernet0/0/1] mpls enable
[ASBR-PE3-GigabitEthernet0/0/1] mpls te enable
[ASBR-PE3-GigabitEthernet0/0/1] quit
[ASBR-PE3] interface gigabitethernet 0/0/3
[ASBR-PE3-GigabitEthernet0/0/3] ospf 1 area 200
[ASBR-PE3-GigabitEthernet0/0/3] mpls enable
[ASBR-PE3-GigabitEthernet0/0/3] mpls te enable
[ASBR-PE3-GigabitEthernet0/0/3] quit
[ASBR-PE3] interface gigabitethernet 0/0/4
92
[ASBR-PE3-GigabitEthernet0/0/4] mpls enable
[ASBR-PE3-GigabitEthernet0/0/4] mpls te enable
[ASBR-PE3-GigabitEthernet0/0/4] quit
# Enable SR-MPLS in OSPF view and configure an OSPF prefix SID.
[ASBR-PE3] ospf 1
[ASBR-PE3-ospf-1] segment-routing mpls
[ASBR-PE3-ospf-1] quit
[ASBR-PE3] interface loopback 0
[ASBR-PE3-LoopBack0] ospf 1 prefix-sid index 40
[ASBR-PE3-LoopBack0] quit
# Create a routing policy and specify a label index value.
[ASBR-PE3]ip prefix-list 1 permit 6.6.6.1 32
[ASBR-PE3] route-policy policy1 permit node 1
[ASBR-PE3-route-policy-policy1-1] if-match ip address prefix-list 1
[ASBR-PE3-route-policy-policy1-1] apply label-index 60
[ASBR-PE3-route-policy-policy1-1] quit
# Start BGP on ASBR-PE 3.
[ASBR-PE3] bgp 600
# Configure IBGP peer group 1, add peers 5.5.5.1 and 6.6.6.1 to the group, and enable the capability to exchange labeled routes for the group.
[ASBR-PE3-bgp-default] group 1
[ASBR-PE3-bgp-default] peer 1 connect-interface loopback 0
[ASBR-PE3-bgp-default] peer 5.5.5.1 group 1
[ASBR-PE3-bgp-default] peer 6.6.6.1 group 1
[ASBR-PE3-bgp-default] address-family ipv4 unicast
[ASBR-PE3-bgp-default-ipv4] peer 1 enable
[ASBR-PE3-bgp-default-ipv4] peer 1 label-route-capability
# Redistribute routes from OSPF process 1 to BGP and apply the routing policy.
[ASBR-PE3-bgp-default-ipv4] import-route ospf 1 route-policy policy1
# Enable SR-MPLS.
[ASBR-PE3-bgp-default-ipv4] segment-routing mpls
[ASBR-PE3-bgp-default-ipv4] quit
# Configure directly connected peer 14.0.0.1 as an EBGP peer. Advertise only the route of local loopback interface 0 to the peer.
[ASBR-PE3-bgp-default] peer 14.0.0.1 as-number 100
[ASBR-PE3-bgp-default] address-family ipv4 unicast
[ASBR-PE3-bgp-default-ipv4] network 4.4.4.1 32 route-policy policy2
[ASBR-PE3-bgp-default-ipv4] peer 14.0.0.1 enable
[ASBR-PE3-bgp-default-ipv4] peer 14.0.0.1 route-policy policy2 export
[ASBR-PE3-bgp-default-ipv4] quit
# Create a multihop EBGP neighbor relationship with ASBR-PE 1 by using the loopback interfaces. Enable the capability to exchange labeled routes with peer 2.2.2.1. Set the preferred value to 100 for routes received from peer 2.2.2.1.
[ASBR-PE3-bgp-default] peer 2.2.2.1 as-number 100
[ASBR-PE3-bgp-default] peer 2.2.2.1 connect-interface loopback 0
[ASBR-PE3-bgp-default] peer 2.2.2.1 ebgp-max-hop 10
[ASBR-PE3-bgp-default] address-family ipv4 unicast
[ASBR-PE3-bgp-default-ipv4] peer 2.2.2.1 enable
93
[ASBR-PE3-bgp-default-ipv4] peer 2.2.2.1 label-route-capability
[ASBR-PE3-bgp-default-ipv4] peer 2.2.2.1 preferred-value 100
[ASBR-PE3-bgp-default-ipv4] quit
# Enable BGP EPE for EBGP neighbor 2.2.2.1 and specify a routing policy to assign a label to the neighbor.
[ASBR-PE3-bgp-default] peer 2.2.2.1 egress-engineering route-policy epe
[ASBR-PE3-bgp-default] quit
[ASBR-PE3-bgp] quit
# Create routing policies policy2 and epe to assign label index 40 and label 6666, respectively.
[ASBR-PE3]ip prefix-list 2 permit 4.4.4.1 32
[ASBR-PE3] route-policy policy2 permit node 1
[ASBR-PE3-route-policy-policy2-1] if-match ip address prefix-list 2
[ASBR-PE3-route-policy-policy2-1] apply label-index 40
[ASBR-PE3-route-policy-policy2-1] quit
[ASBR-PE3] route-policy epe permit node 1
[ASBR-PE3-route-policy-epe-1] apply label-value 6666
[ASBR-PE3-route-policy-epe-1] quit
6. Configure ASBR-PE 4:
# Configure ASBR-PE 4 in the same way you configure ASBR-PE 3. (Details not shown.)
7. Configure PE 2:
# Start OSPF on PE 2, set the LSR ID, and enable MPLS and MPLS TE.
<PE2> system-view
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 6.6.6.1 32
[PE2-LoopBack0] ospf 1 area 200
[PE2-LoopBack0] quit
[PE2] mpls lsr-id 6.6.6.1
[PE2] mpls te
[PE2-te] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] ospf 1 area 200
[PE2-GigabitEthernet0/0/1] mpls enable
[PE2-GigabitEthernet0/0/1] mpls te enable
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] ospf 1 area 200
[PE2-GigabitEthernet0/0/2] mpls enable
[PE2-GigabitEthernet0/0/2] mpls te enable
[PE2-GigabitEthernet0/0/2] quit
# Enable SR-MPLS in OSPF view and configure an OSPF prefix SID.
[PE2] ospf 1
[PE2-ospf-1] segment-routing mpls
[PE2-ospf-1] quit
[PE2] interface loopback 0
[PE2-LoopBack0] ospf 1 prefix-sid index 60
[PE2-LoopBack0] quit
# Start BGP on PE 2.
[PE2] bgp 600
94
# Configure IBGP peer group 1, add peers 4.4.4.1 and 5.5.5.1 to the group, and enable the capability to exchange labeled routes for the group.
[PE2-bgp-default] group 1
[PE2-bgp-default] peer 1 connect-interface loopback 0
[PE2-bgp-default] peer 4.4.4.1 group 1
[PE2-bgp-default] peer 5.5.5.1 group 1
[PE2-bgp-default] address-family ipv4 unicast
[PE2-bgp-default-ipv4] peer 1 enable
[PE2-bgp-default-ipv4] peer 1 label-route-capability
8. Configuring a multisegmented MPLS TE tunnel:
# On PE 1, configure an MPLS TE tunnel to ASBR-PE 1 and an MPLS TE tunnel to ASBR-PE 2.
[PE1] static-sr-mpls lsp sr-lsp-20 out-label 16020
[PE1] static-sr-mpls lsp sr-lsp-30 out-label 16030
[PE1] interface tunnel 0 mode mpls-te
[PE1-Tunnel0] ip address unnumbered interface LoopBack0
[PE1-Tunnel0] destination 2.2.2.1
[PE1-Tunnel0] mpls te signaling static
[PE1-Tunnel0] mpls te static-sr-SR-MPLS-lsp-20
[PE1-Tunnel0] quit
[PE1] interface tunnel 1 mode mpls-te
[PE1-Tunnel1] ip address unnumbered interface LoopBack0
[PE1-Tunnel1] destination 3.3.3.1
[PE1-Tunnel1] mpls te signaling static
[PE1-Tunnel1] mpls te static-sr-SR-MPLS-lsp-30
[PE1-Tunnel1] quit
# On ASBR-PE 1, configure an MPLS TE tunnel to PE 1 and an MPLS TE tunnel to ASBR-PE 3.
[ASBR-PE1] static-sr-mpls lsp sr-lsp-10 out-label 16010
[ASBR-PE1] static-sr-mpls lsp sr-lsp-40 out-label 245555
[ASBR-PE1] interface tunnel 0 mode mpls-te
[ASBR-PE1-Tunnel0] ip address unnumbered interface LoopBack0
[ASBR-PE1-Tunnel0] destination 1.1.1.1
[ASBR-PE1-Tunnel0] mpls te signaling static
[ASBR-PE1-Tunnel0] mpls te static-sr-SR-MPLS-lsp-10
[ASBR-PE1-Tunnel0] quit
[ASBR-PE1] interface tunnel 1 mode mpls-te
[ASBR-PE1-Tunnel1] ip address unnumbered interface LoopBack0
[ASBR-PE1-Tunnel1] destination 4.4.4.1
[ASBR-PE1-Tunnel1] mpls te signaling static
[ASBR-PE1-Tunnel1] mpls te static-sr-SR-MPLS-lsp-40
[ASBR-PE1-Tunnel1] quit
# On ASBR-PE 3, configure an MPLS TE tunnel to PE 2 and an MPLS TE tunnel to ASBR-PE 1.
[ASBR-PE3] static-sr-mpls lsp sr-lsp-60 out-label 16060
[ASBR-PE3] static-sr-mpls lsp sr-lsp-40 out-label 6666
[ASBR-PE3] interface tunnel 0 mode mpls-te
[ASBR-PE3-Tunnel0] ip address unnumbered interface LoopBack0
[ASBR-PE3-Tunnel0] destination 6.6.6.1
[ASBR-PE3-Tunnel0] mpls te signaling static
[ASBR-PE3-Tunnel0] mpls te static-sr-SR-MPLS-lsp-60
95
İndir
Reklam