Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring the Accumulated IGP Attribute for BGP

Understanding the Accumulated IGP Attribute for BGP

The interior gateway protocols (IGPs) are designed to handle routing within a single domain or an autonomous system (AS). Each link is assigned a particular value called a metric. The distance between the two nodes is calculated as a sum of all the metric values of links along the path. The IGP selects the shortest path between two nodes based on distance.

BGP is designed to provide routing over a large number of independent ASs with limited or no coordination among respective administrations. BGP does not use metrics in the path selection decisions.

The accumulated IGP (AIGP) metric attribute for BGP enables deployment in which a single administration can run several contiguous BGP ASs. Such deployments allow BGP to make routing decisions based on the IGP metric. In such networks, it is possible for BGP to select paths based on metrics as is done by IGPs. In this case, BGP chooses the shortest path between two nodes, even though the nodes might be in two different ASs.

The AIGP attribute is particularly useful in networks that use tunneling to deliver a packet to its BGP next hop. The Juniper Networks® Junos® operating system (Junos OS) currently supports the AIGP attribute for two BGP address families, family inet labeled-unicast and family inet6 labeled-unicast.

AIGP impacts the BGP best-route decision process. The AIGP attribute preference rule is applied after the local-preference rule. The AIGP distance is compared to break a tie. The BGP best-route decision process also impacts the way the interior cost rule is applied if the resolving next hop has an AIGP attribute. Without AIGP enabled, the interior cost of a route is based on the calculation of the metric to the next hop for the route. With AIGP enabled, the resolving AIGP distance is added to the interior cost.

The AIGP attribute is an optional non-transitive BGP path attribute and is specified in Internet draft draft-ietf-idr-aigp-06, The Accumulated IGP Metric Attribute for BGP.

Example: Configuring the Accumulated IGP Attribute for BGP

This example shows how to configure the accumulated IGP (AIGP) metric attribute for BGP.

Requirements

This example uses the following hardware and software components:

  • Seven BGP-speaking devices.
  • Junos OS Release 12.1 or later.

Overview

The AIGP attribute enables deployments in which a single administration can run several contiguous BGP autonomous systems (ASs). Such deployments allow BGP to make routing decisions based on the IGP metric. With AIGP enabled, BGP can select paths based on IGP metrics. This enables BGP to choose the shortest path between two nodes, even though the nodes might be in different ASs. The AIGP attribute is particularly useful in networks that use tunneling to deliver a packet to its BGP next hop. This example shows AIGP configured with MPLS label-switched paths.

To enable AIGP, you include the aigp statement in the BGP configuration on a protocol family basis. Configuring AIGP on a particular family enables sending and receiving of the AIGP attribute on that family. By default, AIGP is disabled. An AIGP-disabled neighbor does not send an AIGP attribute and silently discards a received AIGP attribute.

Junos OS supports AIGP for family inet labeled-unicast and family inet6 labeled-unicast. The aigp statement can be configured for a given family at the global BGP, group, or neighbor level.

By default, the value of the AIGP attribute for a local prefix is zero. An AIGP-enabled neighbor can originate an AIGP attribute for a given prefix by export policy, using the aigp-originate policy action. The value of the AIGP attribute reflects the IGP distance to the prefix. Alternatively, you can specify a value, by using the aigp-originate distance distance policy action. The configurable range is 0 through 4,294,967,295. Only one node needs to originate an AIGP attribute. The AIGP attribute is retained and readvertised if the neighbors are AIGP enabled with the aigp statement in the BGP configuration.

The policy action to originate the AIGP attribute has the following requirements:

  • Neighbor must be AIGP enabled.
  • Policy must be applied as an export policy.
  • Prefix must have no current AIGP attribute.
  • Prefix must export with next-hop self.
  • Prefix must reside within the AIGP domain. Typically, a loopback IP address is the prefix to originate.

The policy is ignored if these requirements are not met.

Topology Diagram

Figure 1 shows the topology used in this example. OSPF is used as the interior gateway protocol (IGP). Internal BGP (IBGP) is configured between Device PE1 and Device PE4. External BGP (EBGP) is configured between Device PE7 and Device PE1, between Device PE4 and Device PE3, and between Device PE4 and Device PE2. Devices PE4, PE2, and PE3 are configured for multihop. Device PE4 selects a path based on the AIGP value and then readvertises the AIGP value based on the AIGP and policy configuration. Device PE1 readvertises the AIGP value to Device PE7, which is in another administrative domain. Every device has two loopback interface addresses: 10.9.9.x is used for BGP peering and the router ID, and 10.100.1.x is used for the BGP next hop.

The network between Device PE1 and PE3 has IBGP peering and multiple OSPF areas. The external link to Device PE7 is configured to show that the AIGP attribute is readvertised to a neighbor outside of the administrative domain, if that neighbor is AIGP enabled.

Figure 1: Advertisement of Multiple Paths in BGP

Advertisement of Multiple Paths in
BGP

For origination of an AIGP attribute, the BGP next hop is required to be itself. If the BGP next hop remains unchanged, the received AIGP attribute is readvertised, as is, to another AIGP neighbor. If the next hop changes, the received AIGP attribute is readvertised with an increased value to another AIGP neighbor. The increase in value reflects the IGP distance to the previous BGP next hop. To demonstrate, this example uses loopback interface addresses for Device PE4’s EBGP peering sessions with Device PE2 and Device PE3. Multihop is enabled on these sessions so that a recursive lookup is performed to determine the point-to-point interface. Because the next hop changes, the IGP distance is added to the AIGP distance.

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 P1

set interfaces fe-1/2/0 unit 1 description P1-to-PE1set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.2/30set interfaces fe-1/2/0 unit 1 family mplsset interfaces fe-1/2/1 unit 4 description P1-to-P2set interfaces fe-1/2/1 unit 4 family inet address 10.0.0.29/30set interfaces fe-1/2/1 unit 4 family mplsset interfaces fe-1/2/2 unit 8 description P1-to-PE4set interfaces fe-1/2/2 unit 8 family inet address 10.0.0.17/30set interfaces fe-1/2/2 unit 8 family mplsset interfaces lo0 unit 3 family inet address 10.9.9.2/32set interfaces lo0 unit 3 family inet address 10.100.1.2/32set protocols rsvp interface fe-1/2/0.1set protocols rsvp interface fe-1/2/2.8set protocols rsvp interface fe-1/2/1.4set protocols mpls label-switched-path P1-to-P2 to 10.9.9.3set protocols mpls label-switched-path P1-to-PE1 to 10.9.9.1set protocols mpls label-switched-path P1-to-PE4 to 10.9.9.4set protocols mpls interface fe-1/2/0.1set protocols mpls interface fe-1/2/2.8set protocols mpls interface fe-1/2/1.4set protocols bgp group internal type internalset protocols bgp group internal local-address 10.9.9.2set protocols bgp group internal family inet labeled-unicast aigpset protocols bgp group internal neighbor 10.9.9.1set protocols bgp group internal neighbor 10.9.9.3set protocols bgp group internal neighbor 10.9.9.4set protocols ospf area 0.0.0.1 interface fe-1/2/0.1 metric 1set protocols ospf area 0.0.0.1 interface fe-1/2/1.4 metric 1set protocols ospf area 0.0.0.0 interface fe-1/2/2.8 metric 1set protocols ospf area 0.0.0.0 interface 10.9.9.2 passiveset protocols ospf area 0.0.0.0 interface 10.9.9.2 metric 1set protocols ospf area 0.0.0.0 interface 10.100.1.2 passiveset protocols ospf area 0.0.0.0 interface 10.100.1.2 metric 1set routing-options router-id 10.9.9.2set routing-options autonomous-system 13979

Device P2

