KEMBAR78
01 MPLS Fundamentals | PDF | Multiprotocol Label Switching | Networking
0% found this document useful (0 votes)
175 views45 pages

01 MPLS Fundamentals

Uploaded by

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

01 MPLS Fundamentals

Uploaded by

WaqasMirza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPS, PDF, TXT or read online on Scribd
You are on page 1/ 45

MPLS Fundamentals

© 2010 Juniper Networks, Inc. All rights reserved. | www.juniper.net


IGP Metric-Based Forwarding
 IGP Forwarding
• Traffic is routed based on the IGP’s best path selection
• Traffic that is destined for networks attached to R6 and R7 uses
the same path

R3 R6

R1 R2 1 1 R5
1

1
1 2 1
R4 R7

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 2


Downsides of IGP Metric-Based Forwarding

 Redirecting traffic from R1, destined for R7, to traverse


R4 causes traffic destined to R6 to use R4 also
• This redirecting of traffic causes some of your links to be
underutilized, while others are overutilized

R3 R6

R1 R2 1 3 R5 1

1
1 2 1
R4 R7

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 3


Additional Drawbacks of IGP Metrics
 Adjusting the IGP metric might destabilize the network
• Moves the problem to another section of the network
• Some of the links will be underutilized
• Some of the links will be congested and overutilized
• Lacks control
• All traffic flows over the IGP shortest path

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 4


Internet Growth Required Changes
 ATM switched networks also known as an Overlay Network
 Benefits of using ATM
• ATM switches offered performance and predictable behavior
• Virtual circuits (VCs) could be reengineered without physical
network changes.
• Traffic statistics on a per-VC basis
 Downsides of ATM
• Maintain separate infrastructure
• ATM cell overhead
• Scalability issues
• Not well integrated
ATM
IP

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 5


Additional Options for Connecting Sites
 Frame Relay networks
• Benefits of using Frame Relay
• Uses virtual circuits (VCs) to move traffic to its destination
• Uses Data Link Connection Identifier (DLCI) number to separate VCs
• Built in Congestion Control
• Downsides of Frame Relay
• Maintain separate infrastructure

FR
IP

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 6


Benefits of MPLS (1 of 2)
 Some benefits of MPLS include:
• Improved route lookup time by using labels to forward traffic
• Increased scalability
• Additional control over how traffic moves through the network
using traffic engineering
R3 R6
LSP
A
LSP
B
R1 R2 1 3 R5 1

1
1 2 1
R4 R7

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 7


Benefits of MPLS (2 of 2)
 Service Providers can offer different technologies like
ATM, Frame Relay, Ethernet, and IPsec over the same
infrastructure
Site 6

ATM- R2

et
ern
LSP Relay LSP
Frame Core

Eth
R5
Infrastructure ATM
Site 2
R1 R4
Site 1
ATM

R6
y
ela

R3 Fr
eR

am
eR
am

ela
Fr

y
t
rne
e

Site 4
Eth

Site 3 Site 5

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 8


MPLS Header information
 The MPLS packet header
• MPLS header is prepended to packet with a push operation at
ingress node
• Label is added immediately after Layer 2 encapsulation header

L2 Header MPLS Header Data

32-Bit
• Packet is restored at the end ofshim
theHeader
a pop operation
MPLS LSP with
• Normally the label stack is popped at the penultimate router

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 9


MPLS Shim Header Structure
 MPLS shim header consist of four fields
• Label—used to associate packet with an LSP
• Experimental bits—carry packet queuing priority (CoS)
• Stacking bit
• Time to live—limits packet lifetime within LSP
• In most cases, the IP TTL is copied into the MPLS TTL

Label (20 bits) CoS S TTL

L2 Header MPLS Header Data

32 bits

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 10


MPLS Labels
 Key things to remember about labels:
• Labels can be assigned manually or by a signaling protocol in
each LSR during path setup
• Label values will change at each segment in the path
• The LSR will swap incoming label with new unique outgoing
label
• MPLS Labels only have local significance

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 11


