Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Virtual Routers for Educational Networks

 

This example provides details on configuring virtual router routing instances for network peering using SRX Series or J Series devices as implemented by a network user (Educational Network, in this document called “New University”) connected to multiple other networks to exchange traffic.

See Using Virtual Routers to Provide Customer Peering for overview information.

This topic includes the following sections:

Requirements

This example uses the following three devices:

  • J2350 Services Router as the New University peering device

  • EX3200 Ethernet Switch as the service provider network

  • SRX210 Services Gateway as the customer device

Note

This configuration example has been tested using the software release listed and is assumed to work on all later releases.

Network Topology

In this example, New University is connected to multiple other networks to exchange traffic through peering. The example shows a few customer solutions to explain various ways to accommodate statically attached customers of New University and discusses various methods of connecting to customers’ devices/networks using BGP.

Figure 1 shows the relationship of the virtual router routing instances for customer connectivity. This example explores each of the connectivity models in subsequent sections.

Figure 1: Virtual Router for Customer Connectivity Topology
Virtual Router for
Customer Connectivity Topology

Example 1: Connecting a Static Customer – Internet Only (Customer A)

New University provides the customer connectivity by advertising the customer’s IP address to upstream providers. The users must configure their Internet-facing device to have a default route pointing to New University.

In the example topology, the user (Customer A) network is requesting a simple connection from New University using static rules.

Figure 2 shows the topology of the static customer connectivity.

Figure 2: Connecting a Static Customer – Internet Only (Customer A)
Connecting a Static Customer
– Internet Only (Customer A)

This topic includes the following sections:

Configuring the New University Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the New University device:

  1. Create a virtual router routing instance (static-cust-inet).

  2. Assign the ge-0/0/0.60 interface to the virtual router routing instance.
  3. Create the static-cust-inet-interfaces RIB group for the interfaces.

    The static-cust-inet-interfaces RIB group places the Customer A interfaces into both the static-cust-inet virtual router routing instance and the internet virtual router routing instance. Looking at the route for 10.0.4.0/30, which is the link between the New University router and the customer network router, you can see that the interface route is now in the routing tables of both virtual routers.

    This is important to maintain reachability for Internet traffic (BGP requires valid next-hops for a route to be active and advertised).

  4. Create the static-cust-inet RIB group for the static routes.

    The RIB group configuration shares the Customer A networks between the static-cust-inet virtual router routing instance and the internet virtual router routing instance. These static routes are now available for the internet virtual router routing instance to advertise to its upstream providers. To ensure that only New University prefixes are shared upstream, the addition of a BGP community (cust-routes) is added to the static routes for later use by the export policy on the Internet peering session. The customer’s IP address block is 192.168.30/24.

  5. Configure the static routes to be installed in the routing table by specifying the destination of the generated route, and also the next-hop destination (table).
  6. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (IP address).
  7. Use the run show route route-ip-address command to display the details for the 10.0.4.0/30 route, which is the link between the New University router and the customer network router.
    user@J2350-2-R2# run show route 10.0.4.0/30
  8. Use the run show route route-ip-address command to display the details for route 192.168.30/24.
    user@J2350-2-R2# run show route 192.168.30/24

Results

Use the show routing-instances routing-instance-name command to display the sample configuration of the New University virtual router routing instances.

user@J2350-2-R2> show routing-instances static-cust-inet

Use the show routing-options command to display a sample configuration of the RIB groups.

user@J2350-2-R2> show routing-options

Use the show policy-options policy-statement policy-name command to display a sample configuration of the RIB groups policy. To allow only interfaces to be copied from inet.0, the RIB groups policy is created and applied to the RIB groups.

user@J2350-2-R2> show policy-options policy-statement non-bgp-cust-ribgroup-policy

Configuring the Customer Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the customer device:

  1. Create a virtual router routing instance (cust-a).
  2. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (IP address).
  3. Use the run show route route-ip-address command to display the Customer A network details from the ISP routing table.
    user@EX-3200-1# run show route 192.168.30/24

Results

Use the run show routing-options command to display the sample configuration of the customer device’s RIB groups.

user@SRX210-A-R3# run show routing-options

