Configure Multiple EBGP Sessions

Now that you know how to configure an EBGP session, let’s move on to a more realistic scenario: you have a site with a WAN edge router connected to two upstream ISPs, and you’re running EBGP with them.

Lab topology

The routers in your lab use the following BGP AS numbers. Each upstream router advertises an IPv4 prefix and the default route.

Node/ASN Router ID Advertised prefixes

Start the Lab

Assuming you already set up your lab infrastructure:

  • Change directory to basic/2-multihomed
  • Execute netlab up (device requirements, other options)
  • Log into your device (RTR) with netlab connect rtr and verify that the IP addresses are configured on all its interfaces.

Configuration Tasks

  • Start BGP routing process with AS number 65000
  • Configure EBGP sessions using the following parameters:
Node Neighbor Neighbor IPv4 Neighbor AS
rtr x1 65100
rtr x2 65101


If you’re using Cumulus Linux or FRR on RTR, you might have to enable the BGP daemon first. You’ll find more details in the Configuring Cumulus Linux and FRRouting lab.


If your device happens to be fully compliant with RFC 8212 (example: Cisco IOS XR), you’ll have to configure a permit everything incoming filter on all EBGP neighbors or your device won’t accept anything they send you.

You can also configure neighbor description and BGP neighbor status logging to get an information message when the BGP session is established.


You can use the netlab validate command if you’ve installed netlab release 1.7.0 or later and use Cumulus Linux, FRR, or Arista EOS on the external routers.

If that command fails or you’re using another network operating system on the external routers, it’s time to start a troubleshooting session.

Check the state of the BGP session with a command similar to show ip bgp summary. This is a printout taken from Arista EOS:

rtr#show ip bgp summary
BGP summary information for VRF default
Router identifier, local AS number 65000
Neighbor Status Codes: m - Under maintenance
  Neighbor V AS           MsgRcvd   MsgSent  InQ OutQ  Up/Down State   PfxRcd PfxAcc 4 65100              9         8    0    0 00:00:10 Estab   2      2 4 65101              7         6    0    0 00:00:06 Estab   2      2

Finally, use a command similar to show ip bgp to verify that your router received three prefixes from each EBGP neighbor: the IPv4 prefix configured on the remote loopback interface, another IPv4 prefix, and the default route. This is what the printout looks like on Arista EOS:

rtr#show ip bgp
BGP routing table information for VRF default
Router identifier, local AS number 65000
Route status codes: s - suppressed contributor, * - valid, > - active, E - ECMP head, e - ECMP
                    S - Stale, c - Contributing to ECMP, b - backup, L - labeled-unicast
                    % - Pending BGP convergence
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI Origin Validation codes: V - valid, I - invalid, U - unknown
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

          Network                Next Hop              Metric  AIGP       LocPref Weight  Path
 * >                  0       -          100     0       65100 i
 *                  0       -          100     0       65101 i
 * >              0       -          100     0       65100 i
 * >              0       -          100     0       65101 i


Reference Information

This lab uses a subset of the 4-router lab topology. The following information might help you if you plan to build custom lab infrastructure:

Device Requirements

  • Customer router: use any device supported by the netlab BGP configuration module.
  • External routers need support for default route origination. If you want to use an unsupported device as an external router, remove the bgp.originate attribute from the lab topology.
  • You can do automated lab validation when running Arista EOS, Cumulus Linux, or FRR on the external router. Automated lab validation requires netlab release 1.7.0 or higher.
  • Git repository contains external router initial device configurations for Cumulus Linux.

Lab Wiring

Origin Device Origin Port Destination Device Destination Port
rtr Ethernet1 x1 swp1
rtr Ethernet2 x2 swp1

Lab Addressing

Node/Interface IPv4 Address IPv6 Address Description
rtr Loopback
Ethernet1 rtr -> x1
Ethernet2 rtr -> x2
x1 Loopback
eth1 x1 -> rtr
x2 Loopback
eth1 x2 -> rtr