0% found this document useful (0 votes)
44 views7 pages

MPLS LDP Label Filtering Tutorial

LDP label filtering allows routers to control which networks receive MPLS labels by default all networks are labeled. The example shows configuring filters on three routers so that only the loopback 0 interfaces of 1.1.1.1, 2.2.2.2, and 3.3.3.3 receive labels while other networks are not labeled. This is done by disabling default label advertisements and permitting specific prefixes to be labeled.

Uploaded by

Abhishek garg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views7 pages

MPLS LDP Label Filtering Tutorial

LDP label filtering allows routers to control which networks receive MPLS labels by default all networks are labeled. The example shows configuring filters on three routers so that only the loopback 0 interfaces of 1.1.1.1, 2.2.2.2, and 3.3.3.3 receive labels while other networks are not labeled. This is done by disabling default label advertisements and permitting specific prefixes to be labeled.

Uploaded by

Abhishek garg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

4/29/2019 MPLS LDP Label Filtering Example | NetworkLessons.

com

Search...

Table of Contents
MPLS

 Unit 1: Introduction

 Unit 2: LDP (Label Distribution Protocol)

MPLS LDP (Label Distribution Protocol)

MPLS LDP Label Filtering

 Unit 3: MPLS VPN

 Unit 4: MPLS L2 Encapsulation

 Unit 5: IPv6 MPLS

You are here: Home » MPLS

MPLS LDP Label Filtering Example


a d k y v
Once you enable MPLS on the interfaces between the routers and LDP neighbor adjacencies have been formed, a label will be advertised for
each network. With LDP however we can con gure lters to decide what networks should get a label and which ones shouldn’t be tagged. I’ll
use the following topology to demonstrate this:

Above we have 3 routers and each router has 2 loopback interfaces so that we have plenty of networks to play with. Before we enable MPLS
we’ll con gure OSPF so that all networks are advertised:

R1,R2,R3:
(config)#router ospf 1
(config-router)#network [Link] [Link] area 0

We’ll do this the easy way and activate OSPF on all interfaces. Now let’s enable MPLS on the FastEthernet interfaces:

[Link] 1/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

R1(config)#interface fastEthernet 0/0


R1(config-if)#mpls ip

R2(config)#interface fastEthernet 0/0


R2(config-if)#mpls ip
R2(config-if)#exit
R2(config)#interface fastEthernet 0/1
R2(config-if)#mpls ip

R3(config)#interface fastEthernet 0/0


R3(config-if)#mpls ip

Let’s check if we have LDP neighbors:

R2#show mpls ldp neighbor | include Peer


Peer LDP Ident: [Link]:0; Local LDP Ident [Link]:0
Peer LDP Ident: [Link]:0; Local LDP Ident [Link]:0

So far so good, now let’s take a look at the LDP labels that have been generated:

R1#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag [Link]/32 0 Fa0/0 [Link]
17 17 [Link]/32 0 Fa0/0 [Link]
18 18 [Link]/32 0 Fa0/0 [Link]
19 Pop tag [Link]/32 0 Fa0/0 [Link]
20 Pop tag [Link]/24 0 Fa0/0 [Link]

R2#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag [Link]/32 0 Fa0/0 [Link]
17 Pop tag [Link]/32 0 Fa0/1 [Link]
18 Pop tag [Link]/32 0 Fa0/1 [Link]
19 Pop tag [Link]/32 0 Fa0/0 [Link]

R3#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag [Link]/24 0 Fa0/0 [Link]
17 16 [Link]/32 0 Fa0/0 [Link]
18 Pop tag [Link]/32 0 Fa0/0 [Link]
19 Pop tag [Link]/32 0 Fa0/0 [Link]
20 19 [Link]/32 0 Fa0/0 [Link]

For all networks a label has been generated by LDP. Now let’s con gure ltering so that we only generate labels for the loopback 0 interfaces.
This is how you do it:

R1(config)#access-list 1 permit [Link] [Link]


R1(config)#no mpls ldp advertise-labels
R1(config)#mpls ldp advertise-labels for 1

[Link] 2/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

R2(config)#access-list 1 permit [Link] [Link]


R2(config)#no mpls ldp advertise-labels
R2(config)#mpls ldp advertise-labels for 1

R3(config)#access-list 1 permit [Link] [Link]


R3(config)#no mpls ldp advertise-labels
R3(config)#mpls ldp advertise-labels for 1