Example 2: Connecting a Static Customer – Internet2 Only (Customer B)

In this example, the user (Customer B) network is requesting a simple connection from New University along with access to specialized networks such as Internet2 (I2). In this scenario, the customers’ connection to New University is placed in the static-cust-i2 virtual router routing instances, and routing constraints are limited to the virtual router connectivity model.

Figure 3 shows the topology of the static customer connectivity.

Figure 3: Connecting a Static Customer – Internet2 Only (Customer B)
Connecting a Static Customer
– Internet2 Only (Customer B)

This topic includes the following section:

Configuring the New University Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the New University device:

  1. Create a virtual router routing instance (static-cust-i2).
  2. Assign the ge-0/0/0.20 interface to the virtual router routing instance.
  3. Create the static-cust-i2-interfaces RIB group for the interfaces.

    The RIB group static-cust-i2-interfaces places the Customer B interfaces into both the static-cust-i2 and internet2 virtual router routing instances. The route 10.0.4.8/30 is the link between the New University router and the customer network routers, and it is available in the routing tables of both virtual routers. This is important to maintain reachability for Internet traffic (BGP requires valid next-hops for a route to be active and advertised).

  4. Create the static-cust-i2 RIB group for the static routes.

    The RIB group static-cust-i2 shares the Customer B network routes between the static-cust- inet virtual router routing instance and the internet virtual router routing instance. These static routes are now available for the internet virtual router to advertise to its upstream providers. To ensure that only New University prefixes are shared upstream, the addition of a BGP community (cust-routes) is added to the static routes for use by the export policy on the Internet peering session. The customer’s IP address block is 192.168.40/24.

  5. Create an import policy for the instance RIB.
  6. Configure the static routes to be installed in the routing table by specifying the destination of the generated route and an option to reach the next-hop to another table.
  7. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (IP address).
  8. Use the run show route route-ip-address command to display the details for route 10.0.4.8/30, which is the link between the New University router and the customer network router.
    user@J2350-2-R2# run show route 10.0.4.8/30
  9. Use the run show route route-ip-address command to display the details for the New University routing table.
    user@J2350-2-R2# run show route 192.168.40.0/24
  10. Use the run show route route-ip-address command to display the Customer B network details from the ISP routing table.
    user@EX-3200-1# run show route 192.168.40/24

Results

Use the show routing-instances routing-instance-name command to display the sample configuration of New University virtual router routing instances.

user@J2350-2-R2> show routing-instances static-cust-i2

Use the show routing-options command to display the configuration of the RIB groups.

user@J2350-2-R2> show routing-options

Use the show policy-options policy-statement policy-name command to display the configuration of the RIB groups policy.

user@J2350-2-R2> show policy-options policy-statement non-bgp-custribgroup-policy

Example 3: Connecting a Static Customer – Access to All Three Networks (Customer C)

In this example, the user (Customer C) network is requesting multiple connections simultaneously from New University. The user is depending on New University to provide the best route to each destination based on New University routing policies.

Figure 4 shows the topology of the static customer connectivity.

Figure 4: Connecting a Static Customer – Access to Three Different Networks (Customer C)
Connecting a Static Customer
– Access to Three Different Networks (Customer C)

In this example, a static route to the internet.inet.0 table is maintained, but additional prefixes are imported in the virtual router’s routing table from i2.inet.0 and nlr.inet.0. This configuration reduces the size of the routing table, and the route is preferred for the specialized networks to the traditional Internet.

This topic includes the following section:

Configuring the New University Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the New University device:

  1. Create a virtual router routing instance (static-cust-all-feeds).
  2. Assign the ge-0/0/0.10 interface to the virtual router routing instance.
  3. Create the static-cust-all-feeds-interfaces RIB group for the interfaces.
  4. Create the static-cust-all-feeds RIB group for the static routes.
  5. Create an import policy for the instance RIB.
  6. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (table).
  7. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (IP address).
  8. Use the run show route table route-table-name command to display the details for the routing table.
    user@J2350-2-R2# run show route table static-cust-all-feeds

Results

Use the show routing-instances routing-instance-name command to display the sample configuration of New University virtual router routing instances.

