-Information Distribution -Path Calculation -Path Setup -Forwarding Traffic Down A Tunnel... Path Calculation• Constrained SPF – find shortest path to a specific node • Consider more t
Trang 1MPLS TE TOI
eosborne@cisco.com
Trang 2• How MPLS TE works
• What Code Is MPLS TE In?
• Platform Issues in Implementation
• Lab Demo - config
Trang 3How MPLS TE Works
• Prerequisites
• How MPLS-TE Works
• Basic Configuration
• Knobs! Knobs! Knobs!
• Deploying and Designing
Trang 4You should already understand…
push/pop/swap, EXP, and LFIB
works
Trang 5• Prerequisites
• How MPLS-TE Works
• Basic Configuration
• Knobs! Knobs! Knobs!
• Deploying and Desiginig
Trang 6How MPLS-TE Works
• How MPLS-TE Works
-What good is MPLS-TE?
-Information Distribution -Path Calculation
-Path Setup -Forwarding Traffic Down A Tunnel
Trang 7What Good Is MPLS-TE?
• There are two kinds of networks
1 Those that have plenty of bandwidth
Trang 8What Good Is MPLS-TE?
• MPLS-TE introduces a 3 rd kind:
1 Those that have plenty of bandwidth everywhere
2 Those with congestion in some places, but not in others
3 Those that use all of their bandwidth to its
maximum efficiency, regardless of path routing!
Trang 9shortest-What Good Is MPLS-TE?
Substitute which is Totally
Effortless
This stuff takes work, but it’s worth it!!!
What is MPLS-TE? What is it not?
Trang 10Information Distribution
• You need a link-state protocol as your IGP
IS-IS or OSPF
• Link-state requirement is only for MPLS-TE!
Not a requirement for VPNs, etc!
Trang 11Need for a Link-State Protocol
• Why do I need a link-state protocol?
1 To make sure info gets flooded
2 To build a picture of the entire network
Trang 12Need for a Link-State Protocol
Consider the following network:
- All links have a cost of 10
- RtrA’s path to RtrE is A->B->E, cost 20
- All traffic from A to {E,F,G} goes A->B->E
Trang 13What a DV Protocol Sees
Node Next-Hop Cost
Trang 14What a LS Protocol Sees
Node Next-Hop Cost
• RtrA sees all links
• RtrA only computes
the shortest path
• Routing table doesn’t change
Trang 15The Problem With Shortest-Path
Node Next-Hop Cost
Trang 16What MPLS-TE Addrs
Node Next-Hop Cost
• RtrA sees all links
• RtrA computes paths on
properties other than just shortest cost
• No congestion!
Trang 17How MPLS-TE Works
• How MPLS-TE Works
-What good is MPLS-TE?
-Information Distribution
-Path Calculation -Path Setup
-Forwarding Traffic Down A Tunnel
Trang 18Information Distribution
• OSPF
-Uses Type 10 (Opaque Area-Local) LSAs -See draft-katz-yeung-ospf-traffic
Trang 19Information Distribution
• IS-IS
-Uses Type 22 TLVs -See draft-ietf-isis-traffic
Trang 20Information Distribution
• IS-IS and OSPF propagate the same information!
-Link identification -TE Metric
-Bandwidth info (max physical, max reservable,
available per-class)
-Attribute flags
Trang 21Information Distribution
• TE flooding is local to a single {area|level}
• Inter-{area|level} TE harder, but possible (think PNNI)
Trang 22How MPLS-TE Works
• How MPLS-TE Works
-What good is MPLS-TE?
-Information Distribution
-Path Calculation
-Path Setup -Forwarding Traffic Down A Tunnel
Trang 24Path Calculation
• Normal SPF – find shortest path
across all links
Trang 25Path Calculation
• Normal SPF – find shortest path
across all links
Trang 26Path Calculation
• Normal SPF – find shortest path
across all links
Trang 27Path Calculation
• Normal SPF – find shortest path
across all links
Trang 28Path Calculation
• Normal SPF – find shortest path
across all links
Trang 29Path Calculation
• Normal SPF – find shortest path
across all links
Trang 30Path Calculation
• Normal SPF – find shortest path
across all links
Trang 31Path Calculation
• Normal SPF – find shortest path
across all links
Trang 32Path Calculation
• Normal SPF – find shortest path
across all links
Trang 33Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 34Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 35Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 36Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 37Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 38Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 39Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 40Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 41Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 42Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 43Path Calculation
• Constrained SPF –
find shortest path
to a specific node
• Consider more than
just link cost!
Trang 44Path Calculation
• “But Wait! There’s nothing different between the two SPF results!”
• ….but….
Trang 45Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 46Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 47Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 48Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 49Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 50Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 51Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 52Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 53Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 54Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 55Path Calculation
• What about the 2nd
path?
• Available bandwidth has changed!
Trang 57Path Calculation
• Happy! Happy!
• Joy! Joy!
Trang 58Path Calculation
• What if there’s more than one path that
meets the minimum requirements (BW, etc)?
• PCALC algorithm:
1 find all paths with the lowest IGP cost
2 then pick the path with the highest minimum bandwidth
along the path
3 then pick the path with the lowest hop count (not IGP
cost, just hop count)
4 then just pick one path at random
Trang 614!
Trang 62{8,90M}
Trang 64How MPLS-TE Works
• How MPLS-TE Works
-What good is MPLS-TE?
-Information Distribution -Path Calculation
-Path Setup
-Forwarding Traffic Down A Tunnel
Trang 65Path Setup
• Cisco MPLS-TE uses RSVP
• RFC2205, plus draft-ietf-mpls-rsvp-lsp-tunnel
Trang 66Path Setup
• Once the path is calculated, it is handed to RSVP
• RSVP uses PATH and RESV messages to request an LSP along the calculated path
Trang 67Path Setup
• PATH message: “Can I have 40Mb along this path?”
• RESV message: “Yes, and here’s the label to use.”
• LFIB is set up along each hop
= RESV messages
Trang 68Path Setup
• Errors along the way will trigger RSVP errors
• May also trigger re-flooding of TE info if appropriate
Trang 69How MPLS-TE Works
• How MPLS-TE Works
-What good is MPLS-TE?
-Information Distribution -Path Calculation
-Path Setup
-Forwarding Traffic Down A Tunnel
Trang 70Forwarding Traffic Down a Tunnel
• There are three ways traffic can
be forwarded down a TE tunnel
-Autoroute -Static routes -Policy routing
• For the first two, MPLS-TE gets
you unequal-cost load-balancing.
Trang 71• Autoroute = “use the tunnel as a directly connected link for SPF purposes”
• This is not the CSPF (for path determination), but the
regular IGP SPF (route determination)
• Behavior is intuitive, operation can be confusing
Trang 73This is RtrA’s logical topology
Other routers don’t see the tunnel!
RtrI
Trang 74Node Next-Hop Cost
RtrI
Trang 76RtrG is not routed to over
the tunnel, even though it’s the tunnel tail!
Tunnel1
Trang 77Unequal-Cost Load Balancing
• IP routing has equal-cost load-balancing, but not
unequal-cost*
• Unequal-cost load balancing difficult to do while
guaranteeing a loop-free topology
*EIGRP has ‘variance’, but that’s not as flexible, and besides,
MPLS-TE and EIGRP are two different things
Trang 78Unequal-Cost Load Balancing
• Since MPLS doesn’t forward based on IP header, permanent routing loops don’t happen.
• 16 hash buckets for next-hop, shared in rough proportion
to tunnel BW
Trang 79gsr1#show ip route 192.168.1.8
Routing entry for 192.168.1.8/32
Known via "isis", distance 115, metric 83, type level-2
Redistributing via isis
Last update from 192.168.1.8 on Tunnel0, 00:00:21 ago
Routing Descriptor Blocks:
* 192.168.1.8, from 192.168.1.8, via Tunnel0
Route metric is 83, traffic share count is 2
192.168.1.8, from 192.168.1.8, via Tunnel1
Route metric is 83, traffic share count is 1
Trang 80Note that the load distribution is 11:5 – very close to
2:1, but not quite!
gsr1#sh ip cef 192.168.1.8 int
………
Load distribution: 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 (refcount 1)
Hash OK Interface Address Packets Tags imposed
1 Y Tunnel0 point2point 0 {23}
2 Y Tunnel1 point2point 0 {34}
………
Trang 81
Q:How does 100:10:1 fit into a 16-deep bucket?
1MB
gsr1#sh ip rou 192.168.1.8
Routing entry for 192.168.1.8/32
Known via "isis", distance 115, metric 83, type level-2
Redistributing via isis
Last update from 192.168.1.8 on Tunnel2, 00:00:08 ago
Routing Descriptor Blocks:
* 192.168.1.8, from 192.168.1.8, via Tunnel0
Route metric is 83, traffic share count is 100
192.168.1.8, from 192.168.1.8, via Tunnel1
Route metric is 83, traffic share count is 10
192.168.1.8, from 192.168.1.8, via Tunnel2
Route metric is 83, traffic share count is 1
Trang 82A:Any way it wants to! 15:1, 14:2, 13:2:1, it depends on the order the tunnels come up.
Deployment guideline: don’t use tunnel metrics that don’t reduce to
16 buckets!
1MB
gsr1#sh ip cef 192.168.1.8 internal
………
Load distribution: 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (refcount 1)
Hash OK Interface Address Packets Tags imposed
1 Y Tunnel0 point2point 0 {36}
2 Y Tunnel1 point2point 0 {37}
………
Trang 83RtrA(config-if)#ip policy route-map set-tunnel
RtrA(config)#route-map set-tunnel
RtrA(config-route-map)#match ip address 101
RtrA(config-route-map)#set interface Tunnel1
Trang 85Forwarding Traffic Down a Tunnel
• You can use any combination of
autoroute, static routes, or PBR.
• …but simple is better unless you have a good reason.
• Recommendation: either autoroute
or statics to BGP next-hops,
depending on your needs.
Trang 86• Prerequisites
• How MPLS-TE Works
• Basic Configuration
• Knobs! Knobs! Knobs!
• Deploying and Desiginig
Trang 87Basic Configuration
• Basic Configuration
-Basic Midpoint/Tail Config
-Basic Headend Config -Path-option
-Bandwidth
Trang 88Basic Midpoint/Tail Config
(globally)
ip cef {distributed}
mpls traffic-eng tunnels
Trang 89Basic Midpoint/Tail Config
(per interface) mpls traffic-eng tunnels
Trang 90Basic Midpoint/Tail Config
(if IGP == OSPF) router ospf <x>
mpls traffic-eng router-id Loopback0 mpls traffic-eng area <y>
Trang 91Basic Midpoint/Tail Config
(if IGP == OSPF)
• MPLS TE is a single area only (usually area 0)
• RID must be set (unlike OSPF RID)
It’s a Very Very Good idea to make it a /32
loopback.
Trang 92Basic Midpoint/Tail Config
(if IGP == IS-IS)
router isis <x>
mpls traffic-eng router-id
Loopback0 mpls traffic-eng level-{1,2}
metric-style wide
Trang 93Basic Midpoint/Tail Config
(if IGP == IS-IS)
• MPLS TE is a single level only
• RID must be set (unlike OSPF RID)
It’s a Very Very Good idea to make it a /32
loopback.
Trang 94Basic Midpoint/Tail Config
‘metric-style wide’ - ???
• IS-IS must have wide metrics enabled
• This is discussed in more detail later in this presentation; see also www.cisco.com.
Trang 95Basic Midpoint/Tail Config
• Total config tally so far:
1 line globally
1 line per interface
2 lines if OSPF
3 lines if IS-IS
Trang 96Basic Headend Config
• Headend needs the 4-5 ‘mid/tail’ lines
• But wait – there’s more!
Trang 97Basic Headend Config
• Create the tunnel interface
interface Tunnel0
ip unnumbered Loopback0 tunnel mode mpls traffic-eng tunnel source Loopback0
tunnel destination <tunnel endpoint>
tunnel mpls traffic-eng autoroute tunnel mpls traffic-eng path-option 10 dynamic
unnumbered to Loop0
path-option tells the tunnel how to get to tail
’10’ is the priority of the path-option there are other options besides dynamic autoroute is not strictly necessary, but is useful
Trang 98Basic Headend Config
• Total config tally:
Trang 99• Prerequisites
• How MPLS-TE Works
• Basic Configuration
• Knobs! Knobs! Knobs!
• Deploying and Desiginig
Trang 100Knobs! Knobs! Knobs!
• Influencing the Path Selection
• Auto-Bandwidth
• Fast Reroute
• DiffServ-Aware Traffic Engineering
Trang 101Knobs! Knobs! Knobs!
• Influencing the Path Selection
Bandwidth Priority
Administrative Weight Attributes & Affinity
Trang 102ip rsvp bandwidth <x> <y>
• Per-physical-interface command
• X = amount of reservable BW, in K
• Y = not used by MPLS-TE
• default: X==Y==75% of link
bandwidth
Trang 104• New tunnel with better setup priority will force teardown of already-established tunnel with worse holding priority
• Configuring S<H is illegal
• Default is S=7,H=7
Trang 105= 40MB tunnel with S=7, H=7
= 40MB tunnel with S=6, H=6
Trang 107“Should I ever set S != H?”
No Not unless you know you have a good reason to.
Trang 108• this can be used as a per-tunnel
delay-sensitive metric for doing VoIP TE
Trang 109Administrative Weight
tunnel mpls traffic-eng
path-selection metric {te|igp}
administrative-weight to determine shortest cost
Trang 110Delay-Sensitve Metric with Adminastrative Weight
tunnel mpls traffic-eng path-selection
metric {te|igp}
mpls traffic-eng administrative-weight <x>
• configure admin weight == interface
delay
• configure VoIP tunnels to use TE
metric to calculate the path
• delay-sensitive metric!
Trang 111Attributes & Affinity
• Link attribute – 32 separate link properties
• Tunnel affinity – desire for links to have certain properties set
• Invent your own property meanings
Trang 112Administrative Weight
mpls traffic-eng
attribute-flags <0x0-0xFFFFFFFF>
• Per-physical-interface command
Trang 113care about bits 2 and 8; bit 2 must
be set, bit 8 must be 0’
Trang 114Administrative Weight
• Q: How should I use admin-weight?
• A: To exclude some links from consideration by some
tunnels
• …so give a satellite link an attribute of 0x2, and any VoIP tunnels can be configured with ‘affinity 0x0 mask 0x2’
Trang 115Knobs! Knobs! Knobs!
• Influencing the Path Selection
• Auto-Bandwidth
• Fast Reroute
• DiffServ-Aware Traffic Engineering
Trang 116tunnel mpls traffic-eng auto-bw ?
collect-bw Just collect Bandwidth info on this tunnel
frequency Frequency to change tunnel BW
max-bw Set the Maximum Bandwidth for auto-bw on this tunnel
min-bw Set the Minimum Bandwidth for auto-bw on this tunnel
<cr>
reservation based on traffic out
tunnel
more or less sensitive
Trang 117tunnel mpls traffic-eng auto-bw ?
collect-bw Just collect Bandwidth info on this tunnel
frequency Frequency to change tunnel BW
max-bw Set the Maximum Bandwidth for auto-bw on this tunnel
min-bw Set the Minimum Bandwidth for auto-bw on this tunnel
<cr>
reservation based on traffic out tunnel
or less sensitive
tradeoff: quicker reaction vs more churn
Trang 118auto-bw: (86400/86259) 0 Bandwidth Requested: 100
• 86400 = reoptimization time (default 24h)
tunnel mpls traffic-eng auto-bw frequency <x>
• 86259 = time left to reoptimization
• 0 = BW measured at end of last reopt
interval
• bw requested = signalled tunnel BW
tunnel mpls traffic-eng {max-bw|min-bw} <bw>