Reserved Labels
 Label values 0 through 15 are currently reserved
• 0 = IPv4Explicit NULL
• 1 = Router Alert Label
• 2 = IPv6 Explicit NULL
• 3 = Implicit NULL
• 4 through 15 = for future use

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 12


Label Information Base
 Label Information Base
• The LIB is stored in the mpls.0 table
• The mpls.0 table is automatically created, with label values for 0, 1,
and 2, when you configure the MPLS protocol
• This table is used by transit routers to make forwarding decisions
• The mpls.0 table maps the incoming labels with the outgoing label
and next hop to forward the packets
user@R3> show route table mpls.0

mpls.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

0 *[MPLS/0] 01:13:17, metric 1


Receive
1 *[MPLS/0] 01:13:17, metric 1
Incoming Label Receive
2 *[MPLS/0] 01:13:17, metric 1 Outgoing Label
Receive
1000050 *[MPLS/6] 01:13:16, metric 1
> to 172.20.100.14 via ge-1/0/6.0, Swap 1000515
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 13
Label-Switching Routers
 The LSR performs:
• MPLS packet forwarding
• LSP setup
 All M Series Routers, T Series Routers, and MX Series
Ethernet Services Routers support LSR capabilities
• Simply called routers in this material
LSP LSR R3 R6
A

R1 R2 R5

R4 R7

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 14


Label-Switched Path

 LSP
• Unidirectional path through network
• Generally within a single MPLS domain

LSP R3 R6
A
LSP
10
00
R1 R2 51
0

R5
05

5
00
10

R4 R7

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 15


MPLS Router Functions: Ingress
 Ingress router
• Packets enter LSP at ingress
• Also called a head-end router
• Upstream from other routers
• Performs label push operation
LSP R3 R6
A
Ingress
10
00
R1 R2 51
0

R5
05

5
00
10

R4 R7

label push
Layer 2 1000050 CO S TTL Data FCS
S
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 16
MPLS Router Functions: Transit
 Transit router
• There can be zero or more transit routers
• Perform label swap operations
• Forward traffic to next hop in LSP
Transit
LSP R3 R6
A

10
00
R1 R2 51
0

R5
05

5
00
10

R4 R7

label swap
Layer 2 1000515 CO S TTL Data FCS
S
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 17
MPLS Router Functions: Penultimate
 Penultimate router
• Second-to-last router
• Normally pops the label stack
• Unlabeled packets sent to egress

LSP R3 R6
A Penultimate
10
00
R1 R2 51
0

R5
05

5
00
10

R4 R7

label pop
Layer 2 Data FCS
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 18
MPLS Router Functions: Egress
 Egress router
• Packets exit LSP at egress
• Also called tail-end router
• Downstream from other routers
• Forwards packets based on IP address Egress
LSP R3 R6
A

10
00
R1 R2 51
0

R5
05

5
00
10

R4 R7

Layer 2 Data FCS


© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 19
Interface Configuration
 Interface Configuration
• Default behavior of an interface is to accept only IP packets.
• Protocol family inet
• Configure interface to accept MPLS packets
• Protocol family mpls

[edit interfaces]
user@R2# show
ge-1/0/0 {
unit 0 {
family inet {
address 172.20.100.21/30;
}
family mpls;
}
}

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 20


Protocol Configuration
 Configured under protocols hierarchy
• Specify the interfaces that are running MPLS

• You may also configure MPLS to include all interfaces

[edit protocols]
user@R2# show
mpls {
interface ge-1/0/0.0;
}

[edit protocols]
user@R2# show
mpls {
interface all;
interface fxp0.0 {
disable;
}
}
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 21
Configuring the Ingress Router for Static LSPs
 Configure a Static LSP on the ingress router