user@J2350-2-R2> show routing-instances static-cust-all-feeds

Use the show policy-options policy-statement policy-name command to display a sample configuration of the RIB groups policy.

user@J2350-2-R2> show policy-options policy-statement i2-nlr-bgp-instanceimport
Note

When you configure the policy, consider the following:

  • Configure the policy statement to define matching criteria and the actions to be taken for traffic that matches the criteria. The use of the BGP community ensures that only those routes learned from upstream peers, and not other New University peers, are accepted into the static-cust-all-feeds routing table.

  • Import the i2.inet.0 and the nlr.inet.0 routes into the static-cust-all-feeds virtual router routing instances, and configure this policy under the instance-import option of the default routing instance.

Note

Only the specific prefixes for the I2 and NLR networks are populated in the routing table. For all other destinations, the default route points to the internet.inet.0 virtual router routing table.

Example 4: BGP Customer – Creating a Single Peering Session (Customer D)

In this example, the user (Customer D) network is requesting multiple connections simultaneously from New University and to configure some of the routing-related options themselves.

Figure 5 shows the topology of the static customer connectivity.

Figure 5: BGP Customer – Creating a Single Peering Session (Customer D)
BGP Customer – Creating
a Single Peering Session (Customer D)

In this configuration, a single BGP peering session is provided to the customer where the customer can configure part of it. However, configurations related to route preference and control over active prefixes for the customer connection are controlled and maintained by New University.

This topic includes the following sections:

Configuring the New University Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the New University device:

  1. Create a virtual router routing instance (bgp-customer).
  2. Assign the ge-0/0/0.30 interface to the virtual router routing instance.
  3. Create the bgp-customer-rg-interfaces RIB group for the interfaces.
  4. Create the bgp-customers-rg RIB group for the static routes.
  5. Create an import policy for the instance RIB.
  6. Configure the family type to be unicast.

    This configuration is required to enable the BGP peers to carry the unicast routes that are being used for unicast forwarding purposes.

  7. Set the BGP group customer type to external.
  8. Configure a BGP neighbor (peer).
  9. Configure the cust-d-export BGP group export policy.

Results

Use the show routing-instances routing-instance-name command to display the sample configuration of New University virtual router routing instances.

user@J2350-2-R2> show routing-instances bgp-customer
Note

To allow only interfaces to be copied from inet.0, you must configure a policy and apply it to the RIB group.

Use the show policy-options policy-statement policy-name command to display the sample configuration of the RIB groups policy.

user@J2350-2-R2> show policy-options policy-statement bgp-cust-instanceimport
Note

In the previous policy configuration:

  • Using the instance-import policy, the local preference is configured to meet the requirements of the downstream customers. The customers do not see the change in the local-preference, but those prefixes that are shared with the customer are the only active prefixes available to the customer. If a failure occurs that limits connectivity to one of the specialized networks, then the standard routes become active and are advertised to the customer router.

  • The use of BGP allows customers to peer with New University in a single session. An additional RIB group is created to ensure that Customer D’s networks are propagated to all three upstream networks.

Use the show routing-instances routing-instance-name protocols bgp command to display the sample configuration of the BGP group policy.

user@J2350-2-R2> show routing-instances bgp-customer protocols bgp
Note

In the previous configuration, BGP is configured in the standard way. One benefit of the hierarchical configuration is that a standard peer-group can be used to handle many distinct customers. By placing the peer-specific information under the neighbor statement, the need to create individual groups is reduced.

Use the show routing-options rib-groups rib-groups-name command to display the sample configuration of the RIB groups.

user@J2350-2-R2> show routing-options rib-groups bgp-customers-rg
Note

In the previous configuration, the internet.inet.0, i2.inet.0, and the nlr.inet.0. routes are imported into the inet bgp-customer-rg-interfaces virtual router routing instance, and this policy is configured under the instance-import option of the default routing instance. This configuration combines three provider networks.

Use the show policy-options policy-statement policy-name command to verify the instance-import policy.

user@J2350-2-R2> show policy-options policy-statement static-all-feeds-cust-ribgroup-policy
Note