set interfaces fe-1/2/0 unit 3 description P2-to-PE1set interfaces fe-1/2/0 unit 3 family inet address 10.0.0.6/30set interfaces fe-1/2/0 unit 3 family mplsset interfaces fe-1/2/1 unit 5 description P2-to-P1set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.30/30set interfaces fe-1/2/1 unit 5 family mplsset interfaces fe-1/2/2 unit 6 description P2-to-PE4set interfaces fe-1/2/2 unit 6 family inet address 10.0.0.13/30set interfaces fe-1/2/2 unit 6 family mplsset interfaces lo0 unit 5 family inet address 10.9.9.3/32set interfaces lo0 unit 5 family inet address 10.100.1.3/32set protocols rsvp interface fe-1/2/1.5set protocols rsvp interface fe-1/2/2.6set protocols rsvp interface fe-1/2/0.3set protocols mpls label-switched-path P2-to-PE1 to 10.9.9.1set protocols mpls label-switched-path P2-to-P1 to 10.9.9.2set protocols mpls label-switched-path P2-to-PE4 to 10.9.9.4set protocols mpls interface fe-1/2/1.5set protocols mpls interface fe-1/2/2.6set protocols mpls interface fe-1/2/0.3set protocols bgp group internal type internalset protocols bgp group internal local-address 10.9.9.3set protocols bgp group internal family inet labeled-unicast aigpset protocols bgp group internal neighbor 10.9.9.1set protocols bgp group internal neighbor 10.9.9.2set protocols bgp group internal neighbor 10.9.9.4set protocols ospf area 0.0.0.0 interface fe-1/2/2.6 metric 1set protocols ospf area 0.0.0.0 interface 10.9.9.3 passiveset protocols ospf area 0.0.0.0 interface 10.9.9.3 metric 1set protocols ospf area 0.0.0.0 interface 10.100.1.3 passiveset protocols ospf area 0.0.0.0 interface 10.100.1.3 metric 1set routing-options router-id 10.9.9.3set routing-options autonomous-system 13979

Device PE4

set interfaces fe-1/2/0 unit 7 description PE4-to-P2set interfaces fe-1/2/0 unit 7 family inet address 10.0.0.14/30set interfaces fe-1/2/0 unit 7 family mplsset interfaces fe-1/2/1 unit 9 description PE4-to-P1set interfaces fe-1/2/1 unit 9 family inet address 10.0.0.18/30set interfaces fe-1/2/1 unit 9 family mplsset interfaces fe-1/2/2 unit 10 description PE4-to-PE2set interfaces fe-1/2/2 unit 10 family inet address 10.0.0.21/30set interfaces fe-1/2/2 unit 10 family mplsset interfaces fe-1/0/2 unit 12 description PE4-to-PE3set interfaces fe-1/0/2 unit 12 family inet address 10.0.0.25/30set interfaces fe-1/0/2 unit 12 family mplsset interfaces lo0 unit 7 family inet address 10.9.9.4/32set interfaces lo0 unit 7 family inet address 10.100.1.4/32set protocols rsvp interface fe-1/2/0.7set protocols rsvp interface fe-1/2/1.9set protocols rsvp interface fe-1/2/2.10set protocols rsvp interface fe-1/0/2.12set protocols mpls label-switched-path PE4-to-PE2 to 10.9.9.5set protocols mpls label-switched-path PE4-to-PE3 to 10.9.9.6set protocols mpls label-switched-path PE4-to-P1 to 10.9.9.2set protocols mpls label-switched-path PE4-to-P2 to 10.9.9.3set protocols mpls interface fe-1/2/0.7set protocols mpls interface fe-1/2/1.9set protocols mpls interface fe-1/2/2.10set protocols mpls interface fe-1/0/2.12set protocols bgp export next-hopset protocols bgp export aigpset protocols bgp group internal type internalset protocols bgp group internal local-address 10.9.9.4set protocols bgp group internal family inet labeled-unicast aigpset protocols bgp group internal neighbor 10.9.9.1set protocols bgp group internal neighbor 10.9.9.3set protocols bgp group internal neighbor 10.9.9.2set protocols bgp group external type externalset protocols bgp group external multihop ttl 2set protocols bgp group external local-address 10.9.9.4set protocols bgp group external family inet labeled-unicast aigpset protocols bgp group external peer-as 7018set protocols bgp group external neighbor 10.9.9.5set protocols bgp group external neighbor 10.9.9.6set protocols ospf area 0.0.0.0 interface fe-1/2/1.9 metric 1set protocols ospf area 0.0.0.0 interface fe-1/2/0.7 metric 1set protocols ospf area 0.0.0.0 interface 10.9.9.4 passiveset protocols ospf area 0.0.0.0 interface 10.9.9.4 metric 1set protocols ospf area 0.0.0.0 interface 10.100.1.4 passiveset protocols ospf area 0.0.0.0 interface 10.100.1.4 metric 1set protocols ospf area 0.0.0.2 interface fe-1/2/2.10 metric 1set protocols ospf area 0.0.0.3 interface fe-1/0/2.12 metric 1set policy-options policy-statement aigp term 10 from protocol staticset policy-options policy-statement aigp term 10 from route-filter 44.0.0.0/24 exactset policy-options policy-statement aigp term 10 then aigp-originate distance 200set policy-options policy-statement aigp term 10 then next-hop 10.100.1.4set policy-options policy-statement aigp term 10 then acceptset policy-options policy-statement next-hop term 10 from protocol bgpset policy-options policy-statement next-hop term 10 then next-hop 10.100.1.4set policy-options policy-statement next-hop term 10 then acceptset policy-options policy-statement next-hop term 20 from protocol directset policy-options policy-statement next-hop term 20 from route-filter 10.9.9.4/32 exactset policy-options policy-statement next-hop term 20 from route-filter 10.100.1.4/32 exactset policy-options policy-statement next-hop term 20 then next-hop 10.100.1.4set policy-options policy-statement next-hop term 20 then acceptset routing-options static route 44.0.0.0/24 discardset routing-options router-id 10.9.9.4set routing-options autonomous-system 13979

Device PE1

set interfaces fe-1/2/0 unit 0 description PE1-to-P1set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30set interfaces fe-1/2/0 unit 0 family mplsset interfaces fe-1/2/1 unit 2 description PE1-to-P2set interfaces fe-1/2/1 unit 2 family inet address 10.0.0.5/30set interfaces fe-1/2/1 unit 2 family mplsset interfaces fe-1/2/2 unit 14 description PE1-to-PE7set interfaces fe-1/2/2 unit 14 family inet address 10.0.0.9/30set interfaces lo0 unit 1 family inet address 10.9.9.1/32set interfaces lo0 unit 1 family inet address 10.100.1.1/32set protocols rsvp interface fe-1/2/0.0set protocols rsvp interface fe-1/2/1.2set protocols rsvp interface fe-1/2/2.14set protocols mpls label-switched-path PE1-to-P1 to 10.9.9.2set protocols mpls label-switched-path PE1-to-P2 to 10.9.9.3set protocols mpls interface fe-1/2/0.0set protocols mpls interface fe-1/2/1.2set protocols mpls interface fe-1/2/2.14set protocols bgp group internal type internalset protocols bgp group internal local-address 10.9.9.1set protocols bgp group internal family inet labeled-unicast aigpset protocols bgp group internal export SET_EXPORT_ROUTESset protocols bgp group internal vpn-apply-exportset protocols bgp group internal neighbor 10.9.9.4set protocols bgp group internal neighbor 10.9.9.2set protocols bgp group internal neighbor 10.9.9.3set protocols bgp group external type externalset protocols bgp group external family inet labeled-unicast aigpset protocols bgp group external export SET_EXPORT_ROUTESset protocols bgp group external peer-as 7019set protocols bgp group external neighbor 10.0.0.10set protocols ospf area 0.0.0.1 interface fe-1/2/0.0 metric 1set protocols ospf area 0.0.0.1 interface fe-1/2/1.2 metric 1set protocols ospf area 0.0.0.1 interface 10.9.9.1 passiveset protocols ospf area 0.0.0.1 interface 10.9.9.1 metric 1set protocols ospf area 0.0.0.1 interface 10.100.1.1 passiveset protocols ospf area 0.0.0.1 interface 10.100.1.1 metric 1set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol directset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpset policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.1set policy-options policy-statement SET_EXPORT_ROUTES term 10 then acceptset routing-options router-id 10.9.9.1set routing-options autonomous-system 13979

Device PE2