First use no mpls ldp advertise-labels to disable the advertisement of all labels. Secondly use the mpls ldp advertise-labels for command
and refer to an access-list or pre x-list to choose what networks should have a label.

Be careful, if you forget to use the no mpls ldp advertise-labels command you will discover that LDP is STILL advertising a label for
each network…

Let’s verify our work:

R1#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag [Link]/32 0 Fa0/0 [Link]
17 Untagged [Link]/32 0 Fa0/0 [Link]
18 Untagged [Link]/32 0 Fa0/0 [Link]
19 Untagged [Link]/32 0 Fa0/0 [Link]
20 Untagged [Link]/24 0 Fa0/0 [Link]

R2#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag [Link]/32 0 Fa0/0 [Link]
17 Untagged [Link]/32 0 Fa0/1 [Link]
18 Pop tag [Link]/32 0 Fa0/1 [Link]
19 Untagged [Link]/32 0 Fa0/0 [Link]

R3#show mpls forwarding-table


Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Untagged [Link]/24 0 Fa0/0 [Link]
17 Untagged [Link]/32 0 Fa0/0 [Link]
18 Pop tag [Link]/32 0 Fa0/0 [Link]
19 Untagged [Link]/32 0 Fa0/0 [Link]
20 Untagged [Link]/32 0 Fa0/0 [Link]

Above you can see that only network [Link]/32, [Link]/32 and [Link]/32 now have a label when advertised to a LDP neighbor.

Configurations
Want to take a look for yourself? Here you will nd the con guration of each device.

R1

[Link] 3/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

hostname R1
!
ip cef
!
no mpls ldp advertise-labels
mpls ldp advertise-labels for 1
!
interface Loopback0
ip address [Link] [Link]
!
interface Loopback1
ip address [Link] [Link]
!
interface FastEthernet0/0
ip address [Link] [Link]
mpls ip
!
router ospf 1
network [Link] [Link] area 0
!
access-list 1 permit [Link]
!
end

R2
hostname R2
!
ip cef
!
no mpls ldp advertise-labels
mpls ldp advertise-labels for 1
!
interface Loopback0
ip address [Link] [Link]
!
interface Loopback1
ip address [Link] [Link]
!
interface FastEthernet0/0
ip address [Link] [Link]
mpls ip
!
interface FastEthernet0/1
ip address [Link] [Link]
mpls ip
!
router ospf 1
network [Link] [Link] area 0
!
access-list 1 permit [Link]
!
end

R3

[Link] 4/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

hostname R3
!
ip cef
!
no mpls ldp advertise-labels
mpls ldp advertise-labels for 1
!
interface Loopback0
ip address [Link] [Link]
!
interface Loopback1
ip address [Link] [Link]
!
interface FastEthernet0/0
ip address [Link] [Link]
mpls ip
!
router ospf 1
network [Link] [Link] area 0
!
access-list 1 permit [Link]
!
end

That’s all I wanted to show you, if you have any questions feel free to leave a comment!

« Previous Lesson
MPLS LDP (Label Distribution
Protocol)
Next Lesson
VRFs (Virtual Routing and
Forwarding)
»
 Tags: LDP

Forum Replies

system

For r1 why is [Link] untagged?


Similar for r3 why is [Link] untagged?

ReneMolenaar

That’s what this tutorial is about… ltering tags so not all pre xes get a tag. R2 only sends a tag for [Link] /32 to R1 and R3, not for [Link]/32 or [Link]/32.

ReneMolenaar

TDP is the old Cisco equivalent protocol for LDP. LDP is an IETF standard. On older IOS versions, TDP is the default. Nowadays LDP is the default. There is a
command to change the protocol:

[Link] 5/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

R1(config)#mpls label protocol ?


ldp Use LDP (default)
tdp Use TDP

[Link]

Hi Rene,

I am little bit confused that where we can use the label ltering in Production network .I am looking for scenario where we deploy it . Thx

br//zaman

ReneMolenaar

Hi Zaman,

Think of an MPLS VPN network where we have PE and CE routers. The PE routers only require an LSP (Label Switched Path) between their loopback interfaces
and the /32 IP address that is con gured on these loopback interfaces. These are the IP addresses that are used for the next hops in BGP.

