MPLS - Basic MPLS with OPSF at Core and Default Route to Customer

Basic MPLS with OPSF at Core and Default Route to Customer

In a basic MPLS (Multiprotocol Label Switching) network architecture with OSPF (Open Shortest Path First) at the core and a default route to the customer, OSPF is employed as the interior gateway protocol within the provider's core network. OSPF dynamically establishes and maintains routing tables, ensuring efficient and adaptive routing decisions for optimal traffic flow. The MPLS infrastructure uses label-switched paths to forward data across the core network, improving scalability and traffic engineering capabilities. The introduction of a default route to the customer simplifies the customer edge (CE) router's configuration, as it receives a default route from the provider edge (PE) router. This allows the customer network to leverage the MPLS infrastructure for outbound traffic while minimizing the complexity of the customer's internal routing. Such a configuration streamlines routing processes, enhancing network efficiency and reducing the overhead associated with managing intricate routing tables at the customer's premises.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

IOS used: c7200-p-mz.120-32.S.bin

A1 Router Initial Config:

! 
interface Loopback0 
ip address 203.1.0.1 255.255.255.255 
no ip directed-bro
! 
interface Loopback1 
ip address 203.1.1.1 255.255.255.0 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.2 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

PE1 Router Initial Config:

! 
interface Loopback0 
ip address 192.168.3.1 255.255.255.255 
no ip directed-broadcast
! 
interface Serial2/0 
ip address 192.168.3.22 255.255.255.252 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.1 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

A2 Router Initial Config:

! 
interface Loopback0 
ip address 203.1.0.2 255.255.255.255 
no ip directed-broadcast 
! 
interface Loopback1 
ip address 203.1.2.1 255.255.255.0 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.6 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

PE2 Router Initial Config:

! 
interface Loopback0 
ip address 192.168.3.2 255.255.255.255 
no ip directed-broadcast 
! 
interface Serial2/0 
ip address 192.168.3.21 255.255.255.252 
no ip directed-broadcast 
! 
interface Serial2/1 
ip address 192.168.3.18 255.255.255.252 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.5 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

A3 Router Initial Config:

! 
interface Loopback1 
ip address 203.1.0.3 255.255.255.255
no ip directed-broadcast 
! 
interface Loopback2 
ip address 203.1.3.1 255.255.255.0 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.14 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
! 

PE3 Router Initial Config:

! 
interface Loopback1 
ip address 192.168.3.3 255.255.255.255 
no ip directed-broadcast 
! 
interface Serial2/0 
ip address 192.168.3.13 255.255.255.252 
no ip directed-broadcast 
no fair-queue 
! 
interface Serial2/1 
ip address 192.168.3.10 255.255.255.252 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.3.13 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

A4 Router Initial Config:

! 
interface Loopback1
ip address 203.1.0.4 255.255.255.255 
no ip directed-broadcast 
! 
interface Loopback2 
ip address 203.1.4.1 255.255.255.0 
no ip directed-broadcast 
! 
interface FastEthernet0/0 
ip address 150.1.31.18 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
!

PE4 Router Initial Config:

! 
interface Loopback1 
ip address 192.168.3.4 255.255.255.255 
no ip directed-broadcast 
! 
interface Serial2/1 
ip address 192.168.3.9 255.255.255.252 
no ip directed 
! 
interface FastEthernet0/0 
ip address 150.1.31.17 255.255.255.252 
no ip directed-broadcast 
duplex half 
speed auto 
! 

P Router Config:

!
ip cef 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.5 255.255.255.255 
no ip directed-broadcast 
! 
ip address 192.168.3.14 255.255.255.252 
no ip directed-broadcast tag-switching ip 
! 
interface Serial2/1 
ip address 192.168.3.17 255.255.255.252 
no ip directed-broadcast 
tag-switching ip 
! 
router ospf 1 
log-adjacency-changes 
network 192.168.3.0 0.0.0.255 area 0 
!

Task 1: Basic MPLS Setup