set interfaces fe-1/2/0 unit 11 description PE2-to-PE4set interfaces fe-1/2/0 unit 11 family inet address 10.0.0.22/30set interfaces fe-1/2/0 unit 11 family mplsset interfaces lo0 unit 9 family inet address 10.9.9.5/32 primaryset interfaces lo0 unit 9 family inet address 10.100.1.5/32set protocols rsvp interface fe-1/2/0.11set protocols mpls label-switched-path PE2-to-PE4 to 10.9.9.4set protocols mpls interface fe-1/2/0.11set protocols bgp group external type externalset protocols bgp group external multihop ttl 2set protocols bgp group external local-address 10.9.9.5set protocols bgp group external family inet labeled-unicast aigpset protocols bgp group external export next-hopset protocols bgp group external export aigpset protocols bgp group external export SET_EXPORT_ROUTESset protocols bgp group external vpn-apply-exportset protocols bgp group external peer-as 13979set protocols bgp group external neighbor 10.9.9.4set protocols ospf area 0.0.0.2 interface 10.9.9.5 passiveset protocols ospf area 0.0.0.2 interface 10.9.9.5 metric 1set protocols ospf area 0.0.0.2 interface 10.100.1.5 passiveset protocols ospf area 0.0.0.2 interface 10.100.1.5 metric 1set protocols ospf area 0.0.0.2 interface fe-1/2/0.11 metric 1set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol directset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol staticset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpset policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5set policy-options policy-statement SET_EXPORT_ROUTES term 10 then acceptset policy-options policy-statement aigp term 10 from route-filter 55.0.0.0/24 exactset policy-options policy-statement aigp term 10 then aigp-originate distance 20set policy-options policy-statement aigp term 10 then next-hop 10.100.1.5set policy-options policy-statement aigp term 10 then acceptset policy-options policy-statement aigp term 20 from route-filter 99.0.0.0/24 exactset policy-options policy-statement aigp term 20 then aigp-originate distance 30set policy-options policy-statement aigp term 20 then next-hop 10.100.1.5set policy-options policy-statement aigp term 20 then acceptset policy-options policy-statement next-hop term 10 from protocol bgpset policy-options policy-statement next-hop term 10 then next-hop 10.100.1.5set policy-options policy-statement next-hop term 10 then acceptset policy-options policy-statement next-hop term 20 from protocol directset policy-options policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exactset policy-options policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exactset policy-options policy-statement next-hop term 20 then next-hop 10.100.1.5set policy-options policy-statement next-hop term 20 then acceptset routing-options static route 99.0.0.0/24 discardset routing-options static route 55.0.0.0/24 discardset routing-options router-id 10.9.9.5set routing-options autonomous-system 7018

Device PE3

set interfaces fe-1/2/0 unit 13 description PE3-to-PE4set interfaces fe-1/2/0 unit 13 family inet address 10.0.0.26/30set interfaces fe-1/2/0 unit 13 family mplsset interfaces lo0 unit 11 family inet address 10.9.9.6/32set interfaces lo0 unit 11 family inet address 10.100.1.6/32set protocols rsvp interface fe-1/2/0.13set protocols mpls label-switched-path PE3-to-PE4 to 10.9.9.4set protocols mpls interface fe-1/2/0.13set protocols bgp group external type externalset protocols bgp group external multihop ttl 2set protocols bgp group external local-address 10.9.9.6set protocols bgp group external family inet labeled-unicast aigpset protocols bgp group external export next-hopset protocols bgp group external export SET_EXPORT_ROUTESset protocols bgp group external vpn-apply-exportset protocols bgp group external peer-as 13979set protocols bgp group external neighbor 10.9.9.4set protocols ospf area 0.0.0.3 interface 10.9.9.6 passiveset protocols ospf area 0.0.0.3 interface 10.9.9.6 metric 1set protocols ospf area 0.0.0.3 interface 10.100.1.6 passiveset protocols ospf area 0.0.0.3 interface 10.100.1.6 metric 1set protocols ospf area 0.0.0.3 interface fe-1/2/0.13 metric 1set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol directset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol staticset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpset policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6set policy-options policy-statement SET_EXPORT_ROUTES term 10 then acceptset policy-options policy-statement next-hop term 10 from protocol bgpset policy-options policy-statement next-hop term 10 then next-hop 10.100.1.6set policy-options policy-statement next-hop term 10 then acceptset policy-options policy-statement next-hop term 20 from protocol directset policy-options policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exactset policy-options policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exactset policy-options policy-statement next-hop term 20 then next-hop 10.100.1.6set policy-options policy-statement next-hop term 20 then acceptset routing-options router-id 10.9.9.6set routing-options autonomous-system 7018

Device PE7

set interfaces fe-1/2/0 unit 15 description PE7-to-PE1set interfaces fe-1/2/0 unit 15 family inet address 10.0.0.10/30set interfaces lo0 unit 13 family inet address 10.9.9.7/32set interfaces lo0 unit 13 family inet address 10.100.1.7/32set protocols bgp group external type externalset protocols bgp group external family inet labeled-unicast aigpset protocols bgp group external export SET_EXPORT_ROUTESset protocols bgp group external peer-as 13979set protocols bgp group external neighbor 10.0.0.9set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol directset policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpset policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.7set policy-options policy-statement SET_EXPORT_ROUTES term 10 then acceptset routing-options router-id 10.9.9.7set routing-options autonomous-system 7019

Configuring Device P1

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:

  1. Configure the interfaces.

    [edit interfaces]user@P1# set fe-1/2/0 unit 1 description P1-to-PE1user@P1# set fe-1/2/0 unit 1 family inet address 10.0.0.2/30user@P1# set fe-1/2/0 unit 1 family mplsuser@P1# set fe-1/2/1 unit 4 description P1-to-P2user@P1# set fe-1/2/1 unit 4 family inet address 10.0.0.29/30user@P1# set fe-1/2/1 unit 4 family mplsuser@P1# set fe-1/2/2 unit 8 description P1-to-PE4user@P1# set fe-1/2/2 unit 8 family inet address 10.0.0.17/30user@P1# set fe-1/2/2 unit 8 family mplsuser@P1# set lo0 unit 3 family inet address 10.9.9.2/32user@P1# set lo0 unit 3 family inet address 10.100.1.2/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@P1# set rsvp interface fe-1/2/0.1user@P1# set rsvp interface fe-1/2/2.8user@P1# set rsvp interface fe-1/2/1.4user@P1# set mpls label-switched-path P1-to-P2 to 10.9.9.3user@P1# set mpls label-switched-path P1-to-PE1 to 10.9.9.1user@P1# set mpls label-switched-path P1-to-PE4 to 10.9.9.4user@P1# set mpls interface fe-1/2/0.1user@P1# set mpls interface fe-1/2/2.8user@P1# set mpls interface fe-1/2/1.4
  3. Configure BGP.

    [edit protocols bgp group internal]user@P1# set type internaluser@P1# set local-address 10.9.9.2user@P1# set neighbor 10.9.9.1user@P1# set neighbor 10.9.9.3user@P1# set neighbor 10.9.9.4
  4. Enable AIGP.

    [edit protocols bgp group internal]user@P1# set family inet labeled-unicast aigp
  5. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf]user@P1# set area 0.0.0.1 interface fe-1/2/0.1 metric 1user@P1# set area 0.0.0.1 interface fe-1/2/1.4 metric 1user@P1# set area 0.0.0.0 interface fe-1/2/2.8 metric 1user@P1# set area 0.0.0.0 interface 10.9.9.2 passiveuser@P1# set area 0.0.0.0 interface 10.9.9.2 metric 1user@P1# set area 0.0.0.0 interface 10.100.1.2 passiveuser@P1# set area 0.0.0.0 interface 10.100.1.2 metric 1
  6. Configure the router ID and the autonomous system number.

    [edit routing-options]user@P1# set router-id 10.9.9.2user@P1# set autonomous-system 13979
  7. If you are done configuring the device, commit the configuration.

    user@P1# commit

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@P1# show interfaces
fe-1/2/0 {unit 1 {description P1-to-PE1;family inet {address 10.0.0.2/30;}family mpls;}}
fe-1/2/1 {unit 4 {description P1-to-P2;family inet {address 10.0.0.29/30;}family mpls;}}
fe-1/2/2 {unit 8 {description P1-to-PE4;family inet {address 10.0.0.17/30;}family mpls;}}
lo0 {unit 3 {family inet {address 10.9.9.2/32;address 10.100.1.2/32;}}}
user@P1# show protocols
rsvp {interface fe-1/2/0.1;interface fe-1/2/2.8;interface fe-1/2/1.4;}
mpls {label-switched-path P1-to-P2 {to 10.9.9.3;}label-switched-path P1-to-PE1 {to 10.9.9.1;}label-switched-path P1-to-PE4 {to 10.9.9.4;}interface fe-1/2/0.1;interface fe-1/2/2.8;interface fe-1/2/1.4;}
bgp {group internal {type internal;local-address 10.9.9.2;family inet {labeled-unicast {aigp;}}neighbor 10.9.9.1;neighbor 10.9.9.3;neighbor 10.9.9.4;}}
ospf {area 0.0.0.1 {interface fe-1/2/0.1 {metric 1;}interface fe-1/2/1.4 {metric 1;}}area 0.0.0.0 {interface fe-1/2/2.8 {metric 1;}interface 10.9.9.2 {passive;metric 1;}interface 10.100.1.2 {passive;metric 1;}}}
user@P1# show routing-optionsrouter-id 10.9.9.2;autonomous-system 13979;

