AR100-S, AR110-S, AR120-S, AR150-S, AR160-S, AR200-S, AR1200-S, AR2200-S, and AR3200-S CLI-based Typical Configuration Examples
Example for Configuring Inter-AS BGP/MPLS IP VPN in Option C Mode
Applicability
This example applies to all versions.
The AR100-S&AR110-S&AR120-S&AR160-S series do not support this function.
Networking Requirements
As shown in Figure 6-57, CE1 and CE2 belong to the same VPN. CE1 accesses PE1 through AS100, and CE2 accesses PE2 through AS200.
Inter-AS BGP/MPLS IP VPN is implemented through Option C.
Procedure
- Configure CE1.
# sysname CE1 # interface Ethernet1/0/0 ip address 10.1.1.1 255.255.255.0 # bgp 65001 //Establish an EBGP peer relationship between a CE and a PE. peer 10.1.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.2 enable # return
- Configure PE1.
# sysname PE1 # //Create and configure a VPN instance. ip vpn-instance vpn1 ipv4-family route-distinguisher 100:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # //Enable MPLS. mpls lsr-id 1.1.1.9 mpls # mpls ldp # //Enable MPLS on the interface. interface Ethernet1/0/0 ip address 172.1.1.2 255.255.255.0 mpls mpls ldp # //Bind the VPN instance to the interface. interface Ethernet2/0/0 ip binding vpn-instance vpn1 ip address 10.1.1.2 255.255.255.0 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # bgp 100 peer 2.2.2.9 as-number 100 //Establish an IBGP peer relationship between PE1 and ASBR1. peer 2.2.2.9 connect-interface LoopBack1 peer 4.4.4.9 as-number 200 //Establish an MP-EBGP peer relationship between PE1 and PE2. peer 4.4.4.9 ebgp-max-hop 10 peer 4.4.4.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 2.2.2.9 enable peer 2.2.2.9 label-route-capability //Enable the ability to exchange VPN IPv4 routes with ASBR1. peer 4.4.4.9 enable # ipv4-family vpnv4 //Enable the ability to exchange VPN IPv4 routes with the BGP peer. policy vpn-target peer 4.4.4.9 enable # ipv4-family vpn-instance vpn1 //Establish an EBGP peer relationship between PE1 and a CE and configure PE1 to import VPN routes from the CE. peer 10.1.1.1 as-number 65001 import-route direct # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 172.1.1.0 0.0.0.255 # return
- Configure ASBR1.
# sysname ASBR1 # mpls lsr-id 2.2.2.9 mpls # mpls ldp # interface Ethernet1/0/0 ip address 172.1.1.1 255.255.255.0 mpls mpls ldp # interface Ethernet2/0/0 ip address 192.1.1.1 255.255.255.0 mpls # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # bgp 100 peer 192.1.1.2 as-number 200 //Establish an EBGP peer relationship between ASBR1 and ASBR2. peer 1.1.1.9 as-number 100 //Establish an IBGP peer relationship between ASBR1 and PE1. peer 1.1.1.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization network 1.1.1.9 255.255.255.255 peer 192.1.1.2 enable peer 192.1.1.2 route-policy policy1 export //Apply a routing policy to the routes advertised to ASBR2, and enable labeled IPv4 route exchange with ASBR2. peer 192.1.1.2 label-route-capability peer 1.1.1.9 enable peer 1.1.1.9 route-policy policy2 export //Apply a routing policy to the routes advertised to PE1, and enable labeled IPv4 route exchange with PE1. peer 1.1.1.9 label-route-capability # //Configure routes. ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 172.1.1.0 0.0.0.255 # //Configure a route-policy. route-policy policy1 permit node 1 apply mpls-label route-policy policy2 permit node 1 if-match mpls-label apply mpls-label # return
- Configure ASBR2.
# sysname ASBR2 # //Enable MPLS. mpls lsr-id 3.3.3.9 mpls # mpls ldp # interface Ethernet1/0/0 ip address 162.1.1.1 255.255.255.0 mpls mpls ldp # interface Ethernet2/0/0 ip address 192.1.1.2 255.255.255.0 mpls # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # bgp 200 peer 192.1.1.1 as-number 100 //Establish an EBGP peer relationship between ASBR2 and ASBR1. peer 4.4.4.9 as-number 200 //Establish an IBGP peer relationship between ASBR2 and PE2. peer 4.4.4.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization network 4.4.4.9 255.255.255.255 peer 192.1.1.1 enable peer 192.1.1.1 route-policy policy1 export //Apply a routing policy to the routes advertised to ASBR1, and enable labeled IPv4 route exchange with ASBR1. peer 192.1.1.1 label-route-capability peer 4.4.4.9 enable peer 4.4.4.9 route-policy policy2 export //Apply a routing policy to the routes advertised to PE2, and enable labeled IPv4 route exchange with PE2. peer 4.4.4.9 label-route-capability # //Configure routes. ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 162.1.1.0 0.0.0.255 # //Create a route-policy. route-policy policy1 permit node 1 apply mpls-label route-policy policy2 permit node 1 if-match mpls-label apply mpls-label # return
- Configure PE2.
# sysname PE2 # //Create and configure a VPN instance. ip vpn-instance vpn1 ipv4-family route-distinguisher 200:1 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # //Enable MPLS. mpls lsr-id 4.4.4.9 mpls # mpls ldp # interface Ethernet1/0/0 ip address 162.1.1.2 255.255.255.0 mpls mpls ldp # //Bind the VPN instance to the interface. interface Ethernet2/0/0 ip binding vpn-instance vpn1 ip address 10.2.1.2 255.255.255.0 # interface LoopBack1 ip address 4.4.4.9 255.255.255.255 # bgp 200 peer 1.1.1.9 as-number 100 //Establish an MP-IBGP peer relationship between PE1 and PE2. peer 1.1.1.9 ebgp-max-hop 10 peer 1.1.1.9 connect-interface LoopBack1 peer 3.3.3.9 as-number 200 peer 3.3.3.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.9 enable peer 3.3.3.9 enable peer 3.3.3.9 label-route-capability # ipv4-family vpnv4 //Enable the ability to exchange VPN IPv4 routes with the BGP peer. policy vpn-target peer 1.1.1.9 enable # ipv4-family vpn-instance vpn1 //Establish an EBGP peer relationship between PE1 and CE and configure PE1 to import VPN routes from the CE. peer 10.2.1.1 as-number 65002 import-route direct # //Configure routes. ospf 1 area 0.0.0.0 network 4.4.4.9 0.0.0.0 network 162.1.1.0 0.0.0.255 # return
- Configure CE2.
# sysname CE2 # interface Ethernet1/0/0 ip address 10.2.1.1 255.255.255.0 # bgp 65002 //Configure an EBGP peer relationship between the CE and the PE. peer 10.2.1.2 as-number 200 # ipv4-family unicast undo synchronization import-route direct peer 10.2.1.2 enable # return
Document ID:EDOC1000138063
Views:904206
Downloads:3830
Average rating:4.8Points