net - bgp

labs/net/net01

Overview

In this lab we are going to setup bgp between router ro1 and router ro2, so that host h1 can communicate with host h2.

Subnets

Connectivity Check (before bgp configuration)

Host 1 -> Host 2

First we show that the two hosts cannot reach each other as both routers are unaware of each others subnets.

We enter the  h1 node and check if we can reach h2. As excpected h2 is not reachable from h1 as we can see from the ouput below.

We also check that there is no route setup on h1 except the default route and that the default router is reachable.

Host 2 -> Host 1

We also show that traffic in the other direction isn't possible at the moment.

We enter h2 and check if we can reach h1. As excpected h1 is not reachable from h2.(see output below)

We also check that there is no route setup on the host except the default route and that the default router is reachable.

Router Configuration

Router 1

Activate the bgp daemon

To configure bgp we first need to activate the bgp daemon. We enter ro1 and edit the configuration /etc/frr/daemons. We set bgpd=yes and make sure the datacenter frr_profile is active. To activate the changes we need to reload the configuration.

/etc/frr/daemons:

Configure BGP

Now that the bgp daemon is active we can configure bgp. We login into the router shell vtysh and issue the commands shown below

Router 2

Activate the bgp daemon

We have to mirror the changes we did on ro1 on ro2.

Configure BGP

Configuration Check (after bgp configuration)

Router 1

We check if the bgp configuration is active and that the advertised routes are received.

We can see that a route was added by bgb below:

Router 2

We also check router ro2 if the bgb configuration is active.

We can see that a route was added by bgb below:

Host 1 -> Host 2

Now that we have bgp established between router ro1 and router ro2 the hosts can reach each other as we can see below:

Host 2 -> Host 1

We also check the opposite direction and can see that it works.