Configuring Device P2

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:

  1. Configure the interfaces.

    [edit interfaces]user@P2# set fe-1/2/0 unit 3 description P2-to-PE1user@P2# set fe-1/2/0 unit 3 family inet address 10.0.0.6/30user@P2# set fe-1/2/0 unit 3 family mplsuser@P2# set fe-1/2/1 unit 5 description P2-to-P1user@P2# set fe-1/2/1 unit 5 family inet address 10.0.0.30/30user@P2# set fe-1/2/1 unit 5 family mplsuser@P2# set fe-1/2/2 unit 6 description P2-to-PE4user@P2# set fe-1/2/2 unit 6 family inet address 10.0.0.13/30user@P2# set fe-1/2/2 unit 6 family mplsuser@P2# set lo0 unit 5 family inet address 10.9.9.3/32user@P2# set lo0 unit 5 family inet address 10.100.1.3/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@P2# set rsvp interface fe-1/2/1.5user@P2# set rsvp interface fe-1/2/2.6user@P2# set rsvp interface fe-1/2/0.3user@P2# set mpls label-switched-path P2-to-PE1 to 10.9.9.1user@P2# set mpls label-switched-path P2-to-P1 to 10.9.9.2user@P2# set mpls label-switched-path P2-to-PE4 to 10.9.9.4user@P2# set mpls interface fe-1/2/1.5user@P2# set mpls interface fe-1/2/2.6user@P2# set mpls interface fe-1/2/0.3
  3. Configure BGP.

    [edit protocols bgp group internal]user@P2# set type internaluser@P2# set local-address 10.9.9.3user@P2# set neighbor 10.9.9.1user@P2# set neighbor 10.9.9.2user@P2# set neighbor 10.9.9.4
  4. Enable AIGP.

    [edit protocols bgp group internal]user@P2# set family inet labeled-unicast aigp
  5. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf]user@P2# set area 0.0.0.0 interface fe-1/2/2.6 metric 1user@P2# set area 0.0.0.0 interface 10.9.9.3 passiveuser@P2# set area 0.0.0.0 interface 10.9.9.3 metric 1user@P2# set area 0.0.0.0 interface 10.100.1.3 passiveuser@P2# set area 0.0.0.0 interface 10.100.1.3 metric 1
  6. Configure the router ID and the autonomous system number.

    [edit routing-options]user@P2# set router-id 10.9.9.3user@P2# set autonomous-system 13979
  7. If you are done configuring the device, commit the configuration.

    user@P2# commit

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@P2# show interfaces
fe-1/2/0 {unit 3 {description P2-to-PE1;family inet {address 10.0.0.6/30;}family mpls;}}
fe-1/2/1 {unit 5 {description P2-to-P1;family inet {address 10.0.0.30/30;}family mpls;}}
fe-1/2/2 {unit 6 {description P2-to-PE4;family inet {address 10.0.0.13/30;}family mpls;}}
lo0 {unit 5 {family inet {address 10.9.9.3/32;address 10.100.1.3/32;}}}
user@P2# show protocols
rsvp {interface fe-1/2/1.5;interface fe-1/2/2.6;interface fe-1/2/0.3;}
mpls {label-switched-path P2-to-PE1 {to 10.9.9.1;}label-switched-path P2-to-P1 {to 10.9.9.2;}label-switched-path P2-to-PE4 {to 10.9.9.4;}interface fe-1/2/1.5;interface fe-1/2/2.6;interface fe-1/2/0.3;}
bgp {group internal {type internal;local-address 10.9.9.3;family inet {labeled-unicast {aigp;}}neighbor 10.9.9.1;neighbor 10.9.9.2;neighbor 10.9.9.4;}}
ospf {area 0.0.0.0 {interface fe-1/2/2.6 {metric 1;}interface 10.9.9.3 {passive;metric 1;}interface 10.100.1.3 {passive;metric 1;}}}
user@P2# show routing-optionsrouter-id 10.9.9.3;autonomous-system 13979;