• Define a static-label-switched-path name
• Use the ingress configuration to identify the router as the
ingress LSR
• You must also configure the to and next-hop statements
• Configure the push statement with the outgoing label number

protocols {
mpls {
static-label-switched-path <lsp-name> {
ingress {
next-hop <address or interface of next-hop router>;
to <address of egress router>;
push <label>;
}
}
}
}
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 22
Configuring the Transit Router for Static LSPs
 Configuring a static LSP on the Transit router
• Use the transit configuration to identify the router as a
transit LSR
• On the penultimate router you will configure the pop action.
• There’s no need to configure the egress router since we only support
penultimate hop popping.

protocols {
mpls {
static-label-switched-path <lsp-name> {
transit <incoming-label> {
next-hop <address or interface of next-hop router>;
swap <outgoing label>;
}
}
}
}

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 23


Additional information on Static LSPs
 The static-label-switched-path name should
be unique
 Static label values (1,000,000 through 1,048,575)
• You can also send a label of 0 to tell the next router to pop the
label.

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 24


Mapping BGP Next Hops to LSPs
 Routes associated with signaled LSPs are installed in the
inet.3 routing table
• Only BGP can view the contents of inet.3
 BGP installs an LSP as the physical next hop for transit
destinations
• Internal destinations are not associated with a BGP next hop
and therefore do not use LSPs by default

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 25


Route Resolution Example
Core
R2 AS65512
Loopbacks
192.168.1.x
R5 Site 2
AS65511
17 64.25.1/24
2.
30

30
R1 .0 R4

/
Site 1

.0
/ 30 0 182.19.200.0/30
0/3

20
0 .

2.
AS65510 2.4
17
17
84.25.1/24 R6
172.18.100.0/30
R3

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 26


Unusable BGP Next Hop
Core
R2 AS65512
Loopbacks
192.168.1.x
R5 Site 2
AS65511
17 64.25.1/24
2.
30

30
R1 .0 R4

/
Site 1

.0
/ 30 0 182.19.200.0/30
0/3

20
0 .

2.
AS65510 2.4
17
17
84.25.1/24 R6
172.18.100.0/30
R3

Network 64.25.1.0/24 route advertisement

user@R1> show route 64.25.1/24 all

inet.0: 13 destinations, 13 routes (12 active, 0 holddown, 1 hidden)


+ = Active Route, - = Last Active, * = Both

64.25.1.0/24 [BGP/170] 00:18:54, localpref 100, from 192.168.1.5


AS path: 65511 I
Unusable
© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 27
The Problem
user@R1> show route 64.25.1.0/24 all extensive

inet.0: 13 destinations, 13 routes (12 active, 0 holddown, 1 hidden)


64.25.1.0/24 (1 entry, 0 announced)
BGP Preference: 170/-101
Next hop type: Unusable
Next-hop reference count: 1
State: <Hidden Int Ext>
Local AS: 65512 Peer AS: 65512
Age: 26:59
Task: BGP_65512.192.168.1.5+60163
AS path: 65511 I
Accepted
Localpref: 100
Router ID: 192.168.1.5
Indirect next hops: 1
Protocol next hop: 182.19.200.2
Indirect next hop: 0 -

 R1 does not have a route to 182.19.200.0/30 Network

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 28


Suggested Resolution
Core
R2 AS65512
Loopbacks
192.168.1.x
R5 Site 2
AS65511
17 64.25.1/24
2.
30

30
R1 .0 R4

/
Site 1

.0
/ 30 0 182.19.200.0/30
0/3

20
0 .

2.
AS65510 2.4
17
17
84.25.1/24 R6
172.18.100.0/30
R3

Network 64.25.1.0/24 route advertisement

 Add an export policy on R5 to change next-hop to self


when advertising this route into IBGP.

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 29


Verifying the Route is Usable
 Route now has valid next hop
user@R1> show route 64.25.1/24 extensive

inet.0: 14 destinations, 21 routes (14 active, 0 holddown, 0 hidden)