Step 1: Configure OSPF on all Provider edge and core routers to learn internal routes.

Configure OSPF on all PE-routers and P-router

(Config)# router ospf 1
(Config-router)# network 192.168.0.0 0.0.255.255 area 0

Verification: Nine routes of 192.168.0.0 network should be visible in routing table:

PE4#sho ip route 
 192.168.3.0/24 is variably subnetted, 9 subnets, 2 masks 
C 192.168.3.8/30 is directly connected, Serial2/1 
O 192.168.3.12/30 [110/96] via 192.168.3.10, 01:35:03, Serial2/1 
O 192.168.3.3/32 [110/49] via 192.168.3.10, 01:35:03, Serial2/1 
O 192.168.3.2/32 [110/145] via 192.168.3.10, 01:35:03, Serial2/1 
O 192.168.3.1/32 [110/193] via 192.168.3.10, 01:35:03, Serial2/1 
O 192.168.3.5/32 [110/97] via 192.168.3.10, 01:35:03, Serial2/1 
C 192.168.3.4/32 is directly connected, Loopback0 
O 192.168.3.16/30 [110/144] via 192.168.3.10, 01:35:03, Serial2/1 
O 192.168.3.20/30 [110/192] via 192.168.3.10, 01:35:03, Serial2/1

Step 2: Configure MPLS in the backbone:

Enable CEF switching and MPLS switching on all PE routers and the P router. Enter the following command on all service provider routers:

(Config)# ip cef

Default label is TDP if you wish to change this to LDP then give following to Enable LDP Set Lable Distribution

Protocol on the router to be LDP and Lo0 as the interface to be used for LDP updates

(Config)# mpls label protocol ldp
(Config)# mpls ldp router-id loopback0

Step 3: Configure MPLS on all core interfaces of all service provider routers. Do not configure MPLS on any interfaces toward customers or external backbones.

Enter the following command on all links between the service provider routers. Do not configure MPLS on PE-CE links.

(Config-if)# tag-switching ip OR mpls ip

tag-switching ip” command if using TDP, “mpls ip” if using LDP.

Verification:

show ip route – check all ip route; 
show mpls forwarding – see if labels have been assigned for each route; 
show mpls forwarding details- details on label; 
show mpls interface- see if mpls is enabled on an interface; 
show mpls ldp discovery- see if ldp can discover its neigh; 
show mpls ldp neigh- see details of neigh.

Display TDP neighbors on the core routers to verify proper TDP operation. You should get a printout similar to the one below:

PE3#show tag-switching tdp neighbor
 Peer TDP Ident: 192.168.3.5:0; Local TDP Ident 192.168.3.3:0 
 TCP connection: 192.168.3.5.11003 - 192.168.3.3.711 
 State: Oper; PIEs sent/rcvd: 5/6; Downstream 
 Up time: 00:01:52 
 TDP discovery sources: 
 Serial0/0.1, Src IP addr: 192.168.3.14 
 Addresses bound to peer TDP Ident: 
 192.168.3.5 192.168.3.17 192.168.3.14 
 Peer TDP Ident: 192.168.3.4:0; Local TDP Ident 192.168.3.3:0 
 TCP connection: 192.168.3.4.11002 - 192.168.3.3.711 
 State: Oper; PIEs sent/rcvd: 5/5; Downstream 
 Up time: 00:01:38 
 TDP discovery sources: 
 Serial0/0.2, Src IP addr: 192.168.3.9 
 Addresses bound to peer TDP Ident: 
 192.168.3.4 192.168.20.3 192.168.3.9

Display TDP label bindings on your routers to verify that every IGP route has a local label and a label from all TDP neighbors. You should get a printout similar to the one below:

PE3#show tag-switching tdp bindings 192.168.3.1 255.255.255.255
 tib entry: 192.168.3.1 255.255.255.255, rev 22 
 local binding: tag: 21 
 remote binding: tsr: 192.168.3.5:0, tag: 21 
 remote binding: tsr: 192.168.3.4:0, tag: 20