Configuring Device PE4

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 PE4:

  1. Configure the interfaces.

    [edit interfaces]user@PE4# set fe-1/2/0 unit 7 description PE4-to-P2user@PE4# set fe-1/2/0 unit 7 family inet address 10.0.0.14/30user@PE4# set fe-1/2/0 unit 7 family mplsuser@PE4# set fe-1/2/1 unit 9 description PE4-to-P1user@PE4# set fe-1/2/1 unit 9 family inet address 10.0.0.18/30user@PE4# set fe-1/2/1 unit 9 family mplsuser@PE4# set fe-1/2/2 unit 10 description PE4-to-PE2user@PE4# set fe-1/2/2 unit 10 family inet address 10.0.0.21/30user@PE4# set fe-1/2/2 unit 10 family mplsuser@PE4# set fe-1/0/2 unit 12 description PE4-to-PE3user@PE4# set fe-1/0/2 unit 12 family inet address 10.0.0.25/30user@PE4# set fe-1/0/2 unit 12 family mplsuser@PE4# set lo0 unit 7 family inet address 10.9.9.4/32user@PE4# set lo0 unit 7 family inet address 10.100.1.4/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@PE4# set rsvp interface fe-1/2/0.7user@PE4# set rsvp interface fe-1/2/1.9user@PE4# set rsvp interface fe-1/2/2.10user@PE4# set rsvp interface fe-1/0/2.12user@PE4# set mpls label-switched-path PE4-to-PE2 to 10.9.9.5user@PE4# set mpls label-switched-path PE4-to-PE3 to 10.9.9.6user@PE4# set mpls label-switched-path PE4-to-P1 to 10.9.9.2user@PE4# set mpls label-switched-path PE4-to-P2 to 10.9.9.3user@PE4# set mpls interface fe-1/2/0.7user@PE4# set mpls interface fe-1/2/1.9user@PE4# set mpls interface fe-1/2/2.10user@PE4# set mpls interface fe-1/0/2.12
  3. Configure BGP.

    [edit protocols bgp]user@PE4# set export next-hopuser@PE4# set export aigpuser@PE4# set group internal type internaluser@PE4# set group internal local-address 10.9.9.4user@PE4# set group internal neighbor 10.9.9.1user@PE4# set group internal neighbor 10.9.9.3user@PE4# set group internal neighbor 10.9.9.2user@PE4# set group external type externaluser@PE4# set group external multihop ttl 2user@PE4# set group external local-address 10.9.9.4user@PE4# set group external peer-as 7018user@PE4# set group external neighbor 10.9.9.5user@PE4# set group external neighbor 10.9.9.6
  4. Enable AIGP.

    [edit protocols bgp]user@PE4# set group external family inet labeled-unicast aigpuser@PE4# set group internal family inet labeled-unicast aigp
  5. Originate a prefix, and configure an AIGP distance.

    By default, a prefix is originated using the current IGP distance. Optionally, you can configure a distance for the AIGP attribute, using the distance option, as shown here.

    [edit policy-options policy-statement aigp term 10]user@PE4# set from protocol staticuser@PE4# set from route-filter 44.0.0.0/24 exactuser@PE4# set then aigp-originate distance 200user@PE4# set then next-hop 10.100.1.4user@PE4# set then accept
  6. Enable the policies.

    [edit policy-options policy-statement next-hop]user@PE4# set term 10 from protocol bgpuser@PE4# set term 10 then next-hop 10.100.1.4user@PE4# set term 10 then acceptuser@PE4# set term 20 from protocol directuser@PE4# set term 20 from route-filter 10.9.9.4/32 exactuser@PE4# set term 20 from route-filter 10.100.1.4/32 exactuser@PE4# set term 20 then next-hop 10.100.1.4user@PE4# set term 20 then accept
  7. Configure a static route.

    [edit routing-options]user@PE4# set static route 44.0.0.0/24 discard
  8. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf]user@PE4# set area 0.0.0.0 interface fe-1/2/1.9 metric 1user@PE4# set area 0.0.0.0 interface fe-1/2/0.7 metric 1user@PE4# set area 0.0.0.0 interface 10.9.9.4 passiveuser@PE4# set area 0.0.0.0 interface 10.9.9.4 metric 1user@PE4# set area 0.0.0.0 interface 10.100.1.4 passiveuser@PE4# set area 0.0.0.0 interface 10.100.1.4 metric 1user@PE4# set area 0.0.0.2 interface fe-1/2/2.10 metric 1user@PE4# set area 0.0.0.3 interface fe-1/0/2.12 metric 1
  9. Configure the router ID and the autonomous system number.

    [edit routing-options]user@PE4# set router-id 10.9.9.4user@PE4# set autonomous-system 13979
  10. If you are done configuring the device, commit the configuration.

    user@PE4# commit

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@PE4# show interfaces
fe-1/0/2 {unit 12 {description PE4-to-PE3;family inet {address 10.0.0.25/30;}family mpls;}}
fe-1/2/0 {unit 7 {description PE4-to-P2;family inet {address 10.0.0.14/30;}family mpls;}}
fe-1/2/1 {unit 9 {description PE4-to-P1;family inet {address 10.0.0.18/30;}family mpls;}}
fe-1/2/2 {unit 10 {description PE4-to-PE2;family inet {address 10.0.0.21/30;}family mpls;}}
lo0 {unit 7 {family inet {address 10.9.9.4/32;address 10.100.1.4/32;}}}
user@PE4# show policy-options
policy-statement aigp {term 10 {from {protocol static;route-filter 44.0.0.0/24 exact;}then {aigp-originate distance 200;next-hop 10.100.1.4;accept;}}}
policy-statement next-hop {term 10 {from protocol bgp;then {next-hop 10.100.1.4;accept;}}term 20 {from {protocol direct;route-filter 10.9.9.4/32 exact;route-filter 10.100.1.4/32 exact;}then {next-hop 10.100.1.4;accept;}}}
user@PE4# show protocols
rsvp {interface fe-1/2/0.7;interface fe-1/2/1.9;interface fe-1/2/2.10;interface fe-1/0/2.12;}
mpls {label-switched-path PE4-to-PE2 {to 10.9.9.5;}label-switched-path PE4-to-PE3 {to 10.9.9.6;}label-switched-path PE4-to-P1 {to 10.9.9.2;}label-switched-path PE4-to-P2 {to 10.9.9.3;}interface fe-1/2/0.7;interface fe-1/2/1.9;interface fe-1/2/2.10;interface fe-1/0/2.12;}
bgp {export [ next-hop aigp ];group internal {type internal;local-address 10.9.9.4;family inet {labeled-unicast {aigp;}}neighbor 10.9.9.1;neighbor 10.9.9.3;neighbor 10.9.9.2;}group external {type external;multihop {ttl 2;}local-address 10.9.9.4;family inet {labeled-unicast {aigp;}}peer-as 7018;neighbor 10.9.9.5;neighbor 10.9.9.6;}}
ospf {area 0.0.0.0 {interface fe-1/2/1.9 {metric 1;}interface fe-1/2/0.7 {metric 1;}interface 10.9.9.4 {passive;metric 1;}interface 10.100.1.4 {passive;metric 1;}}area 0.0.0.2 {interface fe-1/2/2.10 {metric 1;}}area 0.0.0.3 {interface fe-1/0/2.12 {metric 1;}}}
user@PE4# show routing-options
static {route 44.0.0.0/24 discard;}
router-id 10.9.9.4;autonomous-system 13979;

Configuring Device 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:

  1. Configure the interfaces.

    [edit interfaces]user@PE1# set fe-1/2/0 unit 0 description PE1-to-P1user@PE1# set fe-1/2/0 unit 0 family inet address 10.0.0.1/30user@PE1# set fe-1/2/0 unit 0 family mplsuser@PE1# set fe-1/2/1 unit 2 description PE1-to-P2user@PE1# set fe-1/2/1 unit 2 family inet address 10.0.0.5/30user@PE1# set fe-1/2/1 unit 2 family mplsuser@PE1# set fe-1/2/2 unit 14 description PE1-to-PE7user@PE1# set fe-1/2/2 unit 14 family inet address 10.0.0.9/30user@PE1# set lo0 unit 1 family inet address 10.9.9.1/32user@PE1# set lo0 unit 1 family inet address 10.100.1.1/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@PE1# set rsvp interface fe-1/2/0.0user@PE1# set rsvp interface fe-1/2/1.2user@PE1# set rsvp interface fe-1/2/2.14user@PE1# set mpls label-switched-path PE1-to-P1 to 10.9.9.2user@PE1# set mpls label-switched-path PE1-to-P2 to 10.9.9.3user@PE1# set mpls interface fe-1/2/0.0user@PE1# set mpls interface fe-1/2/1.2user@PE1# set mpls interface fe-1/2/2.14
  3. Configure BGP.

    [edit protocols bgp]user@PE1# set group internal type internaluser@PE1# set group internal local-address 10.9.9.1user@PE1# set group internal export SET_EXPORT_ROUTESuser@PE1# set group internal vpn-apply-exportuser@PE1# set group internal neighbor 10.9.9.4user@PE1# set group internal neighbor 10.9.9.2user@PE1# set group internal neighbor 10.9.9.3user@PE1# set group external type externaluser@PE1# set group external export SET_EXPORT_ROUTESuser@PE1# set group external peer-as 7019user@PE1# set group external neighbor 10.0.0.10
  4. Enable AIGP.

    [edit protocols bgp]user@PE1# set group internal family inet labeled-unicast aigpuser@PE1# set group external family inet labeled-unicast aigp
  5. Enable the policies.

    [edit policy-options policy-statement SET_EXPORT_ROUTES term 10]user@PE1# set from protocol directuser@PE1# set from protocol bgpuser@PE1# set then next-hop 10.100.1.1user@PE1# set then accept
  6. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf area 0.0.0.1]user@PE1# set interface fe-1/2/0.0 metric 1user@PE1# set interface fe-1/2/1.2 metric 1user@PE1# set interface 10.9.9.1 passiveuser@PE1# set interface 10.9.9.1 metric 1user@PE1# set interface 10.100.1.1 passiveuser@PE1# set interface 10.100.1.1 metric 1
  7. Configure the router ID and the autonomous system number.

    [edit routing-options]user@PE1# set router-id 10.9.9.1user@PE1# set autonomous-system 13979
  8. If you are done configuring the device, commit the configuration.

    user@PE1# commit

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@PE1# show interfaces
fe-1/2/0 {unit 0 {description PE1-to-P1;family inet {address 10.0.0.1/30;}family mpls;}}
fe-1/2/1 {unit 2 {description PE1-to-P2;family inet {address 10.0.0.5/30;}family mpls;}}
fe-1/2/2 {unit 14 {description PE1-to-PE7;family inet {address 10.0.0.9/30;}}}
lo0 {unit 1 {family inet {address 10.9.9.1/32;address 10.100.1.1/32;}}}
user@PE1# show policy-options
policy-statement SET_EXPORT_ROUTES {term 10 {from protocol [ direct bgp ];then {next-hop 10.100.1.1;accept;}}}
user@PE1# show protocols
rsvp {interface fe-1/2/0.0;interface fe-1/2/1.2;interface fe-1/2/2.14;}
mpls {label-switched-path PE1-to-P1 {to 10.9.9.2;}label-switched-path PE1-to-P2 {to 10.9.9.3;}interface fe-1/2/0.0;interface fe-1/2/1.2;interface fe-1/2/2.14;}
bgp {group internal {type internal;local-address 10.9.9.1;family inet {labeled-unicast {aigp;}}export SET_EXPORT_ROUTES;vpn-apply-export;neighbor 10.9.9.4;neighbor 10.9.9.2;neighbor 10.9.9.3;}group external {type external;family inet {labeled-unicast {aigp;}}export SET_EXPORT_ROUTES;peer-as 7019;neighbor 10.0.0.10;}}
ospf {area 0.0.0.1 {interface fe-1/2/0.0 {metric 1;}interface fe-1/2/1.2 {metric 1;}interface 10.9.9.1 {passive;metric 1;}interface 10.100.1.1 {passive;metric 1;}}}
user@PE1# show routing-optionsrouter-id 10.9.9.1;autonomous-system 13979;

