S1E15 - The Border Gateway Protocol - Lab

title: S1E15 - The Border Gateway Protocol - Lab
author: Nicholas Morrison
draft: false
tags: [network, workshop, routing]
categories: [workshop]
noindex: true

Connecting

Connect to the lab server:

local$ ssh-keygen -R netlab.nanocat.net
local$ ssh [email protected]
Password: (see discord)

Connect to your router:

lab@netlab$ list-devices
lab@netlab$ connect DEVICE

Topology

Prefix and AS number allocations: https://docs.google.com/spreadsheets/d/1vxVgJI_LhY3NDGJ3icE-4zphmBxUurEvVFgdjafFBzc/edit?usp=sharing

Topology: BGP-01
Topology: BGP-01

Goal

Enable IP routing

Enable IP routing on your router.

Configure your IP addresses

!
interface ethernetX
   no switchport
   ip address x.x.x.x/x
!

Make sure you can ping your upstream router.

Configure BGP on your router

Establish a BGP session with your upstream. Refer to the diagram for the correct remote-as. You have the lower IP in the /31, your upstream has the higher IP.

!
router bgp XXXXX                        <- your AS number
   neighbor x.x.x.x remote-as xxxxx     <- your upstream's AS number
   neighbor x.x.x.x description The ISP
   network x.x.x.x/24                   <- your /24 IP allocation (not /26)
!
r1.xxx#show ip bgp summary
r1.xxx#show ip route bgp
r1.xxx#show ip bgp neighbor x.x.x.x advertised-routes
r1.xxx#show ip bgp neighbor x.x.x.x received-routes

Do you see the routes?

Add null0 routes

!
ip route x.x.x.x/24 null0
!
r1.xxx#show ip bgp neighbor x.x.x.x advertised-routes
r1.xxx#show ip bgp neighbor x.x.x.x advertised-routes
r1.xxx#show ip bgp neighbor x.x.x.x received-routes

Configure your PC

$ ip address add x.x.x.x/26 dev eth1    <- add an IP to eth1
$ ip route delete default               <- delete the gateway
$ ip route add default via x.x.x.1      <- add the correct gateway
$ ip route                              <- check your routing table
$ ping x.x.x.1                          <- make sure you can ping

Traceroute to other AS’s

Observations

Fin! Questions?