By default, LDP creates and advertises a label for each and every pre x that is learned. This increases memory usage but also the number of advertisements
between peers. If you only advertise labels for the LSPs that you need, you reduce convergence time and memory usage.

 8 more replies! Ask a question or join the discussion by visiting our Community Forum

Hello There!
I am René Molenaar (CCIE
#41726), Your main Instructor.
My goal is to teach you
everything about Cisco,
Wireless and Security. I am
here to Help You Master Networking!

Read my story

Social Fans

 
14,319 9,788
FANS FOLLOWERS

 
658 14,352
FOLLOWERS SUBSCRIBERS

New Lessons
Device Programmability
Data Models and Structures
Network Automation and Orchestration
Cloud Connectivity
Virtualization Functions (NFVI, VNF)

[Link] 6/7
4/29/2019 MPLS LDP Label Filtering Example | [Link]

Tag Cloud
802.1Q 802.1X ACL ARP Authentication
Certi cate Cloud Design DMVPN DHCP
Filtering GRE IGMP IKE IOS
IP Routing IPSec LDP Linux
Load Balancing LSA NAT Network Management

Network Services Network Type OER

OSPFv3 PAT PFR PIM PPP Redistribution


Security Shaping SSH Stub
Summarization Trunk Tuning Tunnel VLAN
VMWare VPN VRF Wireless

Disclaimer
Privacy Policy
Support
© 2013 - 2019 [Link] 21871

[Link] 7/7

Common questions

Powered by AI

In default LDP settings, labels are generated and advertised for all network prefixes learned by the protocol, which ensures comprehensive label propagation but results in higher resource consumption. In contrast, using label filtering, labels are distributed only to specified prefixes defined by access-lists, optimizing resource use and limiting unnecessary label distribution, thus enhancing network efficiency .

MPLS LDP label filtering can improve the scalability of a large-scale network by managing the growth of label advertisements and memory usage as the network expands. By reducing unnecessary label propagation, the network can handle more prefixes without a proportional increase in resource demands, making it easier to scale while maintaining optimal performance .

MPLS LDP label filtering optimizes network resources by reducing the load on network devices through selective label advertisement, leading to quicker convergence times and decreased memory usage. However, potential drawbacks include the complexity in configuration and the risk of inadvertently filtering necessary labels, which can lead to routing issues or misrouted traffic if not configured correctly .

The 'router ospf' command is used to enable OSPF routing between interfaces, which is a prerequisite for MPLS LDP operations. It ensures that all network prefixes are advertised and reachable before MPLS is enabled and label filtering configured. This setup guarantees that only necessary networks are targeted in the label filtering process, optimizing both routing and label advertisement .

Using label filtering in LDP within an MPLS network reduces memory usage and the number of advertisements between peers. By only advertising labels for the Label Switched Paths (LSPs) that are needed, rather than every prefix, convergence time and resource consumption are minimized. This is particularly beneficial in MPLS VPN networks where routers require LSPs between specific loopback interfaces for routing efficiency .

Not using the 'no mpls ldp advertise-labels' command before filtering may lead to LDP continuing to advertise labels for all prefixes rather than the selected few. This negates the benefits of selective filtering, potentially causing unnecessary consumption of bandwidth and memory, and it may introduce confusion or routing errors if unwanted prefixes are labeled and transmitted .

In MPLS LDP label filtering, access-lists are essential for specifying which network prefixes should receive a label. By associating an access-list with 'mpls ldp advertise-labels for', only those networks matching the access-list criteria will be advertised with labels. This targeted approach allows for efficient label distribution, keeping unnecessary labels from consuming resources .

Without selective label filtering in an MPLS environment, network performance may degrade due to the overhead of processing and storing labels for all available prefixes. This can lead to increased memory usage, slower convergence times, and unnecessary bandwidth consumption, impacting the overall efficiency and responsiveness of the network infrastructure .

Label filtering in MPLS LDP is not essential for every network deployment but is particularly useful in large networks or MPLS VPN scenarios where resource optimization is critical. It minimizes unnecessary label advertisement, thereby reducing convergence time and resource usage. However, simpler networks or those not experiencing resource constraints may not require such filtering, as the default advertisement might suffice without introducing complexity .

The command 'no mpls ldp advertise-labels' disables the advertisement of all labels initially. This step is crucial in MPLS label filtering as it ensures that only specific labels, defined by subsequent filtering rules, get advertised. Without first disabling label advertisement entirely, LDP might still advertise labels for undesired prefixes .

You might also like