Configuring Device PE2

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 PE2:

  1. Configure the interfaces.

    [edit interfaces]user@PE2# set fe-1/2/0 unit 11 description PE2-to-PE4user@PE2# set fe-1/2/0 unit 11 family inet address 10.0.0.22/30user@PE2# set fe-1/2/0 unit 11 family mplsuser@PE2# set lo0 unit 9 family inet address 10.9.9.5/32 primaryuser@PE2# set lo0 unit 9 family inet address 10.100.1.5/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@PE2# set rsvp interface fe-1/2/0.11user@PE2# set mpls label-switched-path PE2-to-PE4 to 10.9.9.4user@PE2# set mpls interface fe-1/2/0.11
  3. Configure BGP.

    [edit protocols bgp]user@PE2# set group external type externaluser@PE2# set group external multihop ttl 2user@PE2# set group external local-address 10.9.9.5user@PE2# set group external export next-hopuser@PE2# set group external export aigpuser@PE2# set group external export SET_EXPORT_ROUTESuser@PE2# set group external vpn-apply-exportuser@PE2# set group external peer-as 13979user@PE2# set group external neighbor 10.9.9.4
  4. Enable AIGP.

    [edit protocols bgp]user@PE2# set group external family inet labeled-unicast aigp
  5. Originate a prefix, and configure an AIGP distance.

    By default, a prefix is originated using the current IGP distance. Optionally, you can configure a distance for the AIGP attribute, using the distance option, as shown here.

    [edit policy-options policy-statement aigp]user@PE2# set term 10 from route-filter 55.0.0.0/24 exactuser@PE2# set term 10 then aigp-originate distance 20user@PE2# set term 10 then next-hop 10.100.1.5user@PE2# set term 10 then acceptuser@PE2# set term 20 from route-filter 99.0.0.0/24 exactuser@PE2# set term 20 then aigp-originate distance 30user@PE2# set term 20 then next-hop 10.100.1.5user@PE2# set term 20 then accept
  6. Enable the policies.

    [edit policy-options]user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol directuser@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol staticuser@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpuser@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then acceptuser@PE2# set policy-statement next-hop term 10 from protocol bgpuser@PE2# set policy-statement next-hop term 10 then next-hop 10.100.1.5user@PE2# set policy-statement next-hop term 10 then acceptuser@PE2# set policy-statement next-hop term 20 from protocol directuser@PE2# set policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exactuser@PE2# set policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exactuser@PE2# set policy-statement next-hop term 20 then next-hop 10.100.1.5user@PE2# set policy-statement next-hop term 20 then accept
  7. Enable some static routes.

    [edit routing-options]user@PE2# set static route 99.0.0.0/24 discarduser@PE2# set static route 55.0.0.0/24 discard
  8. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf area 0.0.0.2]user@PE2# set interface 10.9.9.5 passiveuser@PE2# set interface 10.9.9.5 metric 1user@PE2# set interface 10.100.1.5 passiveuser@PE2# set interface 10.100.1.5 metric 1user@PE2# set interface fe-1/2/0.11 metric 1
  9. Configure the router ID and the autonomous system number.

    [edit routing-options]user@PE2# set router-id 10.9.9.5user@PE2# set autonomous-system 7018
  10. If you are done configuring the device, commit the configuration.

    user@PE2# commit

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@PE2# show interfaces
fe-1/2/0 {unit 11 {description PE2-to-PE4;family inet {address 10.0.0.22/30;}family mpls;}}
lo0 {unit 9 {family inet {address 10.9.9.5/32 {primary;}address 10.100.1.5/32;}}}
user@PE2# show policy-options
policy-statement SET_EXPORT_ROUTES {term 10 {from protocol [ direct static bgp ];then {next-hop 10.100.1.5;accept;}}}
policy-statement aigp {term 10 {from {route-filter 55.0.0.0/24 exact;}then {aigp-originate distance 20;next-hop 10.100.1.5;accept;}}term 20 {from {route-filter 99.0.0.0/24 exact;}then {aigp-originate distance 30;next-hop 10.100.1.5;accept;}}}
policy-statement next-hop {term 10 {from protocol bgp;then {next-hop 10.100.1.5;accept;}}term 20 {from {protocol direct;route-filter 10.9.9.5/32 exact;route-filter 10.100.1.5/32 exact;}then {next-hop 10.100.1.5;accept;}}}
user@PE2# show protocols
rsvp {interface fe-1/2/0.11;}
mpls {label-switched-path PE2-to-PE4 {to 10.9.9.4;}interface fe-1/2/0.11;}
bgp {group external {type external;multihop {ttl 2;}local-address 10.9.9.5;family inet {labeled-unicast {aigp;}}export [ next-hop aigp SET_EXPORT_ROUTES ];vpn-apply-export;peer-as 13979;neighbor 10.9.9.4;}}
ospf {area 0.0.0.2 {interface 10.9.9.5 {passive;metric 1;}interface 10.100.1.5 {passive;metric 1;}interface fe-1/2/0.11 {metric 1;}}}
user@PE2# show routing-options
static {route 99.0.0.0/24 discard;route 55.0.0.0/24 discard;}
router-id 10.9.9.5;autonomous-system 7018;

Configuring Device PE3

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 PE3:

  1. Configure the interfaces.

    [edit interfaces]user@PE3# set fe-1/2/0 unit 13 description PE3-to-PE4user@PE3# set fe-1/2/0 unit 13 family inet address 10.0.0.26/30user@PE3# set fe-1/2/0 unit 13 family mplsuser@PE3# set lo0 unit 11 family inet address 10.9.9.6/32user@PE3# set lo0 unit 11 family inet address 10.100.1.6/32
  2. Configure MPLS and a signaling protocol, such as RSVP or LDP.

    [edit protocols]user@PE3# set rsvp interface fe-1/2/0.13user@PE3# set mpls label-switched-path PE3-to-PE4 to 10.9.9.4user@PE3# set mpls interface fe-1/2/0.13
  3. Configure BGP.

    [edit protocols bgp group external]user@PE3# set type externaluser@PE3# set multihop ttl 2user@PE3# set local-address 10.9.9.6user@PE3# set export next-hopuser@PE3# set export SET_EXPORT_ROUTESuser@PE3# set vpn-apply-exportuser@PE3# set peer-as 13979user@PE3# set neighbor 10.9.9.4
  4. Enable AIGP.

    [edit protocols bgp group external]user@PE3# set family inet labeled-unicast aigp
  5. Enable the policies.

    [edit policy-options]user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol directuser@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol staticuser@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgpuser@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then acceptuser@PE3# set policy-statement next-hop term 10 from protocol bgpuser@PE3# set policy-statement next-hop term 10 then next-hop 10.100.1.6user@PE3# set policy-statement next-hop term 10 then acceptuser@PE3# set policy-statement next-hop term 20 from protocol directuser@PE3# set policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exactuser@PE3# set policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exactuser@PE3# set policy-statement next-hop term 20 then next-hop 10.100.1.6user@PE3# set policy-statement next-hop term 20 then accept
  6. Configure an IGP, such as OSPF, RIP, or IS-IS.

    [edit protocols ospf area 0.0.0.3]user@PE3# set interface 10.9.9.6 passiveuser@PE3# set interface 10.9.9.6 metric 1user@PE3# set interface 10.100.1.6 passiveuser@PE3# set interface 10.100.1.6 metric 1user@PE3# set interface fe-1/2/0.13 metric 1
  7. Configure the router ID and the autonomous system number.

    [edit routing-options]user@PE3# set router-id 10.9.9.6user@PE3# set autonomous-system 7018
  8. If you are done configuring the device, commit the configuration.

    user@PE3# commit

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@PE3# show interfaces
fe-1/2/0 {unit 13 {description PE3-to-PE4;family inet {address 10.0.0.26/30;}family mpls;}}
lo0 {unit 11 {family inet {address 10.9.9.6/32;address 10.100.1.6/32;}}}
user@PE3# show policy-options
policy-statement SET_EXPORT_ROUTES {term 10 {from protocol [ direct static bgp ];then {next-hop 10.100.1.6;accept;}}}
policy-statement next-hop {term 10 {from protocol bgp;then {next-hop 10.100.1.6;accept;}}term 20 {from {protocol direct;route-filter 10.9.9.6/32 exact;route-filter 10.100.1.6/32 exact;}then {next-hop 10.100.1.6;accept;}}}
user@PE3# show protocols
rsvp {interface fe-1/2/0.13;}
mpls {label-switched-path PE3-to-PE4 {to 10.9.9.4;}interface fe-1/2/0.13;}
bgp {group external {type external;multihop {ttl 2;}local-address 10.9.9.6;family inet {labeled-unicast {aigp;}}export [ next-hop SET_EXPORT_ROUTES ];vpn-apply-export;peer-as 13979;neighbor 10.9.9.4;}}
ospf {area 0.0.0.3 {interface 10.9.9.6 {passive;metric 1;}interface 10.100.1.6 {passive;metric 1;}interface fe-1/2/0.13 {metric 1;}}}
user@PE3# show routing-optionsrouter-id 10.9.9.6;autonomous-system 7018;