Task 2: Understanding TTL propagation

Step 1: Configure default route on all CE-routers (A1, A2, A3, A4)

Configure default route on A1 customer edge router.

(Config)# ip route 0.0.0.0 0.0.0.0 150.1.31.1

Configure default route on A2 customer edge router.

(Config)# ip route 0.0.0.0 0.0.0.0 150.1.31.5

Configure default route on A3 customer edge router.

(Config)# ip route 0.0.0.0 0.0.0.0 150.1.31.13

Configure default route on A4 customer edge router.

(Config)# ip route 0.0.0.0 0.0.0.0 150.1.31.17

Step 2: Configure default route on all PE-routers (PE1, PE2, PE3, PE4)

Configure static routes on PE1 router to reach loopbacks on A1 customer edge router.

(Config)# ip route 203.1.0.1 255.255.255.255 150.1.31.2
(Config)# ip route 203.1.1.0 255.255.255.0 150.1.31.2

Configure static routes on PE2 router to reach loopbacks on A2 customer edge router.

(Config)# ip route 203.1.0.2 255.255.255.255 150.1.31.6
(Config)# ip route 203.1.2.0 255.255.255.0 150.1.31.6

Configure static routes on PE3 router to reach loopbacks on A3 customer edge router.

(Config)# ip route 203.1.0.3 255.255.255.255 150.1.31.14
(Config)# ip route 203.1.3.0 255.255.255.0 150.1.31.14

Configure static routes on PE4 router to reach loopbacks on A4 customer edge router.

(Config)# ip route 203.1.0.4 255.255.255.255 150.1.31.18
(Config)# ip route 203.1.4.0 255.255.255.0 150.1.31.18

Step 3: Redistribute static route in OSPF domain on all PE-routers

Redistribute static routes on PE1, PE2, PE3, PE4.

(Config)# router ospf 1
(Config-router)# redistribute static subnet
(Config-router)# redistribute connected subnet

Verification:

A1#show ip route
Gateway of last resort is 150.1.31.1 to network 0.0.0.0 
C 203.1.1.0/24 is directly connected, Loopback1 
 203.1.0.0/32 is subnetted, 1 subnets 
C 203.1.0.1 is directly connected, Loopback0 
 150.1.0.0/30 is subnetted, 1 subnets 
C 150.1.31.0 is directly connected, FastEthernet0/0 
S* 0.0.0.0/0 [1/0] via 150.1.31.1
PE1#show ip route
S 203.1.1.0/24 [1/0] via 150.1.31.2 
 203.1.0.0/32 is subnetted, 1 subnets 
S 203.1.0.1 [1/0] via 150.1.31.2 

Perform trace from A1 toward 203.1.4.1 you should see all your core routers in the path. A sample trace printout is shown below:

A1#trace 203.1.4.1
Type escape sequence to abort. 
Tracing the route to 203.1.4.1 
 1 150.1.31.1 84 msec 44 msec 72 msec
 2 192.168.3.21 328 msec 432 msec 280 msec 
 3 192.168.3.17 376 msec 276 msec 268 msec 
 4 192.168.3.13 296 msec 292 msec 196 msec 
 5 192.168.3.9 456 msec 336 msec 268 msec 
 6 150.1.31.18 436 msec * 292 msec 

Task 3: Disable IP TTL Propagation

Step 1: Disable IP TTL propagation on all service provider routers that perform labeling of incoming IP packets.

Disable TTL propagation on all PE routers with the following command:

(Config)#no tag-switching ip propagate-ttl

Verification:

Perform trace from A1 toward 203.1.4.1 you should see only the ingress and egress core router in the path. A sample trace printout is shown below:

A2#trace 128.1.4.1
Type escape sequence to abort. 
Tracing the route to 192.168.20.20 
 1 150.1.31.1 84 msec 44 msec 72 msec 
 2 192.168.3.9 456 msec 336 msec 268 msec 
 3 150.1.31.18 436 msec * 292 msec