The RIB group and associated policy have additional configuration to enable prepending of prefixes. Prepending is used only for the Internet virtual router. Since most New University networks peer to the Internet and I2, and customers prefer the use of the faster Internet2 network. Prepending a prefix with two additional AS-PATH attributes on the Internet links ensures that those prefixes are preferred through the Internet2 peering sessions (shorter AS-PATH).

Configuring the Customer Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

To configure the customer device:

  1. Create a virtual router routing instance (cust-d).
  2. Assign the fe-0/0/0.30 interface to the virtual router routing instance.
  3. Assign the lo0.30 interface to the virtual router routing instance.
  4. Configure the static routes to be installed in the routing table by specifying the destination of the generated route, and the destination where packets should not be forwarded (discard).
  5. Specify the device’s AS number as assigned by the Network Information Center (NIC) in the United States.
  6. Apply one or more policies to routes being exported from the routing table into a routing protocol.
  7. Configure a BGP neighbor (peer).
  8. Configure a BGP neighbor (peer) with IP address 10.0.4.6.

Results

Use the show routing-instances routing-instance-name command to display the complete configuration. The sample output in this example is truncated to provide only the details relevant to the virtual routers configuration.

user@SRX210-A-R3> show routing-instances cust-d
Note

The only disadvantage of this solution is that the upstream prefixes are replicated between several virtual router routing tables.

Example 5: BGP Customer – Creating Multiple Peering Sessions (Customer E)

In this example, the BGP user (Customer E) network is requesting multiple connections from New University along with configuration privileges. This configuration requires a single PE-CE link and multiple BGP peering sessions for each upstream provider feed using multihop external BGP (EBGP).

Figure 6 shows the topology of the static customer connectivity.

Figure 6: BGP Customer – Creating Multiple Peering Sessions (Customer E)
BGP Customer – Creating
Multiple Peering Sessions (Customer E)

In this example, each group contains a BGP group for customers. These customer peering statements must use the EBGP multihop option since they are peering to a loopback address in each of the virtual router routing instances. You must also add the interface routes to a RIB group for each instance. This configuration propagates the loopback interfaces to the bgp-cust-2 virtual router, so that it can form a BGP peering session with the customer.

This section contains the following procedures:

Configuring the New University Device

Step-by-Step Procedure

Note

The following configuration includes basic steps to configure the device. For samples of a detailed configuration, see Appendix A - Device Configuration Details.

In this configuration, the virtual router routing instances provide multiple BGP sessions for each network. The primary BGP connectivity is contained within each provider of the virtual router.

To configure the New University virtual router routing instance:

  1. Create a virtual router routing instance (bgp-cust-2).
  2. Assign the bgp-cust-2 interface to the virtual router routing instance.
  3. Create a RIB group for the interfaces.

Configuring the New University Device for the Internet Virtual Router Routing Instance

Step-by-Step Procedure

To configure the New University virtual router for the internet virtual router routing instance:

  1. Create a virtual router routing instance (internet).
  2. Assign the ge-0/0/0.230 interface to the virtual router routing instance.
  3. Assign the ge-0/0/0.270 interface to the virtual router routing instance.
  4. Assign the lo0.2 interface to the virtual router routing instance.
  5. Create the bgp-cust2-inet-interfaces RIB group for the interfaces.
  6. Configure the BGP group customer type as external.
  7. Configure the BGP group multihop with a time-to-live (TTL) value of 2.

    This enables external peering session, which allows unconnected third-party next-hops.

  8. Specify the address of the local end of a BGP session as 1.1.1.1.
  9. Configure the BGP group by including the advertise-inactive statement.

    The BGP advertises the best route even if the routing table does not select it to be the active route.

  10. Configure the BGP group policy cust-routes-import.

    This configuration applies to one or more routing policies to the routes being imported into the routing table from BGP.

  11. Configure a BGP neighbor (peer) with the IP address 10.0.2.5, and configure the peer as 65200.

Configuring the New University Device for the Internet2 Virtual Router Routing Instance

Step-by-Step Procedure

