It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Firewall

This Firmware Version Is End-Of-Support

Documentation for this product is no longer updated. Please see End-of-Support for CloudGen Firewall Firmware for further information on our EoS policy.

How to Configure EBGP Multihop Routing

  • Last updated on

To allow connections between BGP neighbors that are not directly connected to each other, you can configure EBGP multihop routing with either a route map or static routes. This article provides example scenarios and step-by-step instructions for configuring EBGP. 

Choosing to Use a Routing Map or Static Routes

There are different scenarios that may require the implementation of EBGP multihop routing - for example, as illustrated in the following diagrams:

  • Scenario 1 – A BGP peer runs on a loopback address that is externally unreachable. This can be required if the other IP addresses of the system are dynamically changeable.
    ebgp_multihop_routing01.png 
  • Scenario 2 – The BGP peer (router R1) is located in an external network.
    ebgp_multihop_routing02.png

For both scenarios, you can configure EBGP multihop routing with either a route map or static routes: 

  • Route Map – If you do not require load balancing over more than one router, using a route map is the simplest way of configuring EBGP. You only need to configure the BGP neighbor and do not need to introduce additional routes. All routes learned by router R1 (as configured in Scenario 2) are directed over one gateway. However, this setup can prolong traffic from routes whose next hop would initially have been directly reachable from router R0, and load balancing over more than one router is no more possible.
  • Static Routes – For arriving routes without a directly reachable next hop, configure static routes. You only need to configure the neighbor once for EBGP multihop routing and do not need to change any other BGP configurations. Routes received via next hop can be analyzed. However, you must also set up a new next hop, and the routing table for the kernel becomes more complicated. 

Complete the steps in the following sections to configure EBGP multihop routing with either a route map or static routes, depending on your network architecture. The sections provide examples of how to configure EBGP multihop routing for Scenario 2, as illustrated in the above diagram. BGP peer R1 in an external network is configured on router R0.

Configuring EBGP with a Route Map

This example procedure configures a route map to modify all routes arriving from router R1 so that the next hop is changed to the IP address of the gateway for router R0. This gateway is always directly reachable from R0 and then autonomously forwards data traffic to router R1.

Step 1. Introduce a Route Map

Introduce a route map to modify routes arriving from R1 so that the next hop is set to the gateway of R0. 

  1. Go to CONFIGURATION > Configuration Tree > Box > Assigned Services > OSPF-RIP-BGP-Service > OSPF/RIP/BGP Settings
  2. From the Configuration menu in the left navigation pane, click Filter Setup IPv4.
  3. Click Lock.
  4. In the Route Maps IPv4 table, click + to add an entry for the route map.  
  5. Enter a Name for the route map and then click OK.
  6. In the BGP Specific Conditions table, click + to add an entry for the BGP settings.
  7. In the Route Map Entry window, specify the following settings and then click OK:
    • Sequence Number – Enter a unique number for the route map entry.
    • Type – Select permit.
    • Match Condition – Select None to specify that all routes must be modified.
    • Set Action – Select Next_Hop.
    • Set Next-Hop IP – Enter 10.0.0.1, the gateway address.
  8. In the Route Maps window, click OK.
  9. Click Send Changes and Activate.
Step 2. Configure Neighbor Settings

Configure EBGP in the neighbor settings for R1.

  1. On the OSPF/RIP/BGP Settings page, click Neighbor Setup IPv4 from the Configuration menu in the left navigation pane.
  2. Click Lock. 
  3. In the Neighbors table, click + to add an entry for the neighbor settings.
  4. Enter a name for the neighbor settings and then click OK.  
  5. In the Usage and IP section of the Neighbors window, specify the following settings:
    • Neighbor IPv4 – Enter 10.1.0.2.
    • BGP Routing Protocol Usage – Select yes.
  6. In the BGP Parameters section, specify the following settings:
    • AS Number – Enter 200.
    • Update Source – Select Address.
    • Update Source IPv4 Address   Enter 10.0.0.2.
  7. To add a new route map, click Set next to Peer Filtering For Inputs.
  8. In the EBGP MultiHop field, you can specify the maximum allowed next hop distance to the neighbor. For example, 20.
  9. After you specify all of the required settings in the Neighbors window, click OK.
  10. Click Send Changes and Activate. 

Configuring EBGP with Static Routes

This example procedure configures the neighbor settings for router R1 and introduces two routes:

  • A static route over the gateway of router R0 to the network of router R1.
  • A direct route to the network of router R1.
Step 1. Configure Neighbor Settings

Configure EBGP in the neighbor settings for R1.

  1. Go to CONFIGURATION > Configuration Tree > Box > Assigned Services > OSPF-RIP-BGP-Service > OSPF/RIP/BGP Settings. 

  2. From the Configuration menu in the left navigation pane, click Neighbor Setup IPv4. 
  3. Click Lock. 
  4. In the Neighbors table, click + to add an entry for the neighbor settings.
  5. Enter a name for the neighbor settings and then click OK. 
  6. In the Usage and IP section of the Neighbors window, specify the following settings:
    • Neighbor IPv4 Enter 10.1.0.2.
    • BGP Routing Protocol Usage Select yes. 
  7. In the BGP Parameters section, specify the following settings:
    • AS Number Enter 200. 
    • Update Source Select Address. 
    • Update Source IPv4 Address Enter 10.0.0.2. 
  8. In the EBGP MultiHop field, you can specify the maximum allowed next hop distance to the neighbor. For example, 20. 
  9. After you specify all of the required settings in the Neighbors window, click OK. 
  10. Click Send Changes and Activate. 
Step 2. Execute a Next Hop Lookup

Assuming that a route arrives at 192.168.0.0/24 with the next hop 10.1.0.2, execute a next hop lookup for R1 (10.1.0.2). The lookup should provide the IP address of the gateway for R0 (10.0.0.1) and the interface port1. 

Step 3. Configure a Static Route

Introduce a static route over the gateway of R0 to the network of R1. Use the following settings:

  • Target Network Address10.1.0.2/32
  • Route Typegateway
  • Gateway10.0.0.1

For more information, see How to Configure Gateway Routes.

Step 4. Configure a Device Route

To introduce the route that was learned over BGP, you must configure a direct ­route with the following settings:

  • Target Network Address10.1.0.2/32
  • Route Typedirectly attached network
  • Interface Nameport1

For more information, see How to Configure Direct Attached Routes.

Whenever a route with an unknown next hop is received, you must execute a next hop lookup, configure a static route, and then configure a device route. Use the example steps from above.