Configuring Device PE7

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 PE7:

  1. Configure the interfaces.

    [edit interfaces]user@PE7# set fe-1/2/0 unit 15 description PE7-to-PE1user@PE7# set fe-1/2/0 unit 15 family inet address 10.0.0.10/30user@PE7# set lo0 unit 13 family inet address 10.9.9.7/32user@PE7# set lo0 unit 13 family inet address 10.100.1.7/32
  2. Configure BGP.

    [edit protocols bgp group external]user@PE7# set type externaluser@PE7# set export SET_EXPORT_ROUTESuser@PE7# set peer-as 13979user@PE7# set neighbor 10.0.0.9
  3. Enable AIGP.

    [edit protocols bgp group external]user@PE7# set family inet labeled-unicast aigp
  4. Configure the routing policy.
    [edit policy-options policy-statement SET_EXPORT_ROUTES term 10]user@PE7# set from protocol directuser@PE7# set from protocol bgpuser@PE7# set then next-hop 10.100.1.7user@PE7# set then accept
  5. Configure the router ID and the autonomous system number.

    [edit routing-options]user@PE7# set router-id 10.9.9.7user@PE7# set autonomous-system 7019
  6. If you are done configuring the device, commit the configuration.

    user@PE7# commit

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@PE7# show interfaces
interfaces {fe-1/2/0 {unit 15 {description PE7-to-PE1;family inet {address 10.0.0.10/30;}}}lo0 {unit 13 {family inet {address 10.9.9.7/32;address 10.100.1.7/32;}}}}
user@PE7# show policy-options
policy-statement SET_EXPORT_ROUTES {term 10 {from protocol [ direct bgp ];then {next-hop 10.100.1.7;accept;}}}
user@PE7# show protocols
bgp {group external {type external;family inet {labeled-unicast {aigp;}}export SET_EXPORT_ROUTES;peer-as 13979;neighbor 10.0.0.9;}}
user@PE7# show routing-optionsrouter-id 10.9.9.7;autonomous-system 7019;

Verification

Confirm that the configuration is working properly.

Verifying That Device PE4 Is Receiving the AIGP Attribute from Its EBGP Neighbor PE2

Purpose

Make sure that the AIGP policy on Device PE2 is working.

Action

user@PE4> show route receive-protocol bgp 10.9.9.5 extensive
* 55.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 299888
     Nexthop: 10.100.1.5
     AS path: 7018 I
     AIGP: 20

* 99.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 299888
     Nexthop: 10.100.1.5
     AS path: 7018 I
     AIGP: 30

Meaning

On Device PE2, the aigp-originate statement is configured with a distance of 20 (aigp-originate distance 20). This statement is applied to route 55.0.0.0/24. Likewise, the aigp-originate distance 30 statement is applied to route 99.0.0.0/24. Thus, when Device PE4 receives these routes, the AIGP attribute is attached with the configured metrics.

Checking the IGP Metric

Purpose

From Device PE4, check the IGP metric to the BGP next hop 10.100.1.5.

Action

user@PE4> show route 10.100.1.5
inet.0: 30 destinations, 40 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.100.1.5/32      *[OSPF/10] 05:35:50, metric 2
                    > to 10.0.0.22 via fe-1/2/2.10
                    [BGP/170] 03:45:07, localpref 100, from 10.9.9.5
                      AS path: 7018 I
                    > to 10.0.0.22 via fe-1/2/2.10

Meaning

The IGP metric for this route is 2.

Verifying That Device PE4 Adds the IGP Metric to the AIGP Attribute

Purpose

Make sure that Device PE4 adds the IGP metric to the AIGP attribute when it readvertises routes to its IBGP neighbor, Device PE1.

Action

user@PE4> show route advertising-protocol bgp 10.9.9.1 extensive
* 55.0.0.0/24 (1 entry, 1 announced)
 BGP group internal type Internal
     Route Label: 300544
     Nexthop: 10.100.1.4
     Flags: Nexthop Change
     Localpref: 100
     AS path: [13979] 7018 I
     AIGP: 22

* 99.0.0.0/24 (1 entry, 1 announced)
 BGP group internal type Internal
     Route Label: 300544
     Nexthop: 10.100.1.4
     Flags: Nexthop Change
     Localpref: 100
     AS path: [13979] 7018 I
     AIGP: 32

Meaning

The IGP metric is added to the AIGP metric (20 + 2 = 22 and 30 + 2 = 32), because the next hop is changed for these routes.

Verifying That Device PE7 Is Receiving the AIGP Attribute from Its EBGP Neighbor PE1

Purpose

Make sure that the AIGP policy on Device PE1 is working.

Action

user@PE7> show route receive-protocol bgp 10.0.0.9 extensive
* 44.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300096
     Nexthop: 10.0.0.9
     AS path: 13979 I
     AIGP: 203

* 55.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300112
     Nexthop: 10.0.0.9
     AS path: 13979 7018 I
     AIGP: 25

* 99.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300112                
     Nexthop: 10.0.0.9
     AS path: 13979 7018 I
     AIGP: 35

Meaning

The 44.0.0.0/24 route is originated at Device PE4. The 55.0.0.0/24 and 99.0.0.0/24 routes are originated at Device PE2. The IGP distances are added to the configured AIGP distances.

Verifying the Resolving AIGP Metric

Purpose

Confirm that if the prefix is resolved through recursion and the recursive next hops have AIGP metrics, the prefix has the sum of the AIGP values that are on the recursive BGP next hops.

