ON THIS PAGE
Understanding Configuration of Up to 512 Equal-Cost Paths With Optional Consistent Load Balancing
Example: Configuring Single-Hop EBGP Peers to Accept Remote Next Hops
Understanding Load Balancing for BGP Traffic with Unequal Bandwidth Allocated to the Paths
Example: Load Balancing BGP Traffic with Unequal Bandwidth Allocated to the Paths
Advertising Aggregate Bandwidth Across External BGP Links for Load Balancing Overview
Understanding the Advertisement of Multiple Paths to a Single Destination in BGP
Example: Configuring Selective Advertising of BGP Multiple Paths for Load Balancing
Configuring ECMP Next Hops for RSVP and LDP LSPs for Load Balancing
Example: Configuring an Entropy Label for a BGP Labeled Unicast LSP
Use Case for BGP Prefix Independent Convergence for Inet, Inet6, or Labeled Unicast
Example: Configuring BGP Prefix Independent Convergence for Inet
Configuring BGP PIC Edge Using BGP Labeled Unicast for Layer 2 Services
Example: Protecting IPv4 Traffic over Layer 3 VPN Running BGP Labeled Unicast
Configuring FAT Pseudowire Support for BGP L2VPN to Load-Balance MPLS Traffic
Example: Configuring FAT Pseudowire Support for BGP L2VPN to Load-Balance MPLS Traffic
Configuring FAT Pseudowire Support for BGP VPLS to Load-Balance MPLS Traffic
Example: Configuring FAT Pseudowire Support for BGP VPLS to Load-Balance MPLS Traffic
Load Balancing for a BGP Session
Understanding BGP Multipath
BGP multipath allows you to install multiple internal BGP paths and multiple external BGP paths to the forwarding table. Selecting multiple paths enables BGP to load-balance traffic across multiple links.
A path is considered a BGP equal-cost path (and is used for forwarding) if the BGP path selection process performs a tie-break after comparing the IGP cost to the next-hop. By default, all paths with the same neighboring AS, learned by a multipath-enabled BGP neighbor are considered in the multipath selection process.
BGP typically selects only one best path for each prefix and installs that route in the forwarding table. When BGP multipath is enabled, the device selects multiple equal-cost BGP paths to reach a given destination, and all these paths are installed in the forwarding table. BGP advertises only the active path to its neighbors, unless add-path is in use.
The Junos OS BGP multipath feature supports the following applications:
Load balancing across multiple links between two routing devices belonging to different autonomous systems (ASs)
Load balancing across a common subnet or multiple subnets to different routing devices belonging to the same peer AS
Load balancing across multiple links between two routing devices belonging to different external confederation peers
Load balancing across a common subnet or multiple subnets to different routing devices belonging to external confederation peers
In a common scenario for load balancing, a customer is multihomed to multiple routers or switches in a point of presence (POP). The default behavior is to send all traffic across only one of the available links. Load balancing causes traffic to use two or more of the links.
BGP multipath does not apply to paths that share the same MED-plus-IGP cost, yet differ in IGP cost. Multipath path selection is based on the IGP cost metric, even if two paths have the same MED-plus-IGP cost.
Starting
in Junos OS Release 18.1R1 BGP multipath is supported globally at [edit protocols bgp]
hierarchy level. You can selectively disable
multipath on some BGP groups and neighbors. Include disable
at [edit protocols bgp group group-name multipath]
hierarchy level to disable multipath option for
a group or a specific BGP neighbor.
Starting in Junos OS
Release 18.1R1, you can defer multipath calculation until all BGP
routes are received. When multipath is enabled, BGP inserts the route
into the multipath queue each time a new route is added or whenever
an existing route changes. When multiple paths are received through
BGP add-path feature, BGP might calculate one multipath route multiple
times. Multipath calculation slows down the RIB (also known as the
routing table) learning rate. To speed up RIB learning, multipath
calculation can be either deferred until the BGP routes are received
or you can lower the priority of the multipath build job as per your
requirements until the BGP routes are resolved. To defer the multipath
calculation configure defer-initial-multipath-build
at [edit protocols bgp]
hierarchy level. Alternatively, you can
lower the BGP multipath build job priority using multipath-build-priority
configuration statement at [edit protocols bgp]
hierarchy
level to speed up RIB learning.
See Also
Example: Load Balancing BGP Traffic
This example shows how to configure BGP to select multiple equal-cost external BGP (EBGP) or internal BGP (IBGP) paths as active paths.
Requirements
Before you begin:
Configure the device interfaces.
Configure an interior gateway protocol (IGP).
Configure BGP.
Configure a routing policy that exports routes (such as direct routes or IGP routes) from the routing table into BGP.
Overview
The following steps show how to configure per-packet load balancing:
Define a load-balancing routing policy by including one or more
policy-statement
statements at the[edit policy-options]
hierarchy level, defining an action ofload-balance per-packet
:policy-statement policy-name { from { match-conditions; route-filter destination-prefix match-type <actions>; prefix-list name; } then { load-balance per-packet; } }
Note:To enable load-balancing among multiple EBGP paths and multiple IBGP paths , include the
multipath
statement globally at the[edit protocols bgp]
hierarchy level. You cannot enable load-balancing of BGP traffic without including themultipath
statement globally, or for a BGP group at the[edit protocols bgp group group-name
hierarchy level, or for specific BGP neighbors at the[edit protocols bgp group group-name neighbor address]
hierarchy level.Apply the policy to routes exported from the routing table to the forwarding table. To do this, include the
forwarding-table
andexport
statements:forwarding-table { export policy-name; }
You cannot apply the export policy to VRF routing instances.
Specify all next hops of that route, if more than one exists, when allocating a label corresponding to a route that is being advertised.
Configure the forwarding-options hash key for MPLS to include the IP payload.
On some platforms, you can increase the number of paths that are load balanced by using the chassis maximum-ecmp statement.
With this statement, you can change the maximum number of equal-cost load-balanced paths to 32, 64, 128, 256, or 512 (the maximum number varies per platform—see maximum-ecmp.)
The multipath feature is supported on all platforms that support BGP. Some enhancements have been made to QFX platforms:
-
- Starting with Junos OS Release 19.1R1, you can specify a maximum number of 128 equal-cost paths on QFX10000 switches.
-
- Starting with Junos OS Release 19.2R1, you can specify a maximum number of 512 equal-cost paths on QFX10000 switches—see Understanding Configuration of Up to 512 Equal-Cost Paths With Optional Consistent Load Balancing.
In this example, Device R1 is in AS 64500 and is connected to both Device R2 and Device R3, which are in AS 64501. This example shows the configuration on Device R1.
Configuration
Procedure
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
set protocols bgp group external type external set protocols bgp group external peer-as 64501 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set routing-options forwarding-table export loadbal set routing-options autonomous-system 64500
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure the BGP peer sessions:
Configure the BGP group.
[edit protocols bgp group external] user@R1# set type external user@R1# set peer-as 64501 user@R1# set neighbor 10.0.1.1 user@R1# set neighbor 10.0.0.2
Enable the BGP group to use multiple paths.
Note:To disable the default check requiring that paths accepted by BGP multipath must have the same neighboring autonomous system (AS), include the
multiple-as
option.[edit protocols bgp group external] user@R1# set multipath
Configure the load-balancing policy.
[edit policy-options policy-statement loadbal] user@R1# set from route-filter 10.0.0.0/16 orlonger user@R1# set then load-balance per-packet
Apply the load-balancing policy.
[edit routing-options] user@R1# set forwarding-table export loadbal
Configure the local autonomous system (AS) number.
[edit routing-options] user@R1# set autonomous-system 64500
Results
From configuration mode, confirm your configuration
by entering the show protocols
, show policy-options
, and show routing-options
commands. If the output does
not display the intended configuration, repeat the instructions in
this example to correct the configuration.
[edit]
user@R1# show protocols
bgp {
group external {
type external;
peer-as 64501;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
}
[edit]
user@R1# show policy-options
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
[edit]
user@R1# show routing-options
autonomous-system 64500;
forwarding-table {
export loadbal;
}
If you are done configuring the device, enter commit
from configuration mode.
Verification
Confirm that the configuration is working properly:
Verifying Routes
Purpose
Verify that routes are learned from both routers in the neighboring AS.
Action
From operational mode, run the show route
command.
user@R1> show route 10.0.2.0 inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.0.2.0/30 *[BGP/170] 03:12:32, localpref 100 AS path: 64501 I to 10.0.1.1 via ge-1/2/0.0 > to 10.0.0.2 via ge-1/2/1.0 [BGP/170] 03:12:32, localpref 100 AS path: 64501 I > to 10.0.1.1 via ge-1/2/0.0
user@R1> show route 10.0.2.0 detail inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden) 10.0.2.0/30 (2 entries, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 262142 Next-hop reference count: 3 Source: 10.0.0.2 Next hop: 10.0.1.1 via ge-1/2/0.0 Next hop: 10.0.0.2 via ge-1/2/1.0, selected State: <Active Ext> Local AS: 64500 Peer AS: 64501 Age: 3:18:30 Task: BGP_64501.10.0.0.2+55402 Announcement bits (1): 2-KRT AS path: 64501 I Accepted Multipath Localpref: 100 Router ID: 192.168.2.1 BGP Preference: 170/-101 Next hop type: Router, Next hop index: 602 Next-hop reference count: 5 Source: 10.0.1.1 Next hop: 10.0.1.1 via ge-1/2/0.0, selected State: <NotBest Ext> Inactive reason: Not Best in its group - Active preferred Local AS: 64500 Peer AS: 64501 Age: 3:18:30 Task: BGP_64501.10.0.1.1+53135 AS path: 64501 I Accepted Localpref: 100 Router ID: 192.168.3.1
Meaning
The active path, denoted with an asterisk (*), has two next hops: 10.0.1.1 and 10.0.0.2 to the 10.0.2.0 destination. The 10.0.1.1 next hop is copied from the inactive path to the active path.
The show route detail
command output designates
one gateway as selected
. This output
is potentially confusing in the context of load balancing. The selected
gateway is used for many purposes in addition to deciding which gateway
to install into the kernel when Junos OS is not performing per-packet
load-balancing. For instance, the ping mpls
command uses
the selected gateway when sending packets. Multicast protocols use
the selected gateway in some cases to determine the upstream interface.
Therefore, even when Junos OS is performing per-packet load-balancing
by way of a forwarding-table policy, the selected gateway information
is still required for other purposes. It is useful to display the
selected gateway for troubleshooting purposes. Additionally, it is
possible to use forwarding-table policy to override what is installed
into the kernel (for example, by using the install-nexthop
action). In this case, the next-hop gateway installed in the forwarding
table might be a subset of the total gateways displayed in the show route
command.
Verifying Forwarding
Purpose
Verify that both next hops are installed in the forwarding table.
Action
From operational mode, run the show route forwarding-table
command.
user@R1> show route forwarding-table destination 10.0.2.0 Routing table: default.inet Internet: Destination Type RtRef Next hop Type Index NhRef Netif 10.0.2.0/30 user 0 ulst 262142 2 10.0.1.1 ucst 602 5 ge-1/2/0.0 10.0.0.2 ucst 522 6 ge-1/2/1.0
Understanding Configuration of Up to 512 Equal-Cost Paths With Optional Consistent Load Balancing
You can configure the equal-cost multipath (ECMP) feature with up to 512 paths for external BGP peers. Having the ability to configure up to 512 ECMP next hops allows you to increase the number of direct BGP peer connections with your specified routing device, thus improving latency and optimizing data flow. You can optionally include consistent load balancing in that ECMP configuration. Consistent load balancing ensures that if an ECMP member (that is, a path) fails, only flows flowing through the failed member are redistributed to other active ECMP members. Consistent load balancing also ensures that if an ECMP member is added, redistribution of flows from existing EMCP members to the new ECMP member is minimal.
- Guidelines and Limitations for Configuring from 256 to 512 Equal-Cost Paths, Optionally with Consistent Load Balancing
- Instructions for Configuring Up to 512 ECMP Next Hops, and Optionally Configuring Consistent Load Balancing
Guidelines and Limitations for Configuring from 256 to 512 Equal-Cost Paths, Optionally with Consistent Load Balancing
The feature applies only to single-hop external BGP peers. (This feature does not apply to MPLS routes.)
The device’s routing process (RPD) must support 64-bit mode; 32-bit RPD is not supported.
The feature applies only to unicast traffic.
Traffic distribution might not be even across all group members—it depends on the traffic pattern and on the organization of the hashing flow set table in hardware. Consistent hashing minimizes remapping of flows to destination links when members are added to or deleted from the group.
If you configure
set forwarding-options enhanced-hash-key
with one of the optionshash-mode
,inet
,inet6
, orlayer2
, some flows might change destination links, because the new hash parameters might generate new hash indexes for the flows, resulting in new destination links.To achieve the best-possible hashing accuracy, this feature uses a cascaded topology to implement the next-hop structure for configurations of more than 128 next hops. Hashing accuracy is therefore somewhat lesser than it is for ECMP next-hop configurations of less than 128, which do not require a cascaded topology.
Existing flows on affected ECMP paths and new flows flowing over those affected ECMP paths might switch paths during local route repair, and traffic skewing might be noticeable. However, any such skewing is corrected during the subsequent global route repair.
When you increase the
maximum-ecmp
value, consistency hashing is lost during the next next-hop-change event for the route prefix.If you add a new path to an existing ECMP group, some flows over unaffected paths might move to the newly added path.
Fast reroute (FRR) might not work with consistent hashing.
Perfect ECMP-like traffic distribution cannot be achieved. Paths that have more “buckets” than other paths have more traffic flows than paths with fewer buckets (a bucket is an entry in the load-balancing table’s distribution list that is mapped to an ECMP member index).
During network topology change events, consistent hashing is lost for network prefixes in some instances because those prefixes point to a new ECMP next hop that does not have all properties of the prefixes’ previous ECMP next hops.
If multiple network prefixes point to the same ECMP next hop and one or more of those prefixes is enabled with the
consistent-hash
statement, all network prefixes pointing to that same ECMP next hop display consistent–hashing behavior.Consistent hashing is supported on the equal-cost BGP routes–based ECMP group only. When other protocols or static routes are configured that have priority over BGP routes, consistent hashing is not supported.
Consistent hashing might have limitations when the configuration is combined with configurations for the following features, because these features have tunnel terminations or traffic engineering that does not use hashing for selecting paths—GRE tunneling; BUM traffic; EVPN-VXLAN; and MPLS TE, autobandwidth.
Instructions for Configuring Up to 512 ECMP Next Hops, and Optionally Configuring Consistent Load Balancing
When you are ready to configure up to 512 next hops, use the following configuration instructions:
Configure the maximum number of ECMP next hops—for example, configure 512 ECMP next hops:
[edit] user@host# set chassis maximum-ecmp 512
Creating a routing policy and enable per-packet load balancing, thus enabling ECMP globally on the system:
[edit] user@host# set routing-options forwarding-table export load-balancing-policy user@host# set policy-options policy-statement load-balancing-policy then load-balance per-packet
Enable resiliency on selected prefixes by creating a separate routing policy to match incoming routes to one or more destination prefixes—for example:
[edit] user@host# set policy-options policy-statement c-hash from route-filter 20.0.0.0/24 orlonger user@host# set policy-options policy-statement c-hash then load-balance consistent-hash
Apply an eBGP import policy (for example, “c-hash”) to the BGP group of external peers:
[edit] user@host# set protocols bgp import c-hash
For more detail on configuring equal-cost paths, see Example: Load Balancing BGP Traffic, which appears earlier in this document.
(Optional) For more detail on configuring consistent load balancing (also known as consistent hashing), see Configuring Consistent Load Balancing for ECMP Groups
See Also
Example: Configuring Single-Hop EBGP Peers to Accept Remote Next Hops
This example shows how to configure a single-hop external BGP (EBGP) peer to accept a remote next hop with which it does not share a common subnet.
Requirements
No special configuration beyond device initialization is required before you configure this example.
Overview
In some situations, it is necessary to configure a single-hop EBGP peer to accept a
remote next hop with which it does not share a common subnet. The default behavior
is for any next-hop address received from a single-hop EBGP peer that is not
recognized as sharing a common subnet to be discarded. The ability to have a
single-hop EBGP peer accept a remote next hop to which it is not directly connected
also prevents you from having to configure the single-hop EBGP neighbor as a
multihop session. When you configure a multihop session in this situation, all
next-hop routes learned through this EBGP peer are labeled indirect even when they
do share a common subnet. This situation breaks multipath functionality for routes
that are recursively resolved over routes that include these next-hop addresses.
Configuring the
accept-remote-nexthop
statement allows a single-hop EBGP peer to accept a remote next hop, which
restores multipath functionality for routes that are resolved over these next-hop
addresses. You can configure this statement at the global, group, and neighbor
hierarchy levels for BGP. The statement is also supported on logical systems and the
VPN routing and forwarding (VRF) routing instance type. Both the remote next-hop and
the EBGP peer must support BGP route refresh as defined in RFC 2918, Route
Refresh Capability in BGP-4. If the remote peer does not support BGP
route refresh, the session is reset.
A single-hop EBGP peer advertises its own address as the next hop by default. if you want to advertise a different next hop you must define an import routing policy on the EBGP peer. When you enable a single-hop EBGP peer to accept a remote next hop, you can also configure an import routing policy on the EBGP peer. However, a routing policy is not required if you have configured a remote next hop.
This example includes an import routing policy, agg_route
, that
enables a single-hop external BGP peer (Device R1) to accept the remote next-hop
10.1.10.10
for the route to the
10.1.230.0/23
network. At the [edit protocols bgp]
hierarchy level, the example
includes the import agg_route
statement to apply the policy to the
external BGP peer and includes the accept-remote-nexthop
statement
to enable the single-hop EBGP peer to accept the remote next hop.
Figure 2 shows the sample topology.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a
text file, remove any line breaks, change any details necessary to match your
network configuration, and then copy and paste the commands into the CLI at the
[edit]
hierarchy level.
Device R0
set interfaces fe-1/2/0 unit 0 family inet address 10.1.0.1/30 set interfaces fe-1/2/1 unit 0 family inet address 10.1.1.1/30 set interfaces lo0 unit 0 family inet address 10.255.14.179/32 set protocols bgp group ext type external set protocols bgp group ext export test_route set protocols bgp group ext export agg_route set protocols bgp group ext peer-as 65000 set protocols bgp group ext multipath set protocols bgp group ext neighbor 10.1.0.2 set protocols bgp group ext neighbor 10.1.1.2 set policy-options policy-statement agg_route term 1 from protocol static set policy-options policy-statement agg_route term 1 from route-filter 10.1.230.0/23 exact set policy-options policy-statement agg_route term 1 then accept set policy-options policy-statement test_route term 1 from protocol static set policy-options policy-statement test_route term 1 from route-filter 10.1.10.10/32 exact set policy-options policy-statement test_route term 1 then accept set routing-options static route 10.1.10.10/32 reject set routing-options static route 10.1.230.0/23 reject set routing-options autonomous-system 65500
Device R1
set interfaces fe-1/2/0 unit 0 family inet address 10.1.0.2/30 set interfaces fe-1/2/1 unit 0 family inet address 10.1.1.2/30 set interfaces fe-1/2/2 unit 0 family inet address 10.12.0.1/30 set interfaces lo0 unit 2 family inet address 10.255.71.24/32 set protocols bgp accept-remote-nexthop set protocols bgp group ext type external set protocols bgp group ext import agg_route set protocols bgp group ext peer-as 65500 set protocols bgp group ext multipath set protocols bgp group ext neighbor 10.1.0.1 set protocols bgp group ext neighbor 10.1.1.1 set protocols bgp group int type internal set protocols bgp group int local-address 10.255.71.24 set protocols bgp group int neighbor 10.255.14.177 set protocols ospf area 0.0.0.0 interface fe-1/2/1.4 set protocols ospf area 0.0.0.0 interface 10.255.71.24 set policy-options policy-statement agg_route term 1 from protocol bgp set policy-options policy-statement agg_route term 1 from route-filter 10.1.230.0/23 exact set policy-options policy-statement agg_route term 1 then next-hop 10.1.10.10 set policy-options policy-statement agg_route term 1 then accept set routing-options autonomous-system 65000
Device R2
set interfaces fe-1/2/0 unit 0 family inet address 10.12.0.2/30 set interfaces lo0 unit 0 family inet address 10.255.14.177/32 set protocols bgp group int type internal set protocols bgp group int local-address 10.255.14.177 set protocols bgp group int neighbor 10.255.71.24 set protocols ospf area 0.0.0.0 interface fe-1/2/0.6 set protocols ospf area 0.0.0.0 interface 10.255.14.177 set routing-options autonomous-system 65000
Device R0
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device R0:
-
Configure the interfaces.
[edit interfaces fe-1/2/0 unit 0] user@R0# set family inet address 10.1.0.1/30 [edit interfaces fe-1/2/1 unit 0] user@R0# set family inet address 10.1.1.1/30 [edit interfaces lo0 unit 0] user@R0# set family inet address 10.255.14.179/32
-
Configure EBGP.
[edit protocols bgp group ext] user@R0# set type external user@R0# set peer-as 65000 user@R0# set neighbor 10.1.0.2 user@R0# set neighbor 10.1.1.2
-
Enable multipath BGP between Device R0 and Device R1.
[edit protocols bgp group ext] user@R0# set multipath
-
Configure static routes to remote networks. These routes are not part of the topology. The purpose of these routes is to demonstrate the functionality in this example.
[edit routing-options] user@R0# set static route 10.1.10.10/32 reject user@R0# set static route 10.1.230.0/23 reject
-
Configure routing policies that accept the static routes.
[edit policy-options policy-statement agg_route term 1] user@R0# set from protocol static user@R0# set from route-filter 10.1.230.0/23 exact user@R0# set then accept [edit policy-options policy-statement test_route term 1] user@R0# set from protocol static user@R0# set from route-filter 10.1.10.10/32 exact user@R0# set then accept
-
Export the
agg_route
andtest_route
policies from the routing table into BGP.[edit protocols bgp group ext] user@R0# set export test_route user@R0# set export agg_route
-
Configure the autonomous system (AS) number.
[edit routing-options] user@R0# set autonomous-system 65500
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show protocols
, and show
routing-options
commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct
the configuration.
user@R0# show interfaces fe-1/2/0 { unit 0 { family inet { address 10.1.0.1/30; } } } fe-1/2/1 { unit 0 { family inet { address 10.1.1.1/30; } } } lo0 { unit 0 { family inet { address 10.255.14.179/32; } } }
user@R0# show policy-options policy-statement agg_route { term 0 { from { protocol static; route-filter 10.1.230.0/23 exact; } then accept; } } policy-statement test_route { term 1 { from { protocol static; route-filter 10.1.10.10/32 exact; } then accept; } }
user@R0# show protocols bgp { group ext { type external; export [ test_route agg_route ]; peer-as 65000; multipath; neighbor 10.1.0.2; neighbor 10.1.1.2; } }
user@R0# show routing-options static { route 10.1.10.10/32 reject; route 10.1.230.0/23 reject; } autonomous-system 65500;
If you are done configuring the device, enter commit
from
configuration mode.
Configuring Device R1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device R1:
-
Configure the interfaces.
[edit interfaces fe-1/2/0 unit 0] user@R1# set family inet address 10.1.0.2/30 [edit interfaces fe-1/2/1 unit 0] user@R1# set family inet address 10.1.1.2/30 [edit interfaces fe-1/2/2 unit 0] user@R1# set family inet address 10.12.0.1/30 [edit interfaces lo0 unit 0] user@R1# set family inet address 10.255.71.24/32
-
Configure OSPF.
[edit protocols ospf area 0.0.0.0] user@R1# set interface fe-1/2/1.0 user@R1# set interface 10.255.71.24
-
Enable Device R1 to accept the remote next hop.
[edit protocols bgp] user@R1# set accept-remote-nexthop
-
Configure IBGP.
[edit protocols bgp group int] user@R1# set type internal user@R1# set local-address 10.255.71.24 user@R1# set neighbor 10.255.14.177
-
Configure EBGP.
[edit protocols bgp group ext] user@R1# set type external user@R1# set peer-as 65500 user@R1# set neighbor 10.1.0.1 user@R1# set neighbor 10.1.1.1
-
Enable multipath BGP between Device R0 and Device R1.
[edit protocols bgp group ext] user@R1# set multipath
-
Configure a routing policy that enables a single-hop external BGP peer (Device R1) to accept the remote next-hop 10.1.10.10 for the route to the 10.1.230.0/23 network.
[edit policy-options policy-statement agg_route term 1] user@R1# set from protocol bgp user@R1# set from route-filter 10.1.230.0/23 exact user@R1# set then next-hop 10.1.10.10 user@R1# set then accept
-
Import the
agg_route
policy into the routing table on Device R1.[edit protocols bgp group ext] user@R1# set import agg_route
-
Configure the autonomous system (AS) number.
[edit routing-options] user@R1# set autonomous-system 65000
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show protocols
, and show
routing-options
commands. If the output does not display the
intended configuration, repeat the instructions in this example to correct
the configuration.
user@R1# show interfaces fe-1/2/0 { unit 0 { family inet { address 10.1.0.2/30; } } } fe-1/2/1 { unit 0 { family inet { address 10.1.1.2/30; } } } fe-1/2/2 { unit 0 { family inet { address 10.12.0.1/30; } } } lo0 { unit 0 { family inet { address 10.255.71.24/32; } } }
user@R1# show policy-options policy-statement agg_route { term 1 { from { protocol bgp; route-filter 10.1.230.0/23 exact; } then { next-hop 10.1.10.10; accept; } } }
user@R1# show protocols bgp { accept-remote-nexthop; group ext { type external; import agg_route; peer-as 65500; multipath; neighbor 10.1.0.1; neighbor 10.1.1.1; } group int { type internal; local-address 10.255.71.24; neighbor 10.255.14.177; } } ospf { area 0.0.0.0 { interface fe-1/2/1.0; interface 10.255.71.24; } }
user@R1# show routing-options autonomous-system 65000;
If you are done configuring the device, enter commit
from
configuration mode.
Configuring Device R2
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device R2:
-
Configure the interfaces.
[edit interfaces fe-1/2/0 unit 0] user@R2# set family inet address 10.12.0.2/30 [edit interfaces lo0 unit 0] user@R2# set family inet address 10.255.14.177/32
-
Configure OSPF.
[edit protocols ospf area 0.0.0.0] user@R2# set interface fe-1/2/0.0 user@R2# set interface 10.255.14.177
-
Configure IBGP.
[edit protocols bgp group int] user@R2# set type internal user@R2# set local-address 10.255.14.177 user@R2# set neighbor 10.255.71.24
-
Configure the autonomous system (AS) number.
[edit routing-options] user@R1# set autonomous-system 65000
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show protocols
, and
show routing-options
commands. If the output does not
display the intended configuration, repeat the instructions in this example
to correct the configuration.
user@R2# show interfaces fe-1/2/0 { unit 0 { family inet { address 10.12.0.2/30; } } } lo0 { unit 0 { family inet { address 10.255.14.177/32; } } }
user@R2# show protocols bgp { group int { type internal; local-address 10.255.14.177; neighbor 10.255.71.24; } } ospf { area 0.0.0.0 { interface fe-1/2/0.0; interface 10.255.14.177; } }
user@R2# show routing-options autonomous-system 65000;
If you are done configuring the device, enter commit
from
configuration mode.
Verification
Confirm that the configuration is working properly.
- Verifying That the Multipath Route with the Indirect Next Hop Is in the Routing Table
- Deactivating and Reactivating the accept-remote-nexthop Statement
Verifying That the Multipath Route with the Indirect Next Hop Is in the Routing Table
Purpose
Verify that Device R1 has a route to the 10.1.230.0/23 network.
Action
From operational mode, enter the show route
10.1.230.0
extensive
command.
user@R1> show route 10.1.230.0 extensive inet.0: 11 destinations, 13 routes (11 active, 0 holddown, 0 hidden) Restart Complete 10.1.230.0/23 (2 entries, 1 announced) TSI: KRT in-kernel 10.1.230.0/23 -> {indirect(262142)} Page 0 idx 1 Type 1 val 9168f6c Nexthop: 10.1.10.10 Localpref: 100 AS path: [65000] 65500 I Communities: Path 10.1.230.0 from 10.1.0.1 Vector len 4. Val: 1 *BGP Preference: 170/-101 Next hop type: Indirect Address: 0x90c44d8 Next-hop reference count: 4 Source: 10.1.0.1 Next hop type: Router, Next hop index: 262143 Next hop: 10.1.0.1 via fe-1/2/0.0, selected Next hop: 10.1.1.1 via fe-1/2/2.0 Protocol next hop: 10.1.10.10 Indirect next hop: 91c0000 262142 State: <Active Ext> Local AS: 65000 Peer AS: 65500 Age: 2:55:31 Metric2: 0 Task: BGP_65500.10.1.0.1+64631 Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 1 AS path: 65500 I Accepted Multipath Localpref: 100 Router ID: 10.255.14.179 Indirect next hops: 1 Protocol next hop: 10.1.10.10 Indirect next hop: 91c0000 262142 Indirect path forwarding next hops: 2 Next hop type: Router Next hop: 10.1.0.1 via fe-1/2/0.0 Next hop: 10.1.1.1 via fe-1/2/2.0 10.1.10.10/32 Originating RIB: inet.0 Node path count: 1 Forwarding nexthops: 2 Nexthop: 10.1.0.1 via fe-1/2/0.0 Nexthop: 10.1.1.1 via fe-1/2/2.0 BGP Preference: 170/-101 Next hop type: Indirect Address: 0x90c44d8 Next-hop reference count: 4 Source: 10.1.1.1 Next hop type: Router, Next hop index: 262143 Next hop: 10.1.0.1 via fe-1/2/0.0, selected Next hop: 10.1.1.1 via fe-1/2/2.0 Protocol next hop: 10.1.10.10 Indirect next hop: 91c0000 262142 State: <NotBest Ext> Inactive reason: Not Best in its group - Update source Local AS: 65000 Peer AS: 65500 Age: 2:55:27 Metric2: 0 Task: BGP_65500.10.1.1.1+53260 AS path: 65500 I Accepted Localpref: 100 Router ID: 10.255.14.179 Indirect next hops: 1 Protocol next hop: 10.1.10.10 Indirect next hop: 91c0000 262142 Indirect path forwarding next hops: 2 Next hop type: Router Next hop: 10.1.0.1 via fe-1/2/0.0 Next hop: 10.1.1.1 via fe-1/2/2.0 10.1.10.10/32 Originating RIB: inet.0 Node path count: 1 Forwarding nexthops: 2 Nexthop: 10.1.0.1 via fe-1/2/0.0 Nexthop: 10.1.1.1 via fe-1/2/2.0
Meaning
The output shows that Device R1 has a route to the
10.1.230.0
network with the multipath feature enabled (Accepted
Multipath
). The output also shows that the route has an
indirect next hop of
10.1.10.10.
Deactivating and Reactivating the accept-remote-nexthop Statement
Purpose
Make sure that the multipath route with the indirect next hop is removed from
the routing table when you deactivate the
accept-remote-nexthop
statement.
Action
-
From configuration mode, enter the
deactivate protocols bgp accept-remote-nexthop
command.user@R1# deactivate protocols bgp accept-remote-nexthop user@R1# commit
-
From operational mode, enter the
show route 10.1.230.0
command.user@R1> show route 10.1.230.0
-
From configuration mode, reactivate the statement by entering the
activate protocols bgp accept-remote-nexthop
command.user@R1# activate protocols bgp accept-remote-nexthop user@R1# commit
-
From operational mode, reenter the
show route 10.1.230.0
command.user@R1> show route 10.1.230.0 inet.0: 11 destinations, 13 routes (11 active, 0 holddown, 0 hidden) Restart Complete + = Active Route, - = Last Active, * = Both 10.1.230.0/23 *[BGP/170] 03:13:19, localpref 100 AS path: 65500 I > to 10.1.0.1 via fe-1/2/0.0 to 10.1.1.1 via fe-1/2/2.0 [BGP/170] 03:13:15, localpref 100, from 10.1.1.1 AS path: 65500 I > to 10.1.0.1 via fe-1/2/0.0 to 10.1.1.1 via fe-1/2/2.0
Meaning
When the accept-remote-nexthop
statement is deactivated, the
multipath route to the
10.1.230.0
network is removed from the routing table .
Understanding Load Balancing for BGP Traffic with Unequal Bandwidth Allocated to the Paths
The multipath option removes the tiebreakers from the active route decision process, thereby allowing otherwise equal cost BGP routes learned from multiple sources to be installed into the forwarding table. However, when the available paths are not equal cost, you may wish to load balance the traffic asymmetrically.
Once multiple next hops are installed in the forwarding table, a specific forwarding next hop is selected by the Junos OS per-prefix load-balancing algorithm. This process hashes against a packet’s source and destination addresses to deterministically map the prefix pairing onto one of the available next hops. Per-prefix mapping works best when the hash function is presented with a large number of prefixes, such as might occur on an Internet peering exchange, and it serves to prevent packet reordering among pairs of communicating nodes.
An enterprise network normally wants to alter the default behavior to evoke a per-packet load-balancing algorithm. Per-packet is emphasized here because its use is a misnomer that stems from the historic behavior of the original Internet Processor ASIC. In reality, current Juniper Networks routers support per-prefix (default) and per-flow load balancing. The latter involves hashing against various Layer 3 and Layer 4 headers, including portions of the source address, destination address, transport protocol, incoming interface, and application ports. The effect is that now individual flows are hashed to a specific next hop, resulting in a more even distribution across available next hops, especially when routing between fewer source and destination pairs.
With per-packet load balancing, packets comprising a communication stream between two endpoints might be resequenced, but packets within individual flows maintain correct sequencing. Whether you opt for per-prefix or per-packet load balancing, asymmetry of access links can present a technical challenge. Either way, the prefixes or flows that are mapped to, for example, a T1 link will exhibit degraded performance when compared to those flows that map to, for example, a Fast Ethernet access link. Worse yet, with heavy traffic loads, any attempt at equal load balancing is likely to result in total saturation of the T1 link and session disruption stemming from packet loss.
Fortunately, the Juniper Networks BGP implementation supports the notion of a bandwidth community. This extended community encodes the bandwidth of a given next hop, and when combined with multipath, the load-balancing algorithm distributes flows across the set of next hops proportional to their relative bandwidths. Put another way, if you have a 10-Mbps and a 1-Mbps next hop, on average nine flows will map to the high-speed next hop for every one that uses the low speed.
Use of BGP bandwidth community is supported only with per-packet load balancing.
The configuration task has two parts:
Configure the external BGP (EBGP) peering sessions, enable multipath, and define an import policy to tag routes with a bandwidth community that reflects link speed.
Enable per-packet (really per-flow) load balancing for optimal distribution of traffic.
See Also
Example: Load Balancing BGP Traffic with Unequal Bandwidth Allocated to the Paths
This example shows how to configure BGP to select multiple unequal-cost paths as active paths.
BGP communities can help you control routing policy. An example of a good use for BGP communities is unequal load balancing. When an autonomous system border router (ASBR) receives routes from directly connected external BGP (EBGP) neighbors, the ASBR then advertises those routes to internal neighbors, using IBGP advertisements. In the IBGP adverisements, you can attach the link-bandwidth community to communicate the bandwidth of the advertised external link. This is useful when multiple external links are available, and you want to do unequal load balancing over the links. You configure the link-bandwidth extended community on all ingress links of the AS. The bandwidth information in the link-bandwidth extended community is based on the configured bandwidth of the EBGP link. It is not based on the amount of traffic on the link. Junos OS supports BGP link-bandwidth and multipath load balancing, as described in Internet draft draft-ietf-idr-link-bandwidth-06, BGP Link Bandwidth Extended Community. Note that even though draft-ietf-idr-link-bandwidth-06 specifies non-transitive communities, the Junos OS implementation is limited to transitive communities.
Requirements
Before you begin:
Configure the device interfaces.
Configure an interior gateway protocol (IGP).
Configure BGP.
Configure a routing policy that exports routes (such as direct routes or IGP routes) from the routing table into BGP.
Overview
In this example, Device R1 is in AS 64500 and is connected to both Device R2 and Device R3, which are in AS 64501.
The example uses the bandwidth extended community.
By default, when BGP multipath is used, traffic is distributed equally among the several paths calculated. The bandwidth extended community allows an additional attribute to be added to BGP paths, thus allowing the traffic to be distributed unequally. The primary application is a scenario where multiple external paths exist for a given network with asymmetric bandwidth capabilities. In such a scenario, you can tag routes received with the bandwidth extended community. When BGP multipath (internal or external) operates among routes that contain the bandwidth attribute, the forwarding engine can unequally distribute traffic according to the bandwidth corresponding to each path.
When BGP has several candidate paths available for multipath purposes, BGP does not perform unequal cost load balancing according to the bandwidth community unless all candidate paths have this attribute.
The applicability of the bandwidth extended community is limited by the restrictions under which BGP multipath accepts multiple paths for consideration. Explicitly, the IGP distance, as far as BGP is concerned, between the router performing load balancing and the multiple exit points needs to be the same. This can be achieved by using a full mesh of label-switched paths (LSPs) that do not track the corresponding IGP metric. However, in a network in which the propagation delay of circuits is significant (for example, if long-haul circuits are present), it is often valuable to take into account the delay characteristics of different paths.
Configure the bandwidth community as follows:
[edit policy-options] user@host# set community members bandwidth:[1-65535]:[0-4294967295]
The first 16-bit number represents the local autonomous system. The second 32-bit number represents the link bandwidth in bytes per second.
For example:
[edit policy-options] user@host# show community bw-t1 members bandwidth:10458:193000; community bw-t3 members bandwidth:10458:5592000; community bw-oc3 members bandwidth:10458:19440000;
Where 10458 is the local AS number. The values correspond to the bandwidth of the T1, T3, and OC-3 paths in bytes per second. The value specified as the bandwidth value does not need to correspond to the actual bandwidth of a specific interface. The balance factors used are calculated as a function of the total bandwidth specified. To tag a route with this extended community, define a policy statement, as follows:
[edit policy-options] user@host# show policy-statement link-bw-t1 { then { community set bw-t1; } accept; }
Apply this as an import policy on the BGP peering sessions facing the asymmetrical bandwidth links. Although in theory the community attribute can be added or removed at any point in the network, in the scenario described above, applying the community as an import policy in the EBGP peering session facing the external link allows for that attribute to influence the local multipath decision, and is potentially easier to manage.
Topology
Figure 3 shows the topology used in this example.
CLI Quick Configuration shows the configuration for all of the devices in Figure 3. The section#d29e113__d29e376 describes the steps on Device R1.
Configuration
Procedure
CLI Quick Configuration
To quickly configure
this example, copy the following commands, paste them into a text
file, remove any line breaks, change any details necessary to match
your network configuration, and then copy and paste the commands into
the CLI at the [edit]
hierarchy level.
Device R1
set interfaces ge-1/2/0 unit 0 description R1->R3 set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-1/2/1 unit 0 description R1->R2 set interfaces ge-1/2/1 unit 0 family inet address 10.0.1.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set protocols bgp group external type external set protocols bgp group external import bw-dis set protocols bgp group external peer-as 64501 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set policy-options policy-statement bw-dis term a from protocol bgp set policy-options policy-statement bw-dis term a from neighbor 10.0.1.1 set policy-options policy-statement bw-dis term a then community add bw-high set policy-options policy-statement bw-dis term a then accept set policy-options policy-statement bw-dis term b from protocol bgp set policy-options policy-statement bw-dis term b from neighbor 10.0.0.2 set policy-options policy-statement bw-dis term b then community add bw-low set policy-options policy-statement bw-dis term b then accept set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set policy-options community bw-high members bandwidth:65000:60000000 set policy-options community bw-low members bandwidth:65000:40000000 set routing-options autonomous-system 64500 set routing-options forwarding-table export loadbal
Device R2
set interfaces ge-1/2/0 unit 0 description R2->R1 set interfaces ge-1/2/0 unit 0 family inet address 10.0.1.1/30 set interfaces ge-1/2/1 unit 0 description R2->R3 set interfaces ge-1/2/1 unit 0 family inet address 10.0.2.2/30 set interfaces ge-1/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0002.00 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 64500 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.2 set protocols isis interface ge-1/2/1.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 64501
Device R3
set interfaces ge-1/2/0 unit 0 description R3->R2 set interfaces ge-1/2/0 unit 0 family inet address 10.0.2.1/30 set interfaces ge-1/2/0 unit 0 family iso set interfaces ge-1/2/1 unit 0 description R3->R1 set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0003.00 set protocols bgp group external type external set protocols bgp group external export send-direct set protocols bgp group external export bgp-default set protocols bgp group external peer-as 64500 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.0.1 set protocols isis interface ge-1/2/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 64501
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure the BGP peer sessions:
Configure the interfaces.
user@R1# set ge-1/2/0 unit 0 description R1->R3 user@R1# set ge-1/2/0 unit 0 family inet address 10.0.0.1/30 user@R1# set ge-1/2/1 unit 0 description R1->R2 user@R1# set ge-1/2/1 unit 0 family inet address 10.0.1.2/30 user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
Configure the BGP group.
[edit protocols bgp group external] user@R1# set type external user@R1# set import bw-dis user@R1# set peer-as 64501 user@R1# set neighbor 10.0.1.1 user@R1# set neighbor 10.0.0.2
Enable the BGP group to use multiple paths.
Note:To disable the default check requiring that paths accepted by BGP multipath must have the same neighboring autonomous system (AS), include the
multiple-as
option. Use themultiple-as
option if the neighbors are in different ASs.[edit protocols bgp group external] user@R1# set multipath
Configure the load-balancing policy.
[edit policy-options policy-statement loadbal] user@R1# set from route-filter 10.0.0.0/16 orlonger user@R1# set then load-balance per-packet
Apply the load-balancing policy.
[edit routing-options] user@R1# set forwarding-table export loadbal
Configure the BGP community members.
This example assumes a bandwidth of 1 Gbps and allocates 60 percent to bw-high and 40 percent to bw-low. The reference bandwidth does not need to be the same as the link bandwidth.
[edit policy-options] user@R1# set community bw-high members bandwidth:65000:60000000 user@R1# set community bw-low members bandwidth:65000:40000000
Configure the bandwidth distribution policy.
[edit policy-options bw-dis] user@R1# set term a from protocol bgp user@R1# set term a from neighbor 10.0.1.1 user@R1# set term a then community add bw-high user@R1# set term a then accept user@R1# set term b from protocol bgp user@R1# set term b from neighbor 10.0.0.2 user@R1# set term b then community add bw-low user@R1# set term b then accept
Configure the local autonomous system (AS) number.
[edit routing-options] user@R1# set autonomous-system 64500
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R1# show interfaces
ge-1/2/0 {
unit 0 {
description R1->R3;
family inet {
address 10.0.0.1/30;
}
}
}
ge-1/2/1 {
unit 0 {
description R1->R2;
family inet {
address 10.0.1.2/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
}
}
user@R1# show protocols
bgp {
group external {
type external;
import bw-dis;
peer-as 64501;
multipath;
neighbor 10.0.1.1;
neighbor 10.0.0.2;
}
}
user@R1# show policy-options
policy-statement bw-dis {
term a {
from {
protocol bgp;
neighbor 10.0.1.1;
}
then {
community add bw-high;
accept;
}
}
term b {
from {
protocol bgp;
neighbor 10.0.0.2;
}
then {
community add bw-low;
accept;
}
}
}
policy-statement loadbal {
from {
route-filter 10.0.0.0/16 orlonger;
}
then {
load-balance per-packet;
}
}
community bw-high members bandwidth:65000:60000000;
community bw-low members bandwidth:65000:40000000;
user@R1# show routing-options
autonomous-system 64500;
forwarding-table {
export loadbal;
}
If you are done configuring the device, enter commit
from configuration mode.
Verification
Confirm that the configuration is working properly:
Verifying Routes
Purpose
Verify that both routes are selected and that the next hops on the routes show a 60%/40% balance.
Action
From operational mode, run the show route protocol
bgp detail
command.
user@R1> show route 172.16/16 protocol bgp detail inet.0: 9 destinations, 13 routes (9 active, 0 holddown, 0 hidden) 172.16.0.0/16 (2 entries, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 262143 Address: 0x93fc078 Next-hop reference count: 3 Source: 10.0.0.2 Next hop: 10.0.0.2 via ge-1/2/0.0 balance 40% Next hop: 10.0.1.1 via ge-1/2/1.0 balance 60%, selected State: **Active Ext> Local AS: 64500 Peer AS: 64501 Age: 3:22:55 Task: BGP_64501.10.0.0.2+55344 Announcement bits (1): 0-KRT AS path: 64501 I Communities: bandwidth:65000:40000000 Accepted Multipath Localpref: 100 Router ID: 192.168.0.3 BGP Preference: 170/-101 Next hop type: Router, Next hop index: 658 Address: 0x9260520 Next-hop reference count: 4 Source: 10.0.1.1 Next hop: 10.0.1.1 via ge-1/2/1.0, selected State: <NotBest Ext> Inactive reason: Not Best in its group - Active preferred Local AS: 64500 Peer AS: 64501 Age: 3:22:55 Task: BGP_65001.10.0.1.1+62586 AS path: 64501 I Communities: bandwidth:65000:60000000 Accepted MultipathContrib Localpref: 100 Router ID: 192.168.0.2
user@R1> show route 10.0.2.0 protocol bgp detail inet.0: 9 destinations, 13 routes (9 active, 0 holddown, 0 hidden) 10.0.2.0/30 (2 entries, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 262143 Address: 0x93fc078 Next-hop reference count: 3 Source: 10.0.1.1 Next hop: 10.0.0.2 via ge-1/2/0.0 balance 40% Next hop: 10.0.1.1 via ge-1/2/1.0 balance 60%, selected State: <Active Ext> Local AS: 64500 Peer AS: 64501 Age: 3:36:37 Task: BGP_65001.10.0.1.1+62586 Announcement bits (1): 0-KRT AS path: 64501 I Communities: bandwidth:65000:60000000 Accepted Multipath Localpref: 100 Router ID: 192.168.0.2 BGP Preference: 170/-101 Next hop type: Router, Next hop index: 657 Address: 0x92604d8 Next-hop reference count: 4 Source: 10.0.0.2 Next hop: 10.0.0.2 via ge-1/2/0.0, selected State: <NotBest Ext> Inactive reason: Not Best in its group - Active preferred Local AS: 64500 Peer AS: 65001 Age: 3:36:36 Task: BGP_65001.10.0.0.2+55344 AS path: 64501 I Communities: bandwidth:65000:40000000 Accepted MultipathContrib Localpref: 100 Router ID: 192.168.0.3
Meaning
The active path, denoted with an asterisk (*), has two next hops: 10.0.1.1 and 10.0.0.2 to the 172.16/16 destination.
Likewise, the active path, denoted with an asterisk (*), has two next hops: 10.0.1.1 and 10.0.0.2 to the 10.0.2.0 destination.
In both cases, the 10.0.1.1 next hop is copied from the inactive path to the active path.
The balance of 40 percent and 60 percent is shown in the show route
output. This indicates that traffic is being distributed
between two next hops and that 60 percent of the traffic is following
the first path, while 40 percent is following the second path.
Advertising Aggregate Bandwidth Across External BGP Links for Load Balancing Overview
A BGP peer that receives multiple paths from its internal peers load balances traffic among these paths. In earlier Junos OS releases, a BGP speaker receiving multiple paths from its internal peers advertised only the link bandwidth associated with the active route. BGP uses the link bandwidth extended community, to advertise the aggregated bandwidth of multiple routes across external links. BGP calculates the aggregate bandwidth of multipaths that have unequal bandwidth allocation and advertises the aggregated bandwidth to external BGP peers. A threshold to the aggregate bandwidth can be configured to restrict the bandwidth usage of a BGP group. Both IPv4 and IPv6 routes including anycast addresses support aggregate bandwidth.
To advertise aggregate bandwidth of multipath routes and to
set a maximum threshold, configure a policy with aggregate-bandwidth
and limit-bandwidth
actions at the [edit policy-options
policy-statement name then] hierarchy level.
In Figure 4, autonomous system 1 (AS1) aggregates the bandwidth of its 3 multipath routes to a remote prefix and advertises it to autonomous system 4 (AS4) with a bandwidth of 30 using the link bandwidth extended community. In case of a link failure between AS3 and AS4, AS4 subtracts 60 from the bandwidth it advertises to AS6 and modifies the bandwidth it was advertising from 130 to 70.
When a BGP peer propagates multipath routes configured with an aggregate bandwidth community, a new link bandwidth community is added with the sum of the bandwidth from the incoming bandwidth communities or that prefix. The available link bandwidth is dynamically derived from interface speed. The link bandwidth is sent as a transitive extended community. However, If the device receives the link bandwidth as a non-transitive link bandwidth extended community, Junos OS ignores this community but propagates it along with the transitive link bandwidth extended community. If the link-bandwidth community is not received for each one of the incoming multipath routes then a link bandwidth community is not advertised to its external peers.
When one of the multipath links fails, BGP readvertises the route with the bandwidth of the failed link subtracted from the outgoing link bandwidth community. If the aggregate link bandwidth is found to exceed the configured limit, the advertised aggregate bandwidth is truncated to the configured link bandwidth limit between the two peers.
See Also
Example: Configuring a Policy to Advertise Aggregate Bandwidth Across External BGP Links for Load Balancing
This example shows how to configure a policy to advertise aggregate bandwidth across External BGP links for load balancing and to specify a threshold for the configured aggregate bandwidth. BGP adds up the available link bandwidth of multipaths and calculates the aggregated bandwidth. In case of a link failure, the aggregated bandwidth is adjusted to reflect the current status of the available bandwidth.
Requirements
This example uses the following hardware and software components:
Four routers with load balancing capability
Junos OS Release 17.4 or later running on all the devices
Overview
Starting in Junos OS Release 17.4R1, a BGP speaker that receives
multiple paths from its internal peers load balances traffic among
these paths. In earlier Junos OS releases, a BGP speaker receiving
multiple paths from its internal peers advertised only the link bandwidth
associated with the active route. BGP uses a new link bandwidth extended
community with the aggregated bandwidth to tag multipaths and advertises
the aggregated bandwidth for these multiple routes across its DMZ
link. To advertise aggregated multiple routes, configure a policy
with aggregate-bandwidth
and limit bandwidth
actions at the [edit policy-options policy-statement name then] hierarchy level.
Topology
In Figure 5, Router R1 load balances traffic to a remote destination through next-hop 10.0.1.1 in Router R2 at 60,000,000 bytes per second and through 10.0.0.2 in Router R3 at 40,000,000 bytes per second. Router R1 advertises destination 10.0.2.0 to Router R4. Router R1 calculates the aggregate of the available bandwidth, which is 10000000 bytes per second. However, a policy configured on Router R1 sets the threshold for the aggregate bandwidth to 80,000,000 bytes per second. Therefore, R1 advertises 80,000,000 bytes per second instead of the 10,000,000 bytes per second.
If one of the multipath links goes down, then the bandwidth of the failed link is not added to the aggregate bandwidth that is advertised to BGP neighbors.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit
from configuration
mode.
Router R1
set interfaces ge-0/0/0 unit 0 description R1->R3 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-0/0/1 unit 0 description R1->R2 set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.2/30 set interfaces ge-0/0/2 unit 0 description R1->R4 set interfaces ge-0/0/2 unit 0 family inet address 10.0.4.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set routing-options autonomous-system 65000 set protocols bgp group external type external set protocols bgp group external import bw-dis set protocols bgp group external peer-as 65001 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.1 set protocols bgp group external neighbor 10.0.0.2 set protocols bgp group external2 type external set protocols bgp group external2 peer-as 65002 set policy-options policy-statement bw-dis term a from protocol bgp set policy-options policy-statement bw-dis term a from neighbor 10.0.1.1 set policy-options policy-statement bw-dis term a then community add bw-high set policy-options policy-statement bw-dis term a then accept set policy-options policy-statement bw-dis term b from protocol bgp set policy-options policy-statement bw-dis term b from neighbor 10.0.0.2 set policy-options policy-statement bw-dis term b then community add bw-low set policy-options policy-statement bw-dis term b then accept set policy-options policy-statement aggregate_bw_and_limit_capacity then aggregate-bandwidth set policy-options policy-statement aggregate_bw_and_limit_capacity then limit-bandwidth 80000000 set policy-options policy-statement aggregate_bw_and_limit_capacity then accept set protocols bgp group external2 neighbor 10.0.4.2 export aggregate_bw_and_limit_capacity set policy-options policy-statement loadbal from route-filter 10.0.0.0/16 orlonger set policy-options policy-statement loadbal then load-balance per-packet set routing-options forwarding-table export loadbal set policy-options community bw-high members bandwidth:65000:60000000 set policy-options community bw-low members bandwidth:65000:40000000
Router R2
set interfaces ge-0/0/0 unit 0 description R2->R3 set interfaces ge-0/0/0 unit 0 family inet address 10.0.2.2/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description R2->R1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.1/30 set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0002.00 set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 65001 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 65000 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.1.2 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept
Router R3
set interfaces ge-0/0/0 description R3->R2 set interfaces ge-0/0/0 unit 0 family inet address 10.0.2.1/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description R3->R1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0003.00 set routing-options static route 172.16.0.0/16 discard set routing-options static route 172.16.0.0/16 no-install set routing-options autonomous-system 65001 set protocols bgp group external type external set protocols bgp group external export bgp-default set protocols bgp group external export send-direct set protocols bgp group external peer-as 65000 set protocols bgp group external multipath set protocols bgp group external neighbor 10.0.0.1 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0 set policy-options policy-statement bgp-default from protocol static set policy-options policy-statement bgp-default from route-filter 172.16.0.0/16 exact set policy-options policy-statement bgp-default then accept set policy-options policy-statement send-direct term 1 from protocol direct set policy-options policy-statement send-direct term 1 then accept
Router R4
set interfaces ge-0/0/0 unit 0 description R4->R1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.4.2/30 set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set routing-options autonomous-system 65002 set protocols bgp group external type external set protocols bgp group external peer-as 65000 set protocols bgp group external neighbor 10.0.4.1
Configuring Routers, Starting with R1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure a policy to advertise an aggregated bandwidth to BGP peers (starting with Router R1):
Repeat this procedure on routers R2, R3, and R4 after modifying the appropriate interface names, addresses, and other parameters.
Configure the interfaces with IPv4 addresses.
[edit interfaces] user@R1# set ge-0/0/0 unit 0 description R1->R3 user@R1# set ge-0/0/0 unit 0 family inet address 10.0.0.1/30 user@R1# set ge-0/0/1 unit 0 description R1->R2 user@R1# set ge-0/0/1 unit 0 family inet address 10.0.1.2/30 user@R1# set ge-0/0/2 unit 0 description R1->R4 user@R1# set ge-0/0/2 unit 0 family inet address 10.0.4.1/30
Configure the loopback address.
[edit interfaces] user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
Configure the autonomous system for BGP hosts.
[edit routing-options] user@R1# set autonomous-system 65000
Configure EBGP on the external edge routers.
[edit protocols] user@R1# set bgp group external type external user@R1# set bgp group external import bw-dis user@R1# set bgp group external peer-as 65001 user@R1# set bgp group external multipath user@R1# set bgp group external neighbor 10.0.1.1 user@R1# set bgp group external neighbor 10.0.0.2 user@R1# set bgp group external2 type external user@R1# set bgp group external2 peer-as 65002
Define a bandwidth distribution policy to assign a high bandwidth community to traffic destined to Router R3.
[edit policy-options] user@R1# set policy-statement bw-dis term a from protocol bgp user@R1# set policy-statement bw-dis term a from neighbor 10.0.1.1 user@R1# set policy-statement bw-dis term a then community add bw-high user@R1# set policy-statement bw-dis term a then accept
Define a bandwidth distribution policy to assign a low bandwidth community to traffic destined to Router R2.
[edit policy-options] user@R1# set policy-statement bw-dis term b from protocol bgp user@R1# set policy-statement bw-dis term b from neighbor 10.0.0.2 user@R1# set policy-statement bw-dis term b then community add bw-low user@R1# set policy-statement bw-dis term b then accept
Enable the feature to advertise aggregated bandwidth of 80,000,000 bytes to EBGP peer Router R4 over BGP sessions.
[edit policy-options] user@R1# set policy-statement aggregate_bw_and_limit_capacity then aggregate-bandwidth user@R1# set policy-statement aggregate_bw_and_limit_capacity then limit-bandwidth 80000000 user@R1# set policy-statement aggregate_bw_and_limit_capacity then accept
Apply the aggregate_bw_and limit_capacity policy to EBGP group
external2
.[edit protocols] user@R1# set bgp group external2 neighbor 10.0.4.2 export aggregate_bw_and_limit_capacity
Define a load balancing policy.
[edit policy-options] user@R1# set policy-statement loadbal from route-filter 10.0.0.0/16 orlonger user@R1# set policy-statement loadbal then load-balance per-packet
Apply the load balancing policy.
[edit routing-options] user@R1# set forwarding-table export loadbal
Configure the BGP community members. The first 16-bit number represents the local autonomous system. The second 32-bit number represents the link bandwidth in bytes per second. Configure a
bw-high
community with 60 percent of a 1-Gbps link and another communitybw-low
with 40 percent of a 1-Gbps link.Configure 60 percent of a 1-Gbps link to bw-high community and 40 percent to bw-low community.
[edit policy-options] user@R1# set community bw-high members bandwidth:65000:60000000 user@R1# set community bw-low members bandwidth:65000:40000000
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show routing-options, and show policy-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
[edit] user@R1# show interfaces interfaces { ge-0/0/0 { unit 0 { description R1->R3; family inet { address 10.0.0.1/30; } } } ge-0/0/1 { unit 0 { description R1->R2; family inet { address 10.0.1.2/30; } } } ge-0/0/2 { unit 0 { description R1->R4; family inet { address 10.0.4.1/30; } } } lo0 { unit 0 { family inet { address 192.168.0.1/32; } } } }
[edit] user@R1# show protocols protocols { bgp { group external { type external; import bw-dis; peer-as 65001; multipath; neighbor 10.0.1.1; neighbor 10.0.0.2; } group external2 { type external; peer-as 65002; neighbor 10.0.4.2 { export aggregate_bw_and_limit_capacity; } } } }
[edit] user@R1# show routing-options routing-options { autonomous-system 65000; forwarding-table { export loadbal; } }
[edit] user@R1# show policy-options policy-options { policy-statement bw-dis { term a { from { protocol bgp; neighbor 10.0.1.1; } then { community add bw-high; accept; } } term b { from { protocol bgp; neighbor 10.0.0.2; } then { community add bw-low; accept; } } } policy-statement aggregate_bw_and_limit_capacity { then { aggregate-bandwidth; limit-bandwidth 80000000; accept; } } policy-statement loadbal { from { route-filter 10.0.0.0/16 orlonger; } then { load-balance per-packet; } } community bw-high members bandwidth:65000:60000000; community bw-low members bandwidth:65000:40000000; }
Verification
- Verifying BGP Session Is Established
- Verifying That the Aggregate Bandwidth Is Present in Each Path
- Verifying That Router R1 Is Advertising the Aggregate Bandwidth to Its Neighbor Router R4
Verifying BGP Session Is Established
Purpose
To verify that BGP peering is complete and a BGP session is established between the routers,
Action
user@R1> show bgp summary Groups: 2 Peers: 3 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 12 8 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 10.0.0.2 65001 153 149 0 0 1:07:23 4/6/6/0 0/0/0/0 10.0.1.1 65001 229 226 0 0 1:41:44 4/6/6/0 0/0/0/0 10.0.4.2 65002 1227 1227 0 0 9:10:27 0/0/0/0 0/0/0/0
Meaning
Router R1 has completed peering with Routers R2, R3, and R4.
Verifying That the Aggregate Bandwidth Is Present in Each Path
Purpose
To verify that the extended community is present for each route path.
Action
From operational mode, run the show route protocol bgp
detail
command.
user@R1> show route 10.0.2.0 protocol bgp detail inet.0: 20 destinations, 26 routes (20 active, 0 holddown, 0 hidden) 10.0.2.0/30 (2 entries, 1 announced) *BGP Preference: 170/-101 Next hop type: Router, Next hop index: 0 Address: 0xb618990 Next-hop reference count: 3 Source: 10.0.1.1 Next hop: 10.0.0.2 via ge-0/0/0.0 balance 40% Session Id: 0x0 Next hop: 10.0.1.1 via ge-0/0/1.0 balance 60%, selected Session Id: 0x0 State: <Active Ext> Local AS: 65000 Peer AS: 65001 Age: 20:33 Validation State: unverified Task: BGP_65001.10.0.1.1 Announcement bits (3): 0-KRT 2-BGP_Listen.0.0.0.0+179 3-BGP_RT_Background AS path: 65001 I Communities: bandwidth:65000:60000000 Accepted Multipath Localpref: 100 Router ID: 128.49.121.137 BGP Preference: 170/-101 Next hop type: Router, Next hop index: 595 Address: 0xb7a1330 Next-hop reference count: 9 Source: 10.0.0.2 Next hop: 10.0.0.2 via ge-0/0/0.0, selected Session Id: 0x141 State: <NotBest Ext> Inactive reason: Not Best in its group - Active preferred Local AS: 65000 Peer AS: 65001 Age: 20:33 Validation State: unverified Task: BGP_65001.10.0.0.2 AS path: 65001 I Communities: bandwidth:65000:40000000 Accepted MultipathContrib Localpref: 100 Router ID: 128.49.121.132
Meaning
Verifying That Router R1 Is Advertising the Aggregate Bandwidth to Its Neighbor Router R4
Purpose
To verify that Router R1 is advertising the aggregate bandwidth to its external neighbors.
Action
user@R1> show route advertising-protocol bgp 10.0.4.2 10.0.2.0/30 detail inet.0: 20 destinations, 26 routes (20 active, 0 holddown, 0 hidden) * 10.0.2.0/30 (2 entries, 1 announced) BGP group external2 type External Nexthop: Self AS path: [65000] 65001 I Communities: bandwidth:65000:80000000
Meaning
Router R1 is advertising the aggregated bandwidth of 80,000,000 bytes to its neighbors.
Understanding the Advertisement of Multiple Paths to a Single Destination in BGP
BGP peers advertise routes to each other in update messages.
BGP stores its routes in the Junos OS routing table (inet.0
). For each prefix in the routing table, the routing protocol process
selects a single best path, called the active path. Unless you configure
BGP to advertise multiple paths to the same destination, BGP advertises
only the active path.
Instead of advertising only the active path to a destination, you can configure BGP to advertise multiple paths to the destination. Within an autonomous system (AS), the availability of multiple exit points to reach a destination provides the following benefits:
Fault tolerance—Path diversity leads to reduction in restoration time after failure. For instance, a border after receiving multiple paths to the same destination can precompute a backup path and have it ready so that when the primary path becomes invalid, the border routing device can use the backup to quickly restore connectivity. Without a backup path, the restoration time depends on BGP reconvergence, which includes withdraw and advertisement messages in the network before a new best path can be learned.
Load balancing—The availability of multiple paths to reach the same destination enables load balancing of traffic, if the routing within the AS meets certain constraints.
Maintenance—The availability of alternate exit points allows for graceful maintenance operation of routers.
The following limitations apply to advertising multiple routes in BGP:
-
Address families supported:
-
IPv4 unicast (
family inet unicast
) -
IPv6 unicast (
family inet6 unicast
) -
IPv4 labeled unicast (
family inet labeled-unicast
) -
IPv6 labeled unicast (
family inet6 labeled-unicast
) -
IPv4 VPN unicast (
family inet-vpn unicast
) -
IPv6 VPN unicast (
family inet6-vpn unicast
)
The following example shows the configuration of IPv4 VPN unicast and IPv6 VPN unicast families:
bgp { group <group-name> { family inet-vpn unicast { add-path { send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } receive; } family inet6-vpn unicast { add-path { send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } receive; } } }
-
-
We support
add-path
for internal BGP (IBGP) and external BGP (EBGP) peers.Note:-
We support add-path receive for IBGP and EBGP peers.
-
We support add-path send only for IBGP peers.
-
We do not support add-path send for EBGP peers. When you try to commit the configuration for add-path send for EBGP peers, the CLI throws a commit error.
-
-
Master instance only. No support for routing instances.
-
Graceful restart and nonstop active routing (NSR) are supported.
-
No BGP Monitoring Protocol (BMP) support.
-
Prefix policies enable you to filter routes on a router that is configured to advertise multiple paths to a destination. Prefix policies can only match prefixes. They cannot match route attributes, and they cannot change the attributes of routes.
Starting in Junos OS Release 18.4R1, BGP can advertise a maximum of 2 add-path routes in addition to the multiple ECMP paths.
To advertise all add-paths up to 64 add-paths or only equal-cost-paths, include
path-selection-mode
at the [edit protocols bgp group
group-name family name addpath
send]
hierarchy level. You cannot enable both multipath
and path-selection-mode
at the same time.
See Also
Example: Advertising Multiple Paths in BGP
In this example, BGP routers are configured to advertise multiple paths instead of advertising only the active path. Advertising multiple paths in BGP is specified in RFC 7911, Advertisement of Multiple Paths in BGP.
Requirements
This example uses the following hardware and software components:
Eight BGP-enabled devices.
Five of the BGP-enabled devices do not necessarily need to be routers. For example, they can be EX Series Ethernet Switches.
Three of the BGP-enabled devices are configured to send multiple paths or receive multiple paths (or both send and receive multiple paths). These three BGP-enabled devices must be M Series Multiservice Edge Routers, MX Series 5G Universal Routing Platforms, or T Series Core Routers.
The three routers must be running Junos OS Release 11.4 or later.
Overview
The following statements are used for configuring multiple paths to a destination:
[edit protocols bgp group group-name family family] add-path { receive; send { include-backup-path include-backup-path; multipath; path-count path-count; path-selection-mode { (all-paths | equal-cost-paths); } prefix-policy [ policy-names ... ]; } }
In this example, Router R5, Router R6, and Router R7 redistribute static routes into BGP. Router R1 and Router R4 are route reflectors. Router R2 and Router R3 are clients to Route Reflector R1. Router R8 is a client to Route Reflector R4.
Route reflection is optional when multiple-path advertisement is enabled in BGP.
With the add-path send path-count 6
configuration,
Router R1 is configured to send up to six paths (per destination)
to Router R4.
With the add-path receive
configuration, Router R4
is configured to receive multiple paths from Router R1.
With the add-path send path-count 6
configuration,
Router R4 is configured to send up to six paths to Router R8.
With the add-path receive
configuration, Router R8
is configured to receive multiple paths from Router R4.
The add-path send prefix-policy allow_199
policy
configuration (along with the corresponding route filter) limits Router
R4 to sending multiple paths for only the 172.16.199.1/32 route.
Topology Diagram
Figure 6 shows the topology used in this example.
Configuration
- CLI Quick Configuration
- Configuring Router R1
- Configuring Router R2
- Configuring Router R3
- Configuring Router R4
- Configuring Router R5
- Configuring Router R6
- Configuring Router R7
- Configuring Router R8
- Results
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
Router R1
set interfaces fe-0/0/0 unit 12 family inet address 10.0.12.1/24 set interfaces fe-0/0/1 unit 13 family inet address 10.0.13.1/24 set interfaces fe-1/0/0 unit 14 family inet address 10.0.14.1/24 set interfaces fe-1/2/0 unit 15 family inet address 10.0.15.1/24 set interfaces lo0 unit 10 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 2 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface fe-0/0/0.12 set protocols ospf area 0.0.0.0 interface fe-0/0/1.13 set protocols ospf area 0.0.0.0 interface fe-1/0/0.14 set protocols ospf area 0.0.0.0 interface fe-1/2/0.15 set routing-options router-id 10.0.0.10 set routing-options autonomous-system 1
Router R2
set interfaces fe-1/2/0 unit 21 family inet address 10.0.12.2/24 set interfaces fe-1/2/1 unit 26 family inet address 10.0.26.1/24 set interfaces lo0 unit 20 family inet address 10.0.0.20/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 2 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface fe-1/2/0.21 set protocols ospf area 0.0.0.0 interface fe-1/2/1.28 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 1
Router R3
set interfaces fe-1/0/1 unit 31 family inet address 10.0.13.2/24 set interfaces fe-1/0/2 unit 37 family inet address 10.0.37.1/24 set interfaces lo0 unit 30 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 2 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface fe-1/0/1.31 set protocols ospf area 0.0.0.0 interface fe-1/0/2.37 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 1
Router R4
set interfaces fe-1/2/0 unit 41 family inet address 10.0.14.2/24 set interfaces fe-1/2/1 unit 48 family inet address 10.0.48.1/24 set interfaces lo0 unit 40 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy allow_199 set protocols ospf area 0.0.0.0 interface fe-1/2/0.41 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface fe-1/2/1.48 set policy-options policy-statement allow_199 from route-filter 172.16.199.1/32 exact set policy-options policy-statement allow_199 term match_199 from prefix-list match_199 set policy-options policy-statement allow_199 then add-path send-count 20 set policy-options policy-statement allow_199 then accept set routing-options autonomous-system 1
Router R5
set interfaces fe-1/2/0 unit 51 family inet address 10.0.15.2/24 set interfaces lo0 unit 50 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject set routing-options static route 172.16.198.1/32 reject
Router R6
set interfaces fe-1/2/0 unit 62 family inet address 10.0.26.2/24 set interfaces lo0 unit 60 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject set routing-options static route 172.16.198.1/32 reject
Router R7
set interfaces fe-1/2/0 unit 73 family inet address 10.0.37.2/24 set interfaces lo0 unit 70 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 1 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then accept set routing-options autonomous-system 2 set routing-options static route 172.16.199.1/32 reject
Router R8
set interfaces fe-1/2/0 unit 84 family inet address 10.0.48.2/24 set interfaces lo0 unit 80 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.80 passive set protocols ospf area 0.0.0.0 interface fe-1/2/0.84 set routing-options autonomous-system 1
Configuring Router R1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Router R1:
Configure the interfaces to Router R2, Router R3, Router R4, and Router R5, and configure the loopback (lo0) interface.
[edit interfaces] user@R1# set fe-0/0/0 unit 12 family inet address 10.0.12.1/24 user@R1# set fe-0/0/1 unit 13 family inet address 10.0.13.1/24 user@R1# set fe-1/0/0 unit 14 family inet address 10.0.14.1/24 user@R1# set fe-1/2/0 unit 15 family inet address 10.0.15.1/24 user@R1#set lo0 unit 10 family inet address 10.0.0.10/32
Configure BGP on the interfaces, and configure IBGP route reflection.
[edit protocols bgp] user@R1# set group rr type internal user@R1# set group rr local-address 10.0.0.10 user@R1# set group rr cluster 10.0.0.10 user@R1# set group rr neighbor 10.0.0.20 user@R1# set group rr neighbor 10.0.0.30 user@R1# set group rr_rr type internal user@R1# set group rr_rr local-address 10.0.0.10 user@R1# set group e1 type external user@R1# set group e1 neighbor 10.0.15.2 local-address 10.0.15.1 user@R1# set group e1 neighbor 10.0.15.2 peer-as 2
Configure Router R1 to send up to six paths to its neighbor, Router R4.
The destination of the paths can be any destination that Router R1 can reach through multiple paths.
[edit protocols bgp] user@R1# set group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6
Configure OSPF on the interfaces.
[edit protocols ospf] user@R1# set area 0.0.0.0 interface lo0.10 passive user@R1# set area 0.0.0.0 interface fe-0/0/0.12 user@R1# set area 0.0.0.0 interface fe-0/0/1.13 user@R1# set area 0.0.0.0 interface fe-1/0/0.14 user@R1# set area 0.0.0.0 interface fe-1/2/0.15
Configure the router ID and the autonomous system number.
[edit routing-options] user@R1# set router-id 10.0.0.10 user@R1# set autonomous-system 1
If you are done configuring the device, commit the configuration.
user@R1# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R1# show interfaces fe-0/0/0 { unit 12 { family inet { address 10.0.12.1/24; } } } fe-0/0/1 { unit 13 { family inet { address 10.0.13.1/24; } } } fe-1/0/0 { unit 14 { family inet { address 10.0.14.1/24; } } } fe-1/2/0 { unit 15 { family inet { address 10.0.15.1/24; } } } lo0 { unit 10 { family inet { address 10.0.0.10/32; } } }
user@R1# show protocols bgp { group rr { type internal; local-address 10.0.0.10; cluster 10.0.0.10; neighbor 10.0.0.20; neighbor 10.0.0.30; } group e1 { type external; neighbor 10.0.15.2 { local-address 10.0.15.1; peer-as 2; } } group rr_rr { type internal; local-address 10.0.0.10; neighbor 10.0.0.40 { family inet { unicast { add-path { send { path-count 6; } } } } } } } ospf { area 0.0.0.0 { interface lo0.10 { passive; } interface fe-0/0/0.12; interface fe-0/0/1.13; interface fe-1/0/0.14; interface fe-1/2/0.15; } }
user@R1# show routing-options router-id 10.0.0.10; autonomous-system 1;
Configuring Router R2
Step-by-Step Procedure
To configure Router R2:
Configure the loopback (lo0) interface and the interfaces to Router R6 and Router R1.
[edit interfaces] user@R2# set fe-1/2/0 unit 21 family inet address 10.0.12.2/24 user@R2# set fe-1/2/1 unit 26 family inet address 10.0.26.1/24 user@R2# set lo0 unit 20 family inet address 10.0.0.20/32
Configure BGP and OSPF on Router R2’s interfaces.
[edit protocols] user@R2# set bgp group rr type internal user@R2# set bgp group rr local-address 10.0.0.20 user@R2# set bgp group e1 type external user@R2# set bgp group e1 neighbor 10.0.26.2 peer-as 2 user@R2# set ospf area 0.0.0.0 interface lo0.20 passive user@R2# set ospf area 0.0.0.0 interface fe-1/2/0.21 user@R2# set ospf area 0.0.0.0 interface fe-1/2/1.28
For routes sent from Router R2 to Router R1, advertise Router R2 as the next hop, because Router R1 does not have a route to Router R6’s address on the 10.0.26.0/24 network.
[edit] user@R2# set policy-options policy-statement set_nh_self then next-hop self user@R2# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
Configure the autonomous system number.
[edit] user@R2# set routing-options autonomous-system 1
If you are done configuring the device, commit the configuration.
user@R2# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
,and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R2# show interfaces fe-1/2/0 { unit 21 { family inet { address 10.0.12.2/24; } } } fe-1/2/1 { unit 26 { family inet { address 10.0.26.1/24; } } } lo0 { unit 20 { family inet { address 10.0.0.20/32; } } }
user@R2# show protocols bgp { group rr { type internal; local-address 10.0.0.20; neighbor 10.0.0.10 { export set_nh_self; } } group e1 { type external; neighbor 10.0.26.2 { peer-as 2; } } } ospf { area 0.0.0.0 { interface lo0.20 { passive; } interface fe-1/2/0.21; interface fe-1/2/1.28; } }
user@R2# show policy-options policy-statement set_nh_self { then { next-hop self; } }
user@R2# show routing-options autonomous-system 1;
Configuring Router R3
Step-by-Step Procedure
To configure Router R3:
Configure the loopback (lo0) interface and the interfaces to Router R7 and Router R1.
[edit interfaces] user@R3# set fe-1/0/1 unit 31 family inet address 10.0.13.2/24 user@R3# set fe-1/0/2 unit 37 family inet address 10.0.37.1/24 user@R3# set lo0 unit 30 family inet address 10.0.0.30/32
Configure BGP and OSPF on Router R3’s interfaces.
[edit protocols] user@R3# set bgp group rr type internal user@R3# set bgp group rr local-address 10.0.0.30 user@R3# set bgp group e1 type external user@R3# set bgp group e1 neighbor 10.0.37.2 peer-as 2 user@R3# set ospf area 0.0.0.0 interface lo0.30 passive user@R3# set ospf area 0.0.0.0 interface fe-1/0/1.31 user@R3# set ospf area 0.0.0.0 interface fe-1/0/2.37
For routes sent from Router R3 to Router R1, advertise Router R3 as the next hop, because Router R1 does not have a route to Router R7’s address on the 10.0.37.0/24 network.
[edit] user@R3# set policy-options policy-statement set_nh_self then next-hop self user@R3# set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self
Configure the autonomous system number.
[edit] user@R3# set routing-options autonomous-system 1
If you are done configuring the device, commit the configuration.
user@R3# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R3# show interfaces fe-1/0/1 { unit 31 { family inet { address 10.0.13.2/24; } } } fe-1/0/2 { unit 37 { family inet { address 10.0.37.1/24; } } } lo0 { unit 30 { family inet { address 10.0.0.30/32; } } }
user@R3# show protocols bgp { group rr { type internal; local-address 10.0.0.30; neighbor 10.0.0.10 { export set_nh_self; } } group e1 { type external; neighbor 10.0.37.2 { peer-as 2; } } } ospf { area 0.0.0.0 { interface lo0.30 { passive; } interface fe-1/0/1.31; interface fe-1/0/2.37; } } user@R3# show policy-options policy-statement set_nh_self { then { next-hop self; } }
user@R3# show routing-options autonomous-system 1;
Configuring Router R4
Step-by-Step Procedure
To configure Router R4:
Configure the interfaces to Router R1 and Router R8, and configure the loopback (lo0) interface.
[edit interfaces] user@R4# set fe-1/2/0 unit 41 family inet address 10.0.14.2/24 user@R4# set fe-1/2/1 unit 48 family inet address 10.0.48.1/24 user@R4# set lo0 unit 40 family inet address 10.0.0.40/32
Configure BGP on the interfaces, and configure IBGP route reflection.
[edit protocols bgp] user@R4# set group rr type internal user@R4# set group rr local-address 10.0.0.40 user@R4# set group rr neighbor 10.0.0.10 user@R4# set group rr_client type internal user@R4# set group rr_client local-address 10.0.0.40 user@R4# set group rr_client cluster 10.0.0.40
Configure Router R4 to send up to six paths to its neighbor, Router R8.
The destination of the paths can be any destination that Router R4 can reach through multiple paths.
[edit protocols bgp] user@R4# set group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6
Configure Router R4 to receive multiple paths from its neighbor, Router R1.
The destination of the paths can be any destination that Router R1 can reach through multiple paths.
[edit protocols bgp group rr family inet unicast] user@R4# set add-path receive
Configure OSPF on the interfaces.
[edit protocols ospf area 0.0.0.0] user@R4# set interface fe-1/2/0.41 user@R4# set interface lo0.40 passive user@R4# set interface fe-1/2/1.48
Configure a policy that allows Router R4 to send Router R8 multiple paths to the 172.16.199.1/32 route.
Router R4 receives multiple paths for the 172.16.198.1/32 route and the 172.16.199.1/32 route. However, because of this policy, Router R4 only sends multiple paths for the 172.16.199.1/32 route.
[edit protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast] user@R4# set add-path send prefix-policy allow_199 [edit policy-options policy-statement allow_199] user@R4# set from route-filter 172.16.199.1/32 exact user@R4# set then accept
Router R4 can also be configured to send up-to 20 BGP
add-path
routes for a subset of add-path advertised prefixes.[edit policy-options policy-statement allow_199] user@R4# set term match_199 from prefix-list match_199 user@R4# set then add-path send-count 20
Configure the autonomous system number.
[edit routing-options] user@R4# set autonomous-system 1
If you are done configuring the device, commit the configuration.
user@R4# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R4# show interfaces fe-1/2/0 { unit 41 { family inet { address 10.0.14.2/24; } } } fe-1/2/1 { unit 48 { family inet { address 10.0.48.1/24; } } } lo0 { unit 40 { family inet { address 10.0.0.40/32; } } }
user@R4# show protocols bgp { group rr { type internal; local-address 10.0.0.40; family inet { unicast { add-path { receive; } } } neighbor 10.0.0.10; } group rr_client { type internal; local-address 10.0.0.40; cluster 10.0.0.40; neighbor 10.0.0.80 { family inet { unicast { add-path { send { path-count 6; prefix-policy allow_199; } } } } } } } ospf { area 0.0.0.0 { interface lo0.40 { passive; } interface fe-1/2/0.41; interface fe-1/2/1.48; } }
user@R4# show policy-options policy-statement allow_199 { from { route-filter 172.16.199.1/32 exact; } from term match_199 { prefix-list match_199; } then add-path send-count 20; then accept; }
user@R4# show routing-options autonomous-system 1;
Configuring Router R5
Step-by-Step Procedure
To configure Router R5:
Configure the loopback (lo0) interface and the interface to Router R1.
[edit interfaces] user@R5# set fe-1/2/0 unit 51 family inet address 10.0.15.2/24 user@R5# set lo0 unit 50 family inet address 10.0.0.50/32
Configure BGP on Router R5’s interface.
[edit protocols bgp group e1] user@R5# set type external user@R5# set neighbor 10.0.15.1 peer-as 1
Create static routes for redistribution into BGP.
[edit routing-options] user@R5# set static route 172.16.199.1/32 reject user@R5# set static route 172.16.198.1/32 reject
Redistribute static and direct routes into BGP.
[edit protocols bgp group e1 neighbor 10.0.15.1] user@R5# set export s2b [edit policy-options policy-statement s2b] user@R5# set from protocol static user@R5# set from protocol direct user@R5# set then as-path-expand 2 user@R5# set then accept
Configure the autonomous system number.
[edit routing-options] user@R5# set autonomous-system 2
If you are done configuring the device, commit the configuration.
user@R5# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R5# show interfaces fe-1/2/0 { unit 51 { family inet { address 10.0.15.2/24; } } } lo0 { unit 50 { family inet { address 10.0.0.50/32; } } }
user@R5# show protocols bgp { group e1 { type external; neighbor 10.0.15.1 { export s2b; peer-as 1; } } }
user@R5# show policy-options policy-statement s2b { from protocol [ static direct ]; then { as-path-expand 2; accept; } }
user@R5# show routing-options static { route 172.16.198.1/32 reject; route 172.16.199.1/32 reject; } autonomous-system 2;
Configuring Router R6
Step-by-Step Procedure
To configure Router R6:
Configure the loopback (lo0) interface and the interface to Router R2.
[edit interfaces] user@R6# set fe-1/2/0 unit 62 family inet address 10.0.26.2/24 user@R6# set lo0 unit 60 family inet address 10.0.0.60/32
Configure BGP on Router R6’s interface.
[edit protocols] user@R6# set bgp group e1 type external user@R6# set bgp group e1 neighbor 10.0.26.1 peer-as 1
Create static routes for redistribution into BGP.
[edit] user@R6# set routing-options static route 172.16.199.1/32 reject user@R6# set routing-options static route 172.16.198.1/32 reject
Redistribute static and direct routes from Router R6’s routing table into BGP.
[edit protocols bgp group e1 neighbor 10.0.26.1] user@R6# set export s2b [edit policy-options policy-statement s2b] user@R6# set from protocol static user@R6# set from protocol direct user@R6# set then accept
Configure the autonomous system number.
[edit routing-options] user@R6# set autonomous-system 2
If you are done configuring the device, commit the configuration.
user@R6# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R6# show interfaces fe-1/2/0 { unit 62 { family inet { address 10.0.26.2/24; } } } lo0 { unit 60 { family inet { address 10.0.0.60/32; } } }
user@R6# show protocols bgp { group e1 { type external; neighbor 10.0.26.1 { export s2b; peer-as 1; } } }
user@R6# show policy-options policy-statement s2b { from protocol [ static direct ]; then accept; }
user@R6# show routing-options static { route 172.16.198.1/32 reject; route 172.16.199.1/32 reject; } autonomous-system 2;
Configuring Router R7
Step-by-Step Procedure
To configure Router R7:
Configure the loopback (lo0) interface and the interface to Router R3.
[edit interfaces] user@R7# set fe-1/2/0 unit 73 family inet address 10.0.37.2/24 user@R7# set lo0 unit 70 family inet address 10.0.0.70/32
Configure BGP on Router R7’s interface.
[edit protocols bgp group e1] user@R7# set type external user@R7# set neighbor 10.0.37.1 peer-as 1
Create a static route for redistribution into BGP.
[edit] user@R7# set routing-options static route 172.16.199.1/32 reject
Redistribute static and direct routes from Router R7’s routing table into BGP.
[edit protocols bgp group e1 neighbor 10.0.37.1] user@R7# set export s2b [edit policy-options policy-statement s2b] user@R7# set from protocol static user@R7# set from protocol direct user@R7# set then accept
Configure the autonomous system number.
[edit routing-options] user@R7# set autonomous-system 2
If you are done configuring the device, commit the configuration.
user@R7# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R7# show interfaces fe-1/2/0 { unit 73 { family inet { address 10.0.37.2/24; } } } lo0 { unit 70 { family inet { address 10.0.0.70/32; } } }
user@R7# show protocols bgp { group e1 { type external; neighbor 10.0.37.1 { export s2b; peer-as 1; } } }
user@R7# show policy-options policy-statement s2b { from protocol [ static direct ]; then accept; }
user@R7# show routing-options static { route 172.16.199.1/32 reject; } autonomous-system 2;
Configuring Router R8
Step-by-Step Procedure
To configure Router R8:
Configure the loopback (lo0) interface and the interface to Router R4.
[edit interfaces] user@R8# set fe-1/2/0 unit 84 family inet address 10.0.48.2/24 user@R8# set lo0 unit 80 family inet address 10.0.0.80/32
Configure BGP and OSPF on Router R8’s interface.
[edit protocols] user@R8# set bgp group rr type internal user@R8# set bgp group rr local-address 10.0.0.80 user@R8# set ospf area 0.0.0.0 interface lo0.80 passive user@R8# set ospf area 0.0.0.0 interface fe-1/2/0.84
Configure Router R8 to receive multiple paths from its neighbor, Router R4.
The destination of the paths can be any destination that Router R4 can reach through multiple paths.
[edit protocols] user@R8# set bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive
Configure the autonomous system number.
[edit] user@R8# set routing-options autonomous-system 1
If you are done configuring the device, commit the configuration.
user@R8# commit
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
user@R8# show interfaces fe-1/2/0 { unit 84 { family inet { address 10.0.48.2/24; } } } lo0 { unit 80 { family inet { address 10.0.0.80/32; } } }
user@R8# show protocols bgp { group rr { type internal; local-address 10.0.0.80; neighbor 10.0.0.40 { family inet { unicast { add-path { receive; } } } } } } ospf { area 0.0.0.0 { interface lo0.80 { passive; } interface fe-1/2/0.84; } }
user@R8# show routing-options autonomous-system 1;
Verification
Confirm that the configuration is working properly.
- Verifying That the BGP Peers Have the Ability to Send and Receive Multiple Paths
- Verifying That Router R1 Is Advertising Multiple Paths
- Verifying That Router R4 Is Receiving and Advertising Multiple Paths
- Verifying That Router R8 Is Receiving Multiple Paths
- Checking the Path ID
Verifying That the BGP Peers Have the Ability to Send and Receive Multiple Paths
Purpose
Make sure that one or both of the following strings appear
in the output of the show bgp neighbor
command:
NLRI's for which peer can receive multiple paths: inet-unicast
NLRI's for which peer can send multiple paths: inet-unicast
Action
user@R1> show bgp neighbor 10.0.0.40 Peer: 10.0.0.40+179 AS 1 Local: 10.0.0.10+64227 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can receive multiple paths: inet-unicast ...
user@R4> show bgp neighbor 10.0.0.10 Peer: 10.0.0.10+64227 AS 1 Local: 10.0.0.40+179 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can send multiple paths: inet-unicast ...
user@R4> show bgp neighbor 10.0.0.80 Peer: 10.0.0.80+55416 AS 1 Local: 10.0.0.40+179 AS 1 Type: Internal State: Established (route reflector client)Flags: <Sync> ,,, NLRI's for which peer can receive multiple paths: inet-unicast ...
user@R8> show bgp neighbor 10.0.0.40 Peer: 10.0.0.40+179 AS 1 Local: 10.0.0.80+55416 AS 1 Type: Internal State: Established Flags: <Sync> ... NLRI's for which peer can send multiple paths: inet-unicast ...
Verifying That Router R1 Is Advertising Multiple Paths
Purpose
Make sure that multiple paths to the 172.16.198.1/32 destination and multiple paths to the 172.16.199.1/32 destination are advertised to Router R4.
Action
user@R1> show route advertising-protocol bgp 10.0.0.40 inet.0: 21 destinations, 25 routes (21 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 172.16.198.1/32 10.0.0.20 100 2 I 10.0.15.2 100 2 2 I * 172.16.199.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I * 172.16.200.0/30 10.0.0.20 100 2 I
Meaning
When you see one prefix and more than one next hop, it means that multiple paths are advertised to Router R4.
Verifying That Router R4 Is Receiving and Advertising Multiple Paths
Purpose
Make sure that multiple paths to the 172.16.199.1/32 destination are received from Router R1 and advertised to Router R8. Make sure that multiple paths to the 172.16.198.1/32 destination are received from Router R1, but only one path to this destination is advertised to Router R8.
Action
user@R4> show route receive-protocol bgp 10.0.0.10 inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 172.16.198.1/32 10.0.0.20 100 2 I 10.0.15.2 100 2 2 I * 172.16.199.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I * 172.16.200.0/30 10.0.0.20 100 2 I
user@R4> show route advertising-protocol bgp 10.0.0.80 inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 172.16.198.1/32 10.0.0.20 100 2 I * 172.16.199.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I * 172.16.200.0/30 10.0.0.20 100 2 I
Meaning
The show route receive-protocol
command
shows that Router R4 receives two paths to the 172.16.198.1/32 destination
and three paths to the 172.16.199.1/32 destination. The show
route advertising-protocol
command shows that Router R4 advertises
only one path to the 172.16.198.1/32 destination and advertises all
three paths to the 172.16.199.1/32 destination.
Because of the prefix policy that is applied to Router R4, Router R4 does not advertise multiple paths to the 172.16.198.1/32 destination. Router R4 advertises only one path to the 172.16.198.1/32 destination even though it receives multiple paths to this destination.
Verifying That Router R8 Is Receiving Multiple Paths
Purpose
Make sure that Router R8 receives multiple paths to the 172.16.199.1/32 destination through Router R4. Make sure that Router R8 receives only one path to the 172.16.198.1/32 destination through Router R4.
Action
user@R8> show route receive-protocol bgp 10.0.0.40 inet.0: 18 destinations, 20 routes (18 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 172.16.198.1/32 10.0.0.20 100 2 I * 172.16.199.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I * 200.1.1.0/30 10.0.0.20 100 2 I
Checking the Path ID
Purpose
On the downstream devices, Router R4 and Router R8,
verify that a path ID uniquely identifies the path. Look for the Addpath Path ID:
string.
Action
user@R4> show route 172.16.199.1/32 detail inet.0: 18 destinations, 20 routes (18 active, 0 holddown, 0 hidden) 172.16.199.1/32 (3 entries, 3 announced) *BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 9 Source: 10.0.0.10 Next hop type: Router, Next hop index: 676 Next hop: 10.0.14.1 via lt-1/2/0.41, selected Protocol next hop: 10.0.0.20 Indirect next hop: 92041c8 262146 State: <Active Int Ext> Local AS: 1 Peer AS: 1 Age: 1:44:37 Metric2: 2 Task: BGP_1.10.0.0.10+64227 Announcement bits (3): 2-KRT 3-BGP RT Background 4-Resolve tree 1 AS path: 2 I (Originator) Cluster list: 10.0.0.10 AS path: Originator ID: 10.0.0.20 Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 1 BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 4 Source: 10.0.0.10 Next hop type: Router, Next hop index: 676 Next hop: 10.0.14.1 via lt-1/2/0.41, selected Protocol next hop: 10.0.0.30 Indirect next hop: 92042ac 262151 State: <NotBest Int Ext> Inactive reason: Not Best in its group - Router ID Local AS: 1 Peer AS: 1 Age: 1:44:37 Metric2: 2 Task: BGP_1.10.0.0.10+64227 Announcement bits (1): 3-BGP RT Background AS path: 2 I (Originator) Cluster list: 10.0.0.10 AS path: Originator ID: 10.0.0.30 Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 2 BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 4 Source: 10.0.0.10 Next hop type: Router, Next hop index: 676 Next hop: 10.0.14.1 via lt-1/2/0.41, selected Protocol next hop: 10.0.15.2 Indirect next hop: 92040e4 262150 State: <Int Ext> Inactive reason: AS path Local AS: 1 Peer AS: 1 Age: 1:44:37 Metric2: 2 Task: BGP_1.10.0.0.10+64227 Announcement bits (1): 3-BGP RT Background AS path: 2 2 I Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 3
user@R8> show route 172.16.199.1/32 detail inet.0: 17 destinations, 19 routes (17 active, 0 holddown, 0 hidden) 172.16.199.1/32 (3 entries, 1 announced) *BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 9 Source: 10.0.0.40 Next hop type: Router, Next hop index: 1045 Next hop: 10.0.48.1 via lt-1/2/0.84, selected Protocol next hop: 10.0.0.20 Indirect next hop: 91fc0e4 262148 State: <Active Int Ext> Local AS: 1 Peer AS: 1 Age: 1:56:51 Metric2: 3 Task: BGP_1.10.0.0.40+179 Announcement bits (2): 2-KRT 4-Resolve tree 1 AS path: 2 I (Originator) Cluster list: 10.0.0.40 10.0.0.10 AS path: Originator ID: 10.0.0.20 Accepted Localpref: 100 Router ID: 10.0.0.40 Addpath Path ID: 1 BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 4 Source: 10.0.0.40 Next hop type: Router, Next hop index: 1045 Next hop: 10.0.48.1 via lt-1/2/0.84, selected Protocol next hop: 10.0.0.30 Indirect next hop: 91fc1c8 262152 State: <NotBest Int Ext> Inactive reason: Not Best in its group - Router ID Local AS: 1 Peer AS: 1 Age: 1:56:51 Metric2: 3 Task: BGP_1.10.0.0.40+179 AS path: 2 I (Originator) Cluster list: 10.0.0.40 10.0.0.10 AS path: Originator ID: 10.0.0.30 Accepted Localpref: 100 Router ID: 10.0.0.40 Addpath Path ID: 2 BGP Preference: 170/-101 Next hop type: Indirect Next-hop reference count: 4 Source: 10.0.0.40 Next hop type: Router, Next hop index: 1045 Next hop: 10.0.48.1 via lt-1/2/0.84, selected Protocol next hop: 10.0.15.2 Indirect next hop: 91fc2ac 262153 State: <Int Ext> Inactive reason: AS path Local AS: 1 Peer AS: 1 Age: 1:56:51 Metric2: 3 Task: BGP_1.10.0.0.40+179 AS path: 2 2 I (Originator) Cluster list: 10.0.0.40 AS path: Originator ID: 10.0.0.10 Accepted Localpref: 100 Router ID: 10.0.0.40 Addpath Path ID: 3
Example: Configuring Selective Advertising of BGP Multiple Paths for Load Balancing
This example shows how to configure selective advertising of BGP multiple paths. Advertising all available multiple paths might result in a large overhead of processing on device memory and is a scaling consideration, too. You can configure a BGP route reflector to advertise only contributor multipaths for load balancing.
Requirements
No special configuration beyond device initialization is required before configuring this example.
This example uses the following hardware and software components:
Eight routers that can be a combination of M Series, MX Series, or T Series routers
Junos OS Release 16.1R2 or later on the device
Overview
Beginning with Junos OS Release 16.1R2, you can restrict BGP add-path
to advertise contributor multiple paths only. You
can limit and configure up to six prefixes that the BGP multipath
algorithm selects. Selective advertising of multiple paths facilitates
Internet service providers and data centers that use route reflector
to build in-path diversity in IBGP. You can enable a BGP route reflector
to advertise multipaths that are contributor paths for load balancing.
Topology
In Figure 7, RR1 and RR4 are route reflectors. Router R2 and R3 are clients to the route reflector RR1. Router R8 is a client to route reflector RR4. The RR1 group with neighbors R2 and R3 is configured for multipath. Routers R5, R6, and Router R7 redistribute static routes 199.1.1.1/32 and 198.1.1.1/32 into BGP.
A load-balancing policy is configured at Router RR1 such that the 199.1.1.1/32 routes have multipath calculated. The multipath feature is configured under add-path for neighbor RR4. However, Router RR4 does not have load-balancing multipath configured. Router RR1 is configured to send Router RR4 up to six add path routes to 199.1.1.1/32 chosen from multipath candidate routes.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit]
hierarchy
level, and then enter commit from configuration mode.
Router RR1
set interfaces ge-1/0/10 unit 0 description RR1->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.1/24 set interfaces ge-1/0/11 unit 0 description RR1->RR4 set interfaces ge-1/0/11 unit 0 family inet address 10.0.14.1/24 set interfaces ge-1/0/12 unit 0 description RR1->R5 set interfaces ge-1/0/12 unit 0 family inet address 10.0.15.1/24 set interfaces ge-1/0/13 unit 0 description RR1->R3 set interfaces ge-1/0/13 unit 0 family inet address 10.0.13.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr multipath set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 64502 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send multipath set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set protocols ospf area 0.0.0.0 interface ge-1/0/12 set policy-options prefix-list match_199 199.1.1.1/32 set policy-options policy-statement loadbal_199 term match_100 from prefix-list match_199 set policy-options policy-statement loadbal_199 from route-filter 199.1.1.1/32 exact set policy-options policy-statement loadbal_199 then load-balance per-packet set routing-options router-id 10.0.0.10 set routing-options autonomous-system 64501 set routing-options forwarding-table export loadbal_199
Router R2
set interfaces ge-1/0/10 unit 0 description R2->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.2/24 set interfaces ge-1/0/11 unit 0 description R2->R6 set interfaces ge-1/0/11 unit 0 family inet address 10.0.26.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.20/32 set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
Router R3
set interfaces ge-1/0/10 unit 0 description R3->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.13.2/24 set interfaces ge-1/0/11 unit 0 description R3->R7 set interfaces ge-1/0/11 unit 0 family inet address 10.0.37.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
Router RR4
set interfaces ge-1/0/10 unit 0 description RR4->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.14.2/24 set interfaces ge-1/0/11 unit 0 description RR4->R8 set interfaces ge-1/0/11 unit 0 family inet address 10.0.48.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 2 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send multipath set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options prefix-list match_199 199.1.1.1/32 set routing-options autonomous-system 64501
Router R5
set interfaces ge-1/0/10 unit 0 description R5->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.15.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
Router R6
set interfaces ge-1/0/10 unit 0 description R6->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.26.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
Router R7
set interfaces ge-1/0/10 unit 0 description R7->R3 set interfaces ge-1/0/10 unit 0 family inet address 10.0.37.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options autonomous-system 64502
Router R8
set interfaces ge-1/0/10 unit 0 description R8->RR4 set interfaces ge-1/0/10 unit 0 family inet address 10.0.48.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10.8 set routing-options autonomous-system 64501 set chassis fpc 1 pic 0 tunnel-services bandwidth 1g
Configuring Router RR1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router RR1:
Repeat this procedure for other routers after modifying the appropriate interface names, addresses, and other parameters.
Configure the interfaces with IPv4 addresses.
[edit interfaces] user@RR1# set ge-1/0/10 unit 0 description RR1->R2 user@RR1# set ge-1/0/10 unit 0 family inet address 10.0.12.1/24 user@RR1# set ge-1/0/11 unit 0 description RR1->RR4 user@RR1# set ge-1/0/11 unit 0 family inet address 10.0.14.1/24 user@RR1# set ge-1/0/12 unit 0 description RR1->R5 user@RR1# set ge-1/0/12 unit 0 family inet address 10.0.15.1/24 user@RR1# set ge-1/0/13 unit 0 description RR1->R3 user@RR1# set ge-1/0/13 unit 0 family inet address 10.0.13.1/24
Configure the loopback address.
[edit interfaces] user@RR1# set lo0 unit 0 family inet address 10.0.0.10/32
Configure interior gateway protocol (IGP) such as OSPF or IS-IS.
[edit protocols] user@RR1# set ospf area 0.0.0.0 interface lo0.10 passive user@RR1# set ospf area 0.0.0.0 interface ge-1/0/10 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/13 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/11 user@RR1# set ospf area 0.0.0.0 interface ge-1/0/12
Configure internal group rr for interfaces connecting to internal routers R2 and R3.
[edit protocols] user@RR1# set bgp group rr type internal user@RR1# set bgp group rr local-address 10.0.0.10 user@RR1# set bgp group rr cluster 10.0.0.10 user@RR1# set bgp group rr neighbor 10.0.0.20 user@RR1# set bgp group rr neighbor 10.0.0.30
Configure load balancing for internal BGP group rr.
[edit protocols] user@RR1# set bgp group rr multipath
Configure internal group rr_rr for route reflectors.
[edit protocols] user@RR1# set bgp group rr_rr type internal user@RR1# set bgp group rr_rr local-address 10.0.0.10
Configure the addpath multipath feature to advertise contributor multiple paths only and limit the number of advertised multipaths to 6.
[edit protocols] user@RR1# set bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send multipath user@RR1# set bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6
Configure EBGP on interfaces connecting to the external edge routers.
[edit protocols] user@RR1# set bgp group e1 type external user@RR1# set bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 user@RR1# set bgp group e1 neighbor 10.0.15.2 peer-as 64502
Define a policy loadbal_199 for per packet load balancing.
[edit policy-options] user@RR1# set prefix-list match_199 199.1.1.1/32 user@RR1# set policy-statement loadbal_199 term match_100 from prefix-list match_199 user@RR1# set policy-statement loadbal_199 from route-filter 199.1.1.1/32 exact user@RR1# set policy-statement loadbal_199 then load-balance per-packet
Apply the defined export policy loadbal_199.
[edit routing-options] user@RR1# set forwarding-table export loadbal_199
Configure the router ID and the autonomous system for BGP hosts.
[edit routing-options] user@RR1# set router-id 10.0.0.10 user@RR1# set autonomous-system 64501
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show routing-options, and show policy-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
[edit] user@RR1# show interfaces ge-1/0/10 { unit 0 { description RR1->R2; family inet { address 10.0.12.1/24; } } } ge-1/0/11 { unit 0 { description RR1->RR4; family inet { address 10.0.14.1/24; } } } ge-1/0/12 { unit 0 { description RR1->R5; family inet { address 10.0.15.1/24; } } } ge-1/0/13 { unit 0 { description RR1->R3; family inet { address 10.0.13.1/24; } } } lo0 { unit 0 { family inet { address 10.0.0.10/32; } } }
[edit] user@RR1# show protocols bgp { group rr { type internal; local-address 10.0.0.10; cluster 10.0.0.10; multipath; neighbor 10.0.0.20; neighbor 10.0.0.30; } group e1 { type external; neighbor 10.0.15.2 { local-address 10.0.15.1; peer-as 64502; } } group rr_rr { type internal; local-address 10.0.0.10; neighbor 10.0.0.40 { family inet { unicast { add-path { send { path-count 6; multipath; } } } } } } } ospf { area 0.0.0.0 { interface all; interface fxp0.0 { disable; } interface lo0.10 { passive; } interface ge-1/0/10; interface ge-1/0/13; interface ge-1/0/11; interface ge-1/0/12; } }
[edit] user@RR1# show routing-options router-id 10.0.0.10; autonomous-system 64501; forwarding-table { export load-bal_199; }
[edit] user@RR1# show policy-options prefix-list match_199 { 199.1.1.1/32; } policy-statement loadbal_199 { term match_100 { from { prefix-list match_199; } } from { route-filter 199.1.1.1/32 exact; } then { load-balance per-packet; } }
If you are done configuring the device, commit the configuration.
user@RR1# commit
Verification
Confirm that the configuration is working properly.
- Verifying the Multipath Routes for the Static Route 199.1.1.1/32
- Verifying That the Multipath Routes are Advertised from Router RR1 to Router RR4
- Verifying that Router RR4 Advertises One Route for 199.1.1.1/32 to Router R8
Verifying the Multipath Routes for the Static Route 199.1.1.1/32
Purpose
Verify the available multipath routes for destination 199.1.1.1/32.
Action
From operational mode, run the show route 199.1.1.1/32 detail command on Router RR1.
user@RR1> show route 199.1.1.1/32 detail inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden) 199.1.1.1/32 (3 entries, 2 announced) *BGP Preference: 170/-101 Next hop type: Indirect, Next hop index: 0 Address: 0xae5cc90 Next-hop reference count: 1 Source: 10.0.0.20 Next hop type: Router, Next hop index: 1118 Next hop: 10.0.12.2 via lt-1/0/10.1, selected Session Id: 0x0 Next hop type: Router, Next hop index: 1115 Next hop: 10.0.13.2 via lt-1/0/10.9 Session Id: 0x0 Protocol next hop: 10.0.0.20 Indirect next hop: 0xc409410 1048574 INH Session ID: 0x0 Protocol next hop: 10.0.0.30 Indirect next hop: 0xc409520 1048575 INH Session ID: 0x0 State: <Active Int Ext> Local AS: 1 Peer AS: 1 Age: 4:03:29 Metric2: 1 Validation State: unverified Task: BGP_1.10.0.0.20 Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 2 AS path: 2 I Communities: 4713:100 Accepted Multipath Localpref: 100 Router ID: 10.0.0.20 BGP Preference: 170/-101 Next hop type: Indirect, Next hop index: 0 Address: 0xae0ec10 Next-hop reference count: 4 Source: 10.0.0.30 Next hop type: Router, Next hop index: 1115 Next hop: 10.0.13.2 via lt-1/0/10.9, selected Session Id: 0x0 Protocol next hop: 10.0.0.30 Indirect next hop: 0xc409520 1048575 INH Session ID: 0x0 State: <NotBest Int Ext> Inactive reason: Not Best in its group - Router ID Local AS: 64501 Peer AS: 64501 Age: 4:03:29 Metric2: 1 Validation State: unverified Task: BGP_1.10.0.0.30 Announcement bits (1): 3-BGP_RT_Background AS path: 2 I Communities: 4713:100 Accepted MultipathContrib Localpref: 100 Router ID: 10.0.0.30 BGP Preference: 170/-101 Next hop type: Router, Next hop index: 1105 Address: 0xae0e970 Next-hop reference count: 5 Source: 10.0.15.2 Next hop: 10.0.15.2 via lt-1/0/10.6, selected Session Id: 0x0 State: <Ext> Inactive reason: AS path Local AS: 1 Peer AS: 2 Age: 4:05:01 Validation State: unverified Task: BGP_2.10.0.15.2 AS path: 2 2 I Communities: 4713:100 Accepted Localpref: 100 Router ID: 10.0.0.50
Meaning
The selective advertising multipath feature is enabled on Router RR1 and there is more than one nexthop available for route 199.1.1.1/32. The two available next hops for route 199.1.1.1/32 are 10.0.0.20 and 10.0.0.30.
Verifying That the Multipath Routes are Advertised from Router RR1 to Router RR4
Purpose
Verify that Router RR1 is advertising the multipath routes.
Action
From operational mode, run the show route advertising-protocol bgp 10.0.0.40 command on Router RR1.
user@RR1> show route advertising-protocol bgp 10.0.0.40 inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 198.1.1.1/32 10.0.0.20 100 2 I * 199.1.1.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I
user@RR1> show route advertising-protocol bgp 10.0.0.40 detail inet.0: 22 destinations, 26 routes (22 active, 0 holddown, 0 hidden) * 10.0.0.50/32 (1 entry, 1 announced) BGP group rr_rr type Internal Nexthop: 10.0.15.2 Localpref: 100 AS path: [1] 2 2 I Communities: 4713:100 Addpath Path ID: 1 ….* 199.1.1.1/32 (3 entries, 2 announced) BGP group rr_rr type Internal Nexthop: 10.0.0.20 Localpref: 100 AS path: [1] 2 I Communities: 4713:100 Cluster ID: 10.0.0.10 Originator ID: 10.0.0.20 Addpath Path ID: 1 BGP group rr_rr type Internal Nexthop: 10.0.0.30 Localpref: 100 AS path: [1] 2 I Communities: 4713:100 Cluster ID: 10.0.0.10 Originator ID: 10.0.0.30 Addpath Path ID: 2
Meaning
Router RR1 is advertising two next hops 10.0.0.20 and 10.0.0.30 for route 199.1.1.1/32 to Router RR4.
Verifying that Router RR4 Advertises One Route for 199.1.1.1/32 to Router R8
Purpose
Multipath is not configured on Router RR4, therefore route 199.1.1.1/32 is not eligible for add-path. Verify that Router RR4 advertises only one route for 199.1.1.1/32 to Router R8.
Action
From operational mode, run the show route advertising-protocol bgp 10.0.0.80 command on Router RR4.
user@RR4> show route advertising-protocol bgp 10.0.0.80 detail inet.0: 20 destinations, 21 routes (20 active, 0 holddown, 0 hidden) * 10.0.0.50/32 (1 entry, 1 announced) BGP group rr_client type Internal Nexthop: 10.0.15.2 Localpref: 100 AS path: [1] 2 2 I Communities: 4713:100 Cluster ID: 10.0.0.40 Originator ID: 10.0.0.10 Addpath Path ID: 1 … * 198.1.1.1/32 (1 entry, 1 announced) BGP group rr_client type Internal Nexthop: 10.0.0.20 Localpref: 100 AS path: [1] 2 I (Originator) Cluster list: 10.0.0.10 Originator ID: 10.0.0.20 Communities: 4713:100 Cluster ID: 10.0.0.40 Addpath Path ID: 1 * 199.1.1.1/32 (2 entries, 1 announced) BGP group rr_client type Internal Nexthop: 10.0.0.20 Localpref: 100 AS path: [1] 2 I (Originator) Cluster list: 10.0.0.10 Originator ID: 10.0.0.20 Communities: 4713:100 Cluster ID: 10.0.0.40 Addpath Path ID: 1
Meaning
Since multipath is not enabled on Router RR4, only one path 10.0.0.20 is advertised to Router R8.
Example: Configuring a Routing Policy to Select and Advertise Multipaths Based on BGP Community Value
Advertising all available multiple paths might result in a large overhead of processing on device memory. If you want to advertise a limited subset of prefixes without actually knowing the prefixes in advance, you can use the BGP community value to identify prefix routes that need to be advertised to BGP neighbors. This example shows how to define a routing policy to filter and advertise multiple paths based on a known BGP community value.
Requirements
No special configuration beyond device initialization is required before configuring this example.
This example uses the following hardware and software components:
Eight routers that can be a combination of M Series, MX Series, or T Series routers
Junos OS Release 16.1R2 or later on the device
Overview
Beginning with Junos OS 16.1R2, you can define a policy to identify eligible multiple path prefixes based on community values. BGP advertises these community-tagged routes in addition to the active path to a given destination. If the community value of a route does not match the community value defined in the policy, then BGP does not advertise that route. This feature allows BGP to advertise not more than 20 paths to a given destination. You can limit and configure the number of prefixes that BGP considers for multiple paths without actually knowing the prefixes in advance. Instead, a known BGP community value determines whether or not a prefix is advertised.
Topology
In Figure 8, RR1 and RR4 are route reflectors. Router R2 and R3 are clients to the route reflector RR1. Router R8 is a client to route reflector RR4. Routers R5, R6, and Router R7 redistribute static routes into BGP. Router R5 advertises static routes 199.1.1.1/32 and 198.1.1.1/32 with community value 4713:100.
Router RR1 is configured to send up to six paths (per destination) to Router RR4. Router RR4 is configured to send up to six paths to Router R8. Router R8 is configured to receive multiple paths from Router RR4. The add-path community configuration restricts Router RR4 to send multiple paths for routes that contain only the 4713:100 community value. Router RR4 filters and advertises multipaths that contain only 4714:100 community value.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit]
hierarchy
level, and then enter commit from configuration mode.
Router RR1
set interfaces ge-1/0/10 unit 0 description RR1->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.1/24 set interfaces ge-1/0/11 unit 0 description RR1->RR4 set interfaces ge-1/0/11 unit 0 family inet address 10.0.14.1/24 set interfaces ge-1/0/12 unit 0 description RR1->R5 set interfaces ge-1/0/12 unit 0 family inet address 10.0.15.1/24 set interfaces ge-1/0/13 unit 0 description RR1->R3 set interfaces ge-1/0/13 unit 0 family inet address 10.0.13.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.10/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.10 set protocols bgp group rr cluster 10.0.0.10 set protocols bgp group rr multipath set protocols bgp group rr neighbor 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.30 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.2 local-address 10.0.15.1 set protocols bgp group e1 neighbor 10.0.15.2 peer-as 64502 set protocols bgp group rr_rr type internal set protocols bgp group rr_rr local-address 10.0.0.10 set protocols bgp group rr_rr neighbor 10.0.0.40 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface lo0.10 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set protocols ospf area 0.0.0.0 interface ge-1/0/12 set routing-options router-id 10.0.0.10 set routing-options autonomous-system 64501
Router R2
set interfaces ge-1/0/10 unit 0 description R2->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.12.2/24 set interfaces ge-1/0/11 unit 0 description R2->R6 set interfaces ge-1/0/11 unit 0 family inet address 10.0.26.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.20/32 set protocols bgp group rr local-address 10.0.0.20 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.20 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
Router R3
set interfaces ge-1/0/10 unit 0 description R3->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.13.2/24 set interfaces ge-1/0/11 unit 0 description R3->R7 set interfaces ge-1/0/11 unit 0 family inet address 10.0.37.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.30/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.30 set protocols bgp group rr neighbor 10.0.0.10 export set_nh_self set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.2 peer-as 64502 set protocols ospf area 0.0.0.0 interface lo0.30 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface ge-1/0/13 set policy-options policy-statement set_nh_self then next-hop self set routing-options autonomous-system 64501
Router RR4
set interfaces ge-1/0/10 unit 0 description RR4->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.14.2/24 set interfaces ge-1/0/11 unit 0 description RR4->R8 set interfaces ge-1/0/11 unit 0 family inet address 10.0.48.1/24 set interfaces lo0 unit 0 family inet address 10.0.0.40/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.40 set protocols bgp group rr family inet unicast add-path receive set protocols bgp group rr neighbor 10.0.0.10 set protocols bgp group rr_client type internal set protocols bgp group rr_client local-address 10.0.0.40 set protocols bgp group rr_client cluster 10.0.0.40 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 set protocols bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6 set protocols ospf area 0.0.0.0 interface ge-1/0/10 set protocols ospf area 0.0.0.0 interface lo0.40 passive set protocols ospf area 0.0.0.0 interface ge-1/0/11 set policy-options community addpath-community-members 4713:100 set policy-options community addpath-communities-send-4713:100 set policy-options policy-statement addpath-communitiesunities-send-4713-100 term term1 from protocol bgp set policy-options policy-statement addpath-communities-send-4713-100 term term1 from community addpath-4713-100-community set policy-options policy-statement addpath-communitiesunities-send-4713-100 term term1 then add-path send-count 6 set policy-options policy-statement addpath-communities-send-4713-100 term term1 then add-path accept set routing-options autonomous-system 64501
Router R5
set interfaces ge-1/0/10 unit 0 description R5->RR1 set interfaces ge-1/0/10 unit 0 family inet address 10.0.15.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.50/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.15.1 export s2b set protocols bgp group e1 neighbor 10.0.15.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then as-path-expand 2 set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
Router R6
set interfaces ge-1/0/10 unit 0 description R6->R2 set interfaces ge-1/0/10 unit 0 family inet address 10.0.26.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.60/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.26.1 export s2b set protocols bgp group e1 neighbor 10.0.26.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options static route 198.1.1.1/32 reject set routing-options autonomous-system 64502
Router R7
set interfaces ge-1/0/10 unit 0 description R7->R3 set interfaces ge-1/0/10 unit 0 family inet address 10.0.37.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.70/32 set protocols bgp group e1 type external set protocols bgp group e1 neighbor 10.0.37.1 export s2b set protocols bgp group e1 neighbor 10.0.37.1 peer-as 64501 set policy-options policy-statement s2b from protocol static set policy-options policy-statement s2b from protocol direct set policy-options policy-statement s2b then community add addpath-community set policy-options policy-statement s2b then accept set policy-options community addpath-community members 4713:100 set routing-options static route 199.1.1.1/32 reject set routing-options autonomous-system 64502
Router R8
set interfaces ge-1/0/10 unit 0 description R8->RR4 set interfaces ge-1/0/10 unit 0 family inet address 10.0.48.2/24 set interfaces lo0 unit 0 family inet address 10.0.0.80/32 set protocols bgp group rr type internal set protocols bgp group rr local-address 10.0.0.80 set protocols bgp group rr neighbor 10.0.0.40 family inet unicast add-path receive set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/0/10.8 set routing-options autonomous-system 64501 set chassis fpc 1 pic 0 tunnel-services bandwidth 1g
Configuring Router RR4
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router RR4:
Repeat this procedure for other routers after modifying the appropriate interface names, addresses, and other parameters.
Configure the interfaces with IPv4 addresses.
[edit interfaces] user@RR4# set ge-1/0/10 unit 0 description RR4->RR1 user@RR4# set ge-1/0/10 unit 0 family inet address 10.0.14.2/24 user@RR4# set ge-1/0/11 unit 0 description RR4->R8 user@RR4# set ge-1/0/11 unit 0 family inet address 10.0.48.1/24
Configure the loopback address.
[edit interfaces] user@RR4# set lo0 unit 0 family inet address 10.0.0.40/32
Configure OSPF or any other interior gateway protocol (IGP).
[edit protocols] user@RR4# set ospf area 0.0.0.0 interface lo0.40 passive user@RR4# set ospf area 0.0.0.0 interface ge-1/0/10 user@RR4# set ospf area 0.0.0.0 interface ge-1/0/11
Configure two IBGP groups rr for route reflectors and rr_client for clients of route reflectors.
[edit protocols] user@RR4# set bgp group rr type internal user@RR4# set bgp group rr local-address 10.0.0.40 user@RR4# set bgp group rr family inet unicast add-path receive user@RR4# set bgp group rr neighbor 10.0.0.10 user@RR4# set bgp group rr_client type internal user@RR4# set bgp group rr_client local-address 10.0.0.40 user@RR4# set bgp group rr_client cluster 10.0.0.40
Configure the feature to send multiple paths that contain 4713:100 community value only and limit the number of advertised multipaths to 6.
[edit protocols] user@RR4# set bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send prefix-policy addpath-communities-send-4713-100 user@RR4# set bgp group rr_client neighbor 10.0.0.80 family inet unicast add-path send path-count 6
Define a policy
addpath-community-members 4713:100
to filter prefixes with the community value 4713:100 and restrict the device to send up to 16 paths to Router R8. This limit overrides the previously configured add-path send path-count of 6 at the BGP group hierarchy level.[edit policy-options] user@RR4# set community addpath-community-members 4713:100 user@RR4# set community addpath-communities-send-4713:100 user@RR4# set policy-statement addpath-communitiesunities-send-4713-100 term term1 from protocol bgp user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 from community addpath-4713-100-community user@RR4# set policy-statement addpath-communitiesunities-send-4713-100 term term1 then add-path send-count 16 user@RR4# set policy-statement addpath-communities-send-4713-100 term term1 then add-path accept
Configure the router ID and the autonomous system for BGP hosts.
[edit routing-options] user@RR4# set router-id 10.0.0.40 user@RR4# set autonomous-system 64501
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show routing-options, and show policy-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
[edit] user@RR4# show interfaces ge-1/0/10 { unit 0 { description RR4->RR1; family inet { address 10.0.14.2/24; } } } ge-1/0/11 { unit 0 { description RR4->R8; family inet { address 10.0.48.1/24; } } } lo0 { unit 0 { family inet { address 10.0.0.10/32; } } }
[edit] user@RR4# show protocols bgp { group rr { type internal; local-address 10.0.0.40; family inet { unicast { add-path { receive; } } } neighbor 10.0.0.10; } group rr_client { type internal; local-address 10.0.0.40; cluster 10.0.0.40; neighbor 10.0.0.80 { family inet { unicast { add-path { send { prefix-policy addpath-communities-send-4713-100; path-count 6; } } } } } } } ospf { area 0.0.0.0 { interface ge-1/0/10.0; interface lo0.40 { passive; } interface ge-1/0/11.0; } }
[edit] user@RR4# show policy-options policy-options { policy-statement addpath-communities-send-4713-100 { term term1 { from community addpath-4713-100-community; } } policy-statement addpath-communitiesunities-send-4713-100 { term term1 { from protocol bgp; then { add-path send-count 16; } } } }
[edit] user@RR4# show routing-options router-id 10.0.0.40; autonomous-system 64501;
If you are done configuring the device, commit the configuration.
user@RR4# commit
Verification
Confirm that the configuration is working properly.
- Verifying That the Multipath Routes are Advertised from Router RR4 to Router R8
- Verifying That Router R8 Receives the Multipath Routes That Router RR4 Advertises
- Verifying That Router RR4 is Advertising only Multipath Routes with Community Value 4713:100 to Router R8
Verifying That the Multipath Routes are Advertised from Router RR4 to Router R8
Purpose
Verify that Router RR4 can send multiple paths to Router R8.
Action
From operational mode, run the show route advertising-protocol bgp neighbor-address command on Router RR4.
user@RR4> show route advertising-protocol bgp 10.0.0.80 inet.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 198.1.1.1/32 10.0.0.20 100 2 I 10.0.15.2 100 2 2 I * 199.1.1.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I
Meaning
Router RR4 is advertising multiple paths 10.0.0.20, 10.0.0.30, and 10.0.15.2 to Router R8.
Verifying That Router R8 Receives the Multipath Routes That Router RR4 Advertises
Purpose
Verify that Router R8 is receiving the multipath routes from Router RR4.
Action
From operational mode, run the show route receive-protocol bgp neighbor-address command on Router R8.
user@R8> show route receive-protocol bgp 10.0.0.40 inet.0: 19 destinations, 22 routes (19 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.50/32 10.0.15.2 100 2 2 I * 10.0.0.60/32 10.0.0.20 100 2 I * 10.0.0.70/32 10.0.0.30 100 2 I * 198.1.1.1/32 10.0.0.20 100 2 I 10.0.15.2 100 2 2 I * 199.1.1.1/32 10.0.0.20 100 2 I 10.0.0.30 100 2 I 10.0.15.2 100 2 2 I
Meaning
Router R8 is receiving multiple next hops 10.0.0.20, 10.0.0.30, and 10.0.15.2 for route 199.1.1.1/32 from Router RR4.
Verifying That Router RR4 is Advertising only Multipath Routes with Community Value 4713:100 to Router R8
Purpose
Router RR4 must advertise multipath routes with community value of 4713:100 only to Router R8.
Action
From operational mode, run the show route 199.1.1.1/32 detail command on Router RR4.
user@RR4> show route 199.1.1.1/32 detail inet.0: 20 destinations, 23 routes (20 active, 0 holddown, 0 hidden) 199.1.1.1/32 (3 entries, 3 announced) *BGP Preference: 170/-101 Next hop type: Indirect, Next hop index: 0 Address: 0xae0ea90 Next-hop reference count: 6 Source: 10.0.0.10 Next hop type: Router, Next hop index: 1115 Next hop: 10.0.14.1 via ge-1/0/10.4, selected Session Id: 0x0 Protocol next hop: 10.0.0.20 Indirect next hop: 0xc4091f0 1048581 INH Session ID: 0x0 State: <Active Int Ext> Local AS: 1 Peer AS: 1 Age: 4d 20:56:53 Metric2: 2 Validation State: unverified Task: BGP_1.10.0.0.10 Announcement bits (3): 2-KRT 3-BGP_RT_Background 4-Resolve tree 2 AS path: 2 I (Originator) Cluster list: 10.0.0.10 Originator ID: 10.0.0.20 Communities: 4713:100 Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 1 BGP Preference: 170/-101 Next hop type: Indirect, Next hop index: 0 Address: 0xae0eb50 Next-hop reference count: 3 Source: 10.0.0.10 Next hop type: Router, Next hop index: 1115 Next hop: 10.0.14.1 via lt-1/0/10.4, selected Session Id: 0x0 Protocol next hop: 10.0.0.30 Indirect next hop: 0xc409300 1048582 INH Session ID: 0x0 State: <NotBest Int Ext> Inactive reason: Not Best in its group - Router ID Local AS: 1 Peer AS: 1 Age: 4d 20:56:53 Metric2: 2 Validation State: unverified Task: BGP_1.10.0.0.10 Announcement bits (1): 3-BGP_RT_Background AS path: 2 I (Originator) Cluster list: 10.0.0.10 Originator ID: 10.0.0.30 Communities: 4713:100 Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 2 BGP Preference: 170/-101 Next hop type: Indirect, Next hop index: 0 Address: 0xae0e9d0 Next-hop reference count: 4 Source: 10.0.0.10 Next hop type: Router, Next hop index: 1115 Next hop: 10.0.14.1 via lt-1/0/10.4, selected Session Id: 0x0 Protocol next hop: 10.0.15.2 Indirect next hop: 0xc4090e0 1048580 INH Session ID: 0x0 State: <Int Ext> Inactive reason: AS path Local AS: 1 Peer AS: 1 Age: 4d 20:56:53 Metric2: 2 Validation State: unverified Task: BGP_1.10.0.0.10 Announcement bits (1): 3-BGP_RT_Background AS path: 2 2 I Communities: 4713:100 Accepted Localpref: 100 Router ID: 10.0.0.10 Addpath Path ID: 3
Meaning
Router RR4, is advertising three paths with community value of 4713:100 to Router R8.
Configuring Recursive Resolution over BGP Multipath
Starting in Junos OS Release 17.3R1, when a BGP prefix that has a single protocol next hop is resolved over another BGP prefix that has multiple resolved paths (unilist), all the paths are selected for protocol next-hop resolution. In earlier Junos OS releases, only one of the paths is picked for protocol next-hop resolution because the resolver did not support load-balancing across all paths of the IBGP multipath route. The resolver in the routing protocol process (rpd) resolves the protocol next-hop address (PNH) into immediate forwarding next hops. The BGP recursive resolution feature enhances the resolver to resolve routes over IBGP multipath route and use all the feasible paths as next hops. This feature benefits densely connected networks where BGP is used to establish infrastructure connectivity such as WAN networks with high equal-cost multipath and seamless MPLS topology.
Before you begin configuring recursive resolution of BGP multipath, you must do the following:
Configure the device interfaces.
Configure OSPF or any other IGP protocol.
Configure MPLS and LDP.
Configure BGP.
To configure recursive resolution over multipath,
See Also
Configuring ECMP Next Hops for RSVP and LDP LSPs for Load Balancing
The Junos OS supports configurations of 16, 32, 64, or 128 equal-cost multipath (ECMP) next hops for RSVP and LDP LSP.s. For networks with high-volume traffic, this provides more flexibility to load-balance the traffic over as many as 128 LSPs.
To configure the maximum limit for ECMP next hops, include the maximum-ecmp
next-hops
statement at the [edit
chassis]
hierarchy level:
[edit chassis] maximum-ecmp next-hops;
You can configure a maximum ECMP next-hop limit of 16, 32, 64, or 128 using this statement. The default limit is 16.
MX Series routers with one or more Modular Port Concentrator (MPC) cards and with
Junos OS 11.4 or earlier installed, support the configuration of the
maximum-ecmp
statement with only 16 next hops. You should
not configure the maximum-ecmp
statement with 32 or
64 next hops. When you commit the configuration with 32 or 64 next hops, the
following warning message appears:
Error: Number of members in Unilist NH exceeds the maximum supported 16
on Trio.
The following types of routes support the ECMP maximum next-hop configuration for as many as 128 ECMP gateways:
-
Static IPv4 and IPv6 routes with direct and indirect next-hop ECMPs
-
LDP ingress and transit routes learned through associated IGP routes
-
RSVP ECMP next hops created for LSPs
-
OSPF IPv4 and IPv6 route ECMPs
-
IS-IS IPv4 and IPv6 route ECMPs
-
EBGP IPv4 and IPv6 route ECMPs
-
IBGP (resolving over IGP routes) IPv4 and IPv6 route ECMPs
The enhanced ECMP limit of up to 128 ECMP next hops is also applicable for Layer 3 VPNs, Layer 2 VPNs, Layer 2 circuits, and VPLS services that resolve over an MPLS route, because the available ECMP paths in the MPLS route can also be used by such traffic.
If RSVP LSPs are configured with bandwidth allocation, for ECMP next hops with more than 16 LSPs, traffic is not distributed optimally based on bandwidths configured. Some LSPs with smaller allocated bandwidths receive more traffic than the ones configured with higher bandwidths. Traffic distribution does not strictly comply with the configured bandwidth allocation. This caveat is applicable to the following routers:
-
MX Series routers with all types of FPCs and DPCs, excluding MPCs. This caveat is not applicable to MX Series routers with line cards based on the Junos Trio chipset.
To view the details of the ECMP next hops, issue the show route
command. The show route summary command
also shows the current
configuration for the maximum ECMP limit. To view details of the ECMP LDP paths,
issue the traceroute mpls ldp
command.
See Also
Configuring Consistent Load Balancing for ECMP Groups
Per-packet load balancing allows you to spread traffic across multiple equal-cost paths. By default, when a failure occurs in one or more paths, the hashing algorithm recalculates the next hop for all paths, typically resulting in the redistribution of all flows. Consistent load balancing enables you to override this behavior so that only flows for links that are inactive are redirected. All existing active flows are maintained without disruption. In a data center environment, the redistribution of all flows when a link fails potentially results in significant traffic loss or a loss of service to servers whose links remain active. Consistent load balancing maintains all active links and instead remaps only those flows affected by one or more link failures. This feature ensures that flows connected to links that remain active continue uninterrupted.
This feature applies to topologies where members of an equal-cost multipath (ECMP) group are external BGP neighbors in a single-hop BGP session. Consistent load balancing does not apply when you add a new ECMP path or modify an existing path in any way. To add a new path with minimal disruption, define a new ECMP group without modifying the existing paths. In this way, clients can be moved to the new group gradually without terminating existing connections.
(On MX Series) Only Modular Port Concentrators (MPCs) are supported.
Both IPv4 and IPv6 paths are supported.
ECMP groups that are part of a virtual routing and forwarding (VRF) instance or other routing instance are also supported.
Multicast traffic is not supported.
Aggregated interfaces are supported, but consistent load balancing is not supported among members of the link aggregation (LAG) bundle. Traffic from active members of the LAG bundle might be moved to another active member when one or more member links fail. Flows are rehashed when one or more LAG member links fail.
We strongly recommend that you apply consistent load balancing to no more than a maximum of 1,000 IP prefixes per router or switch.
Layer 3 adjacency over integrated routing and bridging (IRB) interfaces is supported.
You can configure the BGP add-path feature to enable replacement of a failed path with a new active path when one or more paths in the ECMP group fail. Configuring replacement of failed paths ensures that traffic flow on the failed paths only are redirected. Traffic flow on active paths will remain unaltered.
When you configure consistent load balancing on generic routing encapsulation (GRE) tunnel interfaces, you must specify the inet address of the far end GRE interface so that the Layer 3 adjacencies over the GRE tunnel interfaces are installed correctly in the forwarding table. However, ECMP fast reroute (FRR) over GRE tunnel interfaces is not supported during consistent load balancing. You can specify the destination address on the router configured with consistent load balancing at the
[edit interfaces interface name unit unit name family inet address address]
hierarchy level. For example:[edit interfaces] user@host# set interfaces gr-4/0/0 unit 21 family inet address 10.10.31.2/32 destination 10.10.31.1
For more information on generic routing encapsulation see Configuring Generic Routing Encapsulation Tunneling.
Consistent load balancing does not support BGP multihop for EBGP neighbors. Therefore, do not enable the
multihop
option on devices configured with consistent load balancing.
To configure consistent load balancing for ECMP groups:
Understanding Entropy Label for BGP Labeled Unicast LSP
What Is an Entropy Label?
An entropy label is a special load-balancing label that enhances the router’s ability to load-balance traffic across equal-cost multipath (ECMP) paths or link aggregation groups (LAGs). The entropy label allows routers to efficiently load-balance traffic using just the label stack rather than deep packet inspection (DPI). DPI requires more of the router’s processing power and is not a capability shared by all routers.
When an IP packet has multiple paths to reach its destination, Junos OS uses certain fields of the packet headers to hash the packet to a deterministic path. The source or destination addresses and port numbers of the packet are used to hash, in order to avoid packet reordering of a given flow. If a core label-switching router (LSR) is not capable of performing a DPI to identify the flow or can not do so at line rate, the label stack alone is used for ECMP hashing. This requires an entropy label, a special load-balancing label that can carry the flow information. The ingress LSR has more context and information about incoming packets than transit LSRs. Therefore, the ingress label edge router (LER) can inspect the flow information of a packet, map it to an entropy label, and insert it into the label stack. LSRs in the core simply use the entropy label as the key to hash the packet to the right path.
An entropy label can be any label value between 16 to 1048575 (regular 20-bit label range). Since this range overlaps with the existing regular label range, a special label called entropy label indicator (ELI) is inserted before the entropy label. ELI is a special label assigned by IANA with the value of 7.
Figure 9 illustrates the entropy label in an RSVP label-switched path (LSP) packet label stack. The label stack consists of the entropy label indicator (ELI), the entropy label, and the IP packet.
Entropy Label for BGP Labeled Unicast
BGP labeled unicasts concatenate RSVP or LDP LSPs across multiple interior gateway protocol (IGP) areas or multiple autonomous systems (inter-AS LSPs). Inter-area BGP labeled unicast LSPs usually carry VPN and IP traffic when ingress PEs and egress PEs are in different IGP areas. When BGP labeled unicasts concatenate RSVP or LDP LSPs, Junos OS inserts the entropy labels at the BGP labeled unicast LSP ingress to achieve end-to-end entropy label load balancing. This is because RSVP or LDP entropy labels are usually popped at the penultimate hop node, together with the RSVP or LDP label, and there are no entropy labels at the stitching points, that is, the routers between two areas or two ASs. Therefore, in the absence of entropy labels, the router at the stitching point uses the BGP labels to forward packets. Figure 10 illustrates the BGP labeled unicast packet label stack with the entropy label in an RSVP label stack. The RSVP label stack consists of the entropy label indicator (ELI), the entropy label, the BGP label, and the IP packet. The RSVP entropy labels are popped at the penultimate hop node.
The BGP labeled unicast stitching node cannot use the entropy labels for load balancing unless the stitching node signals the entropy label capability at the BGP egress. If the BGP labeled unicast stitching node signals BGP entropy label capability (ELC) to the provider edge routers, the BGP labeled unicast LSP ingress is aware that the BGP labeled unicast LSP egress can handle entropy labels and inserts an entropy label indicator and entropy label underneath the BGP label. All of the LSRs are able to use the entropy label for load balancing. While BGP labeled unicast LSP might cross many routers in different areas and ASs, it is possible that some of the segments might support entropy labels while others might not. Figure 11 illustrates the entropy label in the BGP label stack. The label stack at the stitching node consists of the ELI, the entropy label, and the IP packet.
To disable entropy label capability for BGP labeled unicast at the egress node,
define a policy with the option no-entropy-label-capability
at
the [edit policy-options policy-statement
policy-name then]
hierarchy level.
[edit policy-options policy-statement policy-name then]
user@PE#no-entropy-label-capability
By default, routers that support entropy labels are configured with the load-balance-label-capability statement at the [edit
forwarding-options]
hierarchy level to signal the labels on a
per-LSP basis. If the peer router is not equipped to handle load-balancing
labels, you can prevent the signaling of entropy label capability by configuring
the no-load-balance-label-capability
statement at the
[edit forwarding-options]
hierarchy level.
[edit forwarding-options]
user@PE#no-load-balance-label-capability
By default, a BGP speaker uses the Entropy Label Capability (ELCv3) attribute defined
within the IETF BGP Router Capability Attribute (RCA) for load balancing. It sends
and receives only the ELCv3 attribute. If you need to use the ELCv2 attribute
interoperable with the RCA draft, explicitly configure the
elc-v2-compatible
knob at the labeled-unicast entropy-label
hierarchy. In such a scenario, both ELCv3 and ELCv2 are sent and received.
Supported and Unsupported Features
Junos OS supports an entropy label for BGP labeled unicast in the following scenarios:
All the nodes of the LSPs have entropy label capability.
Some of the nodes of the LSPs have entropy label capability.
The LSPs tunnel through another carrier’s VPN.
Define an ingress policy to select a subset of BGP labeled unicast LSPs to insert an entropy label at ingress.
Define an egress policy to disable entropy label capability advertisement.
Junos OS does not support the following features for an entropy label for BGP labeled unicast:
When BGP labeled unicast LSPs are tunneling through another carrier’s VPN, there is no true end-to-end entropy label because Junos OS does not insert an entropy label indicator or entropy label underneath VPN labels at the carrier-of-carriers network.
Currently, Junos OS does not support IPv6 BGP labeled unicast LSPs with their own entropy labels. However, IPv6 BGP labeled unicast LSPs might use the entropy labels from the underlying RSVP, LDP, or BGP LSPs.
See Also
Configuring an Entropy Label for a BGP Labeled Unicast LSP
Configure an entropy label for BGP labeled unicast LSP to achieve end-to-end entropy label load balancing. An entropy label is a special load-balancing label that can carry the flow information of the packets. BGP labeled unicasts generally concatenate RSVP or LDP LSPs across multiple IGP areas or multiple autonomous systems (ASs). RSVP or LDP entropy labels are popped at the penultimate hop node, together with the RSVP or LDP label. This feature enables the use of an entropy label at the stitching point, that is, the routers between two areas or ASs, to achieve end-to-end entropy label load balancing for BGP traffic. This feature enables the insertion of entropy labels at the BGP labeled unicast LSP ingress.
An entropy label can be any label value between 16 to 1048575 (regular 20-bit label range). Since this range overlaps with the existing regular label range, a special label called entropy label indicator (ELI) is inserted before the entropy label. ELI is a special label assigned by IANA with the value of 7.
Before you configure an entropy label for BGP labeled unicast, make sure you:
Configure the device interfaces.
Configure OSPF or any other IGP protocol.
Configure BGP.
Configure LDP.
Configure RSVP.
Configure MPLS.
To configure an entropy label for BGP labeled unicast LSP:
See Also
Example: Configuring an Entropy Label for a BGP Labeled Unicast LSP
This example shows how to configure an entropy label for a BGP labeled unicast to achieve end-to-end load balancing using entropy labels. When an IP packet has multiple paths to reach its destination, Junos OS uses certain fields of the packet headers to hash the packet to a deterministic path. This requires an entropy label, a special load-balancing label that can carry the flow information. LSRs in the core simply use the entropy label as the key to hash the packet to the correct path. An entropy label can be any label value between 16 to 1048575 (regular 20-bit label range). Since this range overlaps with the existing regular label range, a special label called entropy label indicator (ELI) is inserted before the entropy label. ELI is a special label assigned by IANA with the value of 7.
BGP labeled unicasts generally concatenate RSVP or LDP LSPs across multiple IGP areas or multiple autonomous systems. RSVP or LDP entropy labels are popped at the penultimate hop node, together with the RSVP or LDP label. This feature enables the use of entropy labels at the stitching points to bridge the gap between the penultimate hop node and the stitching point, in order to achieve end-to-end entropy label load balancing for BGP traffic.
Requirements
This example uses the following hardware and software components:
-
Seven MX Series routers with MPCs
-
Junos OS Release 15.1 or later running on all the devices
-
Revalidated using Junos OS Relese 22.4
-
Before you configure an entropy label for BGP labeled unicast, make sure you:
-
Configure the device interfaces.
-
Configure OSPF or any other IGP protocol.
-
Configure BGP.
-
Configure RSVP.
-
Configure MPLS.
Overview
When BGP labeled unicasts concatenate RSVP or LDP LSPs across multiple IGP areas or multiple autonomous systems, RSVP or LDP entropy labels are popped at the penultimate hop node, together with the RSVP or LDP label. However, there are no entropy labels at the stitching points, that is, the routers between two areas. Therefore, the routers at the stitching points used the BGP labels to forward packets.
Beginning with Junos OS Release 15.1, you can configure an entropy label for BGP labeled unicast to achieve end-to-end entropy label load balancing. This feature enables the use of an entropy label at the stitching points in order to achieve end-to-end entropy label load balancing for BGP traffic. Junos OS allows the insertion of entropy labels at the BGP labeled unicast LSP ingress.
By default, routers that support entropy labels are configured with the
load-balance-label-capability
statement at the [edit
forwarding-options]
hierarchy level to signal the labels on a per-LSP
basis. If the peer router is not equipped to handle load-balancing labels, you can
prevent the signaling of entropy label capability by configuring the
no-load-balance-label-capability
at the [edit
forwarding-options]
hierarchy level.
[edit forwarding-options]
user@PE#no-load-balance-label-capability
You can explicitly disable advertising entropy label capability at egress for
routes specified in the policy with the
no-entropy-label-capability
option at the [edit
policy-options policy-statement
policy name then]
hierarchy level.
[edit policy-options policy-statement policy-name then]
user@PE#no-entropy-label-capability
Topology
In Figure 12 , Router PE1 is the ingress router and Router PE2 is the egress router. Routers P1 and P2 are the transit routers. Router ABR is the area bridge router between Area 0 and Area 1. Two LSPs are configured on the ABR to PE2 for load balancing the traffic. Entropy label capability for BGP labeled unicast is enabled on the ingress Router PE1. Host 1 is connected to P1 for packet captures so that we can show the entropy label.
Configuration
- CLI Quick Configuration
- Configuring Router PE1
- Configuring Router P1
- Configuring Router ABR
- (Optional) Port-Mirroring Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a
text file, remove any line breaks, change any details necessary to match your
network configuration, copy and paste the commands into the CLI at the
[edit] hierarchy level, and then enter
commit
from configuration mode.
Router CE1
set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.1/30 set interfaces lo0 unit 0 family inet address 172.16.255.1/32 primary set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set routing-options router-id 172.16.255.1 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
Router PE1
set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.2/30 set interfaces ge-0/0/2 unit 0 family inet address 10.1.23.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.2/32 primary set interfaces lo0 unit 1 family inet address 10.1.255.22/32 set policy-options policy-statement bgp-to-ospf from protocol bgp set policy-options policy-statement bgp-to-ospf then accept set policy-options policy-statement pplb then load-balance per-packet set routing-instances VPN-l3vpn instance-type vrf set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf set routing-instances VPN-l3vpn interface ge-0/0/0.0 set routing-instances VPN-l3vpn interface lo0.1 set routing-instances VPN-l3vpn route-distinguisher 10.1.255.2:1 set routing-instances VPN-l3vpn vrf-target target:65000:1 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.2 set protocols bgp group ibgp family inet labeled-unicast entropy-label set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.6 family inet-vpn unicast set protocols mpls icmp-tunneling set protocols mpls label-switched-path pe1-abr to 10.1.255.4 set protocols mpls label-switched-path pe1-abr entropy-label set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface lo0.0
Router P1
set interfaces ge-0/0/0 unit 0 family inet address 10.1.23.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.34.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.3/32 primary set routing-options router-id 10.1.255.3 set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/0.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/2.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/2.0
Router ABR
set interfaces ge-0/0/0 unit 0 family inet address 10.1.34.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.45.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 unit 0 family inet address 10.1.45.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.4/32 primary set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement send-inet3-pe1 from route-filter 10.1.255.2/32 exact set policy-options policy-statement send-inet3-pe1 then accept set policy-options policy-statement send-inet3-pe2 from route-filter 10.1.255.6/32 exact set policy-options policy-statement send-inet3-pe2 then accept set routing-options router-id 10.1.255.4 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.4 set protocols bgp group ibgp family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.2 export send-inet3-pe2 set protocols bgp group ibgp neighbor 10.1.255.6 export send-inet3-pe1 set protocols mpls icmp-tunneling set protocols mpls label-switched-path abr-pe1 to 10.1.255.2 set protocols mpls label-switched-path abr-pe1 entropy-label set protocols mpls label-switched-path abr-pe2 to 10.1.255.6 set protocols mpls label-switched-path abr-pe2 entropy-label set protocols mpls label-switched-path abr-pe2 primary to-r6-1 set protocols mpls label-switched-path abr-pe2-2 to 10.1.255.6 set protocols mpls label-switched-path abr-pe2-2 entropy-label set protocols mpls label-switched-path abr-pe2-2 primary to-r6-2 set protocols mpls path to-r6-1 10.1.45.2 strict set protocols mpls path to-r6-1 10.1.56.2 strict set protocols mpls path to-r6-2 10.1.45.6 strict set protocols mpls path to-r6-2 10.1.56.6 strict set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/2.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 set protocols ospf area 0.0.0.1 interface ge-0/0/3.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface ge-0/0/3.0
Router P2
set interfaces ge-0/0/0 unit 0 family inet address 10.1.45.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 10.1.45.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 10.1.56.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 unit 0 family inet address 10.1.56.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.5/32 primary set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement pplb then load-balance per-packet set routing-options router-id 10.1.255.5 set routing-options forwarding-table export pplb set protocols mpls icmp-tunneling set protocols mpls interface ge-0/0/2.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.1 interface lo0.0 passive set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 set protocols ospf area 0.0.0.1 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface ge-0/0/1.0 set protocols ospf area 0.0.0.1 interface ge-0/0/3.0 set protocols rsvp interface ge-0/0/2.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/3.0
Router PE2
set interfaces ge-0/0/0 unit 0 family inet address 10.1.56.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 10.1.56.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 172.16.67.2/30 set interfaces lo0 unit 0 family inet address 10.1.255.6/32 primary set interfaces lo0 unit 1 family inet address 10.1.255.66/32 set forwarding-options hash-key family mpls label-1 set forwarding-options hash-key family mpls label-2 set forwarding-options hash-key family mpls label-3 set forwarding-options enhanced-hash-key family mpls no-payload set policy-options policy-statement bgp-to-ospf from protocol bgp set policy-options policy-statement bgp-to-ospf then accept set policy-options policy-statement pplb then load-balance per-packet set routing-instances VPN-l3vpn instance-type vrf set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf set routing-instances VPN-l3vpn interface ge-0/0/2.0 set routing-instances VPN-l3vpn interface lo0.1 set routing-instances VPN-l3vpn route-distinguisher 10.1.255.6:1 set routing-instances VPN-l3vpn vrf-target target:65000:1 set routing-options router-id 10.1.255.6 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 10.1.255.6 set protocols bgp group ibgp family inet labeled-unicast entropy-label set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 set protocols bgp group ibgp neighbor 10.1.255.2 family inet-vpn unicast set protocols mpls icmp-tunneling set protocols mpls label-switched-path pe2-abr to 10.1.255.4 set protocols mpls label-switched-path pe2-abr entropy-label set protocols mpls interface ge-0/0/0.0 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.1 interface ge-0/0/0.0 set protocols ospf area 0.0.0.1 interface lo0.0 passive set protocols ospf area 0.0.0.1 interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols rsvp interface ge-0/0/1.0
Router CE2
set interfaces ge-0/0/0 unit 0 family inet address 172.16.67.1/30 set interfaces lo0 unit 0 family inet address 172.16.255.7/32 primary set interfaces lo0 unit 0 family inet address 192.168.255.7/32 set routing-options router-id 172.16.255.7 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
Configuring Router PE1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router PE1:
Repeat this procedure for Router PE2 after modifying the appropriate interface names, addresses, and other parameters.
-
Configure the physical interfaces. Ensure to configure
family mpls
on the core facing interface.[edit] user@PE1# set interfaces ge-0/0/0 unit 0 family inet address 172.16.12.2/30 user@PE1# set interfaces ge-0/0/2 unit 0 family inet address 10.1.23.1/30 user@PE1# set interfaces ge-0/0/2 unit 0 family mpls
-
Configure the loopback interfaces. The secondary loopback is optional and is applied under the routing instance in a later step.
[edit] user@PE1# set interfaces lo0 unit 0 family inet address 10.1.255.2/32 primary user@PE1# set interfaces lo0 unit 1 family inet address 10.1.255.22/32
-
Configure the router ID and the autonomous system number.
[edit] user@PE1# set routing-options router-id 10.1.255.2 user@PE1# set routing-options autonomous-system 65000
-
Configure the OSPF protocol.
[edit] user@PE1# set protocols ospf traffic-engineering user@PE1# set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 user@PE1# set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
Configure the RSVP protocol.
[edit] user@PE1# set protocols rsvp interface ge-0/0/2.0 user@PE1# set protocols rsvp interface lo0.0
-
Configure the MPLS protocol and an LSP towards the ABR. Include the
entropy-label
option to add the entropy label to the MPLS label stack.[edit protocols] user@PE1# set protocols mpls icmp-tunneling user@PE1# set protocols mpls label-switched-path pe1-abr to 10.1.255.4 user@PE1# set protocols mpls label-switched-path pe1-abr entropy-label user@PE1# set protocols mpls interface ge-0/0/2.0 user@PE1# set protocols mpls interface lo0.0
-
Configure IBGP using
family inet labeled-unicast
for the ABR peering andfamily inet-vpn
for the PE2 peering. Enable entropy label capability for BGP labeled unicast.[edit] user@PE1# set protocols bgp group ibgp type internal user@PE1# set protocols bgp group ibgp local-address 10.1.255.2 user@PE1# set protocols bgp group ibgp family inet labeled-unicast entropy-label user@PE1# set protocols bgp group ibgp neighbor 10.1.255.4 family inet labeled-unicast rib inet.3 user@PE1# set protocols bgp group ibgp neighbor 10.1.255.6 family inet-vpn unicast
-
Define a policy to export BGP VPN routes into OSPF. The policy is applied under OSPF in the routing instance.
[edit] user@PE1# set policy-options policy-statement bgp-to-ospf from protocol bgp user@PE1# set policy-options policy-statement bgp-to-ospf then accept
-
Define a load balancing policy and apply it under the
routing-options forwarding-table
. PE1 only has one path in the example therefore this step is not needed, but for this example we are applying the same load balancing policy on all devices.[edit] user@PE1# set policy-options policy-statement pplb then load-balance per-packet user@PE1# set routing-options forwarding-table export pplb
-
Configure the Layer 3 VPN routing instance.
[edit] user@PE1# set routing-instances VPN-l3vpn instance-type vrf
-
Assign the interfaces to the routing instance.
[edit] user@PE1# set routing-instances VPN-l3vpn interface ge-0/0/0.0 user@PE1# set routing-instances VPN-l3vpn interface lo0.1
-
Configure the route distinguisher for the routing instance.
[edit] user@PE1# set routing-instances VPN-l3vpn route-distinguisher 10.1.255.2:1
-
Configure a VPN routing and forwarding (VRF) target for the routing instance.
[edit] user@PE1# set routing-instances VPN-l3vpn vrf-target target:65000:1
-
Configure the protocol OSPF under the routing instance and apply the previously configured
bgp-to-ospf
policy.[edit] user@PE1# set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@PE1# set routing-instances VPN-l3vpn protocols ospf area 0.0.0.0 interface lo0.1 passive user@PE1# set routing-instances VPN-l3vpn protocols ospf export bgp-to-ospf
Configuring Router P1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router P1:
Repeat this procedure for Router P2 after modifying the appropriate interface names, addresses, and other parameters.
-
Configure the physical interfaces.
[edit] user@P1# set interfaces ge-0/0/0 unit 0 family inet address 10.1.23.2/30 user@P1# set interfaces ge-0/0/0 unit 0 family mpls user@P1# set interfaces ge-0/0/2 unit 0 family inet address 10.1.34.1/30 user@P1# set interfaces ge-0/0/2 unit 0 family mpls
-
Configure the loopback interface.
[edit] user@P1# set interfaces lo0 unit 0 family inet address 10.1.255.3/32 primary
-
Configure the router ID.
[edit] user@P1# set routing-options router-id 10.1.255.3
-
Configure the OSPF protocol.
[edit] user@P1# set protocols ospf traffic-engineering user@P1# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@P1# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@P1# set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
-
Configure the RSVP protocol.
[edit] user@P1# set protocols rsvp interface ge-0/0/0.0 user@P1# set protocols rsvp interface lo0.0 user@P1# set protocols rsvp interface ge-0/0/2.0
-
Configure the MPLS protocol.
[edit] user@P1# set protocols mpls icmp-tunneling user@P1# set protocols mpls interface ge-0/0/0.0 user@P1# set protocols mpls interface lo0.0 user@P1# set protocols mpls interface ge-0/0/2.0
Configuring Router ABR
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router ABR:
-
Configure the physical interfaces.
[edit] user@ABR# set interfaces ge-0/0/0 unit 0 family inet address 10.1.34.2/30 user@ABR# set interfaces ge-0/0/0 unit 0 family mpls user@ABR# set interfaces ge-0/0/2 unit 0 family inet address 10.1.45.1/30 user@ABR# set interfaces ge-0/0/2 unit 0 family mpls user@ABR# set interfaces ge-0/0/3 unit 0 family inet address 10.1.45.5/30 user@ABR# set interfaces ge-0/0/3 unit 0 family mpls
-
Configure the loopback interface.
[edit] user@ABR# set interfaces lo0 unit 0 family inet address 10.1.255.4/32 primary
-
Configure MPLS labels that the router uses for hashing the packets to its destination for load balancing.
[edit] user@ABR# set forwarding-options hash-key family mpls label-1 user@ABR# set forwarding-options hash-key family mpls label-2 user@ABR# set forwarding-options hash-key family mpls label-3 user@ABR# set forwarding-options enhanced-hash-key family mpls no-payload
-
Configure the router ID and the autonomous system number.
[edit] user@ABR# set routing-options router-id 10.1.255.4 user@ABR# set routing-options autonomous-system 65000
-
Configure the OSPF protocol.
[edit] user@ABR# set protocols ospf traffic-engineering user@ABR# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@ABR# set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 user@ABR# set protocols ospf area 0.0.0.1 interface ge-0/0/2.0 user@ABR# set protocols ospf area 0.0.0.1 interface ge-0/0/3.0
-
Configure the RSVP protocol.
[edit] user@ABR# set protocols rsvp interface lo0.0 user@ABR# set protocols rsvp interface ge-0/0/0.0 user@ABR# set protocols rsvp interface ge-0/0/2.0 user@ABR# set protocols rsvp interface ge-0/0/3.0
-
Configure the MPLS protocol and specify the LSPs towards PE1 and PE2. Two LSPs are created towards PE2 for the purpose of load balancing traffic to show different LSPs and interfaces are used.
[edit] user@ABR# set protocols mpls icmp-tunneling user@ABR# set protocols mpls label-switched-path abr-pe1 to 10.1.255.2 user@ABR# set protocols mpls label-switched-path abr-pe1 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2 to 10.1.255.6 user@ABR# set protocols mpls label-switched-path abr-pe2 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2 primary to-r6-1 user@ABR# set protocols mpls label-switched-path abr-pe2-2 to 10.1.255.6 user@ABR# set protocols mpls label-switched-path abr-pe2-2 entropy-label user@ABR# set protocols mpls label-switched-path abr-pe2-2 primary to-r6-2 user@ABR# set protocols mpls path to-r6-1 10.1.45.2 strict user@ABR# set protocols mpls path to-r6-1 10.1.56.2 strict user@ABR# set protocols mpls path to-r6-2 10.1.45.6 strict user@ABR# set protocols mpls path to-r6-2 10.1.56.6 strict user@ABR# set protocols mpls interface lo0.0 user@ABR# set protocols mpls interface ge-0/0/0.0 user@ABR# set protocols mpls interface ge-0/0/2.0 user@ABR# set protocols mpls interface ge-0/0/3.0
-
Configure IBGP to both PE1 and PE2 using
family inet labeled-unicast
. Apply the policy to advertise the inet.3 loopback route from both PE1 and PE2. We show the policy in the next step.[edit] user@ABR# set protocols bgp group ibgp type internal user@ABR# set protocols bgp group ibgp local-address 10.1.255.4 user@ABR# set protocols bgp group ibgp family inet labeled-unicast rib inet.3 user@ABR# set protocols bgp group ibgp neighbor 10.1.255.2 export send-inet3-pe2 user@ABR# set protocols bgp group ibgp neighbor 10.1.255.6 export send-inet3-pe1
-
Define a policy to match on the loopback addresses for PE1 and PE2.
[edit] user@ABR# set policy-options policy-statement send-inet3-pe1 from route-filter 10.1.255.2/32 exact user@ABR# set policy-options policy-statement send-inet3-pe1 then accept user@ABR# set policy-options policy-statement send-inet3-pe2 from route-filter 10.1.255.6/32 exact user@ABR# set policy-options policy-statement send-inet3-pe2 then accept
-
Define a policy for load balancing and apply it under the
routing-options forwarding-table
.[edit] user@ABR# set policy-options policy-statement pplb then load-balance per-packet user@ABR# set routing-options forwarding-table export pplb
(Optional) Port-Mirroring Configuration
To see the entropy label that is applied you can capture the traffic. In this example a filter is applied on the PE1 facing interface on P1 to capture the CE1 to CE2 traffic. The traffic is sent to Host 1 for viewing. There are different ways to capture traffic than what we use in this example. For more information see Understanding Port Mirroring and Analyzers.
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Router P1:
-
Configure the interfaces. In this example we are putting the interface connected to Host1 in a bridge domain and creating an IRB interface for verifying connectivity to Host1.
[edit] user@P1# set interfaces ge-0/0/4 unit 0 family bridge interface-mode access user@P1# set interfaces ge-0/0/4 unit 0 family bridge vlan-id 100 user@P1# set interfaces irb unit 0 family inet address 10.1.31.1/30
-
Configure the bridge domain.
[edit] user@P1# set bridge-domains v100 vlan-id 100 user@P1# set bridge-domains v100 routing-interface irb.0
-
Configure a filter to capture the traffic. For this example we are capturing all traffic.
[edit] user@P1# set firewall family any filter test term 1 then count test user@P1# set firewall family any filter test term 1 then port-mirror user@P1# set firewall family any filter test term 1 then accept
-
Apply the filter to the PE1 facing interface.
[edit] user@P1# set interfaces ge-0/0/0 unit 0 filter input test
-
Configure the port mirroring options. For this example we are mirroring all traffic and sending it to Host1 connected to interface ge-0/0/4.
[edit] user@P1# set forwarding-options port-mirroring input rate 1 user@P1# set forwarding-options port-mirroring family any output interface ge-0/0/4.0
Verification
Confirm that the configuration is working properly.
- Verifying That the Entropy Label Capability Is Being Advertised
- Verifying That Router PE1 Receives the Entropy Label Advertisement
- Verifying ECMP at the ABR to PE2
- Show Routes to CE2 on PE1
- Ping CE2 from CE1
- Verify Load Balancing
- Verify the Entropy Label
Verifying That the Entropy Label Capability Is Being Advertised
Purpose
Verify that the entropy label capability path attribute is being advertised from the ABR to PE1 for the route to PE2.
Action
From operational mode, run the show route advertising-protocol bgp 10.1.255.2 detail command on Router ABR.
user@ABR> show route advertising-protocol bgp 10.1.255.2 detail inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) * 10.1.255.6/32 (1 entry, 1 announced) BGP group ibgp type Internal Route Label: 299952 Nexthop: Self Flags: Nexthop Change MED: 2 Localpref: 4294967294 AS path: [65000] I Entropy label capable
Meaning
The output shows that the host PE2 with the IP address of 10.1.255.6 has the entropy label capability and the route label that is used. The host is advertising the entropy label capability to its BGP neighbors.
Verifying That Router PE1 Receives the Entropy Label Advertisement
Purpose
Verify that Router PE1 receives the entropy label advertisement for Router PE2.
Action
From operational mode, run the show route protocol bgp 10.1.255.6 extensive command on Router PE1.
user@PE1> show route protocol bgp 10.1.255.6 extensive inet.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden) inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) 10.1.255.6/32 (1 entry, 1 announced) *BGP Preference: 170/1 Next hop type: Indirect, Next hop index: 0 Address: 0x7b3ffd4 Next-hop reference count: 2, key opaque handle: 0x0, non-key opaque handle: 0x0 Source: 10.1.255.4 Next hop type: Router, Next hop index: 0 Next hop: 10.1.23.2 via ge-0/0/2.0, selected Label-switched-path pe1-abr Label operation: Push 299952, Push 299808(top) Label TTL action: prop-ttl, prop-ttl(top) Load balance label: Label 299952: Entropy label; Label 299808: None; Label element ptr: 0x93d6bf8 Label parent element ptr: 0x93d6c20 Label element references: 3 Label element child references: 2 Label element lsp id: 0 Session Id: 0 Protocol next hop: 10.1.255.4 Label operation: Push 299952 Label TTL action: prop-ttl Load balance label: Label 299952: Entropy label; Indirect next hop: 0x758c05c - INH Session ID: 0 State: <Active Int Ext> Local AS: 65000 Peer AS: 65000 Age: 1:33:11 Metric: 2 Metric2: 2 Validation State: unverified Task: BGP_65000.10.1.255.4 Announcement bits (2): 3-Resolve tree 1 4-Resolve_IGP_FRR task AS path: I Accepted Route Label: 299952 Localpref: 4294967294 Router ID: 10.1.255.4 Session-IDs associated: Session-id: 324 Version: 3 Thread: junos-main Indirect next hops: 1 Protocol next hop: 10.1.255.4 Metric: 2 ResolvState: Resolved Label operation: Push 299952 Label TTL action: prop-ttl Load balance label: Label 299952: Entropy label; Indirect next hop: 0x758c05c - INH Session ID: 0 Indirect path forwarding next hops: 1 Next hop type: Router Next hop: 10.1.23.2 via ge-0/0/2.0 Session Id: 0 10.1.255.4/32 Originating RIB: inet.3 Metric: 2 Node path count: 1 Forwarding nexthops: 1 Next hop type: Router Next hop: 10.1.23.2 via ge-0/0/2.0 Session Id: 0
Meaning
Router PE1 receives the entropy label capability advertisement from its BGP neighbor.
Verifying ECMP at the ABR to PE2
Purpose
Verify equal-cost multipath (ECMP) to PE2.
Action
From operational mode, run the show route table mpls.0 and show route forwarding-table label <label>commands on Router ABR.
user@ABR> show route table mpls.0 mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 2w1d 23:02:11, metric 1 Receive 1 *[MPLS/0] 2w1d 23:02:11, metric 1 Receive 2 *[MPLS/0] 2w1d 23:02:11, metric 1 Receive 13 *[MPLS/0] 2w1d 23:02:11, metric 1 Receive 299936 *[VPN/170] 2d 21:47:02 > to 10.1.34.1 via ge-0/0/0.0, label-switched-path abr-pe1 299952 *[VPN/170] 2d 21:47:02 > to 10.1.45.2 via ge-0/0/2.0, label-switched-path abr-pe2 to 10.1.45.6 via ge-0/0/3.0, label-switched-path abr-pe2-2 ruser@ABR> show route forwarding-table label 299952 Routing table: default.mpls MPLS: Destination Type RtRef Next hop Type Index NhRef Netif 299952 user 0 ulst 1048575 2 10.1.45.2 Swap 299824 516 2 ge-0/0/2.0 10.1.45.6 Swap 299840 572 2 ge-0/0/3.0 ...
Meaning
The output shows an ECMP for the label used for the BGP labeled unicast route.
Show Routes to CE2 on PE1
Purpose
Verify the routes to CE2.
Action
From operational mode, run the show route table VPN-l3vpn.inet.0 172.16.255.7 extensive and show route table VPN-l3vpn.inet.0 192.168.255.7 extensivecommands on Router PE1.
user@PE1> show route table VPN-l3vpn.inet.0 172.16.255.7 extensive VPN-l3vpn.inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) 172.16.255.7/32 (1 entry, 1 announced) TSI: OSPF area : 0.0.0.0, LSA ID : 172.16.255.7, LSA type : Summary KRT in-kernel 172.16.255.7/32 -> {indirect(1048574)} *BGP Preference: 170/-101 Route Distinguisher: 10.1.255.6:1 Next hop type: Indirect, Next hop index: 0 Address: 0x7b40434 Next-hop reference count: 9, key opaque handle: 0x0, non-key opaque handle: 0x0 Source: 10.1.255.6 Next hop type: Router, Next hop index: 515 Next hop: 10.1.23.2 via ge-0/0/2.0, selected Label-switched-path pe1-abr Label operation: Push 299824, Push 299952, Push 299808(top) Label TTL action: prop-ttl, prop-ttl, prop-ttl(top) Load balance label: Label 299824: None; Label 299952: Entropy label; Label 299808: None; Label element ptr: 0x93d6c98 Label parent element ptr: 0x93d6bf8 Label element references: 1 Label element child references: 0 Label element lsp id: 0 Session Id: 140 Protocol next hop: 10.1.255.6 Label operation: Push 299824 Label TTL action: prop-ttl Load balance label: Label 299824: None; ... user@PE1> show route table VPN-l3vpn.inet.0 192.168.255.7 extensive VPN-l3vpn.inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) 192.168.255.7/32 (1 entry, 1 announced) TSI: OSPF area : 0.0.0.0, LSA ID : 192.168.255.7, LSA type : Summary KRT in-kernel 192.168.255.7/32 -> {indirect(1048574)} *BGP Preference: 170/-101 Route Distinguisher: 10.1.255.6:1 Next hop type: Indirect, Next hop index: 0 Address: 0x7b40434 Next-hop reference count: 9, key opaque handle: 0x0, non-key opaque handle: 0x0 Source: 10.1.255.6 Next hop type: Router, Next hop index: 515 Next hop: 10.1.23.2 via ge-0/0/2.0, selected Label-switched-path pe1-abr Label operation: Push 299824, Push 299952, Push 299808(top) Label TTL action: prop-ttl, prop-ttl, prop-ttl(top) Load balance label: Label 299824: None; Label 299952: Entropy label; Label 299808: None; Label element ptr: 0x93d6c98 Label parent element ptr: 0x93d6bf8 Label element references: 1 Label element child references: 0 Label element lsp id: 0 Session Id: 140 Protocol next hop: 10.1.255.6 Label operation: Push 299824 Label TTL action: prop-ttl Load balance label: Label 299824: None; ...
Meaning
The output shows the same labels are used for both routes.
Ping CE2 from CE1
Purpose
Verify connectivity and to use for verifying load balancing.
Action
From operational mode, run the ping 172.16.255.7 source 172.16.12.1 rapid count 100 and ping 192.168.255.7 source 192.168.255.1 rapid count 200commands on Router PE1.
user@CE1> ping 172.16.255.7 source 172.16.12.1 rapid count 100 PING 172.16.255.7 (172.16.255.7): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 172.16.255.7 ping statistics --- 100 packets transmitted, 100 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.369/6.070/8.828/0.612 ms user@CE1> ping 192.168.255.7 source 192.168.255.1 rapid count 200 PING 192.168.255.7 (192.168.255.7): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 192.168.255.7 ping statistics --- 200 packets transmitted, 200 packets received, 0% packet loss round-trip min/avg/max/stddev = 5.086/5.994/10.665/0.649 ms
Meaning
The output shows pings are successful.
Verify Load Balancing
Purpose
Verify load balancing.
Action
From operational mode, run the show mpls lsp ingress statistics command on the ABR.
user@ABR> show mpls lsp ingress statistics Ingress LSP: 3 sessions To From State Packets Bytes LSPname 10.1.255.2 10.1.255.4 Up 300 30000 abr-pe1 10.1.255.6 10.1.255.4 Up 200 20000 abr-pe2 10.1.255.6 10.1.255.4 Up 100 10000 abr-pe2-2 Total 3 displayed, Up 3, Down 0
Meaning
The output shows the first ping from the previous command used LSP abr-pe2-2 and the second ping used LSP abr-pe2.
Verify the Entropy Label
Purpose
Verify the entropy label is different between the pings that were used.
Action
On Host 1, run the tcpdump -i eth1 -n.
user@Host1# tcpdump -i eth1 -n ... 13:42:31.993274 MPLS (label 299808, exp 0, ttl 63) (label 299952, exp 0, ttl 63) (label 7, exp 0, ttl 63) (label 1012776, exp 0, ttl 0) (label 299824, exp 0, [S], ttl 63) IP 172.16.12.1 > 172.16.255.7: ICMP echo request, id 32813, seq 9, length 64 ... 13:43:19.570260 MPLS (label 299808, exp 0, ttl 63) (label 299952, exp 0, ttl 63) (label 7, exp 0, ttl 63) (label 691092, exp 0, ttl 0) (label 299824, exp 0, [S], ttl 63) IP 192.168.255.1 > 192.168.255.7: ICMP echo request, id 46381, seq 9, length 64
Meaning
The output shows the different value for the entropy label for the two different ping commands.
Use Case for BGP Prefix Independent Convergence for Inet, Inet6, or Labeled Unicast
In the instance of a router failure, a BGP network can take from a few seconds to minutes to recover, depending on parameters such as the size of the network or router performance. When the BGP Prefix Independent Convergence (PIC) feature is enabled on a router, BGP installs to the Packet Forwarding Engine the second best path in addition to the calculated best path to a destination. The router uses this backup path when an egress router fails in a network and drastically reduces the outage time. You can enable this feature to reduce the network downtime if the egress router fails.
When reachability to an egress router in a network fails, the IGP detects this outage, and the link state propagates this information throughout the network and advertises the BGP next hop for that prefix as unreachable. BGP reevaluates alternative paths and if an alternative path is available, reinstalls this alternate next hop into the Packet Forwarding Engine. This kind of egress failure usually impacts multiple prefixes at the same time, and BGP has to update all these prefixes one at a time. On the ingress routers, the IGP completes the shortest path first (SPF) and updates the next hops. Junos OS then determines the prefixes that have become unreachable and signals to the protocol that these need to be updated. BGP gets the notification and updates the next hop for every prefix that is now invalid. This process could impact the connectivity and could take a few minutes to recover from the outage. BGP PIC can reduce this down time as the backup path is already installed in the Packet Forwarding Engine.
Beginning with Junos OS Release 15.1, the BGP PIC feature, which was initially supported for Layer 3 VPN routers, is extended to BGP with multiple routes in the global tables such as inet and inet6 unicast, and inet and inet6 labeled unicast. On a BGP PIC enabled router, Junos OS installs the backup path for the indirect next hop on the Routing Engine and also provides this route to the Packet Forwarding Engine and IGP. When an IGP loses reachability to a prefix with one or more routes, it signals to the Routing Engine with a single message prior to updating the routing tables. The Routing Engine signals to the Packet Forwarding Engine that an indirect next hop has failed, and traffic must be rerouted using the backup path. Routing to the impacted destination prefix continues using the backup path even before BGP starts recalculating the new next hops for the BGP prefixes. The router uses this backup path to reduce traffic loss until the global convergence through the BGP is resolved.
The time at which the outage occurs to the time until the loss of reachability is signaled actually depends on the failure detection time of the nearest router and the IGP convergence time. Once the local router detects the outage, the route convergence without the BGP PIC feature enabled depends heavily on the number of prefixes affected and the performance of the router due to recalculation of each affected prefix. However, with the BGP PIC feature enabled, even before BGP recalculates the best path for those affected prefixes, the Routing Engine signals the data plane to switch to the standby next best path. Hence traffic loss is minimum. The new routes are calculated even while the traffic is being forwarded, and these new routes are pushed down to the data plane. Therefore, the number of BGP prefixes affected does not impact the time taken from the time traffic outage occurs to the point of time at which BGP signals the loss of reachability.
See Also
Configuring BGP Prefix Independent Convergence for Inet
On a BGP Prefix Independent Convergence (PIC) enabled router, Junos OS installs the backup path for the indirect next hop on the Routing Engine and also provides this route to the Packet Forwarding Engine and IGP. When an IGP loses reachability to a prefix with one or more routes, it signals to the Routing Engine with a single message prior to updating the routing tables. The Routing Engine signals to the Packet Forwarding Engine that an indirect next hop has failed, and traffic must be rerouted using the backup path. Routing to the impacted destination prefix continues using the backup path even before BGP starts recalculating the new next hops for the BGP prefixes. The router uses this backup path to reduce traffic loss until the global convergence through the BGP is resolved. The BGP PIC feature, which was initially supported for Layer 3 VPN routers, is extended to BGP with multiple routes in the global tables such as inet and inet6 unicast, and inet and inet6 labeled unicast.
Before you begin:
Configure the device interfaces.
Configure OSPF or any other IGP protocol.
Configure MPLS and LDP.
Configure BGP.
The BGP PIC feature is supported only on routers with MPC interfaces.
On routers with Modular Port Concentrators (MPCs), enable enhanced IP network services as shown here:
[edit chassis network-services] user@host# set enhanced-ip
To configure BGP PIC for inet:
See Also
Example: Configuring BGP Prefix Independent Convergence for Inet
This example shows how to configure BGP PIC for inet. In the instance of a router failure, a BGP network can take from a few seconds to minutes to recover, depending on parameters such as the size of the network or router performance. When the BGP Prefix Independent Convergence (PIC) feature is enabled on a router, BGP with multiple routes in the global tables, such as inet and inet6 unicast, and inet and inet6 labeled unicast, installs to the Packet Forwarding Engine the second best path in addition to the calculated best path to a destination. The router uses this backup path when an egress router fails in a network and drastically reduces the outage time.
Requirements
No special configuration beyond device initialization is required before configuring this example.
This example uses the following hardware and software components:
One MX Series router with MPCs to configure the BGP PIC feature
Seven routers that can be a combination of M Series, MX Series, T Series, or PTX Series routers
Junos OS Release 15.1 or later on the device with BGP PIC configured
Overview
Beginning with Junos OS Release 15.1, BGP PIC, which was initially supported for Layer 3 VPN routers, is extended to BGP with multiple routes in the global tables such as inet and inet6 unicast, and inet and inet6 labeled unicast. BGP installs to the Packet Forwarding Engine the second best path in addition to the calculated best path to a destination. When an IGP loses reachability to a prefix, the router uses this backup path to reduce traffic loss until the global convergence through the BGP is resolved, thereby reducing the outage duration.
The BGP PIC feature is supported only on routers with MPCs.
Topology
This example shows three customer edge (CE) routers, Device CE0, CE1, and CE2. Routers PE0, PE1, and PE2 are the provider edge (PE) routers. Router P0 and P1 are the provider core routers. BGP PIC is configured on Router PE0. For testing, the address 192.168.1.5 is added as a second loopback interface address on Device CE1. The address is announced to Routers PE1 and PE2 and is relayed by the internal BGP (IBGP) to Router PE0. On Router PE0, there are two paths to the 192.168.1.5 network. These are the primary path and a backup path. Figure 13 shows the sample network.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit]
hierarchy
level, and then enter commit from configuration mode.
Router PE0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE0->P0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.5/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::1/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 description PE0->P1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::2/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces ge-0/0/2 unit 0 description PE0->CE0 set interfaces ge-0/0/2 unit 0 family inet address 172.16.0.1/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::10/32 set interfaces ge-0/0/2 unit 0 family mpls set protocols mpls ipv6-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local-address 192.168.0.1 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.1 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp neighbor 172.16.0.2 description CE0 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement lb then load-balance per-packet set policy-options policy-statement nhself then next-hop self set routing-options protect core set routing-options forwarding-table export lb set routing-options router-id 192.168.0.1 set routing-options autonomous-system 64496
Router P0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description P0->PE0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.6/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::3/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 description P0->PE1 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.9/24 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::4/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.1 set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set routing-options router-id 192.168.0.2 set routing-options autonomous-system 64496
Router P1
set chassis network-services enhanced-ip set interfaces ge-0/0/1 unit 0 description P1->PE0 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.2/24 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::5/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/0 unit 0 description P1->PE2 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.13/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::6/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.3/32 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.3 set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set routing-options router-id 192.168.0.3 set routing-options autonomous-system 64496
Router PE1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE1->P0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.10/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::7/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description PE1->CE1 set interfaces ge-0/0/1 unit 0 family inet address 172.16.1.1/30 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::12/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.4/32 set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.4 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ibgp neighbor 192.168.0.5 description PE2 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.4 set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp neighbor 172.16.1.2 description CE1 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/0.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement PE1-v6-nh_CE1 from family inet6 set policy-options policy-statement PE1-v6-nh_CE1 then next-hop 2001:DB8::13 set policy-options policy-statement nhself then next-hop self set routing-options router-id 192.168.0.4 set routing-options autonomous-system 64496 set routing-options static route 192.168.1.2 next-hop 172.16.1.2
Router PE2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 description PE2->P1 set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.14/24 set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8::8/32 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/1 unit 0 description PE2->CE2 set interfaces ge-0/0/1 unit 0 family inet address 172.16.2.1/30 set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8::14/32 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.0.5/32 set protocols mpls ipv6-tunneling set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols bgp group ibgp type internal set protocols bgp group ibgp local address 192.168.0.5 set protocols bgp group ibgp family inet labeled-unicast per-prefix-label set protocols bgp group ibgp family inet6 labeled-unicast explicit-null set protocols bgp group ibgp export nhself set protocols bgp group ibgp neighbor 192.168.0.4 description PE1 set protocols bgp group ibgp neighbor 192.168.0.1 description PE0 set protocols bgp group ebgp type external set protocols bgp group ebgp local address 192.168.0.5 set protocols bgp group ebgp peer-as 64497 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp neighbor 172.16.2.2 description CE2 set protocols ospf area 0.0.0.0 interface all set protocols ospf area 0.0.0.0 interface fxp0.0 disable set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 set protocols ospf3 area 0.0.0.0 interface all set protocols ospf3 area 0.0.0.0 interface fxp0.0 disable set protocols ospf3 area 0.0.0.0 interface lo0.0 passive set protocols ospf3 area 0.0.0.0 interface ge-0/0/0.0 metric 1000 set protocols ldp track-igp-metric set protocols ldp interface all set protocols ldp interface fxp0.0 disable set policy-options policy-statement nhself then next-hop self set routing-options router-id 192.168.0.5 set routing-options autonomous-system 64496 set routing-options static route 192.168.1.3 next-hop 172.16.2.2
Device CE0
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE0->PE0 set interfaces ge-0/0/2 unit 0 family inet address 172.16.0.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::11/32 set interfaces lo0 unit 0 family inet address 192.168.1.1/32 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp neighbor 172.16.0.1 description PE0 set protocols bgp group ebgp local-address 192.168.1.1 set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.1
Device CE1
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE1->PE1 set interfaces ge-0/0/2 unit 0 family inet address 172.16.1.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::13/32 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.1.2/32 set interfaces lo0 unit 0 family inet address 192.168.1.5/24 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp export send-direct set protocols bgp group ebgp neighbor 172.16.1.1 description PE1 set policy-options policy statement send-direct from protocol direct then accept set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.2
Device CE2
set chassis network-services enhanced-ip set interfaces ge-0/0/2 unit 0 description CE2->PE2 set interfaces ge-0/0/2 unit 0 family inet address 172.16.2.2/30 set interfaces ge-0/0/2 unit 0 family inet6 address 2001:db8::15/32 set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.1.3/32 set protocols mpls interface all set protocols bgp group ebgp type external set protocols bgp group ebgp peer-as 64496 set protocols bgp group ebgp family inet labeled-unicast set protocols bgp group ebgp family inet6 labeled-unicast set protocols bgp group ebgp export send-direct set protocols bgp group ebgp neighbor 172.16.2.1 description PE2 set policy-options policy statement send-direct from protocol direct then accept set routing-options autonomous-system 64497 set routing-options router-id 192.168.1.3
Configuring Device PE0
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device PE0:
On routers with Modular Port Concentrators (MPCs), enable enhanced IP network services.
[edit chassis] usr@PE0# set network-services enhanced-ip
Configure the device interfaces.
[edit interfaces] user@PE0# set ge-0/0/0 unit 0 description PE0->P0 user@PE0# set ge-0/0/0 unit 0 family inet address 10.0.0.5/24 user@PE0# set ge-0/0/0 unit 0 family iso user@PE0# set ge-0/0/0 unit 0 family inet6 address 2001:db8::1/32 user@PE0# set ge-0/0/0 unit 0 family mpls user@PE0# set ge-0/0/1 unit 0 description PE0->P1 user@PE0# set ge-0/0/1 unit 0 family inet address 10.0.0.1/24 user@PE0# set ge-0/0/1 unit 0 family iso user@PE0# set ge-0/0/1 unit 0 family inet6 address 2001:db8::2/32 user@PE0# set ge-0/0/1 unit 0 family mpls user@PE0# set ge-0/0/2 unit 0 description PE0->CE0 user@PE0# set ge-0/0/2 unit 0 family inet address 172.16.0.1/30 user@PE0# set ge-0/0/2 unit 0 family inet6 address 2001:db8::10/32 user@PE0# set ge-0/0/2 unit 0 family mpls
Configure the loopback interface.
[edit interfaces] user@PE0# set lo0 unit 0 family inet address 192.168.0.1/32
Configure MPLS and LDP on all interfaces excluding the management interface.
[edit protocols] user@PE0# set mpls ipv6-tunneling user@PE0# set mpls interface all user@PE0# set mpls interface fxp0.0 disable user@PE0# set ldp track-igp-metric user@PE0# set ldp interface all user@PE0# set ldp interface fxp0.0 disable
Configure an IGP on the core-facing interfaces.
[edit protocols] user@PE0# set ospf area 0.0.0.0 interface all user@PE0# set ospf area 0.0.0.0 interface fxp0.0 disable user@PE0# set ospf area 0.0.0.0 interface lo0.0 passive user@PE0# set ospf area 0.0.0.0 interface ge-0/0/1.0 metric 1000 user@PE0# set ospf3 area 0.0.0.0 interface all user@PE0# set ospf3 area 0.0.0.0 interface fxp0.0 disable user@PE0# set ospf3 area 0.0.0.0 interface lo0.0 passive user@PE0# set ospf3 area 0.0.0.0 interface ge-0/0/1.0 metric 1000
Configure IBGP connections with the other PE devices.
[edit protocols] user@PE0# set bgp group ibgp type internal user@PE0# set bgp group ibgp local-address 192.168.0.1 user@PE0# set bgp group ibgp family inet labeled-unicast per-prefix-label user@PE0# set bgp group ibgp family inet6 labeled-unicast explicit-null user@PE0# set bgp group ibgp export nhself user@PE0# set bgp group ibgp neighbor 192.168.0.4 description PE1 user@PE0# set bgp group ibgp neighbor 192.168.0.5 description PE2
Configure EBGP connections with the customer devices.
[edit protocols] user@PE0# set bgp group ebgp type external user@PE0# set bgp group ebgp local address 192.168.0.1 user@PE0# set bgp group ebgp family inet labeled-unicast user@PE0# set bgp group ebgp family inet6 labeled-unicast user@PE0# set bgp group ebgp peer-as 64497 user@PE0# set bgp group ebgp neighbor 172.16.0.2 description CE0
Configure the load-balancing policy.
[edit policy-options] user@PE0# set policy-statement lb then load-balance per-packet
Configure a next-hop self policy.
[edit policy-options] user@PE0# set policy-statement nhself then next-hop self
Enable the BGP PIC edge feature.
[edit routing-options] user@PE0# set protect core
Apply the load-balancing policy.
[edit routing-options] user@PE0# set forwarding-table export lb
Assign the router ID and autonomous system (AS) number.
[edit routing-options] user@PE0# set router-id 192.168.0.2 user@PE0# set autonomous-system 64496
Results
From configuration mode, confirm your configuration
by entering the show chassis
, show interfaces
, show protocols
, show policy-options
, and show routing-options
commands. If the output does not display
the intended configuration, repeat the instructions in this example
to correct the configuration.
[edit] user@PE0# show chassis network-services enhanced-ip;
[edit] user@PE0# show interfaces ge-0/0/0 { unit 0 { description PE0->P0; family inet { address 10.0.0.5/24; } family iso; family inet6 { address 2001:db8::1/32; } family mpls; } } ge-0/0/1 { unit 0 { description PE0->P1; family inet { address 10.0.0.1/24; } family iso; family inet6 { address 2001:db8::2/32; } family mpls; } } ge-0/0/2 { unit 0 { description PE0->CE0; family inet { address 172.16.0.1/30; } family inet6 { address 2001:db8::10/32; } family mpls; } } lo0 { unit 0 { family inet { address 192.168.0.1/32; } } }
[edit] user@PE0# show protocols mpls { ipv6-tunneling; interface all; interface fxp0.0 { disable; } } bgp { group ibgp { type internal; local-address 192.168.0.1; family inet { labeled-unicast { per-prefix-label; } } family inet6 { labeled-unicast { explicit-null; } } export nhself; neighbor 192.168.0.4 { description PE1; } neighbor 192.168.0.5 { description PE2; } } group ebgp { type external; local-address 192.168.0.1; family inet { labeled-unicast; } family inet6 { labeled-unicast; } peer-as 64497; neighbor 172.16.0.2 { description CE0; } } } ospf { area 0.0.0.0 { interface all; interface lo0.0 { passive; } interface ge-0/0/1.0 { metric 1000; } interface fxp0.0 { disable; } } } ospf3 { area 0.0.0.0 { interface all; interface lo0.0 { passive; } interface ge-0/0/1.0 { metric 1000; } interface fxp0.0 { disable; } } } ldp { track-igp-metric; interface all; interface fxp0.0 { disable; } }
[edit] user@PE1# show policy-options policy-statement lb { then { load-balance per-packet; } } policy-statement nhself { then { next-hop self; } }
[edit] user@PE0# show routing-options protect core; router-id 192.168.0.1; autonomous system 64496 forwarding-table { export lb; }
Verification
Confirm that the configuration is working properly.
Displaying Extensive Route Information
Purpose
Confirm that BGP PIC edge is working.
Action
From Device PE0, run the show route extensive
command.
user@PE0> show route 192.168.1.5 extensive
inet.0: 236941 destinations, 630411 routes (236940 active, 0 holddown, 1 hidden)
20.1.1.1/32 (3 entries, 2 announced)
State: <CalcForwarding>
TSI:
KRT in-kernel 192.168.1.5/24 -> {indirect(1048574), indirect(1048575)}
@BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xafd09d0
Next-hop reference count: 236886
Source: 192.168.0.4
Next hop type: Router, Next hop index: 623
Next hop: 10.0.0.2 via ge-0/0/1.0, selected
Session Id: 0x140
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144
State: <Active Int Ext ProtectionPath ProtectionCand>
Local AS: 64496 Peer AS: 64496
Age: 1:11 Metric2: 2
Validation State: unverified
Task: BGP_100.192.168.0.5
Announcement bits (1): 6-Resolve tree 2
AS path: 64497 I
Accepted MultipathUnequal
Localpref: 100
Router ID: 192.168.0.5
Indirect next hops: 1
Protocol next hop: 192.168.0.5 Metric: 2
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 10.0.0.2 via ge-0/0/1.0
Session Id: 0x140
192.168.0.5/32 Originating RIB: inet.0
Metric: 2 Node path count: 1
Forwarding nexthops: 1
Nexthop: 10.0.0.2 via ge-0/0/1.0
BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xafd0970
Next-hop reference count: 196735
Source: 192.168.0.4
Next hop type: Router, Next hop index: 624
Next hop: 10.0.0.6 via ge-0/0/0.0, selected
Session Id: 0x141
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145
State: <NotBest Int Ext ProtectionCand>
Inactive reason: Not Best in its group - IGP metric
Local AS: 100 Peer AS: 100
Age: 1:05 Metric2: 1001
Validation State: unverified
Task: BGP_100.192.168.0.4
AS path: 200 400 I
Accepted
Localpref: 100
Router ID: 192.168.0.4
Indirect next hops: 1
Protocol next hop: 192.168.0.4 Metric: 1001
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145
Indirect path forwarding next hops: 1
Next hop type: Router
Next hop: 10.0.0.6 via ge-0/0/0.0
Session Id: 0x141
192.168.0.4/32 Originating RIB: inet.0
Metric: 1001 Node path count: 1
Forwarding nexthops: 1
Nexthop: 10.0.0.6 via ge-0/0/0.0
#Multipath Preference: 255
Next hop type: Indirect, Next hop index: 0
Address: 0xd330f90
Next-hop reference count: 304062
Next hop type: Router, Next hop index: 623
Next hop: 10.0.0.6 via ge-0/0/0.0, selected
Session Id: 0x140
Next hop type: Router, Next hop index: 624
Next hop: 10.0.0.2 via ge-0/0/1.0
Session Id: 0x141
Protocol next hop: 192.168.0.4
Indirect next hop: 0xab3b980 1048574 INH Session ID: 0x144 Weight 0x1
Protocol next hop: 192.168.0.5
Indirect next hop: 0xab3c240 1048575 INH Session ID: 0x145 Weight 0x4000
State: <ForwardinOnly Int Ext>
Inactive reason: Forwarding use only
Local AS: 64496
Age: 1:05 Metric2: 2
Validation State: unverified
Task: RT
Announcement bits (1): 0-KRT
AS path: 64497 I
Meaning
Junos OS uses the next hops and the weight
values to select a backup path when a link
failure occurs. The next-hop weight has one of the following values:
0x1 indicates the primary path with active next hops.
0x4000 indicates the backup path with passive next hops.
Displaying the Forwarding Table
Purpose
Check the forwarding and kernel routing-table state
by using the show route forwarding-table
command.
Action
From Device PE0, run the show route forwarding-table
destination 192.168.1.5 extensive
command.
user@PE0> show route forwarding-table destination 192.168.1.5 extensive
Routing table: default.inet [Index 0]
Internet:
Destination: 192.168.1.5/24
Route type: user
Route reference: 0 Route interface-index: 0
Multicast RPF nh index: 0
Flags: sent to PFE
Next-hop type: unilist Index: 1048576 Reference: 7401
Next-hop type: indirect Index: 1048574 Reference: 2 Weight: 0x1
Nexthop: 10.0.0.6
Next-hop type: unicast Index: 623 Reference: 8
Next-hop interface: ge-0/0/0.0 Weight: 0x1
Next-hop type: indirect Index: 1048575 Reference: 2 Weight: 0x4000
Nexthop: 10.0.0.2
Next-hop type: unicast Index: 624 Reference: 8
Next-hop interface: ge-0/0/1.0 Weight: 0x4000
Meaning
Junos OS uses the next hops and the weight
values to select a backup path when a link
failure occurs. The next-hop weight has one of the following values:
0x1 indicates the primary path with active next hops.
0x4000 indicates the backup path with passive next hops.
BGP PIC Edge Using BGP Labeled Unicast Overview
This section talks about the benefits and overview of BGP PIC Edge using BGP labeled unicast as the transport protocol.
- Benefits of BGP PIC Edge Using BGP Labeled Unicast
- How does BGP Prefix Independent Convergence Work?
- BGP PIC Edge Using BGP Labeled Unicast as the Transport Protocol
Benefits of BGP PIC Edge Using BGP Labeled Unicast
This feature provides the following benefits:
Provides traffic protection in case of border (ABR and ASBR) node failures in multi-domain networks.
Provides faster restoration of network connectivity and reduces traffic loss if the primary path becomes unavailable.
How does BGP Prefix Independent Convergence Work?
BGP Prefix Independent Convergence (PIC) improves BGP convergence on network node failures. BGP PIC creates and stores primary and backup paths for the indirect next hop on the Routing Engine and also provides the indirect next hop route information to the Packet Forwarding Engine. When a network node failure occurs, the Routing Engine signals the Packet Forwarding Engine that an indirect next hop has failed, and that the traffic is rerouted to a pre-calculated equal-cost or backup path without modifying BGP prefixes. Routing the traffic to the destination prefix continues by using the backup path to reduce traffic loss until the global convergence through BGP is resolved.
BGP convergence is applicable to both core and edge network node failures. In the case of BGP PIC Core, adjustments to the forwarding chains are made as a result of node or core link failures. In the case of BGP PIC Edge, adjustments to the forwarding chains are made as a result of edge node or edge link failures.
BGP PIC Edge Using BGP Labeled Unicast as the Transport Protocol
BGP PIC Edge using the BGP labeled unicast transport protocol helps to protect and reroute traffic when border nodes (ABR and ASBR) failures happen in multi-domain networks. Multi-domain networks are typically used in Metro Ethernet aggregation and mobile backhaul network designs.
On Juniper Networks MX Series, EX Series, and PTX Series devices, BGP PIC Edge supports Layer 3 services with BGP labeled unicast as the transport protocol. Additionally, on Juniper Networks MX Series, EX9204, EX9208, EX9214, EX9251, and EX9253 devices, BGP PIC Edge supports Layer 2 circuit, Layer 2 VPN, and VPLS (BGP VPLS, LDP VPLS and FEC 129 VPLS) services with BGP labeled unicast as transport protocol. These BGP services are multipath (learned from multiple PEs) and resolved through BGP labeled unicast routes, which could again be a multipath learnt from other ABRs. Transport protocols supported over BGP PIC Edge are RSVP, LDP, OSPF, and ISIS. Starting from Junos OS Release 20.2R1, MX Series, EX9204, EX9208, EX9214, EX9251, and EX9253 devices support BGP PIC Edge protection for Layer 2 circuit, Layer 2 VPN, and VPLS (BGP VPLS, LDP VPLS and FEC 129 VPLS) services with BGP labeled unicast as the transport protocol.
On Juniper Networks MX Series, EX Series and PTX Series devices, BGP PIC Edge protection with BGP labeled unicast as the transport is supported for the following services:
IPv4 services over IPv4 BGP labeled unicast
IPv6 BGP labeled unicast service over IPv4 BGP labeled unicast
IPv4 Layer 3 VPN services over IPv4 BGP labeled unicast
IPv6 Layer 3 VPN services over IPv4 BGP labeled unicast
On Juniper Networks MX Series and EX Series devices, BGP PIC Edge protection with BGP labeled unicast as the transport is supported for the following services:
Layer 2 circuit services over IPv4 BGP labeled unicast
Layer 2 VPN services over IPv4 BGP labeled unicast
VPLS (BGP VPLS, LDP VPLS, and FEC 129 VPLS) services over IPv4 BGP labeled unicast
Configuring BGP PIC Edge Using BGP Labeled Unicast for Layer 2 Services
MX Series, EX9204, EX9208, EX9214, EX9251, and EX9253 devices support BGP PIC Edge protection for Layer 2 circuit, Layer 2 VPN, and VPLS (BGP VPLS, LDP VPLS and FEC 129 VPLS) services with BGP labeled unicast as the transport protocol. BGP PIC Edge using the BGP labeled unicast transport protocol helps to protect traffic failures over border nodes (ABR and ASBR) in multi-domain networks. Multi-domain networks are typically used in metro-aggregation and mobile backhaul networks designs.
A prerequisite for BGP PIC Edge protection is to program the Packet Forwarding Engine (PFE) with expanded next-hop hierarchy.
To enable expanded next-hop hierarchy for BGP labeled unicast
family, you need to configure the following CLI configuration statement
at the [edit protocols
] hierarchy level:
[edit protocols] user@host#set bgp group group-name family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy;
To enable BGP PIC for MPLS load balance nexthops, you need to
configure the following CLI configuration statement at the [edit
routing-options
] hierarchy level:
[edit routing-options] user@host#set rib routing-table-name protect core;
To enable fast convergence for Layer 2 services, you need to
configure the following CLI configuration statements at the [edit protocols
] hierarchy level:
For Layer 2 circuit and LDP VPLS:
[edit protocols] user@host#set l2circuit resolution preserve-nexthop-heirarchy;
For Layer 2 VPN, BGP VPLS, and FEC129:
[edit protocols] user@host#set l2vpn resolution preserve-nexthop-heirarchy;
Example: Protecting IPv4 Traffic over Layer 3 VPN Running BGP Labeled Unicast
This example shows how to configure BGP prefix-independent convergence (PIC) edge labeled unicast and protect IPv4 traffic over Layer 3 VPN. When an IPv4 traffic from a CE router is sent to a PE router, the IPv4 traffic is routed over a Layer 3 VPN, where BGP labeled unicast is configured as the transport protocol.
Requirements
This example uses the following hardware and software components:
-
MX Series routers.
-
Junos OS Release 19.4R1 or later running on all devices.
Overview
The following topology provides both ABR and ASBR protection by switching the traffic to backup paths whenever the primary path becomes unavailable.
Topology
Figure 14 illustrates Layer 3 VPN running BGP labeled unicast as the inter-domain transport protocol.
The following table describes the components used in the topology:
Primary Components |
Device Type |
Position |
---|---|---|
CE1 |
MX Series |
Connected to customer network. |
PE1 |
MX Series |
Configured with primary and backup routing paths to protect and reroute traffic from CE1 to CE2. |
P1-P3 |
MX Series |
Core routers to transport traffic. |
ABR1-ABR2 |
MX Series |
Area border routers |
ABSR1-ABSR4 |
MX Series |
Autonomous System Boundary Router |
RR1-RR3 |
MX Series |
Route Reflector |
PE2-PE3 |
MX Series |
PE routers connected to customer edge router (CE2). |
CE2 |
MX Series |
Connected to customer network. |
PE2 and PE3 device addresses are learned from both ABR1 and ABR2 as labeled unicast routes. These routes are resolved over IGP/LDP protocols. PE1 learns CE2 routes from both PE2 and PE3 devices.
Configuration
To configure BGP PIC Edge using BGP Label Unicast with LDP as the transport protocol, perform these tasks:
- CLI Quick Configuration
- Configuring CE1
- Configuring PE1
- Configuring P1 Device
- Configuring RR1 Device
- Configuring ABR1 Device
- Configuring ABR2 Device
- Configuring P2 Device
- Configuring RR2 Device
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a
text file, remove any line breaks, change any details necessary to match your
network configuration, copy and paste the commands into the CLI at the
[edit]
hierarchy level, and then enter
commit
from configuration mode.
Device CE1
set interfaces ge-0/0/1 description CE1-to-PE1-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.0/31 set interfaces ge-0/0/2 description CE1-to-PE1-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.2/31 set interfaces lo0 unit 0 family inet address 10.4.4.4/32 set policy-options policy-statement nhs term 1 from interface lo0.0 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set routing-options router-id 10.4.4.4 set routing-options autonomous-system 65004 set protocols bgp path-selection external-router-id set protocols bgp group toAs2 export nhs set protocols bgp group toAs2 peer-as 65002 set protocols bgp group toAs2 neighbor 192.168.0.1 set protocols bgp group toAs2 neighbor 192.168.0.3
Device PE1
set interfaces ge-0/0/1 description PE1-to-CE1-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.1/31 set interfaces ge-0/0/2 description PE1-to-CE1-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.3/31 set interfaces ge-0/0/3 description PE1-to-P1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.4/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.5/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0005.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement mp-resolv term 1 from route-filter 10.1.1.0/24 orlonger set policy-options policy-statement mp-resolv term 1 then accept set policy-options policy-statement mp-resolv term 1 then multipath-resolve set policy-options policy-statement mp-resolv term 2 from route-filter 10.2.2.0/24 orlonger set policy-options policy-statement mp-resolv term 2 then accept set policy-options policy-statement mp-resolv term 2 then multipath-resolve set policy-options policy-statement mp-resolv term def then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then local-preference 65200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red routing-options multipath preserve-nexthop-hierarchy set routing-instances red routing-options protect core set routing-instances red protocols bgp group toCE1 peer-as 4 set routing-instances red protocols bgp group toCE1 neighbor 192.168.0.2 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/2.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options rib inet.3 protect core set routing-options route-distinguisher-id 10.2.2.5 set routing-options forwarding-table export pplb set routing-options resolution preserve-nexthop-hierarchy set routing-options resolution rib inet.0 import mp-resolv set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.5 set routing-options autonomous-system 2 set routing-options protect core set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/3.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/3.0 set protocols ldp interface ge-0/0/3.0 set protocols mpls label-switched-path toABR1-gold to 10.2.2.3 set protocols mpls label-switched-path toABR1-bronze to 10.2.2.3 set protocols mpls label-switched-path toABR2-gold to 10.2.2.4 set protocols bgp path-selection external-router-id set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.5 set protocols bgp group toAs2RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR export export-inet3 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs4 peer-as 65004 set protocols bgp group toAs4 neighbor 192.168.0.0 set protocols bgp group toAs1PEs multihop no-nexthop-change set protocols bgp group toAs1PEs local-address 10.2.2.5 set protocols bgp group toAs1PEs family inet unicast set protocols bgp group toAs1PEs family inet-vpn unicast set protocols bgp group toAs1PEs family inet6 unicast set protocols bgp group toAs1PEs family inet6-vpn unicast set protocols bgp group toAs1PEs export nhs set protocols bgp group toAs1PEs peer-as 65001 set protocols bgp group toAs1PEs neighbor 10.1.1.1 set protocols bgp group toAs1PEs neighbor 10.1.1.2 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp multipath
Device P1
set interfaces ge-0/0/1 description P1-to-RR1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.6/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P1-to-ABR1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.8/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P1-to-PE1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.5/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P1-to-ABR2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.10/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.8/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0008.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.2.2.8 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
Device RR1
set interfaces ge-0/0/1 description RR1-to-P1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.7/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.6/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.6 set routing-options autonomous-system 2 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-rib inet6.3 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs2Reg2BNs type internal set protocols bgp group toAs2Reg2BNs family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs2Reg2BNs family inet labeled-unicast add-path receive set protocols bgp group toAs2Reg2BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2Reg2BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs2Reg2BNs export export-inet3 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.3 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.4 set protocols bgp group toAs2Reg2BNs neighbor 10.2.2.5 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.2.2.6 set protocols bgp cluster 10.2.2.6
Device ABR1
set interfaces ge-0/0/1 description ABR1-to-P2 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.12/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ABR1-to-P1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.9/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.3/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.3 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls label-switched-path toASBR2-gold to 10.2.2.2 set protocols mpls label-switched-path toASBR1-bronze to 10.2.2.1 set protocols mpls label-switched-path toASBR2-bronze to 10.2.2.2 set protocols mpls interface all set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.3 set protocols bgp group toAs2RR advertise-inactive set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR cluster 10.2.2.3 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device ABR2
set interfaces ge-0/0/2 description ABR2-to-P2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.14/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/4 description ABR2-to-P1 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.11/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.4/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.4 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls label-switched-path toASBR1-bronze to 10.2.2.1 set protocols mpls interface all set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.4 set protocols bgp group toAs2RR advertise-inactive set protocols bgp group toAs2RR family inet labeled-unicast add-path receive set protocols bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR cluster 10.2.2.4 set protocols bgp group toAs2RR neighbor 10.2.2.6 set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device P2
set interfaces ge-0/0/1 description P2-to-ABR1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.13/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P2-to-ABR2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.15/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P2-to-RR2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.16/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P2-to-ASBR1 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.18/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description P2-to-ASBR2 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.20/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.9/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0009.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.2.2.9 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
Device RR2
set interfaces ge-0/0/3 description RR2-to-P2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.17/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.2.2.7/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0007.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.2.2.7 set routing-options autonomous-system 65002 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs2Reg1BNs type internal set protocols bgp group toAs2Reg1BNs family inet labeled-unicast add-path receive set protocols bgp group toAs2Reg1BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs2Reg1BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.1 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.2 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.3 set protocols bgp group toAs2Reg1BNs neighbor 10.2.2.4 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.2.2.7 set protocols bgp cluster 10.2.2.7
Device ASBR1
set interfaces ge-0/0/2 description ASBR1-to-ASBR3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.22/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description ASBR1-to-ASBR4 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.24/31 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description ASBR1-to-P2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.19/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.1/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0001.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.1 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface ge-0/0/4.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/4.0 set protocols ldp interface ge-0/0/4.0 set protocols mpls interface ge-0/0/4.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs1-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs1-T peer-as 1 set protocols bgp group toAs1-T neighbor 192.168.0.23 set protocols bgp group toAs1-T neighbor 192.168.0.27 set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.1 set protocols bgp group toAs2RR advertise-external set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device ASBR2
set interfaces ge-0/0/1 description ASBR2-to-ASBR3 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.28/31 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR2-to-ASBR4 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.26/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/5 description ASBR2-to-P2 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.21/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.2.2.2/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0002.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.2.2.2 set routing-options autonomous-system 65002 set protocols isis level 1 disable set protocols isis interface ge-0/0/5.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/5.0 set protocols ldp interface ge-0/0/5.0 set protocols mpls interface ge-0/0/5.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs1-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs1-T peer-as 1 set protocols bgp group toAs1-T neighbor 192.168.0.29 set protocols bgp group toAs1-T neighbor 192.168.0.25 set protocols bgp group toAs2RR type internal set protocols bgp group toAs2RR local-address 10.2.2.2 set protocols bgp group toAs2RR advertise-external set protocols bgp group toAs2RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs2RR export nhs set protocols bgp group toAs2RR neighbor 10.2.2.7 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device ASBR3
set interfaces ge-0/0/1 description ASBR3-to-ASBR2 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.29/31 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR3-to-ASBR1 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.23/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/4 description ASBR3-to-P3 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.30/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.3/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.1.1.3 set routing-options autonomous-system 65001 set protocols isis level 1 disable set protocols isis interface ge-0/0/4.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/4.0 set protocols ldp interface ge-0/0/4.0 set protocols mpls label-switched-path toPE2-gold to 10.1.1.1 set protocols mpls interface ge-0/0/4.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs2-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs2-T peer-as 65002 set protocols bgp group toAs2-T neighbor 192.168.0.22 set protocols bgp group toAs2-T neighbor 192.168.0.28 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.3 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device ASBR4
set interfaces ge-0/0/1 description ASBR4-to-P3 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.32/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description ASBR4-to-ASBR2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.27/31 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description ASBR4-to-ASBR1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.25/31 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.4/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set routing-options forwarding-table export pplb set routing-options router-id 10.1.1.4 set routing-options autonomous-system 65001 set protocols isis level 1 disable set protocols isis interface ge-0/0/1.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/1.0 set protocols mpls label-switched-path toPE2-bronze to 10.1.1.1 set protocols mpls label-switched-path toPE3-bronze to 10.1.1.2 set protocols mpls interface ge-0/0/1.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs2-T family inet labeled-unicast rib inet.3 set protocols bgp group toAs2-T peer-as 2 set protocols bgp group toAs2-T neighbor 192.168.0.26 set protocols bgp group toAs2-T neighbor 192.168.0.24 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.4 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device RR3
set interfaces ge-0/0/2 description RR3-to-P3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.35/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.6/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement pplb then load-balance per-packet set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.6 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all set protocols bgp path-selection external-router-id set protocols bgp group toAs1BNs type internal set protocols bgp group toAs1BNs family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1BNs family inet labeled-unicast add-path receive set protocols bgp group toAs1BNs family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs1BNs family inet labeled-unicast rib inet.3 set protocols bgp group toAs1BNs export export-inet3 set protocols bgp group toAs1BNs neighbor 10.1.1.3 set protocols bgp group toAs1BNs neighbor 10.1.1.4 set protocols bgp group toAs1BNs neighbor 10.1.1.2 set protocols bgp group toAs1BNs neighbor 10.1.1.1 set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy set protocols bgp local-address 10.1.1.6 set protocols bgp cluster 10.1.1.6
Device P3
set interfaces ge-0/0/1 description P3-to-ASBR4 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.33/31 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description P3-to-RR3 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.34/31 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description P3-to-PE2 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.36/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description P3-to-ASBR3 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.31/31 set interfaces ge-0/0/4 unit 0 family iso set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description P3-to-PE3 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.38/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.1.5/32 set interfaces lo0 unit 0 family iso address 49.0000.0000.aaaa.0005.00 set policy-options policy-statement allow-lo0 term 1 from interface lo0.0 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set routing-options router-id 10.1.1.5 set protocols isis level 1 disable set protocols isis interface all set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface all set protocols ldp interface all set protocols mpls interface all
Device PE2
set interfaces ge-0/0/1 description PE2-to-CE2-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.40/31 set interfaces ge-0/0/2 description PE2-to-CE2-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.42/31 set interfaces ge-0/0/3 description PE2-to-P3 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.37/31 set interfaces ge-0/0/3 unit 0 family iso set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.1/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0001.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then metric add 0 set policy-options policy-statement nhs term 1 then local-preference 200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red protocols bgp group toCE2 peer-as 65003 set routing-instances red protocols bgp group toCE2 neighbor 192.168.0.43 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/2.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options route-distinguisher-id 10.1.1.1 set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.1 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/3.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/3.0 set protocols ldp interface ge-0/0/3.0 set protocols mpls interface ge-0/0/3.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs3-1 peer-as 65003 set protocols bgp group toAs3-1 neighbor 192.168.0.41 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.1 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1RR family inet labeled-unicast add-path receive set protocols bgp group toAs1RR family inet labeled-unicast add-path send path-count 4 set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR family inet6-vpn unicast set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR export export-inet3 set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp group toAs2PEs multihop no-nexthop-change set protocols bgp group toAs2PEs local-address 10.1.1.1 set protocols bgp group toAs2PEs family inet unicast set protocols bgp group toAs2PEs family inet-vpn unicast set protocols bgp group toAs2PEs family inet6 unicast set protocols bgp group toAs2PEs family inet6-vpn unicast set protocols bgp group toAs2PEs export nhs set protocols bgp group toAs2PEs peer-as 65002 set protocols bgp group toAs2PEs neighbor 10.2.2.5 set protocols bgp group toAs2PEs vpn-apply-export set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device PE3
set interfaces ge-0/0/3 description PE3-to-CE2-Link1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.44/31 set interfaces ge-0/0/4 description PE3-to-CE2-Link2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.46/31 set interfaces ge-0/0/5 description PE3-to-P3 set interfaces ge-0/0/5 vlan-tagging set interfaces ge-0/0/5 unit 0 vlan-id 100 set interfaces ge-0/0/5 unit 0 family inet address 192.168.0.39/31 set interfaces ge-0/0/5 unit 0 family iso set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 1 family inet address 10.1.1.2/32 set interfaces lo0 unit 1 family iso address 49.0000.0000.aaaa.0002.00 set policy-options policy-statement add-noexport term 1 then community add noexport set policy-options policy-statement allow-lo0 term 1 from interface lo0.1 set policy-options policy-statement allow-lo0 term 1 then accept set policy-options policy-statement allow-lo0 term 2 then reject set policy-options policy-statement export-inet3 term 1 from rib inet.3 set policy-options policy-statement export-inet3 term 1 then accept set policy-options policy-statement export-inet3 term 2 then reject set policy-options policy-statement nhs term 1 from protocol bgp set policy-options policy-statement nhs term 1 then metric add 0 set policy-options policy-statement nhs term 1 then local-preference 200 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement vrf-export-red term 1 then community add leak2red set policy-options policy-statement vrf-export-red term 1 then accept set policy-options policy-statement vrf-import-red term 1 from community leak2red set policy-options policy-statement vrf-import-red term 1 then accept set policy-options community leak2red members target:100:100 set policy-options community noexport members no-export set policy-options community noexport members no-advertise set routing-instances red protocols bgp group toCE2 peer-as 65003 set routing-instances red protocols bgp group toCE2 neighbor 192.168.0.47 set routing-instances red instance-type vrf set routing-instances red interface ge-0/0/4.0 set routing-instances red vrf-import vrf-import-red set routing-instances red vrf-export vrf-export-red set routing-options route-distinguisher-id 10.1.1.2 set routing-options forwarding-table export pplb set routing-options interface-routes rib-group inet inet0to3 set routing-options router-id 10.1.1.2 set routing-options autonomous-system 1 set routing-options rib-groups inet0to3 import-rib inet.0 set routing-options rib-groups inet0to3 import-rib inet.3 set routing-options rib-groups inet0to3 import-policy allow-lo0 set routing-options rib-groups inet3to0 import-rib inet.3 set routing-options rib-groups inet3to0 import-rib inet.0 set routing-options rib-groups inet3to0 import-policy add-noexport set protocols isis level 1 disable set protocols isis interface ge-0/0/5.0 set protocols isis export allow-lo0 set protocols isis topologies ipv6-unicast set protocols rsvp interface ge-0/0/5.0 set protocols ldp interface ge-0/0/5.0 set protocols mpls interface ge-0/0/5.0 set protocols bgp path-selection external-router-id set protocols bgp group toAs3 peer-as 65003 set protocols bgp group toAs3 neighbor 192.168.0.45 set protocols bgp group toAs1RR type internal set protocols bgp group toAs1RR local-address 10.1.1.2 set protocols bgp group toAs1RR advertise-external set protocols bgp group toAs1RR family inet labeled-unicast rib-group inet3to0 set protocols bgp group toAs1RR family inet labeled-unicast rib inet.3 set protocols bgp group toAs1RR export nhs set protocols bgp group toAs1RR export export-inet3 set protocols bgp group toAs1RR neighbor 10.1.1.6 set protocols bgp group toAs2PEs multihop no-nexthop-change set protocols bgp group toAs2PEs local-address 10.1.1.2 set protocols bgp group toAs2PEs family inet unicast set protocols bgp group toAs2PEs family inet-vpn unicast set protocols bgp group toAs2PEs family inet6 unicast set protocols bgp group toAs2PEs family inet6-vpn unicast set protocols bgp group toAs2PEs export nhs set protocols bgp group toAs2PEs peer-as 65002 set protocols bgp group toAs2PEs neighbor 10.2.2.5 set protocols bgp group toAs2PEs vpn-apply-export set protocols bgp traceoptions file bgp.log set protocols bgp traceoptions file size 100m set protocols bgp traceoptions flag state detail set protocols bgp traceoptions flag policy
Device CE2
set interfaces ge-0/0/1 description CE2-to-PE2-Link1 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 100 set interfaces ge-0/0/1 unit 0 family inet address 192.168.0.41/31 set interfaces ge-0/0/2 description CE2-to-PE2-Link2 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 100 set interfaces ge-0/0/2 unit 0 family inet address 192.168.0.43/31 set interfaces ge-0/0/3 description CE2-to-PE3-Link1 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 unit 0 vlan-id 100 set interfaces ge-0/0/3 unit 0 family inet address 192.168.0.45/31 set interfaces ge-0/0/4 description CE2-to-PE3-Link2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 unit 0 vlan-id 100 set interfaces ge-0/0/4 unit 0 family inet address 192.168.0.47/31 set interfaces lo0 unit 0 family inet address 10.3.3.3/32 set policy-options policy-statement nhs term 1 from interface lo0.0 set policy-options policy-statement nhs term 1 then metric 50 set policy-options policy-statement nhs term 1 then next-hop self set policy-options policy-statement nhs term 1 then accept set policy-options policy-statement nhsMED100 term 1 from interface lo0.0 set policy-options policy-statement nhsMED100 term 1 then metric 100 set policy-options policy-statement nhsMED100 term 1 then next-hop self set policy-options policy-statement nhsMED100 term 1 then accept set policy-options community map2bronze members 100:200 set policy-options community map2gold members 100:100 set policy-options community map2gold_bronze_plain members 300:400 set routing-options router-id 10.3.3.3 set routing-options autonomous-system 65003 set protocols bgp path-selection external-router-id set protocols bgp group toAs1Internet export nhs set protocols bgp group toAs1Internet peer-as 65001 set protocols bgp group toAs1Internet neighbor 192.168.0.40 set protocols bgp group toAs1Internet neighbor 192.168.0.44 export nhsMED100 set protocols bgp group toAs1L3VPN export nhs set protocols bgp group toAs1L3VPN peer-as 65001 set protocols bgp group toAs1L3VPN neighbor 192.168.0.46 set protocols bgp group toAs1L3VPN neighbor 192.168.0.42 export nhsMED100
Configuring CE1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device CE1:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@CE1#set ge-0/0/1 description CE1-to-PE1-Link1 user@CE1#set ge-0/0/1 vlan-tagging user@CE1#set ge-0/0/1 unit 0 vlan-id 100 user@CE1#set ge-0/0/1 unit 0 family inet address 192.168.0.0/31 user@CE1#set ge-0/0/2 description CE1-to-PE1-Link2 user@CE1#set ge-0/0/2 vlan-tagging user@CE1#set ge-0/0/2 unit 0 vlan-id 100 user@CE1#set ge-0/0/2 unit 0 family inet address 192.168.0.2/31
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@CE1#set lo0 unit 0 family inet address 10.4.4.4/32
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@CE1#set policy-statement nhs term 1 from interface lo0.0 user@CE1#set policy-statement nhs term 1 then next-hop self user@CE1#set policy-statement nhs term 1 then accept
-
Configure routing options.
[edit routing-options] user@CE1#set router-id 10.4.4.4 user@CE1#set autonomous-system 65004
-
Configure BGP labeled unicast to ABRs to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols bgp] user@CE1#set path-selection external-router-id user@CE1#set group toAs2 export nhs user@CE1#set group toAs2 peer-as 65002 user@CE1#set group toAs2 neighbor 192.168.0.1 user@CE1#set group toAs2 neighbor 192.168.0.3
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
, and show
protocols
commands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the
configuration.
interfaces { ge-0/0/1 { description CE1-to-PE1-Link1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.0/31; } } } ge-0/0/2 { description CE1-to-PE1-Link2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.2/31; } } } lo0 { unit 0 { family inet { address 10.4.4.4/32; } } } } policy-options { policy-statement nhs { term 1 { from interface lo0.0; then { next-hop self; accept; } } } } routing-options { router-id 10.4.4.4; autonomous-system 65004; } protocols { bgp { path-selection external-router-id; group toAs2 { export nhs; peer-as 65002; neighbor 192.168.0.1; neighbor 192.168.0.3; } } }
Configuring PE1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device PE1:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@PE1#set ge-0/0/1 description PE1-to-CE1-Link1 user@PE1#set ge-0/0/1 vlan-tagging user@PE1#set ge-0/0/1 unit 0 vlan-id 100 user@PE1#set ge-0/0/1 unit 0 family inet address 192.168.0.1/31 user@PE1#set ge-0/0/2 description PE1-to-CE1-Link2 user@PE1#set ge-0/0/2 vlan-tagging user@PE1#set ge-0/0/2 unit 0 vlan-id 100 user@PE1#set ge-0/0/2 unit 0 family inet address 192.168.0.3/31 user@PE1#set ge-0/0/3 description PE1-to-P1 user@PE1#set ge-0/0/3 vlan-tagging user@PE1#set ge-0/0/3 unit 0 vlan-id 100 user@PE1#set ge-0/0/3 unit 0 family inet address 192.168.0.4/31 user@PE1#set ge-0/0/3 unit 0 family iso user@PE1#set ge-0/0/3 unit 0 family mpls
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@PE1#set lo0 unit 1 family inet address 10.2.2.5/32 user@PE1#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0005.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@PE1#set policy-statement add-noexport term 1 then community add noexport user@PE1#set policy-statement allow-lo0 term 1 from interface lo0.1 user@PE1#set policy-statement allow-lo0 term 1 then accept user@PE1#set policy-statement allow-lo0 term 2 then reject user@PE1#set policy-statement export-inet3 term 1 from rib inet.3 user@PE1#set policy-statement export-inet3 term 1 then accept user@PE1#set policy-statement export-inet3 term 2 then reject user@PE1#set policy-statement mp-resolv term 1 from route-filter 10.1.1.0/24 orlonger user@PE1#set policy-statement mp-resolv term 1 then accept user@PE1#set policy-statement mp-resolv term 1 then multipath-resolve user@PE1#set policy-statement mp-resolv term 2 from route-filter 10.2.2.0/24 orlonger user@PE1#set policy-statement mp-resolv term 2 then accept user@PE1#set policy-statement mp-resolv term 2 then multipath-resolve user@PE1#set policy-statement mp-resolv term def then reject user@PE1#set policy-statement nhs term 1 from protocol bgp user@PE1#set policy-statement nhs term 1 then local-preference 200 user@PE1#set policy-statement nhs term 1 then next-hop self user@PE1#set policy-statement nhs term 1 then accept user@PE1#set policy-statement pplb then load-balance per-packet user@PE1#set policy-statement vrf-export-red term 1 then community add leak2red user@PE1#set policy-statement vrf-export-red term 1 then accept user@PE1#set policy-statement vrf-import-red term 1 from community leak2red user@PE1#set policy-statement vrf-import-red term 1 then accept user@PE1#set community leak2red members target:100:100 user@PE1#set community noexport members no-export user@PE1#set community noexport members no-advertise
-
Configure Layer 3 VPN routing instance to provide customer services.
[edit routing-instances] user@PE1#set red routing-options multipath preserve-nexthop-hierarchy user@PE1#set red routing-options protect core user@PE1#set red protocols bgp group toCE1 peer-as 65004 user@PE1#set red protocols bgp group toCE1 neighbor 192.168.0.2 user@PE1#set red instance-type vrf user@PE1#set red interface ge-0/0/2.0 user@PE1#set red vrf-import vrf-import-red user@PE1#set red vrf-export vrf-export-red
-
Configure resolver RIB import policies and resolution RIBs to enable expanded hierarchical nexthop structure for selected Layer 3 VPN prefixes specified in the policy.
[edit routing-options] user@PE1#set rib inet.3 protect core user@PE1#set route-distinguisher-id 10.2.2.5 user@PE1#set forwarding-table export pplb user@PE1#set resolution preserve-nexthop-hierarchy user@PE1#set resolution rib inet.0 import mp-resolv user@PE1#set interface-routes rib-group inet inet0to3 user@PE1#set router-id 10.2.2.5 user@PE1#set autonomous-system 65002 user@PE1#set protect core user@PE1#set rib-groups inet0to3 import-rib inet.0 user@PE1#set rib-groups inet0to3 import-rib inet.3 user@PE1#set rib-groups inet0to3 import-policy allow-lo0 user@PE1#set rib-groups inet3to0 import-rib inet.3 user@PE1#set rib-groups inet3to0 import-rib inet.0 user@PE1#set rib-groups inet3to0 import-policy add-noexport
-
Configure OSPF protocol.
[edit protocols ospf] user@PE1#set protocols ospf area 0.0.0.0 interface all link-protection; user@PE1#set protocols ospf area 0.0.0.0 interface fxp0.0 disable; user@PE1#set protocols ospf area 0.0.0.0 interface lo0.0 passive;
-
Configure routing protocols to establish IP and MPLS connectivity across the domain.
[edit protocols] user@PE1#set isis level 1 disable user@PE1#set isis interface ge-0/0/3.0 user@PE1#set isis export allow-lo0 user@PE1#set isis topologies ipv6-unicast user@PE1#set rsvp interface ge-0/0/3.0 user@PE1#set ldp interface ge-0/0/3.0 user@PE1#set mpls label-switched-path toABR1-gold to 10.2.2.3 user@PE1#set mpls label-switched-path toABR1-bronze to 10.2.2.3 user@PE1#set mpls label-switched-path toABR2-gold to 10.2.2.4
-
Configure BGP labeled unicast to ABRs to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols bgp] user@PE1#set path-selection external-router-id user@PE1#set group toAs2RR type internal user@PE1#set group toAs2RR local-address 10.2.2.5 user@PE1#set group toAs2RR family inet labeled-unicast rib-group inet3to0 user@PE1#set group toAs2RR family inet labeled-unicast add-path receive user@PE1#set group toAs2RR family inet labeled-unicast add-path send path-count 4 user@PE1#set group toAs2RR family inet labeled-unicast nexthop-resolution preserve-nexthop-hierarchy user@PE1#set group toAs2RR family inet labeled-unicast rib inet.3 user@PE1#set group toAs2RR export nhs user@PE1#set group toAs2RR export export-inet3 user@PE1#set group toAs2RR neighbor 10.2.2.6 user@PE1#set group toAs4 peer-as 65004 user@PE1#set group toAs4 neighbor 192.168.0.0 user@PE1#set group toAs1PEs multihop no-nexthop-change user@PE1#set group toAs1PEs local-address 10.2.2.5 user@PE1#set group toAs1PEs family inet unicast user@PE1#set group toAs1PEs family inet-vpn unicast user@PE1#set group toAs1PEs family inet6 unicast user@PE1#set group toAs1PEs family inet6-vpn unicast user@PE1#set group toAs1PEs export nhs user@PE1#set group toAs1PEs peer-as 65001 user@PE1#set group toAs1PEs neighbor 10.1.1.1 user@PE1#set group toAs1PEs neighbor 10 .1.1.2 user@PE1#set traceoptions file bgp.log user@PE1#set traceoptions file size 100m user@PE1#set traceoptions flag state detail user@PE1#set traceoptions flag policy user@PE1#set multipath
Results
From configuration mode, confirm your configuration by entering the
show chassis
, show interfaces
,
show policy-options
, show
routing-instances
,show routing-options
, and
show protocols
commands. If the output does not display
the intended configuration, repeat the instructions in this example to
correct the configuration.
interfaces { ge-0/0/1 { description PE1-to-CE1-Link1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.1/31; } } } ge-0/0/2 { description PE1-to-CE1-Link2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.3/31; } } } ge-0/0/3 { description PE1-to-P1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.4/31; } family iso; family mpls; } } lo0 { unit 1 { family inet { address 10.2.2.5/32; } family iso { address 49.0000.0000.aaaa.0005.00; } } } } policy-options { policy-statement add-noexport { term 1 { then { community add noexport; } } } policy-statement allow-lo0 { term 1 { from interface lo0.1; then accept; } term 2 { then reject; } } policy-statement export-inet3 { term 1 { from rib inet.3; then accept; } term 2 { then reject; } } policy-statement mp-resolv { term 1 { from { route-filter 10.1.1.0/24 orlonger; } then { accept; multipath-resolve; } } term 2 { from { route-filter 10.2.2.0/24 orlonger; } then { accept; multipath-resolve; } } term def { then reject; } } policy-statement nhs { term 1 { from protocol bgp; then { local-preference 200; next-hop self; accept; } } } policy-statement pplb { then { load-balance per-packet; } } policy-statement vrf-export-red { term 1 { then { community add leak2red; accept; } } } policy-statement vrf-import-red { term 1 { from community leak2red; then accept; } } community leak2red members target:100:100; community noexport members [ no-export no-advertise ]; } routing-instances { red { routing-options { multipath preserve-nexthop-hierarchy; protect core; } protocols { bgp { group toCE1 { peer-as 65004; neighbor 192.168.0.2; } } } instance-type vrf; interface ge-0/0/2.0; vrf-import vrf-import-red; vrf-export vrf-export-red; } } routing-options { rib inet.3 { protect core; } route-distinguisher-id 10.2.2.5; forwarding-table { export pplb; } resolution { preserve-nexthop-hierarchy; rib inet.0 { import mp-resolv; } } interface-routes { rib-group inet inet0to3; } router-id 10.2.2.5; autonomous-system 65002; protect core; rib-groups { inet0to3 { import-rib [ inet.0 inet.3 ]; import-policy allow-lo0; } inet3to0 { import-rib [ inet.3 inet.0 ]; import-policy add-noexport; } } } protocols { isis { level 1 disable; interface ge-0/0/3.0; export allow-lo0; topologies ipv6-unicast; } rsvp { interface ge-0/0/3.0; } bgp { path-selection external-router-id; group toAs2RR { type internal; local-address 10.2.2.5; family inet { labeled-unicast { rib-group inet3to0; add-path { receive; send { path-count 4; } } nexthop-resolution { preserve-nexthop-hierarchy; } rib { inet.3; } } } export [ nhs export-inet3 ]; neighbor 10.2.2.6; } group toAs4 { peer-as 65004; neighbor 192.168.0.0; } group toAs1PEs { multihop { no-nexthop-change; } local-address 10.2.2.5; family inet { unicast; } family inet-vpn { unicast; } family inet6 { unicast; } family inet6-vpn { unicast; } export nhs; peer-as 65001; neighbor 10.1.1.1; neighbor 10.1.1.2; } traceoptions { file bgp.log size 100m; flag state detail; flag policy; } multipath; } ldp { interface ge-0/0/3.0; } mpls { label-switched-path toABR1-gold { to 10.2.2.3; } label-switched-path toABR1-bronze { to 10.2.2.3; } label-switched-path toABR2-gold { to 10.2.2.4; } } }
Configuring P1 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device P1:
-
Configure the interfaces.
[edit interfaces] user@P1#set ge-0/0/1 description P1-to-RR1 user@P1#set ge-0/0/1 vlan-tagging user@P1#set ge-0/0/1 unit 0 vlan-id 100 user@P1#set ge-0/0/1 unit 0 family inet address 192.168.0.6/31 user@P1#set ge-0/0/1 unit 0 family iso user@P1#set ge-0/0/1 unit 0 family mpls user@P1#set ge-0/0/2 description P1-to-ABR1 user@P1#set ge-0/0/2 vlan-tagging user@P1#set ge-0/0/2 unit 0 vlan-id 100 user@P1#set ge-0/0/2 unit 0 family inet address 192.168.0.8/31 user@P1#set ge-0/0/2 unit 0 family iso user@P1#set ge-0/0/2 unit 0 family mpls user@P1#set ge-0/0/3 description P1-to-PE1 user@P1#set ge-0/0/3 vlan-tagging user@P1#set ge-0/0/3 unit 0 vlan-id 100 user@P1#set ge-0/0/3 unit 0 family inet address 192.168.0.5/31 user@P1#set ge-0/0/3 unit 0 family iso user@P1#set ge-0/0/3 unit 0 family mpls user@P1#set ge-0/0/4 description P1-to-ABR2 user@P1#set ge-0/0/4 vlan-tagging user@P1#set ge-0/0/4 unit 0 vlan-id 100 user@P1#set ge-0/0/4 unit 0 family inet address 192.168.0.10/31 user@P1#set ge-0/0/4 unit 0 family iso user@P1#set ge-0/0/4 unit 0 family mpls
-
Configure the loopback interface.
[edit interfaces] user@P1#set lo0 unit 0 family inet address 10.2.2.8/32 user@P1#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0008.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@P1#set policy-statement allow-lo0 term 1 from interface lo0.0 user@P1#set policy-statement allow-lo0 term 1 then accept user@P1#set policy-statement allow-lo0 term 2 then reject
-
Configure routing options.
[edit routing-options] user@P1#set router-id 10.2.2.8
-
Configure ISIS, RSVP, LDP, and MPLS protocols on the interface.
[edit protocols] user@P1#set isis level 1 disable user@P1#set isis interface all user@P1#set isis export allow-lo0 user@P1#set isis topologies ipv6-unicast user@P1#set rsvp interface all user@P1#set ldp interface all user@P1#set mpls interface all
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
and show protocols
commands. If the output does not display
the intended configuration, repeat the instructions in this example to
correct the configuration.
interfaces { ge-0/0/1 { description P1-to-RR1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.6/31; } family iso; family mpls; } } ge-0/0/2 { description P1-to-ABR1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.8/31; } family iso; family mpls; } } ge-0/0/3 { description P1-to-PE1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.5/31; } family iso; family mpls; } } ge-0/0/4 { description P1-to-ABR2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.10/31; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 10.2.2.8/32; } family iso { address 49.0000.0000.aaaa.0008.00; } } } } policy-options { policy-statement allow-lo0 { term 1 { from interface lo0.0; then accept; } term 2 { then reject; } } } routing-options { router-id 10.2.2.8; } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } ldp { interface all; } mpls { interface all; } }
Configuring RR1 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device RR1:
-
Configure the interfaces.
[edit interfaces] user@RR1#set ge-0/0/1 description RR1-to-P1 user@RR1#set ge-0/0/1 vlan-tagging user@RR1#set ge-0/0/1 unit 0 vlan-id 100 user@RR1#set ge-0/0/1 unit 0 family inet address 192.168.0.7/31 user@RR1#set ge-0/0/1 unit 0 family iso user@RR1#set ge-0/0/1 unit 0 family mpls
-
Configure the loopback interface.
[edit interfaces] user@RR1#set lo0 unit 1 family inet address 10.2.2.6/32 user@RR1#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0006.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@RR1#set policy-statement add-noexport term 1 then community add noexport user@RR1#set policy-statement allow-lo0 term 1 from interface lo0.1 user@RR1#set policy-statement allow-lo0 term 1 then accept user@RR1#set policy-statement allow-lo0 term 2 then reject user@RR1#set policy-statement export-inet3 term 1 from rib inet.3 user@RR1#set policy-statement export-inet3 term 1 then accept user@RR1#set policy-statement export-inet3 term 2 then reject user@RR1#set policy-statement pplb then load-balance per-packet user@RR1#set community noexport members no-export user@RR1#set community noexport members no-advertise
-
Configure routing options.
[edit routing-options] user@RR1#set forwarding-table export pplb user@RR1#set interface-routes rib-group inet inet0to3 user@RR1#set router-id 10.2.2.6 user@RR1#set autonomous-system 2 user@RR1#set rib-groups inet0to3 import-rib inet.0 user@RR1#set rib-groups inet0to3 import-rib inet.3 user@RR1#set rib-groups inet0to3 import-policy allow-lo0 user@RR1#set rib-groups inet3to0 import-rib inet.3 user@RR1#set rib-groups inet3to0 import-rib inet.0 user@RR1#set rib-groups inet3to0 import-rib inet6.3 user@RR1#set rib-groups inet3to0 import-policy add-noexport
-
Configure ISIS, RSVP, LDP, and MPLS protocols on the interface.
[edit protocols] user@RR1#set isis level 1 disable user@RR1#set isis interface all user@RR1#set isis export allow-lo0 user@RR1#set isis topologies ipv6-unicast user@RR1#set rsvp interface all user@RR1#set ldp interface all user@RR1#set mpls interface all
-
Configure BGP labeled unicast to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols bgp] user@RR1#set path-selection external-router-id user@RR1#set group toAs2Reg2BNs type internal user@RR1#set group toAs2Reg2BNs family inet labeled-unicast rib-group inet3to0 user@RR1#set group toAs2Reg2BNs family inet labeled-unicast add-path receive user@RR1#set group toAs2Reg2BNs family inet labeled-unicast add-path send path-count 4 user@RR1#set group toAs2Reg2BNs family inet labeled-unicast rib inet.3 user@RR1#set group toAs2Reg2BNs export export-inet3 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.3 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.4 user@RR1#set group toAs2Reg2BNs neighbor 10.2.2.5 user@RR1#set traceoptions file bgp.log user@RR1#set traceoptions file size 100m user@RR1#set traceoptions flag state detail user@RR1#set traceoptions flag policy user@RR1#set local-address 10.2.2.6 user@RR1#set cluster 10.2.2.6
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
and show protocols
commands. If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
interfaces { ge-0/0/1 { description RR1-to-P1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.7/31; } family iso; family mpls; } } lo0 { unit 1 { family inet { address 10.2.2.6/32; } family iso { address 49.0000.0000.aaaa.0006.00; } } } } policy-options { policy-statement add-noexport { term 1 { then { community add noexport; } } } policy-statement allow-lo0 { term 1 { from interface lo0.1; then accept; } term 2 { then reject; } } policy-statement export-inet3 { term 1 { from rib inet.3; then accept; } term 2 { then reject; } } policy-statement pplb { then { load-balance per-packet; } } community noexport members [ no-export no-advertise ]; } routing-options { forwarding-table { export pplb; } interface-routes { rib-group inet inet0to3; } router-id 10.2.2.6; autonomous-system 2; rib-groups { inet0to3 { import-rib [ inet.0 inet.3 ]; import-policy allow-lo0; } inet3to0 { import-rib [ inet.3 inet.0 inet6.3 ]; import-policy add-noexport; } } } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } bgp { path-selection external-router-id; group toAs2Reg2BNs { type internal; family inet { labeled-unicast { rib-group inet3to0; add-path { receive; send { path-count 4; } } rib { inet.3; } } } export export-inet3; neighbor 10.2.2.3; neighbor 10.2.2.4; neighbor 10.2.2.5; } traceoptions { file bgp.log size 100m; flag state detail; flag policy; } local-address 10.2.2.6; cluster 10.2.2.6; } ldp { interface all; } mpls { interface all; } }
Configuring ABR1 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device ABR1:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@ABR1#set ge-0/0/1 description ABR1-to-P2 user@ABR1#set ge-0/0/1 vlan-tagging user@ABR1#set ge-0/0/1 unit 0 vlan-id 100 user@ABR1#set ge-0/0/1 unit 0 family inet address 192.168.0.12/31 user@ABR1#set ge-0/0/1 unit 0 family iso user@ABR1#set ge-0/0/1 unit 0 family mpls user@ABR1#set ge-0/0/2 description ABR1-to-P1 user@ABR1#set ge-0/0/2 vlan-tagging user@ABR1#set ge-0/0/2 unit 0 vlan-id 100 user@ABR1#set ge-0/0/2 unit 0 family inet address 192.168.0.9/31 user@ABR1#set ge-0/0/2 unit 0 family iso user@ABR1#set ge-0/0/2 unit 0 family mpls
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@ABR1#set lo0 unit 0 family inet address 10.2.2.3/32 user@ABR1#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0003.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@ABR1#set policy-statement allow-lo0 term 1 from interface lo0.0 user@ABR1#set policy-statement allow-lo0 term 1 then accept user@ABR1#set policy-statement allow-lo0 term 2 then reject user@ABR1#set policy-statement nhs term 1 from protocol bgp user@ABR1#set policy-statement nhs term 1 then next-hop self user@ABR1#set policy-statement nhs term 1 then accept user@ABR1#set policy-statement pplb then load-balance per-packet
-
Apply per flow load balance policy to enable traffic protection.
[edit routing-options] user@ABR1#set forwarding-table export pplb user@ABR1#set router-id 10.2.2.3 user@ABR1#set autonomous-system 65002
-
Configure ISIS, RSVP, MPLS, and LDP protocols on the interface.
[edit protocols] user@ABR1#set isis level 1 disable user@ABR1#set isis interface all user@ABR1#set isis export allow-lo0 user@ABR1#set isis topologies ipv6-unicast user@ABR1#set rsvp interface all user@ABR1#set ldp interface all user@ABR1#set mpls label-switched-path toASBR2-gold to 10.2.2.2 user@ABR1#set mpls label-switched-path toASBR1-bronze to 10.2.2.1 user@ABR1#set mpls label-switched-path toASBR2-bronze to 10.2.2.2 user@ABR1#set mpls interface all
-
Configure BGP labeled unicast to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols] user@ABR1#set bgp group toAs2RR type internal user@ABR1#set bgp group toAs2RR local-address 10.2.2.3 user@ABR1#set bgp group toAs2RR advertise-inactive user@ABR1#set bgp group toAs2RR family inet labeled-unicast add-path receive user@ABR1#set bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 user@ABR1#set bgp group toAs2RR family inet labeled-unicast rib inet.3 user@ABR1#set bgp group toAs2RR export nhs user@ABR1#set bgp group toAs2RR cluster 10.2.2.3 user@ABR1#set bgp group toAs2RR neighbor 10.2.2.6 user@ABR1#set bgp group toAs2RR neighbor 10.2.2.7 user@ABR1#set bgp traceoptions file bgp.log user@ABR1#set bgp traceoptions file size 100m user@ABR1#set bgp traceoptions flag state detail user@ABR1#set bgp traceoptions flag policy
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
and show protocols
commands. If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
interfaces { ge-0/0/1 { description ABR1-to-P2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.12/31; } family iso; family mpls; } } ge-0/0/2 { description ABR1-to-P1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.9/31; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 10.2.2.3/32; } family iso { address 49.0000.0000.aaaa.0003.00; } } } } policy-options { policy-statement allow-lo0 { term 1 { from interface lo0.0; then accept; } term 2 { then reject; } } policy-statement nhs { term 1 { from protocol bgp; then { next-hop self; accept; } } } policy-statement pplb { then { load-balance per-packet; } } } routing-options { forwarding-table { export pplb; } router-id 10.2.2.3; autonomous-system 65002; } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } bgp { group toAs2RR { type internal; local-address 10.2.2.3; advertise-inactive; family inet { labeled-unicast { add-path { receive; send { path-count 4; } } rib { inet.3; } } } export nhs; cluster 10.2.2.3; neighbor 10.2.2.6; neighbor 10.2.2.7; } traceoptions { file bgp.log size 100m; flag state detail; flag policy; } } ldp { interface all; } mpls { label-switched-path toASBR2-gold { to 10.2.2.2; } label-switched-path toASBR1-bronze { to 10.2.2.1; } label-switched-path toASBR2-bronze { to 10.2.2.2; } interface all; } }
Configuring ABR2 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device ABR2:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@ABR2#set ge-0/0/2 description ABR2-to-P2 user@ABR2#set ge-0/0/2 vlan-tagging user@ABR2#set ge-0/0/2 unit 0 vlan-id 100 user@ABR2#set ge-0/0/2 unit 0 family inet address 192.168.0.14/31 user@ABR2#set ge-0/0/2 unit 0 family iso user@ABR2#set ge-0/0/2 unit 0 family mpls user@ABR2#set ge-0/0/4 description ABR2-to-P1 user@ABR2#set ge-0/0/4 vlan-tagging user@ABR2#set ge-0/0/4 unit 0 vlan-id 100 user@ABR2#set ge-0/0/4 unit 0 family inet address 192.168.0.11/31 user@ABR2#set ge-0/0/4 unit 0 family iso user@ABR2#set ge-0/0/4 unit 0 family mpls
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@ABR2#set lo0 unit 0 family inet address 2.2.2.4/32 user@ABR2#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0004.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@ABR2#set policy-statement allow-lo0 term 1 from interface lo0.0 user@ABR2#set policy-statement allow-lo0 term 1 then accept user@ABR2#set policy-statement allow-lo0 term 2 then reject user@ABR2#set policy-statement nhs term 1 from protocol bgp user@ABR2#set policy-statement nhs term 1 then next-hop self user@ABR2#set policy-statement nhs term 1 then accept user@ABR2#set policy-statement pplb then load-balance per-packet
-
Apply per flow load balance policy to enable traffic protection.
[edit routing-options] user@ABR2#set forwarding-table export pplb user@ABR2#set router-id 2.2.2.4 user@ABR2#set autonomous-system 2
-
Configure ISIS, RSVP, MPLS, and LDP protocols on the interface.
[edit protocols] user@ABR2#set isis level 1 disable user@ABR2#set isis interface all user@ABR2#set isis export allow-lo0 user@ABR2#set isis topologies ipv6-unicast user@ABR2#set rsvp interface all user@ABR2#set ldp interface all user@ABR2#set mpls label-switched-path toASBR1-bronze to 2.2.2.1 user@ABR2#set mpls interface all
-
Configure BGP labeled unicast to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols] user@ABR2#set bgp group toAs2RR type internal user@ABR2#set bgp group toAs2RR local-address 2.2.2.4 user@ABR2#set bgp group toAs2RR advertise-inactive user@ABR2#set bgp group toAs2RR family inet labeled-unicast add-path receive user@ABR2#set bgp group toAs2RR family inet labeled-unicast add-path send path-count 4 user@ABR2#set bgp group toAs2RR family inet labeled-unicast rib inet.3 user@ABR2#set bgp group toAs2RR export nhs user@ABR2#set bgp group toAs2RR cluster 2.2.2.4 user@ABR2#set bgp group toAs2RR neighbor 2.2.2.6 user@ABR2#set bgp group toAs2RR neighbor 2.2.2.7 user@ABR2#set bgp traceoptions file bgp.log user@ABR2#set bgp traceoptions file size 100m user@ABR2#set bgp traceoptions flag state detail user@ABR2#set bgp traceoptions flag policy
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
and show protocols
commands. If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
interfaces { ge-0/0/2 { description ABR2-to-P2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.14/31; } family iso; family mpls; } } ge-0/0/4 { description ABR2-to-P1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.11/31; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 2.2.2.4/32; } family iso { address 49.0000.0000.aaaa.0004.00; } } } } policy-options { policy-statement allow-lo0 { term 1 { from interface lo0.0; then accept; } term 2 { then reject; } } policy-statement nhs { term 1 { from protocol bgp; then { next-hop self; accept; } } } policy-statement pplb { then { load-balance per-packet; } } } routing-options { forwarding-table { export pplb; } router-id 2.2.2.4; autonomous-system 2; } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } bgp { group toAs2RR { type internal; local-address 2.2.2.4; advertise-inactive; family inet { labeled-unicast { add-path { receive; send { path-count 4; } } rib { inet.3; } } } export nhs; cluster 2.2.2.4; neighbor 2.2.2.6; neighbor 2.2.2.7; } traceoptions { file bgp.log size 100m; flag state detail; flag policy; } } ldp { interface all; } mpls { label-switched-path toASBR1-bronze { to 2.2.2.1; } interface all; } }
Configuring P2 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device P2:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@P2#set ge-0/0/1 description P2-to-ABR1 user@P2#set ge-0/0/1 vlan-tagging user@P2#set ge-0/0/1 unit 0 vlan-id 100 user@P2#set ge-0/0/1 unit 0 family inet address 192.168.0.13/31 user@P2#set ge-0/0/1 unit 0 family iso user@P2#set ge-0/0/1 unit 0 family mpls user@P2#set ge-0/0/2 description P2-to-ABR2 user@P2#set ge-0/0/2 vlan-tagging user@P2#set ge-0/0/2 unit 0 vlan-id 100 user@P2#set ge-0/0/2 unit 0 family inet address 192.168.0.15/31 user@P2#set ge-0/0/2 unit 0 family iso user@P2#set ge-0/0/2 unit 0 family mpls user@P2#set ge-0/0/3 description P2-to-RR2 user@P2#set ge-0/0/3 vlan-tagging user@P2#set ge-0/0/3 unit 0 vlan-id 100 user@P2#set ge-0/0/3 unit 0 family inet address 192.168.0.16/31 user@P2#set ge-0/0/3 unit 0 family iso user@P2#set ge-0/0/3 unit 0 family mpls user@P2#set ge-0/0/4 description P2-to-ASBR1 user@P2#set ge-0/0/4 vlan-tagging user@P2#set ge-0/0/4 unit 0 vlan-id 100 user@P2#set ge-0/0/4 unit 0 family inet address 192.168.0.18/31 user@P2#set ge-0/0/4 unit 0 family iso user@P2#set ge-0/0/4 unit 0 family mpls user@P2#set ge-0/0/5 description P2-to-ASBR2 user@P2#set ge-0/0/5 vlan-tagging user@P2#set ge-0/0/5 unit 0 vlan-id 100 user@P2#set ge-0/0/5 unit 0 family inet address 192.168.0.20/31 user@P2#set ge-0/0/5 unit 0 family iso user@P2#set ge-0/0/5 unit 0 family mpls
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@P2#set lo0 unit 0 family inet address 2.2.2.9/32 user@P2#set lo0 unit 0 family iso address 49.0000.0000.aaaa.0009.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@P2#set policy-statement allow-lo0 term 1 from interface lo0.0 user@P2#set policy-statement allow-lo0 term 1 then accept user@P2#set policy-statement allow-lo0 term 2 then reject
-
Configure routing options.
[edit routing-options] user@P2#set router-id 2.2.2.9
-
Configure ISIS, RSVP, MPLS, and LDP protocols on the interface.
[edit protocols] user@P2#set isis level 1 disable user@P2#set isis interface all user@P2#set isis export allow-lo0 user@P2#set isis topologies ipv6-unicast user@P2#set rsvp interface all user@P2#set ldp interface all user@P2#set mpls interface all
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
and show protocols
commands. If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
interfaces { ge-0/0/1 { description P2-to-ABR1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.13/31; } family iso; family mpls; } } ge-0/0/2 { description P2-to-ABR2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.15/31; } family iso; family mpls; } } ge-0/0/3 { description P2-to-RR2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.16/31; } family iso; family mpls; } } ge-0/0/4 { description P2-to-ASBR1; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.18/31; } family iso; family mpls; } } ge-0/0/5 { description P2-to-ASBR2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.20/31; } family iso; family mpls; } } lo0 { unit 0 { family inet { address 2.2.2.9/32; } family iso { address 49.0000.0000.aaaa.0009.00; } } } } policy-options { policy-statement allow-lo0 { term 1 { from interface lo0.0; then accept; } term 2 { then reject; } } } routing-options { router-id 2.2.2.9; } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } ldp { interface all; } mpls { interface all; } }
Configuring RR2 Device
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure device RR2:
-
Configure the interfaces to enable IP and MPLS transport.
[edit interfaces] user@RR2#set ge-0/0/3 description RR2-to-P2 user@RR2#set ge-0/0/3 vlan-tagging user@RR2#set ge-0/0/3 unit 0 vlan-id 100 user@RR2#set ge-0/0/3 unit 0 family inet address 192.168.0.17/31 user@RR2#set ge-0/0/3 unit 0 family iso user@RR2#set ge-0/0/3 unit 0 family mpls
-
Configure the loopback interface to be used as router ID and termination interface for LDP and BGP sessions.
[edit interfaces] user@RR2#set lo0 unit 1 family inet address 2.2.2.7/32 user@RR2#set lo0 unit 1 family iso address 49.0000.0000.aaaa.0007.00
-
Configure multipath resolution policies to install hierarchical multipaths into PFE.
[edit policy-options] user@RR2#set policy-statement allow-lo0 term 1 from interface lo0.1 user@RR2#set policy-statement allow-lo0 term 1 then accept user@RR2#set policy-statement allow-lo0 term 2 then reject user@RR2#set policy-statement export-inet3 term 1 from rib inet.3 user@RR2#set policy-statement export-inet3 term 1 then accept user@RR2#set policy-statement export-inet3 term 2 then reject user@RR2#set policy-statement pplb then load-balance per-packet
-
Apply per flow load balance policy to enable traffic protection.
[edit routing-options] user@RR2#set forwarding-table export pplb user@RR2#set interface-routes rib-group inet inet0to3 user@RR2#set router-id 2.2.2.7 user@RR2#set autonomous-system 2 user@RR2#set rib-groups inet0to3 import-rib inet.0 user@RR2#set rib-groups inet0to3 import-rib inet.3 user@RR2#set rib-groups inet0to3 import-policy allow-lo0
-
Configure ISIS, RSVP, MPLS, and LDP protocols on the interface.
[edit protocols] user@RR2#set isis level 1 disable user@RR2#set isis interface all user@RR2#set isis export allow-lo0 user@RR2#set isis topologies ipv6-unicast user@RR2#set rsvp interface all user@RR2#set ldp interface all user@RR2#set mpls interface all
-
Configure BGP labeled unicast to exchange loopback IP addresses as BGP labeled unicast prefixes.
[edit protocols] user@RR2#set bgp path-selection external-router-id user@RR2#set bgp group toAs2Reg1BNs type internal user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast add-path receive user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast add-path send path-count 4 user@RR2#set bgp group toAs2Reg1BNs family inet labeled-unicast rib inet.3 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.1 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.2 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.3 user@RR2#set bgp group toAs2Reg1BNs neighbor 2.2.2.4 user@RR2#set bgp traceoptions file bgp.log user@RR2#set bgp traceoptions file size 100m user@RR2#set bgp traceoptions flag state detail user@RR2#set bgp traceoptions flag policy user@RR2#set bgp local-address 2.2.2.7 user@RR2#set bgp cluster 2.2.2.7
Results
From configuration mode, confirm your configuration by entering the
show interfaces
, show policy-options
,
show routing-options
and show protocols
commands. If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
interfaces { ge-0/0/3 { description RR2-to-P2; vlan-tagging; unit 0 { vlan-id 100; family inet { address 192.168.0.17/31; } family iso; family mpls; } } lo0 { unit 1 { family inet { address 2.2.2.7/32; } family iso { address 49.0000.0000.aaaa.0007.00; } } } } policy-options { policy-statement allow-lo0 { term 1 { from interface lo0.1; then accept; } term 2 { then reject; } } policy-statement export-inet3 { term 1 { from rib inet.3; then accept; } term 2 { then reject; } } policy-statement pplb { then { load-balance per-packet; } } } routing-options { forwarding-table { export pplb; } interface-routes { rib-group inet inet0to3; } router-id 2.2.2.7; autonomous-system 2; rib-groups { inet0to3 { import-rib [ inet.0 inet.3 ]; import-policy allow-lo0; } } } protocols { isis { level 1 disable; interface all; export allow-lo0; topologies ipv6-unicast; } rsvp { interface all; } bgp { path-selection external-router-id; group toAs2Reg1BNs { type internal; family inet { labeled-unicast { add-path { receive; send { path-count 4; } } rib { inet.3; } } } neighbor 2.2.2.1; neighbor 2.2.2.2; neighbor 2.2.2.3; neighbor 2.2.2.4; } traceoptions { file bgp.log size 100m; flag state detail; flag policy; } local-address 2.2.2.7; cluster 2.2.2.7; } ldp { interface all; } mpls { interface all; } }
Verification
Confirm that the configuration is working properly.
Verifying that Nexthops are Resolved
Purpose
Verify that PE2 and PE3 nexthops are resolved at PE1.
Action
From operational mode, run the show route forwarding-table
destination
command.
user@PE1> show route forwarding-table destination 10.3.3.3 extensive table default | match Weight Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x4000 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1
user@PE1> show route forwarding-table destination 10.3.3.3 extensive table red | match Weight Weight: 0x1 Weight: 0x1 Next-hop interface: ge-0/0/3.0 Weight: 0x1 Weight: 0x4000 Weight: 0x4000 Next-hop interface: ge-0/0/3.0 Weight: 0x4000
Meaning
You can see weights 0x1
and 0x4000
for
primary and backup nexthops.
Verifying the Nexthop Entries in the Routing Table
Purpose
Verify the active nexthop routing entries at PE1.
Action
From operational mode, run the show route extensive
expanded-nh
command.
user@PE1> show route 10.3.3.3 extensive expanded-nh inet.0: 36 destinations, 65 routes (36 active, 0 holddown, 0 hidden) 10.3.3.3/32 (2 entries, 1 announced) Installed-nexthop: List (0xd6ba4b8) Index:1048626 Indr (0xc593cac) 10.1.1.1 Krt_inh (0xcc14684) Index:1048614 List (0xc4cf7b4) Index:1048613 Frr_inh (0xc592730) Index:1048608 Chain (0xc59334c) Index:651 Push 300368 Router (0xc58ea40) Index:628 192.168.0.5 Push 299808 Frr_inh (0xc592604) Index:1048609 Chain (0xc5924d8) Index:649 Push 300384 Router (0xc58ea40) Index:628 192.168.0.5 Push 299808 Frr_inh (0xc592154) Index:1048611 Chain (0xc591bdc) Index:654 Push 300368 Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824 Frr_inh (0xc5921b8) Index:1048612 Chain (0xc591a4c) Index:655 Push 300384 Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824 Indr (0xc593ab8) 10.1.1.2 Krt_inh (0xcc14f84) Index:1048624 List (0xc4d0074) Index:1048623 Frr_inh (0xc5939f0) Index:1048619 Chain (0xc592ab4) Index:638 Push 300144 Router (0xc58ea40) Index:628 192.168.0.5 Push 299808 Frr_inh (0xc593a54) Index:1048620 Chain (0xc591efc) Index:637 Push 300160 Router (0xc58ea40) Index:628 192.168.0.5 Push 299808 Frr_inh (0xc59172c) Index:1048589 Chain (0xc5903a4) Index:640 Push 300144 Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824 Frr_inh (0xc59159c) Index:1048590 Chain (0xc58fa44) Index:639 Push 300160 Router (0xc58ebd0) Index:629 192.168.0.5 Push 299824 TSI: <SNIP> Protocol next hop: 10.1.1.1 Indirect next hop: 0xcc14684 1048614 INH Session ID: 0x146 Weight 0x1 Protocol next hop: 10.1.1.2 Indirect next hop: 0xcc14f84 1048624 INH Session ID: 0x145 Weight 0x4000 State: >Active Ext> Local AS: 65002 Peer AS: 65001 <SNIP> Indirect next hops: 2 Protocol next hop: 10.1.1.1 Metric: 1 Indirect next hop: 0xcc14684 1048614 INH Session ID: 0x146 Weight 0x1 Indirect path forwarding next hops (Merged): 4 <SNIP> Protocol next hop: 10.1.1.2 Metric: 1 Indirect next hop: 0xcc14f84 1048624 INH Session ID: 0x145 Weight 0x4000 Indirect path forwarding next hops (Merged): 4
Meaning
You can see the weights 0x1
and 0x4000
for
primary and backup nexthops.
FAT Pseudowire Support for BGP L2VPN and VPLS Overview
A pseudowire is a Layer 2 circuit or service that emulates the essential attributes of a telecommunications service, such as a T1 line, over an MPLS packet-switched network (PSN). The pseudowire is intended to provide only the minimum necessary functionality to emulate the wire with the required resiliency requirements for the given service definition.
In an MPLS network, the flow-aware transport (FAT) of pseudowires flow label, as described in draft-keyupdate-l2vpn-fat-pw-bgp, is used for load-balancing traffic across BGP-signaled pseudowires for the Layer 2 virtual private network (L2VPN) and virtual private LAN service (VPLS).
FAT flow label is configured only on the label edge routers (LERs). This causes the transit routers or label-switching routers (LSRs) to perform load balancing of MPLS packets across equal-cost multipath (ECMP) paths or link aggregation groups (LAGs) without the need for deep packet inspection of the payload.
FAT flow label can be used for LDP-signaled forwarding equivalence class (FEC 128 and FEC 129) pseudowires for VPWS and VPLS pseudowires. The interface parameter (Sub-TLV) is used both for FEC 128 and FEC 129 pseudowires. The sub-TLV defined for LDP contains the transmit (T) and receive (R) bits. The T bit advertises the ability to push the flow label. The R bit advertises the ability to pop the flow label. By default, the signaling behavior of the provider edge (PE) router for any of these pseudowires is to advertise the T and R bits in the label set to 0.
The flow-label-transmit
and flow-label-receive
configuration statements provide the ability to set the T bit and
R bit advertisement to 1 in the Sub-TLV field, which is part of the
interface parameters of the FEC for the LDP label-mapping message.
You can use these statements to control the pushing of the load-balancing
label and the advertisement of the label to the routing peers in the
control plane for BGP signaled pseudowires like L2VPN and VPLS.
See Also
Configuring FAT Pseudowire Support for BGP L2VPN to Load-Balance MPLS Traffic
The flow-aware transport (FAT) or flow label is supported for BGP-signaled pseudowires such as L2VPN to be configured only on the label edge routers (LERs). This enables the transit routers or the label-switching routers (LSRs) to perform load balancing of MPLS packets across equal-cost multipath paths (ECMP) or link aggregation groups (LAGs) without the need for deep packet inspection of the payload. FAT pseudowires or flow label can be used with LDP-signaled L2VPNs with forwarding equivalence class (FEC128 and FEC129), and the support for flow label is extended for BGP-signaled pseudowires for point-to-point or point–to-multipoint Layer 2 services.
Before you configure FAT pseudowire support for BGP L2VPN to load-balance MPLS traffic:
Configure the device interfaces and enable MPLS on all the interfaces.
Configure RSVP.
Configure MPLS and an LSP to the remote PE router.
Configure BGP and OSPF.
To configure FAT pseudowire support for BGP L2VPN to load-balance MPLS traffic, you must do the following:
See Also
Example: Configuring FAT Pseudowire Support for BGP L2VPN to Load-Balance MPLS Traffic
This example shows how to implement FAT pseudowire support for BGP L2VPN to help load-balance MPLS traffic.
Requirements
This example uses the following hardware and software components:
Five MX Series routers
Junos OS Release 16.1 or later running on all devices
Before you configure FAT pseudowire support for BGP L2VPN, be sure you configure the routing and signaling protocols.
Overview
Junos OS allows the flow-aware transport (FAT) flow label that is supported for BGP-signaled pseudowires such as L2VPN to be configured only on the label edge routers (LERs). This causes the transit routers or the label-switching routers(LSRs) to perform load balancing of MPLS packets across equal-cost multipath (ECMP) paths or link aggregation groups (LAGs) without the need for deep packet inspection of the payload. The FAT flow label can be used for LDP-signaled forwarding equivalence class (FEC 128 and FEC 129) pseudowires for VPWS and VPLS pseudowires.
Topology
Figure 15, shows the FAT pseudowire support for BGP L2VPN configured on Device PE1 and Device PE2.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit
from configuration
mode.
CE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 10.255.255.8/32
PE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 mtu 1600 set interfaces ge-0/0/0 encapsulation vlan-ccc set interfaces ge-0/0/0 unit 300 encapsulation vlan-ccc set interfaces ge-0/0/0 unit 300 vlan-id 600 set interfaces ge-0/0/0 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family vpls set interfaces ge-0/0/1 unit 0 family inet address 1.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.1/32 set routing-options nonstop-routing set routing-options router-id 10.255.255.1 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe2 to 10.255.255.4 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.1 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.4 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances l2vpn-inst instance-type l2vpn set routing-instances l2vpn-inst interface ge-0/0/0.300 set routing-instances l2vpn-inst route-distinguisher 10.255.255.1:200 set routing-instances l2vpn-inst vrf-target target:100:100 set routing-instances l2vpn-inst protocols l2vpn encapsulation-type ethernet-vlan set routing-instances l2vpn-inst protocols l2vpn site pe1 site-identifier 1 set routing-instances l2vpn-inst protocols l2vpn site pe1 interface ge-0/0/0.300 remote-site-id 2 set routing-instances l2vpn-inst protocols l2vpn flow-label-transmit set routing-instances l2vpn-inst protocols l2vpn flow-label-receive set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/0.600 set routing-instances vpl1 route-distinguisher 10.255.255.1:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE1 site-identifier 1 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
P
set interfaces ge-0/0/0 unit 0 family inet address 1.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 2.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.2/32 set routing-options router-id 10.255.255.2 set routing-options autonomous-system 100 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.2 set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.4 deactivate protocols bgp set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
PE2
set interfaces ge-0/0/0 unit 0 family inet address 2.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 mtu 1600 set interfaces ge-0/0/1 encapsulation vlan-ccc set interfaces ge-0/0/1 unit 300 encapsulation vlan-ccc set interfaces ge-0/0/1 unit 300 vlan-id 600 set interfaces ge-0/0/1 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 vlan-id 600 set interfaces ge-0/0/1 unit 600 family vpls set interfaces lo0 unit 0 family inet address 10.255.255.4/32 set routing-options router-id 10.255.255.4 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe1 to 10.255.255.1 set protocols mpls interface ge-0/0/0.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.4 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances l2vpn-inst instance-type l2vpn set routing-instances l2vpn-inst interface ge-0/0/1.300 set routing-instances l2vpn-inst route-distinguisher 10.255.255.4:200 set routing-instances l2vpn-inst vrf-target target:100:100 set routing-instances l2vpn-inst protocols l2vpn encapsulation-type ethernet-vlan set routing-instances l2vpn-inst protocols l2vpn site pe2 site-identifier 2 set routing-instances l2vpn-inst protocols l2vpn site pe2 interface ge-0/0/1.300 remote-site-id 1 set routing-instances l2vpn-inst protocols l2vpn flow-label-transmit set routing-instances l2vpn-inst protocols l2vpn flow-label-receive set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/1.600 set routing-instances vpl1 route-distinguisher 10.255.255.4:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE2 site-identifier 2 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive deactivate routing-instances vpl1
CE2
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.2/24 set interfaces lo0 unit 0 family inet address 10.255.255.9/32
Configuring PE1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device PE1:
Configure the interfaces.
[edit interfaces] user@PE1# set ge-0/0/0 vlan-tagging user@PE1# set ge-0/0/0 mtu 1600 user@PE1# set ge-0/0/0 encapsulation vlan-ccc user@PE1# set ge-0/0/0 unit 300 encapsulation vlan-ccc user@PE1# set ge-0/0/0 unit 300 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 family vpls deactivate interfaces ge-0/0/0 unit 600 user@PE1# set ge-0/0/1 unit 0 family inet address 1.0.0.1/24 user@PE1# set ge-0/0/1 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.255.255.1/32
Configure nonstop routing, and configure the router ID.
[edit routing-options] user@PE1# set nonstop-routing user@PE1# set router-id 10.255.255.1
Configure the autonomous system (AS) number, and apply the policy to the forwarding table of the local router with the export statement.
[edit routing-options] user@PE1# set autonomous-system 100 user@PE1# set forwarding-table export exp-to-frwd
Configure the RSVP protocol on the interfaces.
[edit protocols rsvp] user@PE1# set interface all user@PE1# set interface ge-0/0/1.0 user@PE1# set interface lo0.0
Apply the label-switched path attributes to the MPLS protocol, and configure the interface.
[edit protocols mpls] user@PE1# set label-switched-path to-pe2 to 10.255.255.4 user@PE1# set interface ge-0/0/1.0
Define a peer group, and configure the address of the local-end address of the BGP session for peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE1# set type internal user@PE1# set local-address 10.255.255.1
Configure attributes of the protocol family for NLRIs in updates.
[edit protocols bgp group vpls-pe] user@PE1# set family l2vpn auto-discovery-only user@PE1# set family l2vpn signaling
Configure neighbors for the peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE1# set neighbor 10.255.255.4 user@PE1# set neighbor 10.255.255.2
Configure traffic engineering, and configure the interfaces of OSPF area 0.0.0.0.
[edit protocols ospf] user@PE1# set traffic-engineering user@PE1# set area 0.0.0.0 interface lo0.0 passive user@PE1# set area 0.0.0.0 interface ge-0/0/1.0
Configure the routing policy and the BGP community information.
[edit policy-options] user@PE1# set policy-statement exp-to-fwd term 0 from community vpls-com user@PE1# set policy-statement exp-to-fwd term 0 then install-nexthop lsp to-pe2 user@PE1# set policy-statement exp-to-fwd term 0 then accept user@PE1# set community vpls-com members target:100:100
Configure the type of routing instance, and configure the interface.
[edit routing-instances l2vpn-inst] user@PE1# set instance-type l2vpn user@PE1# set interface ge-0/0/0.300
Configure the route distinguisher for instance
l2vpn-inst
, and configure the VRF target community.[edit routing-instances l2vpn-inst] user@PE1# set route-distinguisher 10.255.255.1:200 user@PE1# set vrf-target target:100:100
Configure the type of encapsulation required for the L2VPN protocol.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set encapsulation-type ethernet-vlan
Configure the sites connected to the provider equipment.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set site pe1 site-identifier 1 user@PE1# set site pe1 interface ge-0/0/0.300 remote-site-id 2
Configure the L2VPN protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to push the flow label in the transmit direction to the remote PE.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE1# set flow-label-transmit user@PE1# set flow-label-receive
Configure the type of routing instance, and configure the interface.
[edit routing-instances vpl1] user@PE1# set instance-type vpls user@PE1# set interface ge-0/0/0.600
Configure the route distinguisher for instance
vp1
, and configure the VRF target community.[edit routing-instances vpl1] user@PE1# set route-distinguisher 10.255.255.1:100 user@PE1# set vrf-target target:100:100
Assign the maximum site identifier for the VPLS domain.
[edit routing-instances vpl1 protocols vpls] user@PE1# set site-range 10
Configure to not use the tunnel services for the VPLS instance, and assign a site identifier to the site connected to the provider equipment.
[edit routing-instances vpl1 protocols vpls] user@PE1# set no-tunnel-services user@PE1# set site vpl1PE1 site-identifier 1
Configure the VPLS protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to push the flow label in the transmit direction to the remote PE.
[edit routing-instances vpl1 protocols vpls] user@PE1# set flow-label-transmit user@PE1# set flow-label-receive
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@PE1# show interfaces ge-0/0/0 { vlan-tagging; mtu 1600; encapsulation vlan-ccc; unit 300 { encapsulation vlan-ccc; vlan-id 600; } unit 600 { encapsulation vlan-vpls; vlan-id 600; family vpls; } } ge-0/0/1 { unit 0 { family inet { address 1.0.0.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.255.1/32; } } }
user@PE1# show protocols rsvp { interface all; interface ge-0/0/1.0; interface lo0.0; } mpls { label-switched-path to-pe2 { to 10.255.255.4; } interface ge-0/0/1.0; } bgp { group vpls-pe { type internal; local-address 10.255.255.1; family l2vpn { auto-discovery-only; signaling; } neighbor 10.255.255.4; neighbor 10.255.255.2; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0 { passive; } interface ge-0/0/1.0; } }
user@PE1# show policy-options policy-statement exp-to-frwd { term 0 { from community vpls-com; then { install-nexthop lsp to-pe2; accept; } } } community vpls-com members target:100:100;
user@PE1# show routing-instances l2vpn-inst { instance-type l2vpn; interface ge-0/0/0.300; route-distinguisher 10.255.255.1:200; vrf-target target:100:100; protocols { l2vpn { encapsulation-type ethernet-vlan; site pe1 { site-identifier 1; interface ge-0/0/0.300 { remote-site-id 2; } } flow-label-transmit; flow-label-receive; } } } vpl1 { instance-type vpls; interface ge-0/0/0.600; route-distinguisher 10.255.255.1:100; vrf-target target:100:100; protocols { vpls { site-range 10; no-tunnel-services; site vpl1PE1 { site-identifier 1; } flow-label-transmit; flow-label-receive; } } }
user@PE1# show routing-options nonstop-routing; router-id 10.255.255.1; autonomous-system 100; forwarding-table { export exp-to-frwd; }
Verification
Confirm that the configuration is working properly.
- Verifying the BGP Summary Information
- Verifying the L2VPN Connections Information
- Verifying the Routes
Verifying the BGP Summary Information
Purpose
Verify the BGP summary information.
Action
From operational mode, enter the show bgp summary
command.
user@PE1> show bgp summary
Groups: 1 Peers: 2 Down peers: 1
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l2vpn.0
1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.255.255.2 100 0 0 0 0 2d 12:54:28 Active
10.255.255.4 100 8121 8093 0 0 2d 12:53:56 Establ
bgp.l2vpn.0: 1/1/1/0
l2vpn-inst.l2vpn.0: 1/1/1/0
Meaning
The output displays the BGP summary information.
Verifying the L2VPN Connections Information
Purpose
Verify the Layer 2 VPN connections information.
Action
From operational mode, run the show l2vpn connections
command to display the Layer 2 VPN connections information.
user@PE1> show l2vpn connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: l2vpn-inst
Edge protection: Not-Primary
Local site: pe1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jun 22 14:46:50 2015 1
Remote PE: 10.255.255.4, Negotiated control-word: Yes (Null)
Incoming label: 800003, Outgoing label: 800002
Local interface: ge-0/0/0.300, Status: Up, Encapsulation: VLAN
Flow Label Transmit: Yes, Flow Label Receive: Yes
Meaning
The output displays the Layer 2 VPN connections information along with the flow label transmit and flow label receive information.
Verifying the Routes
Purpose
Verify that the expected routes are learned.
Action
From operational mode, run the show route
command to display the routes in the routing table.
user@PE1> show route
inet.0: 51 destinations, 51 routes (51 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.0.0.0/24 *[Direct/0] 2d 12:48:34
> via ge-0/0/1.0
1.0.0.1/32 *[Local/0] 2d 12:48:34
Local via ge-0/0/1.0
2.0.0.0/24 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
10.4.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.5.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.6.128.0/17 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.9.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.10.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.13.4.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.13.10.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.82.0.0/15 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.84.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.85.12.0/22 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.92.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.94.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.99.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.102.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.102.160.0/19 *[Direct/0] 2d 12:48:34
> via fxp0.0
10.102.169.99/32 *[Local/0] 2d 12:48:34
Local via fxp0.0
10.150.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.155.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.157.64.0/19 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.160.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.204.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.205.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.206.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.207.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.209.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.212.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.213.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.214.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.215.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.216.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.13.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.14.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.16.0/20 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.218.32.0/20 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.227.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
10.255.255.1/32 *[Direct/0] 2d 12:48:34
> via lo0.0
10.255.255.2/32 *[OSPF/10] 2d 12:48:24, metric 1
> to 1.0.0.2 via ge-0/0/1.0
10.255.255.4/32 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
128.102.161.191/32 *[OSPF/10] 2d 12:48:24, metric 1
> to 1.0.0.2 via ge-0/0/1.0
128.102.169.99/32 *[Direct/0] 2d 12:48:34
> via lo0.0
128.102.171.41/32 *[OSPF/10] 2d 12:48:24, metric 2
> to 1.0.0.2 via ge-0/0/1.0
172.16.0.0/12 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
192.168.0.0/16 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
192.168.102.0/23 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.136.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.136.192/32 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
207.17.137.0/24 *[Static/5] 2d 12:48:34
> to 10.102.191.254 via fxp0.0
224.0.0.5/32 *[OSPF/10] 2d 12:48:34, metric 1
MultiRecv
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.4/32 *[RSVP/7/1] 2d 12:48:04, metric 2
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
47.0005.80ff.f800.0000.0108.0001.1281.0216.9099/152
*[Direct/0] 2d 12:48:34
> via lo0.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2d 12:48:34, metric 1
Receive
1 *[MPLS/0] 2d 12:48:34, metric 1
Receive
2 *[MPLS/0] 2d 12:48:34, metric 1
Receive
13 *[MPLS/0] 2d 12:48:34, metric 1
Receive
800003 *[L2VPN/7] 2d 12:41:29
> via ge-0/0/0.300, Pop Offset: 4
ge-0/0/0.300 *[L2VPN/7] 2d 12:41:29, metric2 2
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
abcd::128:102:169:99/128
*[Direct/0] 2d 12:48:34
> via lo0.0
fe80::5668:a60f:fc6b:eb97/128
*[Direct/0] 2d 12:48:34
> via lo0.0
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.4:200:2:1/96
*[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
l2vpn-inst.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[L2VPN/170/-101] 2d 12:41:29, metric2 1
Indirect
10.255.255.4:200:2:1/96
*[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
l2vpn-inst.l2id.0: 2 destinations, 3 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1 *[L2VPN/170/-101] 2d 12:41:29, metric2 1
Indirect
[L2VPN/175] 2d 12:41:29
> via ge-0/0/0.300, Pop Offset: 4
2 *[BGP/170] 2d 12:41:35, localpref 100, from 10.255.255.4
AS path: I, validation-state: unverified
> to 1.0.0.2 via ge-0/0/1.0, label-switched-path to-pe2
Meaning
The output shows all the routes in the routing table.
Configuring PE2
Procedure
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device PE2:
Configure the interfaces.
[edit interfaces] user@PE2# set ge-0/0/0 unit 0 family inet address 2.0.0.2/24 user@PE2# set ge-0/0/0 unit 0 family mpls user@PE2# set ge-0/0/1 vlan-tagging user@PE2# set ge-0/0/1 mtu 1600 user@PE2# set ge-0/0/1 encapsulation vlan-ccc user@PE2# set ge-0/0/1 unit 300 encapsulation vlan-ccc user@PE2# set ge-0/0/1 unit 300 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 family vpls deactivate interfaces ge-0/0/1 unit 600 user@PE2# set lo0 unit 0 family inet address 10.255.255.4/32
Configure the router ID.
[edit routing-options] user@PE2# set router-id 10.255.255.4
Configure the autonomous system (AS) number, and apply the policy to the forwarding table of the local router with the export statement.
[edit routing-options] user@PE2# set autonomous-system 100 user@PE2# set forwarding-table export exp-to-frwd
Configure the RSVP protocol on the interfaces.
[edit protocols rsvp] user@PE2# set interface all user@PE2# set interface ge-0/0/1.0 user@PE2# set interface lo0.0
Apply the label-switched path attributes to the MPLS protocol, and configure the interface.
[edit protocols mpls] user@PE2# set label-switched-path to-pe1 to 10.255.255.1 user@PE2# set interface ge-0/0/0.0
Define a peer group, and configure the local-end address of the BGP session for the peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE2# set type internal user@PE2# set local-address 10.255.255.4
Configure the attributes of the protocol family for NLRIs in updates.
[edit protocols bgp group vpls-pe] user@PE2# set family l2vpn auto-discovery-only user@PE2# set family l2vpn signaling
Configure the neighbors for peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE2# set neighbor 10.255.255.1 user@PE2# set neighbor 10.255.255.2
Configure traffic engineering, and configure the interfaces of OSPF area 0.0.0.0.
[edit protocols ospf] user@PE2# set traffic-engineering user@PE2# set area 0.0.0.0 interface lo0.0 passive user@PE2# set area 0.0.0.0 interface ge-0/0/0.0
Configure the routing policy and the BGP community information.
[edit policy-options] user@PE2# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE2# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 user@PE2# set policy-statement exp-to-frwd term 0 then accept user@PE2# set community vpls-com members target:100:100
Configure the type of routing instance, and configure the interface.
[edit routing-instances l2vpn-inst] user@PE2# set instance-type l2vpn user@PE2# set interface ge-0/0/1.300
Configure the route distinguisher for instance
l2vpn-inst
, and configure the VRF target community.[edit routing-instances l2vpn-inst] user@PE2# set route-distinguisher 10.255.255.4:200 user@PE2# set vrf-target target:100:100
Configure the type of encapsulation required for the L2VPN protocol.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set encapsulation-type ethernet-vlan
Configure the sites connected to the provider equipment.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set site pe2 site-identifier 2 user@PE2# set site pe2 interface ge-0/0/1.300 remote-site-id 1
Configure the L2VPN protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to push the flow label in the transmit direction to the remote PE.
[edit routing-instances l2vpn-inst protocols l2vpn] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
Configure the type of routing instance, and configure the interface.
[edit routing-instances vpl1] user@PE2# set instance-type vpls user@PE2# set interface ge-0/0/1.600
Configure the route distinguisher for instance
vpl1
, and configure the VRF target community.[edit routing-instances vpl1] user@PE2# set route-distinguisher 10.255.255.4:100 user@PE2# set vrf-target target:100:100
Assign the maximum site identifier for the VPLS domain.
[edit routing-instances vpl1 protocols vpls] user@PE2# set site-range 10
Configure to not use the tunnel services for the VPLS instance, and assign a site identifier to the site connected to the provider equipment.
[edit routing-instances vpl1 protocols vpls] user@PE2# set no-tunnel-services user@PE2# set site vpl1PE2 site-identifier 2
Configure the VPLS protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to the push flow label in the transmit direction to the remote PE.
[edit routing-instances vpl1 protocols vpls] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@PE2# show interfaces ge-0/0/0 { unit 0 { family inet { address 2.0.0.2/24; } family mpls; } } ge-0/0/1 { vlan-tagging; mtu 1600; encapsulation vlan-ccc; unit 300 { encapsulation vlan-ccc; vlan-id 600; } unit 600 { encapsulation vlan-vpls; vlan-id 600; family vpls; } } lo0 { unit 0 { family inet { address 10.255.255.4/32; } } }
user@PE2# show protocols rsvp { interface all; interface ge-0/0/1.0; interface lo0.0; } mpls { label-switched-path to-pe1 { to 10.255.255.1; } interface ge-0/0/0.0; } bgp { group vpls-pe { type internal; local-address 10.255.255.4; family l2vpn { auto-discovery-only; signaling; } neighbor 10.255.255.1; neighbor 10.255.255.2; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0 { passive; } interface ge-0/0/0.0; } }
user@PE2# show policy-options policy-statement exp-to-frwd { term 0 { from community vpls-com; then { install-nexthop lsp to-pe1; accept; } } } community vpls-com members target:100:100;
user@PE2# show routing-instances l2vpn-inst { instance-type l2vpn; interface ge-0/0/1.300; route-distinguisher 10.255.255.4:200; vrf-target target:100:100; protocols { l2vpn { encapsulation-type ethernet-vlan; site pe2 { site-identifier 2; interface ge-0/0/1.300 { remote-site-id 1; } } flow-label-transmit; flow-label-receive; } } } vpl1 { instance-type vpls; interface ge-0/0/1.600; route-distinguisher 10.255.255.4:100; vrf-target target:100:100; protocols { vpls { site-range 10; no-tunnel-services; site vpl1PE2 { site-identifier 2; } flow-label-transmit; flow-label-receive; } } }
user@PE2# show routing-options router-id 10.255.255.4; autonomous-system 100; forwarding-table { export exp-to-frwd; }
Verification
Confirm that the configuration is working properly.
- Verifying the BGP Summary Information
- Verifying the L2VPN Connections Information
- Verifying the Routes
Verifying the BGP Summary Information
Purpose
Verify the BGP summary information.
Action
From operational mode, enter the show bgp summary
command.
user@PE2> show bgp summary
Groups: 1 Peers: 2 Down peers: 1
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l2vpn.0
1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.255.255.1 100 8090 8119 0 1 2d 12:53:15 Establ
bgp.l2vpn.0: 1/1/1/0
l2vpn-inst.l2vpn.0: 1/1/1/0
10.255.255.2 100 0 0 0 0 2d 14:14:49 Active
Meaning
The output displays the BGP summary information.
Verifying the L2VPN Connections Information
Purpose
Verify the Layer 2 VPN connections information.
Action
From operational mode, run the show l2vpn connections
command to display the Layer 2 VPN connections information.
user@PE2> show l2vpn connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: l2vpn-inst
Edge protection: Not-Primary
Local site: pe2 (2)
connection-site Type St Time last up # Up trans
1 rmt Up Jun 22 14:46:50 2015 1
Remote PE: 10.255.255.1, Negotiated control-word: Yes (Null)
Incoming label: 800002, Outgoing label: 800003
Local interface: ge-0/0/1.300, Status: Up, Encapsulation: VLAN
Flow Label Transmit: Yes, Flow Label Receive: Yes
Meaning
The output displays the Layer 2 VPN connections information along with the flow label transmit and flow label receive information.
Verifying the Routes
Purpose
Verify that the expected routes are learned.
Action
From operational mode, run the show route
command to display the routes in the routing table.
user@PE2> show route
inet.0: 51 destinations, 51 routes (51 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.0.0.0/24 *[OSPF/10] 2d 14:09:33, metric 2
> to 2.0.0.1 via ge-0/0/0.0
2.0.0.0/24 *[Direct/0] 2d 14:10:18
> via ge-0/0/0.0
2.0.0.2/32 *[Local/0] 2d 14:10:20
Local via ge-0/0/0.0
10.4.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.5.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.6.128.0/17 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.9.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.10.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.13.4.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.13.10.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.82.0.0/15 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.84.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.85.12.0/22 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.92.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.94.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.99.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.102.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.102.160.0/19 *[Direct/0] 2d 14:12:18
> via fxp0.0
10.102.171.41/32 *[Local/0] 2d 14:12:18
Local via fxp0.0
10.150.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.155.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.157.64.0/19 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.160.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.204.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.205.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.206.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.207.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.209.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.212.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.213.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.214.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.215.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.216.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.13.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.14.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.16.0/20 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.218.32.0/20 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.227.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
10.255.255.1/32 *[OSPF/10] 2d 12:50:36, metric 2
> to 2.0.0.1 via ge-0/0/0.0
10.255.255.2/32 *[OSPF/10] 2d 14:09:33, metric 1
> to 2.0.0.1 via ge-0/0/0.0
10.255.255.4/32 *[Direct/0] 2d 14:11:51
> via lo0.0
128.102.161.191/32 *[OSPF/10] 2d 14:09:33, metric 1
> to 2.0.0.1 via ge-0/0/0.0
128.102.169.99/32 *[OSPF/10] 2d 12:50:36, metric 2
> to 2.0.0.1 via ge-0/0/0.0
128.102.171.41/32 *[Direct/0] 2d 14:12:18
> via lo0.0
172.16.0.0/12 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
192.168.0.0/16 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
192.168.102.0/23 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.136.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.136.192/32 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
207.17.137.0/24 *[Static/5] 2d 14:12:18
> to 10.102.191.254 via fxp0.0
224.0.0.5/32 *[OSPF/10] 2d 14:11:51, metric 1
MultiRecv
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1/32 *[RSVP/7/1] 2d 12:50:24, metric 2
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
47.0005.80ff.f800.0000.0108.0001.1281.0217.1041/152
*[Direct/0] 2d 14:12:18
> via lo0.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2d 14:11:51, metric 1
Receive
1 *[MPLS/0] 2d 14:11:51, metric 1
Receive
2 *[MPLS/0] 2d 14:11:51, metric 1
Receive
13 *[MPLS/0] 2d 14:11:51, metric 1
Receive
800002 *[L2VPN/7] 2d 12:43:43
> via ge-0/0/1.300, Pop Offset: 4
ge-0/0/1.300 *[L2VPN/7] 2d 12:43:43, metric2 2
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
abcd::128:102:171:41/128
*[Direct/0] 2d 14:12:18
> via lo0.0
fe80::5668:a60f:fc6b:ee28/128
*[Direct/0] 2d 14:12:18
> via lo0.0
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
l2vpn-inst.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.255.1:200:1:1/96
*[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
10.255.255.4:200:2:1/96
*[L2VPN/170/-101] 2d 12:43:50, metric2 1
Indirect
l2vpn-inst.l2id.0: 2 destinations, 3 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1 *[BGP/170] 2d 12:43:43, localpref 100, from 10.255.255.1
AS path: I, validation-state: unverified
> to 2.0.0.1 via ge-0/0/0.0, label-switched-path to-pe1
2 *[L2VPN/170/-101] 2d 12:43:50, metric2 1
Indirect
[L2VPN/175] 2d 12:43:43
> via ge-0/0/1.300, Pop Offset: 4
Meaning
The output shows all the routes in the routing table.
Configuring FAT Pseudowire Support for BGP VPLS to Load-Balance MPLS Traffic
The flow-aware transport (FAT) or flow label is supported for BGP-signaled pseudowires such as VPLS and is to be configured only on the label edge routers (LERs). This enables the transit routers or the label-switching routers (LSRs) to perform load balancing of MPLS packets across equal-cost multipath (ECMP) or link aggregation groups (LAGs) without the need for deep packet inspection of the payload. FAT pseudowires or flow label can be used with LDP-signaled VPLS with forwarding equivalence class (FEC128 and FEC129), and the support for flow label is extended for BGP-signaled pseudowires for point-to-point or point-to-multipoint Layer 2 services.
Before you configure FAT pseudowire support for BGP VPLS to load-balance MPLS traffic:
Configure the device interfaces and enable MPLS on all the interfaces.
Configure RSVP.
Configure MPLS and an LSP to the remote PE router.
Configure BGP and OSPF.
To configure FAT pseudowire support for BGP VPLS to load-balance MPLS traffic, you must do the following:
See Also
Example: Configuring FAT Pseudowire Support for BGP VPLS to Load-Balance MPLS Traffic
This example shows how to implement FAT pseudowire support for BGP VPLS to help load-balance MPLS traffic.
Requirements
This example uses the following hardware and software components:
Five MX Series routers
Junos OS Release 16.1 or later running on all devices
Before you configure FAT pseudowire support for BGP VPLS, be sure you configure the routing and signaling protocols.
Overview
Junos OS allows the flow-aware transport (FAT) flow label that is supported for BGP-signaled pseudowires such as VPLS to be configured only on the label edge routers (LERs). This causes the transit routers or the label-switching routers (LSRs) to perform load balancing of MPLS packets across equal-cost multipath (ECMP) paths or link aggregation groups (LAGs) without the need for deep packet inspection of the payload. The FAT flow label can be used for LDP-signaled forwarding equivalence class (FEC 128 and FEC 129) pseudowires for VPWS and VPLS pseudowires.
Topology
Figure 16 shows the FAT pseudowire support for BGP VPLS configured on Device PE1 and Device PE2.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit
from configuration
mode.
CE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.1/24 set interfaces lo0 unit 0 family inet address 10.255.255.8/32
PE1
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 mtu 1600 set interfaces ge-0/0/0 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family vpls set interfaces ge-0/0/1 unit 0 family inet address 1.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.1/32 set routing-options nonstop-routing set routing-options router-id 10.255.255.1 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe2 to 10.255.255.4 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.1 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.4 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/0.600 set routing-instances vpl1 route-distinguisher 10.255.255.1:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE1 site-identifier 1 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
P
set interfaces ge-0/0/0 unit 0 family inet address 1.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 2.0.0.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.255.255.2/32 set routing-options router-id 10.255.255.2 set routing-options autonomous-system 100 set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface ge-0/0/0.0 set protocols rsvp interface lo0.0 set protocols mpls interface ge-0/0/0.0 set protocols mpls interface ge-0/0/1.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.2 set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.4 deactivate protocols bgp set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
PE2
set interfaces ge-0/0/0 unit 0 family inet address 2.0.0.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 mtu 1600 set interfaces ge-0/0/1 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 encapsulation vlan-vpls set interfaces ge-0/0/1 unit 600 vlan-id 600 set interfaces ge-0/0/1 unit 600 family vpls set interfaces lo0 unit 0 family inet address 10.255.255.4/32 set routing-options router-id 10.255.255.4 set routing-options autonomous-system 100 set routing-options forwarding-table export exp-to-frwd set protocols rsvp interface all set protocols rsvp interface ge-0/0/1.0 set protocols rsvp interface lo0.0 set protocols mpls label-switched-path to-pe1 to 10.255.255.1 set protocols mpls interface ge-0/0/0.0 set protocols bgp group vpls-pe type internal set protocols bgp group vpls-pe local-address 10.255.255.4 set protocols bgp group vpls-pe family l2vpn auto-discovery-only set protocols bgp group vpls-pe family l2vpn signaling set protocols bgp group vpls-pe neighbor 10.255.255.1 set protocols bgp group vpls-pe neighbor 10.255.255.2 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set policy-options policy-statement exp-to-frwd term 0 from community vpls-com set policy-options policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 set policy-options policy-statement exp-to-frwd term 0 then accept set policy-options community vpls-com members target:100:100 set routing-instances vpl1 instance-type vpls set routing-instances vpl1 interface ge-0/0/1.600 set routing-instances vpl1 route-distinguisher 10.255.255.4:100 set routing-instances vpl1 vrf-target target:100:100 set routing-instances vpl1 protocols vpls site-range 10 set routing-instances vpl1 protocols vpls no-tunnel-services set routing-instances vpl1 protocols vpls site vpl1PE2 site-identifier 2 set routing-instances vpl1 protocols vpls flow-label-transmit set routing-instances vpl1 protocols vpls flow-label-receive
CE2
set interfaces ge-0/0/0 vlan-tagging set interfaces ge-0/0/0 unit 600 vlan-id 600 set interfaces ge-0/0/0 unit 600 family inet address 10.1.1.2/24 set interfaces lo0 unit 0 family inet address 10.255.255.9/32
Configuring PE1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device PE1:
Configure the interfaces.
[edit interfaces] user@PE1# set ge-0/0/0 vlan-tagging user@PE1# set ge-0/0/0 mtu 1600 user@PE1# set ge-0/0/0 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 encapsulation vlan-vpls user@PE1# set ge-0/0/0 unit 600 vlan-id 600 user@PE1# set ge-0/0/0 unit 600 family vpls user@PE1# set ge-0/0/1 unit 0 family inet address 1.0.0.1/24 user@PE1# set ge-0/0/1 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.255.255.1/32
Configure nonstop routing, and configure the router ID.
[edit routing-options] user@PE1# set nonstop-routing user@PE1# set router-id 10.255.255.1
Configure the autonomous system (AS) number, and apply the policy to the forwarding table of the local router with the export statement.
[edit routing-options] user@PE1# set autonomous-system 100 user@PE1# set forwarding-table export exp-to-frwd
Configure the RSVP protocol on the interfaces.
[edit protocols rsvp] user@PE1# set interface all user@PE1# set interface ge-0/0/1.0 user@PE1# set interface lo0.0
Apply the label-switched path attributes to the MPLS protocol, and configure the interface.
[edit protocols mpls] user@PE1# set label-switched-path to-pe2 to 10.255.255.4 user@PE1# set interface ge-0/0/1.0
Define a peer group, and configure the address of the local end of the BGP session for peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE1# set type internal user@PE1# set local-address 10.255.255.1
Configure attributes of the protocol family for NLRIs in updates.
[edit protocols bgp group vpls-pe family l2vpn] user@PE1# set auto-discovery-only user@PE1# set signaling
Configure neighbors for the peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE1# set neighbor 10.255.255.4 user@PE1# set neighbor 10.255.255.2
Configure traffic engineering, and configure the interfaces of OSPF area 0.0.0.0.
[edit protocols ospf] user@PE1# set traffic-engineering user@PE1# set area 0.0.0.0 interface lo0.0 passive user@PE1# set area 0.0.0.0 interface ge-0/0/1.0
Configure the routing policy and the BGP community information.
[edit policy-options ] user@PE1# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE1# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe2 user@PE1# set policy-statement exp-to-frwd term 0 then accept user@PE1# set community vpls-com members target:100:100
Configure the type of routing instance, and configure the interface.
[edit routing-instances vp1] user@PE1# set instance-type vpls user@PE1# set interface ge-0/0/0.600
Configure the route distinguisher for instance
vpl1
, and configure the VRF target community.[edit routing-instances vpl1] user@PE1# set route-distinguisher 10.255.255.1:100 user@PE1# set vrf-target target:100:100
Assign the maximum site identifier for the VPLS domain.
[edit routing-instances vp1 protocols vpls] user@PE1# set site-range 10
Configure the VPLS protocol to not use the tunnel services for the VPLS instance, and assign the site identifier to the site connected to the provider equipment.
[edit routing-instances vp1 protocols vpls] user@PE1# set no-tunnel-services user@PE1# set site vpl1PE1 site-identifier 1
Configure the VPLS protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to push the flow label in the transmit direction to the remote PE.
[edit routing-instances vp1 protocols vpls] user@PE1# set flow-label-receive user@PE1# set flow-label-transmit
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@PE1# show interfaces ge-0/0/0 { vlan-tagging; mtu 1600; encapsulation vlan-vpls; unit 600 { encapsulation vlan-vpls; vlan-id 600; family vpls; } } ge-0/0/1 { unit 0 { family inet { address 1.0.0.1/24; } family mpls; } } lo0 { unit 0 { family inet { address 10.255.255.1/32; } } }
user@PE1# show protocols rsvp { interface all; interface ge-0/0/1.0; interface lo0.0; } mpls { label-switched-path to-pe2 { to 10.255.255.4; } interface ge-0/0/1.0; } bgp { group vpls-pe { type internal; local-address 10.255.255.1; family l2vpn { auto-discovery-only; signaling; } neighbor 10.255.255.4; neighbor 10.255.255.2; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0 { passive; } interface ge-0/0/1.0; } }
user@PE1# show policy-options policy-statement exp-to-frwd { term 0 { from community vpls-com; then { install-nexthop lsp to-pe2; accept; } } } community vpls-com members target:100:100;
user@PE1# show routing-instances vpl1 { instance-type vpls; interface ge-0/0/0.600; route-distinguisher 10.255.255.1:100; vrf-target target:100:100; protocols { vpls { site-range 10; no-tunnel-services; site vpl1PE1 { site-identifier 1; } flow-label-transmit; flow-label-receive; } } }
user@PE1# show routing-options nonstop-routing; router-id 10.255.255.1; autonomous-system 100; forwarding-table { export exp-to-frwd; }
Configuring PE2
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device PE2:
Configure the interfaces.
[edit interfaces] user@PE2# set ge-0/0/0 unit 0 family inet address 2.0.0.2/24 user@PE2# set ge-0/0/0 unit 0 family mpls user@PE2# set ge-0/0/1 vlan-tagging user@PE2# set ge-0/0/1 mtu 1600 user@PE2# set ge-0/0/1 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 encapsulation vlan-vpls user@PE2# set ge-0/0/1 unit 600 vlan-id 600 user@PE2# set ge-0/0/1 unit 600 family vpls user@PE2# set lo0 unit 0 family inet address 10.255.255.4/32
Configure the router ID.
[edit routing-options] user@PE2# set router-id 10.255.255.4
Configure the autonomous system (AS) number, and apply the policy to the forwarding table of the local router with the export statement.
[edit routing-options] user@PE2# set autonomous-system 100 user@PE2# set forwarding-table export exp-to-frwd
Configure the RSVP protocol on the interfaces.
[edit protocols rsvp] user@PE2# set interface all user@PE2# set interface ge-0/0/1.0 user@PE2# set interface lo0.0
Apply the label-switched path attributes to the MPLS protocol, and configure the interface.
[edit protocols mpls] user@PE2# set label-switched-path to-pe1 to 10.255.255.1 user@PE2# set interface ge-0/0/0.0
Define a peer group, and configure the local-end address of the BGP session for peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE2# set type internal user@PE2# set local-address 10.255.255.4
Configure attributes of the protocol family for NLRIs in updates.
[edit protocols bgp group vpls-pe] user@PE2# set family l2vpn auto-discovery-only user@PE2# set family l2vpn signaling
Configure neighbors for the peer group
vpls-pe
.[edit protocols bgp group vpls-pe] user@PE2# set neighbor 10.255.255.1 user@PE2# set neighbor 10.255.255.2
Configure traffic engineering, and configure the interfaces of OSPF area 0.0.0.0.
[edit protocols ospf] user@PE2# set traffic-engineering user@PE2# set area 0.0.0.0 interface lo0.0 passive user@PE2# set area 0.0.0.0 interface ge-0/0/0.0
Configure the routing policy and the BGP community information.
[edit policy-options ] user@PE2# set policy-statement exp-to-frwd term 0 from community vpls-com user@PE2# set policy-statement exp-to-frwd term 0 then install-nexthop lsp to-pe1 user@PE2# set policy-statement exp-to-frwd term 0 then accept user@PE2# set community vpls-com members target:100:100
Configure the type of routing instance, and configure the interface.
[edit routing-instances vpl1] user@PE2# set instance-type vpls user@PE2# set interface ge-0/0/1.600
Configure the route distinguisher for instance
vp11
, and configure the VRF target community.[edit routing-instances vpl1] user@PE2# set route-distinguisher 10.255.255.4:100 user@PE2# set vrf-target target:100:100
Assign the maximum site identifier for the VPLS domain.
[edit routing-instances vpl1 protocols vpls] user@PE2# set site-range 10
Configure the VPLS protocol to not use the tunnel services for the VPLS instance, and assign the site identifier to the site connected to the provider equipment.
[edit routing-instances vpl1 protocols vpls] user@PE2# set no-tunnel-services user@PE2# set site vpl1PE2 site-identifier 2
Configure the VPLS protocol for the routing instance to provide advertising capability to pop the flow label in the receive direction to the remote PE and to provide advertising capability to push the flow label in the transmit direction to the remote PE.
[edit routing-instances vpl1 protocols vpls] user@PE2# set flow-label-transmit user@PE2# set flow-label-receive
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, show routing-instances, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@PE2# show interfaces ge-0/0/0 { unit 0 { family inet { address 2.0.0.2/24; } family mpls; } } ge-0/0/1 { vlan-tagging; mtu 1600; encapsulation vlan-vpls; unit 600 { encapsulation vlan-vpls; vlan-id 600; family vpls; } } lo0 { unit 0 { family inet { address 10.255.255.4/32; } } }
user@PE2# show protocols rsvp { interface all; interface ge-0/0/1.0; interface lo0.0; } mpls { label-switched-path to-pe1 { to 10.255.255.1; } interface ge-0/0/0.0; } bgp { group vpls-pe { type internal; local-address 10.255.255.4; family l2vpn { auto-discovery-only; signaling; } neighbor 10.255.255.1; neighbor 10.255.255.2; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0 { passive; } interface ge-0/0/0.0; } }
user@PE2# show policy-options policy-statement exp-to-frwd { term 0 { from community vpls-com; then { install-nexthop lsp to-pe1; accept; } } } community vpls-com members target:100:100;
user@PE2# show routing-instances vpl1 { instance-type vpls; interface ge-0/0/1.600; route-distinguisher 10.255.255.4:100; vrf-target target:100:100; protocols { vpls { site-range 10; no-tunnel-services; site vpl1PE2 { site-identifier 2; } flow-label-transmit; flow-label-receive; } } }
user@PE2# show routing-options router-id 10.255.255.4; autonomous-system 100; forwarding-table { export exp-to-frwd; }
Verification
Confirm that the configuration is working properly.
Verifying the VPLS Connection Information
Purpose
Verify the VPLS connection information.
Action
From operational mode, run the show vpls connections
command to display the VPLS connections information.
user@PE1> show vpls connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: vpl1
Edge protection: Not-Primary
Local site: vpl1PE1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jun 17 11:38:14 2015 1
Remote PE: 10.255.255.4, Negotiated control-word: No
Incoming label: 262146, Outgoing label: 262145
Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS
Description: Intf - vpls vpl1 local site 1 remote site 2
Flow Label Transmit: Yes, Flow Label Receive: Yes
Meaning
The output displays the VPLS connection information along with the flow label receive and flow label transmit information.
Verification
Confirm that the configuration is working properly.
Verifying the VPLS Connection Information
Purpose
Verify the VPLS connection information.
Action
From operational mode, run the show vpls connections
command to display the VPLS connections information.
user@PE2> show vpls connections
Layer-2 VPN connections:
Legend for connection status (St)
EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down NP -- interface hardware not present
CM -- control-word mismatch -> -- only outbound connection is up
CN -- circuit not provisioned <- -- only inbound connection is up
OR -- out of range Up -- operational
OL -- no outgoing label Dn -- down
LD -- local site signaled down CF -- call admission control failure
RD -- remote site signaled down SC -- local and remote site ID collision
LN -- local site not designated LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status IL -- no incoming label
MM -- MTU mismatch MI -- Mesh-Group ID not available
BK -- Backup connection ST -- Standby connection
PF -- Profile parse failure PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site RB -- Remote site not best-site
VM -- VLAN ID mismatch
Legend for interface status
Up -- operational
Dn -- down
Instance: vpl1
Edge protection: Not-Primary
Local site: vpl1PE2 (2)
connection-site Type St Time last up # Up trans
1 rmt Up Jun 17 11:38:14 2015 1
Remote PE: 10.255.255.1, Negotiated control-word: No
Incoming label: 262145, Outgoing label: 262146
Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS
Description: Intf - vpls vpl1 local site 2 remote site 1
Flow Label Transmit: Yes, Flow Label Receive: Yes
Meaning
The output displays the VPLS connection information along with the flow label receive and flow label transmit information.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
[edit protocols bgp]
hierarchy level. You can selectively disable
multipath on some BGP groups and neighbors. Include disable
at [edit protocols bgp group group-name multipath]
hierarchy level to disable multipath option for
a group or a specific BGP neighbor.defer-initial-multipath-build
at [edit protocols bgp]
hierarchy level. Alternatively, you can
lower the BGP multipath build job priority using multipath-build-priority
configuration statement at [edit protocols bgp]
hierarchy
level to speed up RIB learning.