64.25.1.0/24 (1 entry, 1 announced)
TSI:
...
Indirect next hops: 1
Protocol next hop: 192.168.1.5 Metric: 0
Indirect next hop: 8f00870 1048576
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 172.20.0.2 via ge-1/0/6.0 weight 0x1
192.168.1.5/32 Originating RIB: inet.3
Metric: 0 Node path count: 1
Forwarding nexthops: 1
Nexthop: 172.20.0.2 via ge-1/0/6.0

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 30


Configure the Static LSP (1 of 2)
Core
R2 AS65512
my-lsp Loopbacks
192.168.1.x
R5 Site 2
AS65511
17 64.25.1/24
2.
30

30
R1 .0 R4

/
Site 1

.0
/ 30 0 182.19.200.0/30
0/3

20
0 .

2.
AS65510 2.4
17
17
84.25.1/24 R6
172.18.100.0/30
R3

[edit protocols mpls]


user@R1# show
static-label-switched-path my-lsp { Network 64.25.1.0/24 route advertisement
ingress {
next-hop 172.20.0.2;
to 192.168.1.5;
push 1000050;
}
}

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 31


Configure the Static LSP (2 of 2)
 Since the penultimate router is popping the label we do not
have to configure the LSP on the egress router
[edit protocols mpls]
user@R2# show
static-label-switched-path my-lsp {
transit 1000050 {
next-hop 172.30.0.2;
swap 1000515;
}
}

[edit protocols mpls]


user@R4# show
static-label-switched-path my-lsp {
transit 1000515 {
next-hop 172.40.0.2;
pop;
}
}

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 32


Lowest Preference Wins
user@R1> show route 192.168.1.5

