Skip to content

15 BGP between two networks ​

Two autonomous systems exchange their networks over eBGP, like two companies or an ISP and a customer.

What you practice ​

  • eBGP sessions and network statements in FRR
  • no bgp ebgp-requires-policy, and what a route-map would replace it with
  • Withdrawing a route and watching it disappear on the peer

Topology ​

NodeImageCPUs / memoryAddressesRole
h1debian-131 / 1GiBmgmt 10.115.0.11; lan 192.168.11.10/24Host in AS 65001
r1debian-131 / 1GiBmgmt 10.115.0.12; lan 192.168.11.1/24; peer 172.16.15.1/30AS 65001 border
r2debian-131 / 1GiBmgmt 10.115.0.13; peer 172.16.15.2/30; lan 192.168.12.1/24AS 65002 border
h2debian-131 / 1GiBmgmt 10.115.0.14; lan 192.168.12.10/24Host in AS 65002

Before you start ​

bash
vz image pull disk debian-13

Run it ​

bash
cd examples/15-bgp-two-as
vz validate
vz up
vz node ls
ssh lab@10.115.0.11        # password: lab

First boot installs packages; give it a minute or two after vz up returns.

Try it ​

bash
ssh lab@10.115.0.12 "sudo vtysh -c 'show bgp summary' -c 'show ip bgp'"
ssh lab@10.115.0.11 'ping -c 2 192.168.12.10'
ssh lab@10.115.0.13 "sudo vtysh -c 'conf t' -c 'router bgp 65002' -c 'address-family ipv4 unicast' -c 'no network 192.168.12.0/24'"
ssh lab@10.115.0.12 "sudo vtysh -c 'show ip bgp'"      # the route is gone

Notes ​

Every node also has a mgmt NIC on a NAT switch: out-of-band access from the Mac and package downloads. The exercise traffic stays on the links.

Clean up ​

bash
vz down
vz destroy --yes   # deletes the overlays and state of this lab