To configure the New University virtual router routing instance for the Internet2 connection:

  1. Create a virtual router routing instance (i2 ).
  2. Assign the ge-0/0/0.210 interface to the virtual router routing instance.
  3. Assign the ge-0/0/0.280 interface to the virtual router routing instance.
  4. Assign the lo0.2 interface to the virtual router routing instance.
  5. Create the bgp-cust2-i2-interfaces RIB group for the interfaces.
  6. Configure the BGP group customer type as external.
  7. Configure the BGP group multihop with a time-to-live (TTL) value of 2.

    This enables external peering session, which allows unconnected third-party next-hops.

  8. Specify the address of the local end of a BGP session as 1.1.1.2.
  9. Configure the BGP group by including the advertise-inactive statement.

    The BGP advertises the best route even if the routing table does not select it to be the active route.

  10. Configure the cust-routes-import BGP group policy.

    This configuration applies to one or more routing policies to the routes being imported into the routing table from BGP.

  11. Configure a BGP neighbor (peer) with an IP address of 10.0.2.5, and a peer autonomous system number of 65200.

Configuring the New University Device for the NLR Virtual Router Routing Instance

Step-by-Step Procedure

To configure the New University virtual router routing instance for the NLR connection:

  1. Create a virtual router routing instance (nlr).
  2. Assign the ge-0/0/0.200 interface to the virtual router routing instance.
  3. Assign the lo0.3 interface to the virtual router routing instance.
  4. Create the bgp-cust2-nlr-interfaces RIB group for the interfaces.
  5. Configure the BGP group customer type as external.
  6. Configure the BGP group multihop with a time-to-live (TTL) value of 2.

    This enables external peering session, which allows unconnected third-party next-hops.

  7. Specify the address of the local end of a BGP session as 1.1.1.3.
  8. Configure the BGP group by including the advertise-inactive statement.

    The BGP advertises the best route even if the routing table does not select it to be the active route.

  9. Configure the BGP group policy cust-routes-import.

    This configuration applies to one or more routing policies to the routes being imported into the routing table from BGP.

  10. Configure a BGP neighbor (peer) with IP address 10.0.2.5, and configure the peer as 65200.
  11. Use the run show route table route-ip-address-table-name terse command to display the details of the routing table.

Results

Use the show routing-instances routing-instance-name command to display the complete configuration. The sample output is truncated to provide configuration details relevant to the virtual router routing instances.

user@J2350-2-R2> show routing-instances bgp-cust-2

Use the show routing-options rib-groups rib-groups-name command to verify the RIB group configurations.

user@J2350-2-R2> show routing-options rib-groups bgp-cust2-interfaces
user@J2350-2-R2> show routing-options rib-groups bgp-cust2-i2-interfaces
user@J2350-2-R2> show routing-options rib-groups bgp-cust2-nlr-interfaces

Configuring the Customer Device

Step-by-Step Procedure

To configure the customer device:

  1. Create a virtual router routing instance (cust-e).
  2. Assign the fe-0/0/0.40 interface to the virtual router routing instance.
  3. Configure the static routes for the routing table by specifying the destination of the generated route, and also the next-hop destination (IP address).
  4. Configure the static routes to be installed in the routing table by specifying the destination of the generated route, and the destination where packets should not be forwarded (discard).
  5. Specify the device’s AS number as assigned by the Network Information Center (NIC) in the United States.
  6. Configure an external BGP group (provider-ebgp).
  7. Configure the BGP group multihop with a time-to-live (TTL) value of 2.

    This enables external peering session, which allows unconnected third-party next-hops.

  8. Apply one or more policies to routes being exported from the routing table into a routing protocol.
  9. Configure a BGP neighbor (peer).
  10. Configure a BGP neighbor (peer) with IP address 1.1.1.1.
  11. Configure a BGP neighbor (peer) with IP address 1.1.1.2.
  12. Configure a BGP neighbor (peer) with IP address 1.1.1.3.
  13. Use the run show route table route-table-name terse command to verify the routing table (customer device).
    user@SRX210-A-R3# run show route table cust-e terse

Results

Use the show routing-instances routing-instance-name command to verify customer device configuration.

user@SRX210-A-R3> show routing-instances cust-e