1 Topology
2 Configuration steps
2.1 Configure the interface IP and routing protocol on the MPLS node
PE1
interface LoopBack 0
ip address 1.1.1.9 32
quit
interface GigabitEthernet4/0
ip address 172.1.1.1 24
quit
ospf 1
area 1
network 1.1.1.9 0.0.0.0
network 172.1.1.0 0.0.0.255
quit
quit
P
interface LoopBack 0
ip address 2.2.2.9 32
quit
interface GigabitEthernet4/0
ip address 172.1.1.2 24
quit
interface GigabitEthernet5/0
ip address 172.2.1.1 24
quit
ospf 1
area 1
network 2.2.2.9 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
quit
quit
PE2
interface LoopBack 0
ip address 3.3.3.9 32
quit
interface GigabitEthernet4/0
ip address 172.2.1.2 24
quit
ospf 1
area 1
network 3.3.3.9 0.0.0.0
network 172.2.1.0 0.0.0.255
quit
quit
View OSPF learning status
2.2 Configure MPLS LDP
PE1
mpls lsr-id 1.1.1.9
mpls label advertise non-null
mpls ldp
quit
interface GigabitEthernet4/0
mpls enable
mpls ldp enable
quit
P
mpls lsr-id 2.2.2.9
mpls label advertise non-null
mpls ldp
quit
interface GigabitEthernet4/0
mpls enable
mpls ldp enable
quit
interface GigabitEthernet5/0
mpls enable
mpls ldp enable
quit
PE2
mpls lsr-id 3.3.3.9
mpls label advertise non-null
mpls ldp
quit
interface GigabitEthernet4/0
mpls enable
mpls ldp enable
quit
View LDP LSP
2.3 Configure VPN instance on PE device
PE1
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 111:1
quit
interface GigabitEthernet1/0
ip binding vpn-instance vpn1
ip address 10.1.1.2 24
quit
ip vpn-instance vpn2
route-distinguisher 100:2
vpn-target 222:2
quit
interface GigabitEthernet2/0
ip binding vpn-instance vpn2
ip address 10.2.1.2 24
quit
PE2
ip vpn-instance vpn1
route-distinguisher 200:1
vpn-target 111:1
quit
interface GigabitEthernet1/0
ip binding vpn-instance vpn1
ip address 10.3.1.2 24
quit
ip vpn-instance vpn2
route-distinguisher 200:2
vpn-target 222:2
quit
interface GigabitEthernet2/0
ip binding vpn-instance vpn2
ip address 10.4.1.2 24
quit
View configuration
2.4 Establish EBGP peers between PE and CE and introduce VPN routes
PE1
bgp 100
ip vpn-instance vpn1
peer 10.1.1.1 as-number 65410
address-family ipv4 unicast
peer 10.1.1.1 enable
quit
quit
ip vpn-instance vpn2
peer 10.2.1.1 as-number 65420
address-family ipv4 unicast
peer 10.2.1.1 enable
quit
quit
quit
CE1
interface GigabitEthernet1/0
ip address 10.1.1.1 24
quit
bgp 65410
peer 10.1.1.2 as-number 100
address-family ipv4 unicast
peer 10.1.1.2 enable
import-route direct
quit
quit
CE2
interface GigabitEthernet1/0
ip address 10.2.1.1 24
quit
bgp 65420
peer 10.2.1.2 as-number 100
address-family ipv4 unicast
peer 10.2.1.2 enable
import-route direct
quit
quit
Check BGP status
PE2
bgp 100
ip vpn-instance vpn1
peer 10.3.1.1 as-number 65430
address-family ipv4 unicast
peer 10.3.1.1 enable
quit
quit
ip vpn-instance vpn2
peer 10.4.1.1 as-number 65440
address-family ipv4 unicast
peer 10.4.1.1 enable
quit
quit
quit
CE3
interface GigabitEthernet1/0
ip address 10.3.1.1 24
quit
bgp 65430
peer 10.3.1.2 as-number 100
address-family ipv4 unicast
peer 10.3.1.2 enable
import-route direct
quit
quit
CE4
interface GigabitEthernet1/0
ip address 10.4.1.1 24
quit
bgp 65440
peer 10.4.1.2 as-number 100
address-family ipv4 unicast
peer 10.4.1.2 enable
import-route direct
quit
quit
Check BGP status
2.5 Establish MP-IBGP peers between PEs
PE1
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface loopback 0
address-family vpnv4
peer 3.3.3.9 enable
quit
quit
PE2
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface loopback 0
address-family vpnv4
peer 1.1.1.9 enable
quit
quit
Check BGP status
View VPN1 routing table
View VPN2 routing table
Another way to view VPN routes is to view the BGP router table
View VPN labels
2.6 Verification
CE1 ping CE3
CE2 ping CE4