You are on page 1of 8

MPLS L3VPN PE-CE OSPF without Backup Link

Lab Topology:
Please use the following topology to complete this lab exercise:

Lab Objective:
The objective of this lab exercise is for you to learn and understand how to use OSPF as the PE-
CE routing protocol for MPLS L3VPN. This lab configuration in Cisco IOS (P router and CE
router), IOS XR devices (PE router).

Recommendation:
Recommend do “MPLS basic LDP” lab to understand how LDP work in core domain before do
this lab.
Reference: https://user.pnetlab.com/store/labs/detail?id=15960951497382

Task list:
Task 1: Assign the IP address to each interface on routers as shown in the topo.
Task 2: Configure OSPF to advertise all interfaces in the core domain and enable LDP on all
internal interfaces.
Task 3: Create some VRFs and assign the interfaces that is facing the customer to the VRF.
Then assign its IP address.
Task 4: Configure IBGP between PE1 and PE2 to exchange VPNv4 routes.
Task 5: Configure OSPF between PE and CE routers.
SOLUTION:
Task 1: Assign the IP address to each interface on routers as shown in the topo. Don’t assign IP
address to the interfaces of PE router which connect to CE.
Core On XRv1-PE1
hostname PE1
!
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.12.1 255.255.255.0
On XRv3-PE2
hostname PE2
!
interface Loopback0
ipv4 address 3.3.3.3 255.255.255.255
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.23.3 255.255.255.0
On R2-P
hostname P
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Ethernet0/1
ip address 10.1.12.2 255.255.255.0
interface Ethernet0/2
ip address 10.1.23.2 255.255.255.0
Customer On R4-CE1 On R5-CE2
hostname CE1 hostname CE2
! !
interface Loopback0 interface Loopback0
ip address 4.4.4.4 ip address 5.5.5.5
255.255.255.255 255.255.255.255
interface Ethernet0/0 interface Ethernet0/0
ip address 192.168.14.4 ip address 192.168.35.5
255.255.255.0 255.255.255.0

Task 2: Configure OSPF in the core domain and enable LDP on all internal interfaces.
Remember set ldp RID for R1 and R5 because we just advertise loopback 0 (isnt highest IP
address) in OSPF.
On XRv1-PE1
router ospf 1
area 0
interface Loopback0
interface GigabitEthernet0/0/0/1
!
mpls ldp
interface GigabitEthernet0/0/0/1
!
mpls label range table 0 16100 16199

On R2-P
mpls label range 200 299
!
interface Ethernet0/1
mpls ip
interface Ethernet0/2
mpls ip
!
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0

On XRv3-PE2
router ospf 1
area 0
interface Loopback0
interface GigabitEthernet0/0/0/2
!
mpls ldp
interface GigabitEthernet0/0/0/2
!
mpls label range table 0 16300 16399

Verification
On XRv1-PE1
RP/0/0/CPU0:PE1#show route ipv4
L 1.1.1.1/32 is directly connected, 00:13:05, Loopback0
O 2.2.2.2/32 [110/2] via 10.1.12.2, 00:12:53,
GigabitEthernet0/0/0/1
O 3.3.3.3/32 [110/12] via 10.1.12.2, 00:12:53,
GigabitEthernet0/0/0/1
C 10.1.12.0/24 is directly connected, 00:13:02,
GigabitEthernet0/0/0/1
L 10.1.12.1/32 is directly connected, 00:13:02,
GigabitEthernet0/0/0/1
O 10.1.23.0/24 [110/11] via 10.1.12.2, 00:12:53,
GigabitEthernet0/0/0/1
RP/0/0/CPU0:PE1#show mpls ldp neighbor | include Peer
Peer LDP Identifier: 2.2.2.2:0

RP/0/0/CPU0:PE1#show mpls forwarding


Tue Sep 15 15:53:10.152 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ -------- ---------- ------------ ------------- ------------
16100 Pop 2.2.2.2/32 Gi0/0/0/1 10.1.12.2 2462
16101 200 3.3.3.3/32 Gi0/0/0/1 10.1.12.2 0
16102 Pop 10.1.23.0/24 Gi0/0/0/1 10.1.12.2 0

On R2-P
P#show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 10.1.12.1, 00:21:04, Ethernet0/1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 10.1.23.3, 00:21:14, Ethernet0/2
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.12.0/24 is directly connected, Ethernet0/1
L 10.1.12.2/32 is directly connected, Ethernet0/1
C 10.1.23.0/24 is directly connected, Ethernet0/2
L 10.1.23.2/32 is directly connected, Ethernet0/2

P#show mpls ldp neighbor | include Peer


Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0

P#show mpls forwarding-table


Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
200 Pop Label 3.3.3.3/32 0 Et0/2 10.1.23.3
201 Pop Label 1.1.1.1/32 0 Et0/1 10.1.12.1

