You want an automatic way to optimize the amount of bandwidth allocated to each LSP to minimize or eliminate any contention for the available bandwidth on the shared links.
MPLS can automatically allocate bandwidth for an LSP and can automatically adjust the allocation as necessary from time to time. The configuration has two parts. First, MPLS must gather bandwidth statistics:
[edit protocols mpls] aviva@R1# set statistics auto-bandwidth aviva@R1# set statistics file mpls-bandwidth-stats world-readable
Second, configure the LSP to automatically allocate and adjust the bandwidth for an LSP:
[edit protocols mpls] aviva@R1# set label-switched-path R1-to-R5 auto-bandwidth minimum-bandwidth 50m
In a network with bandwidth constraints, it can be difficult for RSVP to set up LSPs when insufficient bandwidth is available. If you choose to allocate LSP bandwidth manually (see Recipe 14.11), it can be challenging to figure out how much bandwidth to set aside for an individual LSP or for a series of LSPs so that they are always available to carry your customers traffic. MPLS autobandwidth is a JUNOS mechanism that automatically allocates bandwidth for an LSP. It works by monitoring the rate of traffic flow through an LSP and periodically resizing the allocated bandwidth to match the flow rate. In effect, autobandwidth adaptively requests bandwidth reservations based on actual LSP usage.
When MPLS resizes the bandwidth, it calculates and sets up a new LSP and sets it up in a make-before-break fashion, then tears down the old LSP after the new one is established. To avoid double-counting of resources, the LSP is set up as adaptive. Thus, the new and old LSPs share bandwidth over common links. In this process, the LSP might be rerouted. If this happens, all traffic already in the existing LSP continues to the egress router and any new traffic entering the LSP travels along the newly established path.
You turn on autobandwidth at the ingress router. No configuration is necessary on the other routers in the LSP. As a first step, enable MPLS statistics collection (with the set statistics auto-bandwidth command) and create a logfile to track actual bandwidth usage on the LSP. This recipe creates a file named mpls-bandwidth-stats.
The second step is to configure autobandwidth on the LSP itself. In this recipe, we set autobandwidth on the R1-to-R5 LSP, specifying that RSVP always allocates a minimum of 50 Mbps for the LSP.
To verify the autobandwidth configuration, look at the LSP on the ingress router:
aviva@R1> show mpls lsp detail ingress Ingress LSP: 1 sessions 10.0.0.5 From: 10.0.0.1, State: Up, ActiveRoute: 0, LSPname: R1-to-R5 ActivePath: (primary) LoadBalance: Random Autobandwidth MinBW: 50Mbps AdjustTimer: 86400 secs Max AvgBW util: 0bps, Bandwidth Adjustment in 86368 second(s). Encoding type: Packet, Switching type: Packet, GPID: IPv4 *Primary State: Up SmartOptimizeTimer: 180 Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 30) 10.1.12.2 S 10.1.26.2 S 10.1.56.1 S Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt): 10.1.12.2 10.1.26.2 10.1.56.1 Total 1 displayed, Up 1, Down 0
The first highlighted line shows that autobandwidth is operational, and the second line reflects the configured minimum bandwidth of 50 Mbps. The AdjustTimer line is how often MPLS automatically recalculates the LSPs bandwidth. Here, the default time is 86,400 seconds (24 hours). Use the following command to change the interval:
[edit protocols mpls] aviva@R1# set label-switched-path R1-to-R5 auto-bandwidth adjust-interval 28800
This configuration changes the recalculation interval to 12 hours.
Next, verify that RSVP has reserved bandwidth for the LSP:
aviva@R1> show rsvp interface RSVP interface: 2 active Active Subscr- Static Available Reserved Highwater Interface State resv iption BW BW BW mark so-0/0/0.0 Up 1 100% 155.52Mbps 155.52Mbps 0bps 0bps so-0/0/2.0 Up 1 100% 155.52Mbps 105.52Mbps 50Mbps 80Mbps
RSVP has reserved 50 Mbps for the LSP in interface so-0/0/2.
You might wonder whether the LSP goes down each time RSVP recalculates the bandwidth requirements. The answer here is no. The whole point of autobandwidth is that the LSP stays up during the entire process and RSVP makes the bandwidth changes without dropping any traffic traveling along the LSP. This occurs because RSPV sets up the new LSP before tearing down the existing onemake-before-break. You can confirm this by forcing RSVP to recompute the allocated bandwidth:
aviva@R1> request mpls lsp adjust-autobandwidth
Then examine the history of the LSP:
aviva@R1> show mpls lsp ingress extensive Ingress LSP: 1 sessions 10.0.0.5 From: 10.0.0.1, State: Up, ActiveRoute: 0, LSPname: R1-to-R5 ActivePath: (primary) LoadBalance: Random Autobandwidth MinBW: 50Mbps AdjustTimer: 86400 secs Max AvgBW util: 0bps, Bandwidth Adjustment in 86089 second(s). Encoding type: Packet, Switching type: Packet, GPID: IPv4 *Primary State: Up Bandwidth: 50Mbps SmartOptimizeTimer: 180 Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 30) 10.1.13.2 S 10.1.34.2 S 10.1.45.2 S Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt): 10.1.13.2 10.1.34.2 10.1.45.2 10 Oct 10 13:44:54 Record Route: 10.1.13.2 10.1.34.2 10.1.45.2 9 Oct 10 13:44:54 Up 8 Oct 10 13:44:54 Manual Autobw adjustment succeeded 7 Oct 10 13:44:54 Originate make-before-break call 6 Oct 10 13:44:54 CSPF: computation result accepted 5 Oct 10 13:39:48 Selected as active path 4 Oct 10 13:39:48 Record Route: 10.1.12.2 10.1.26.2 10.1.56.1 3 Oct 10 13:39:48 Up 2 Oct 10 13:39:47 Originate Call 1 Oct 10 13:39:47 CSPF: computation result accepted Created: Mon Oct 10 13:39:47 2005 Total 1 displayed, Up 1, Down 0
Line 4 of the history shows the initial path calculated for the LSP. Line 7 gives the first indication of the autobandwidth recalculation triggered by the request mpls lsp adjust-autobandwidth command. At this point, RSVP starts setting up the new LSP. When it is ready, RSVP then tears down the existing LSP. Line 8 shows that the autobandwidth adjustment was successful. Line 9 shows that the new LSP is up, and line 10 shows the new path.
Router Configuration and File Management
Basic Router Security and Access Control
Routing Policy and Firewall Filters