Configure PEs as BGP Neighbors

BGP is the preferred protocol to transport VPN routes because of its multiprotocol capability and its scalability. Its ability to exchange information between indirectly connected routers supports keeping VPN routing information out of the Provider (P) routers. The P routers carry information as an optional BGP attribute. Additional attributes are transparently forwarded by any P router. The MPLS-VPN forwarding model does not require the P routers to make routing decisions based on VPN addresses: They forward packets based on the label value attached to the packet. The P routers do not require a VPN configuration in order to carry this information.

PE1

#configure terminal

Enter the configure terminal

(config)#router bgp 100

Enter the Router BGP mode, ASN: 100

(config-router)#bgp router-id 2.2.2.2

Router identifier for BGP

(config-router)#exit

Exit router BGP mode

(config)#router ldp

Enter the Router LDP mode

(config-router)#exit

Exit the Router LDP mode

(config)#router bgp 100

Enter the Router BGP mode, ASN: 100

(config-router)#neighbor 3.3.3.3 remote-as 100

Configuring ABR1 as iBGP neighbor using it's loopback IP

(config-router)#neighbor 3.3.3.3 update-source 2.2.2.2

Source of routing updates

(config-router)#address-family vpnv4 unicast

Configure VPNv4 address family

(config-router-af)#neighbor 3.3.3.3 activate

Activate the VPN neighbor

(config-router-af)exit-address-family

Exit address family mode

(config-router)#address-family ipv4 unicast

Configure IPv4 address family

(config-router-af)#neighbor 3.3.3.3 activate

Activate the IPv4 neighbor

(config-router-af)#commit

Commit the transaction.

PE2

#configure terminal

Enter the configure terminal

(config)#router bgp 100

Enter the Router BGP mode, ASN: 100

(config-router)#bgp router-id 3.3.3.3

Router identifier for BGP

(config-router)#exit

Exit router BGP mode

(config)#router ldp

Enter the Router LDP mode

(config-router)#exit

Exit the Router LDP mode

(config)#router bgp 100

Enter the Router BGP mode, ASN: 100

(config-router)#neighbor 2.2.2.2 remote-as 100

Configuring ABR1 as iBGP neighbor using it's loopback IP

(config-router)#neighbor 2.2.2.2 update-source 3.3.3.3

Source of routing updates

(config-router)#address-family vpnv4 unicast

Configure VPNv4 address family

(config-router-af)#neighbor 2.2.2.2 activate

Activate the VPN neighbor

(config-router-af)exit-address-family

Exit address family mode

(config-router)#address-family ipv4 unicast

Configure IPv4 address family

(config-router-af)#neighbor 2.2.2.2 activate

Activate the IPv4 neighbor

(config-router-af)#commit

Commit the transaction.

Create VRF

Each PE router in the MPLS-VPN backbone is attached to a site that receives routes from a specific VPN, so the PE router must have the relevant Virtual Routing and Forwarding (VRFClosed Virtual Routing and Forwarding) configuration for that VPN.

This command creates a VRF RIB (Routing Information Base), assigns a VRF-ID, and switches the command mode to vrf mode. The following example creates a VRF named ComB.

PE1

#configure terminal

Enter the configure terminal

(config)#ip vrf ComB

Configure VRF instance

(config-vrf)#rd 2:1

Configure Router Distinguisher value

(config-vrf)#exit

Exit VRF mode

(config)#ip vrf ComA

Configure VRF instance

(config-vrf)#rd 1:2

Configure Router Distinguisher value

(config-vrf)#exit

Exit VRF mode

(config)#commit

Commit the transaction.

PE2

#configure terminal

Enter the configure terminal

(config)#ip vrf ComB

Configure VRF instance

(config-vrf)#rd 1:2

Configure Router Distinguisher value

(config-vrf)#exit

Exit VRF mode

(config)#ip vrf ComA

Configure VRF instance

(config-vrf)#rd 2:1

Configure Router Distinguisher value

(config-vrf)#exit

Exit VRF mode

(config)#commit

Commit the transaction.

Associate Interfaces to VRFs

After the VRFs are defined on the PE router, the PE router needs to recognize which interfaces belong to which VRF. The VRF is populated with routes from connected sites. More than one interface can belong to the same VRF.

In the following example, interface xe48 is associated with the VRF named ComB.

PE1

#configure terminal

Enter the configure terminal

(config)#interface xe49

Enter interface mode

(config-if)#ip vrf forwarding ComA

Bind the VRF instance to the interface

(config-if)exit

Exit interface mode

(config)#interface xe48

Enter interface mode

(config-if)#ip vrf forwarding ComB

Bind the VRF instance to the interface

(config-if)#ip address 168.12.0.3/24

Assign IPv4 address

PE1(config-if)#ip vrf forwarding ComA

Bind the VRF instance to the interface

(config-if)exit

Exit interface mode

(config)#commit

Commit the transaction.

PE2

#configure terminal

Enter the configure terminal

(config)#interface xe48

Enter interface mode

(config-if)#ip vrf forwarding ComA

Bind the VRF instance to the interface

(config-if)#ip address 192.16.4.2/24

Assign IPv4 address

(config-if)exit

Exit interface mode

(config)#interface xe49

Enter interface mode

(config-if)#ip vrf forwarding ComB

Bind the VRF instance to the interface

(config-if)#ip address 168.12.4.2/24

Assign IPv4 address

(config-if)exit

Exit interface mode

(config)#commit

Commit the transaction.