Action

  1. Add a static route to 66.0.0.0/24.
    [edit routing-options]user@PE2# set static route 66.0.0.0/24 discard
  2. Delete the existing terms in the aigp policy statement on Device PE2.

    [edit policy-options policy-statement aigp]user@PE2# delete term 10user@PE2# delete term 20
  3. Configure a recursive route lookup for the route to 66.0.0.0.

    The policy shows the AIGP metric for prefix 66.0.0.0/24 (none) and its recursive next hop. Prefix 66.0.0.0/24 is resolved by 55.0.0.1. Prefix 66.0.0.0/24 does not have its own AIGP metric being originated, but its recursive next hop, 55.0.0.1, has an AIGP value.

    [edit policy-options policy-statement aigp]user@PE2# set term 10 from route-filter 55.0.0.1/24 exact user@PE2# set term 10 then aigp-originate distance 20 user@PE2# set term 10 then next-hop 10.100.1.5 user@PE2# set term 10 then accept user@PE2# set term 20 from route-filter 66.0.0.0/24 exact user@PE2# set term 20 then next-hop 55.0.0.1 user@PE2# set term 20 then accept
  4. On Device PE4, run the show route 55.0.0.0 extensive command.

    The value of Metric2 is the IGP metric to the BGP next hop. When Device PE4 readvertises these routes to its IBGP peer, Device PE1, the AIGP metric is the sum of AIGP + its Resolving AIGP metric + Metric2.

    Prefix 55.0.0.0 shows its own IGP metric 20, as defined and advertised by Device PE2. It does not show a resolving AIGP value because it does not have a recursive BGP next hop. The value of Metric2 is 2.

    user@PE4> show route 55.0.0.0 extensive
    inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden)
    55.0.0.0/24 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 55.0.0.0/24 -> {indirect(262151)}
    Page 0 idx 0 Type 1 val 928d1b8
        Flags: Nexthop Change
        Nexthop: 10.100.1.4
        Localpref: 100
        AS path: [13979] 7018 I
        Communities:
        AIGP: 22
    Path 55.0.0.0 from 10.9.9.5 Vector len 4.  Val: 0
            *BGP    Preference: 170/-101
                    Next hop type: Indirect
                    Address: 0x925da38
                    Next-hop reference count: 4
                    Source: 10.9.9.5
                    Next hop type: Router, Next hop index: 1004
                    Next hop: 10.0.0.22 via fe-1/2/2.10, selected
                    Label operation: Push 299888
                    Label TTL action: prop-ttl
                    Protocol next hop: 10.100.1.5
                    Push 299888
                    Indirect next hop: 93514d8 262151
                    State: <Active Ext>
                    Local AS: 13979 Peer AS:  7018
                    Age: 22:03:26   Metric2: 2 
                    AIGP: 20 
                    Task: BGP_7018.10.9.9.5+58560
                    Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 
                    AS path: 7018 I
                    Accepted
                    Route Label: 299888
                    Localpref: 100
                    Router ID: 10.9.9.5
                    Indirect next hops: 1
                            Protocol next hop: 10.100.1.5 Metric: 2
                            Push 299888
                            Indirect next hop: 93514d8 262151
                            Indirect path forwarding next hops: 1
                                    Next hop type: Router
                                    Next hop: 10.0.0.22 via fe-1/2/2.10
                            10.100.1.5/32 Originating RIB: inet.0
                              Metric: 2                       Node path count: 1
                              Forwarding nexthops: 1
                                    Nexthop: 10.0.0.22 via fe-1/2/2.10
  5. On Device PE4, run the show route 66.0.0.0 extensive command.

    Prefix 66.0.0.0/24 shows the Resolving AIGP, which is the sum of its own AIGP metric and its recursive BGP next hop:

    66.0.0.1 = 0, 55.0.0.1 = 20, 0+20 = 20

    user@PE4> show route 66.0.0.0 extensive
    inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden)
    66.0.0.0/24 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 66.0.0.0/24 -> {indirect(262162)}
    Page 0 idx 0 Type 1 val 928cefc
        Flags: Nexthop Change
        Nexthop: 10.100.1.4
        Localpref: 100
        AS path: [13979] 7018 I
        Communities:
    Path 66.0.0.0 from 10.9.9.5 Vector len 4.  Val: 0
            *BGP    Preference: 170/-101
                    Next hop type: Indirect
                    Address: 0x925d4e0
                    Next-hop reference count: 4
                    Source: 10.9.9.5
                    Next hop type: Router, Next hop index: 1006
                    Next hop: 10.0.0.22 via fe-1/2/2.10, selected
                    Label operation: Push 299888, Push 299888(top)
                    Label TTL action: prop-ttl, prop-ttl(top)
                    Protocol next hop: 55.0.0.1
                    Push 299888
                    Indirect next hop: 9353e88 262162
                    State: <Active Ext>
                    Local AS: 13979 Peer AS:  7018
                    Age: 31:42      Metric2: 2 
                    Resolving-AIGP: 20 
                    Task: BGP_7018.10.9.9.5+58560
                    Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 
                    AS path: 7018 I
                    Accepted
                    Route Label: 299888
                    Localpref: 100
                    Router ID: 10.9.9.5
                    Indirect next hops: 1
                            Protocol next hop: 55.0.0.1 Metric: 2 AIGP: 20
                            Push 299888
                            Indirect next hop: 9353e88 262162
                            Indirect path forwarding next hops: 1
                                    Next hop type: Router
                                    Next hop: 10.0.0.22 via fe-1/2/2.10
                            55.0.0.0/24 Originating RIB: inet.0
                              Metric: 2                       Node path count: 1
                              Indirect nexthops: 1
                                    Protocol Nexthop: 10.100.1.5 Metric: 2 Push 299888
                                    Indirect nexthop: 93514d8 262151
                                    Indirect path forwarding nexthops: 1
                                            Nexthop: 10.0.0.22 via fe-1/2/2.10
                                    10.100.1.5/32 Originating RIB: inet.0
                                      Metric: 2                               Node path count: 1
                                      Forwarding nexthops: 1
                                            Nexthop: 10.0.0.22 via fe-1/2/2.10

Verifying the Presence of AIGP Attributes in BGP Updates

Purpose

If the AIGP attribute is not enabled under BGP (or the group or neighbor hierarchies), the AIGP attribute is silently discarded. Enable traceoptions and include the packets flag in the detail option in the configuration to confirm the presence of the AIGP attribute in transmitted or received BGP updates. This is useful when debugging AIGP issues.

Action

  1. Configure Device PE2 and Device PE4 for traceoptions.
    user@host> show protocols bgp
    traceoptions {file bgp size 1m files 5;flag packets detail;}
  2. Check the traceoptions file on Device PE2.

    The following sample shows Device PE2 advertising prefix 99.0.0.0/24 to Device PE4 (10.9.9.4) with an AIGP metric of 20:

    user@PE2> show log bgp
    Mar 22 09:27:18.982150 BGP SEND 10.9.9.5+49652 -> 10.9.9.4+179
    Mar 22 09:27:18.982178 BGP SEND message type 2 (Update) length 70
    Mar 22 09:27:18.982198 BGP SEND Update PDU length 70
    Mar 22 09:27:18.982248 BGP SEND flags 0x40 code Origin(1): IGP
    Mar 22 09:27:18.982273 BGP SEND flags 0x40 code ASPath(2) length 6: 7018
    Mar 22 09:27:18.982295 BGP SEND flags 0x80 code AIGP(26): AIGP: 20 
    Mar 22 09:27:18.982316 BGP SEND flags 0x90 code MP_reach(14): AFI/SAFI 1/4
    Mar 22 09:27:18.982341 BGP SEND         nhop 10.100.1.5 len 4
    Mar 22 09:27:18.982372 BGP SEND         99.0.0.0/24 (label 301664)
    Mar 22 09:27:33.665412 bgp_send: sending 19 bytes to abcd::10:255:170:84 (External AS 13979)
    
  3. Verify that the route was received on Device PE4 using the show route receive-protocol command.

    AIGP is not enabled on Device PE4, so the AIGP attribute is silently discarded for prefix 99.0.0.0/24 and does not appear in the following output:

    user@PE4> show route receive-protocol bgp 10.9.9.5 extensive | find 55.0.0.0
    * 99.0.0.0/24 (2 entries, 1 announced)
         Accepted
         Route Label: 301728
         Nexthop: 10.100.1.5
         AS path: 7018 I
    
  4. Check the traceoptions file on Device PE4.

    The following output from the traceoptions log shows that the 99.0.0.0/24 prefix was received with the AIGP attribute attached:

    user@PE4> show log bgp
    Mar 22 09:41:39.650295 BGP RECV 10.9.9.5+64690 -> 10.9.9.4+179
    Mar 22 09:41:39.650331 BGP RECV message type 2 (Update) length 70
    Mar 22 09:41:39.650350 BGP RECV Update PDU length 70
    Mar 22 09:41:39.650370 BGP RECV flags 0x40 code Origin(1): IGP
    Mar 22 09:41:39.650394 BGP RECV flags 0x40 code ASPath(2) length 6: 7018
    Mar 22 09:41:39.650415 BGP RECV flags 0x80 code AIGP(26): AIGP: 20
    Mar 22 09:41:39.650436 BGP RECV flags 0x90 code MP_reach(14): AFI/SAFI 1/4
    Mar 22 09:41:39.650459 BGP RECV         nhop 10.100.1.5 len 4
    Mar 22 09:41:39.650495 BGP RECV         99.0.0.0/24 (label 301728)
    Mar 22 09:41:39.650574 bgp_rcv_nlri: 99.0.0.0/24
    Mar 22 09:41:39.650607 bgp_rcv_nlri: 99.0.0.0/24 belongs to meshgroup
    Mar 22 09:41:39.650629 bgp_rcv_nlri: 99.0.0.0/24 qualified bnp->ribact 0x0 l2afcb 0x0
    

Meaning

Performing this verification helps with AIGP troubleshooting and debugging issues. It enables you to verify which devices in your network send and receive AIGP attributes.

Published: 2013-07-09