inet.0: 14 destinations, 21 routes (14 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

192.168.1.5/32 *[OSPF/10] 01:34:32, metric 3


> to 172.20.0.2 via ge-1/0/6.0
[BGP/170] 00:46:34, localpref 100, from 192.168.1.5
AS path: I
> to 172.20.0.2 via ge-1/0/6.0, Push 1000050

inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

192.168.1.5/32 *[MPLS/6/1] 01:47:44, metric 0


> to 172.20.0.2 via ge-1/0/6.0, Push 1000050

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 33


BGP Installs LSP as Next Hop
Core
R2 AS65512
my-lsp Loopbacks
192.168.1.x
R5 Site 2
AS65511
17 64.25.1/24
2.
30

30
R1 .0 R4

/
Site 1

.0
/ 30 0 182.19.200.0/30
0/3

20
0 .

2.
AS65510 2.4
17
17
84.25.1/24 R6
172.18.100.0/30
R3

user@R1> show route 64.25.1.0/24 Network 64.25.1.0/24 route advertisement

inet.0: 14 destinations, 21 routes (14 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

64.25.1.0/24 *[BGP/170] 00:52:23, localpref 100, from 192.168.1.5


AS path: 65511 I
> to 172.20.0.2 via ge-1/0/6.0, Push 1000050

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 34


Ingress Router Behavior
 Ingress router
• RSVP/LDP/Static:
• Signal LSPs to egress router
• Install IP prefix to egress router into the inet.3 routing table
– Specifies LSP’s egress interface and label assigned by the
downstream router

OSPF IS-IS BGP RSVP LDP Static

IP MPLS
Routing Table Routing Table
(inet.0) (inet.3)

IP Forwarding Table

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 35


Ingress Resolves BGP Next Hop
 BGP performs recursive lookup to resolve BGP next hop
• BGP also looks in the inet.3 MPLS routing table
• BGP looks in the inet.0 IP routing table
• BGP selects route with lowest preference

OSPF IS-IS BGP RSVP LDP Static


Contains IP prefix
to egress router
with LSP next
IP MPLS hop.
Routing Table Routing Table
(inet.0) (inet.3) Only BGP uses
this routing table.
IP Forwarding Table

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 36


Ingress Installs LSP for Forwarding
 BGP favors routes in inet.3
• MPLS preference is better than IS-IS and OSPF
• For preference ties, BGP selects inet.3
 LSP to egress router copied to inet.0 as a forwarding
next hop
• Specified LSP’s egress interface and label to push
OSPF IS-IS BGP RSVP LDP Static

inet.0 inet.3
to: 64.25.1.0/24

192.168.1.5  my-lsp 192.168.1.5  my-lsp


Push label 1000050 Push label 1000050

IP Forwarding Table
64.25.1/24  my-lsp Push label 1000050

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 37


Route Resolution Summary
 LSPs installed in ingress router’s inet.3 table
• Points to the IP addresses specified as egress
• Normally identifies the egress router’s loopback address
• Address appears as if it were directly connected
• When LSP is up, next hop is usable and attractive to BGP
• When LSP is down, LSP next hop is unusable
• Can still use normal IP routing to reach next hop
 Only BGP is aware of LSPs
• Other protocols can use this information with additional
configuration

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 38


Routing Table Summary
 MPLS uses three tables:
• inet.0
• Primary IP unicast routing table
• Can install additional prefixes per LSP with
install prefix active;
• inet.3
• MPLS routing table
• Houses signaled LSPs at ingress node
• Can install additional prefixes per LSP with
install prefix;
• mpls.0
• MPLS label-switching table
• Used by transit and egress routers

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 39


MPLS Forwarding (1 of 2)
 Ingress router
• Performs forwarding lookup based on destination IP address
• Resolves in inet.3 or inet.0 routing table
• After the next hop is determined to be the LSP ,the MPLS
header is added and the packet is forwarded with the
corresponding label

user@R2> show route table inet.3

inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

192.168.1.5/32 *[MPLS/6/1] 00:25:52, metric 0


> to 172.20.100.22 via ge-1/0/5.0, Push 1000050

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 40


MPLS Forwarding (2 of 2)
 Transit router
• Performs forwarding lookup based on incoming label
• Resolves in mpls.0 routing table
• Label handling depends on LSR type
• Transit swaps out the incoming label with the outgoing label and
forwards the packet to the next router
• If the transit router is also the penultimate router, it usually pops the
label and forwards it to the egress router in its native form
 Egress router
• Performs forwarding lookup based on destination IP address
• Resolves in the inet.0 or inet.3 routing table

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 41


MPLS Label Mapping
 The mpls.0 table contains the mapping information of
incoming labels to outgoing labels and next-hop information
used to forward MPLS packets, also known as the LIB

user@R2> show route table mpls.0

mpls.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both


Receive
1000050 *[MPLS/6] 01:13:16, metric 1
> to 172.20.100.14 via ge-1/0/6.0, Swap 1000515

Next-hop address and outgoing


Incoming MPLS label values interface Label Operation

Outgoing MPLS label values

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 42


Penultimate Hop Popping
 Penultimate hop popping (PHP) is the default behavior in
the Junos OS
• Penultimate router pops the MPLS label
• Forwards the native IP packet to the egress router, which makes
the forwarding decisions based on the IP header

user@R5> show route table mpls.0

mpls.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)


+ = Active Route, - = Last Active, * = Both

1000515 *[MPLS/6] 01:28:33, metric 1
> to 172.20.100.2 via ge-1/0/8.0, Pop
1000515(S=0) *[MPLS/6] 01:28:33, metric 1
> to 172.20.100.2 via ge-1/0/8.0, Pop

Label Operation

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 43


Implicit and Explicit NULL Labels
 Implicit NULL
• Default operation in the Junos OS
• Egress router signals the penultimate to perform the label pop
 Explicit NULL
• Configured on the egress router
• Signals the penultimate router to forward the packet with a
MPLS header
• Egress router pops the label before forwarding it in its native IP
form

© 2010 Juniper Networks, Inc. All rights reserved. www.juniper.net | 44

You might also like