Note: Do the same thing with PE2.

Task 3: Create some VRFs and assign the interfaces that is facing the customer to the VRF.
Then assign its IP address.
In task 1, if you assign IP address for interface GigabitEthernet0/0/0/0, you will receive a errror
message. You can try if you want.
On XRv1-PE1 On XRv3-PE2
vrf customer vrf customer
address-family ipv4 unicast address-family ipv4 unicast
import route-target import route-target
100:1 100:1
export route-target export route-target
100:1 100:1
! !
interface GigabitEthernet0/0/0/0 interface GigabitEthernet0/0/0/0
vrf customer vrf customer
ipv4 address 192.168.14.1 ipv4 address 192.168.35.3
255.255.255.0 255.255.255.0

Verification
On XRv1-PE1
RP/0/0/CPU0:PE1#ping vrf customer 192.168.14.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.14.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms

RP/0/0/CPU0:PE1#show vrf customer


Tue Sep 15 16:13:43.367 UTC
VRF RD RT AFI SAFI
customer not set
import 100:1 IPV4 Unicast
export 100:1 IPV4 Unicast
Note: Do the same thing with PE2.

Task 4: Configure IBGP between PE1 and PE2 to exchange VPNv4 routes.
On XRv1-PE1 On XRv3-PE2
router bgp 100 router bgp 100
address-family vpnv4 unicast address-family vpnv4 unicast
! !
neighbor 3.3.3.3 neighbor 1.1.1.1
remote-as 100 remote-as 100
update-source Loopback0 update-source Loopback0
address-family vpnv4 unicast address-family vpnv4 unicast

Verification
On XRv1-PE1
RP/0/0/CPU0:PE1#show bgp vpnv4 unicast summary
BGP router identifier 1.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 1
BGP NSR Initial initsync version 1 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.

Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer


Speaker 1 1 1 1 1 0

Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd


3.3.3.3 0 100 10 11 1 0 0 00:08:45 0

Note: Do the same thing with PE2.

Task 5: Configure OSPF between PE and CE routers. Remember redistribute them into BGP
and vice versa. With interface of PE router that is facing the CE router we use a different OSPF
process to separate different IP routing domains.
On XRv1-PE1 On XRv3-PE2
router ospf 2 router ospf 2
vrf customer vrf customer
redistribute bgp 100 redistribute bgp 100
area 0 area 0
interface interface
GigabitEthernet0/0/0/0 GigabitEthernet0/0/0/0
! !
router bgp 100 router bgp 100
vrf customer vrf customer
rd 100:1 rd 100:1
address-family ipv4 unicast address-family ipv4 unicast
redistribute ospf 2 redistribute ospf 2
On R4-CE1 On R5-CE2
router ospf 1 router ospf 1
network 4.4.4.4 0.0.0.0 area 0 network 5.5.5.5 0.0.0.0 area 0
network 192.168.14.0 0.0.0.255 network 192.168.35.0 0.0.0.255
area 0 area 0

Verification
On XRv1-PE1
RP/0/0/CPU0:PE1#show route vrf customer ospf
O 4.4.4.4/32 [110/2] via 192.168.14.4, 00:05:00,
GigabitEthernet0/0/0/0

RP/0/0/CPU0:PE1#show bgp vpnv4 unicast vrf customer


BGP router identifier 1.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 8
BGP NSR Initial initsync version 1 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best


i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (default for vrf customer)
*> 4.4.4.4/32 192.168.14.4 2 32768 ?
*>i5.5.5.5/32 3.3.3.3 2 100 0 ?
*> 192.168.14.0/24 0.0.0.0 0 32768 ?
*>i192.168.35.0/24 3.3.3.3 0 100 0 ?

Processed 4 prefixes, 4 paths

RP/0/0/CPU0:PE1#show mpls forwarding


Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- -------- ---------- --------- ------------
16100 Pop 2.2.2.2/32 Gi0/0/0/1 10.1.12.2 8216

16101 200 3.3.3.3/32 Gi0/0/0/1 10.1.12.2 3104

16102 Pop 10.1.23.0/24 Gi0/0/0/1 10.1.12.2 0

16103 Unlabelled 4.4.4.4/32[V] Gi0/0/0/0 192.168.14.4 0

16104 Aggregate customer: Per-VRF Aggr[V] \


customer 0

On CE1
CE1#ping 5.5.5.5 source l0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 10/18/50
ms
CE1#trace 5.5.5.5 source l0
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.14.1 5 msec 2 msec 1 msec
2 10.1.12.2 [MPLS: Labels 200/16303 Exp 0] 9 msec 9 msec 10 msec
3 10.1.23.3 [MPLS: Label 16303 Exp 0] 19 msec 11 msec 11 msec
4 192.168.35.5 13 msec * 19 msec

You might also like