## Introduction

The purpose of this exercise is to:

- Learn to configure basic eBGP to exchange routing information with local peers.

## Pre-requisites

This exercise builds upon the configurations implemented in eBGP lab. You must be able to:

- see routes by BGP from both your upstream ISP and your upstream NREN

- Ping your neighbour routers in other ASs by their address space.

## Address Space Allocation

Refer to the IP Address Plan document for information about the IP address plan for the network infrastructure for these labs.

## Traffic Exchange (Peering)

Direct traffic exchanges are usually established at no charge between two autonomous systems that want to save costs. The savings are achieved by not having to carry that traffic over expensive transit links via commercial providers. Also, these direct exchanges have the added benefit of reducing latency because there are fewer hops.

Usually traffic exchanges occur at public exchange points, also known as IXPs. The simplest kind of exchange point is a Layer-2 switch. In this exercise, we will simply configure direct links between routers, which is basically the same thing as connecting through a switch.

## Peering with your neighbouring AS

This section sets up peering between adjacent groups in the classroom network.

Configure a point-to-point link to your neighbour AS as shown in the diagram. Consult the address plan used for the workshop to see which subnet addresses you should use.

For example, on B12:

    interface GigabitEthernet3/0
     description Link to B21
     ip address 100.68.1.25 255.255.255.252
     no ip directed-broadcast
     no ip redirects
     no ip proxy-arp
     ipv6 address 2001:db8:1:12::/127
     ipv6 nd prefix default no-advertise
     ipv6 nd ra suppress all
     no shutdown

Configure prefix lists for your inbound filters

On B12:

    ip prefix-list AS20-block permit 100.68.2.0/24
    !
    ipv6 prefix-list AS20-v6block permit 2001:db8:2::/48

The equivalent needs to be done on B21 (which connects directly to B12).

Prefix lists for outbound filters should still exist from a previous step. You can verify like this:

    B12#show ip prefix-list AS10-block
    B12#show ipv6 prefix-list AS10-v6block

Now create the BGP sessions and apply those inbound/outbound filters:

On B12:

    router bgp 10
     address-family ipv4
      neighbor 100.68.1.26 remote-as 20
      neighbor 100.68.1.26 description eBGP with AS20
      neighbor 100.68.1.26 password NSRC-BGP
      neighbor 100.68.1.26 prefix-list AS10-block out
      neighbor 100.68.1.26 prefix-list AS20-block in
      neighbor 100.68.1.26 activate
     !
     address-family ipv6
      neighbor 2001:db8:1:12::1 remote-as 20
      neighbor 2001:db8:1:12::1 description eBGP with AS20
      neighbor 2001:db8:1:12::1 password NSRC-BGP
      neighbor 2001:db8:1:12::1 prefix-list AS10-v6block out
      neighbor 2001:db8:1:12::1 prefix-list AS20-v6block in
      neighbor 2001:db8:1:12::1 activate
     !

The equivalent needs to be done for B21.

Verify that the sessions are up:

    B12# show ip bgp summary
    B12# show ipv6 bgp unicast summary

…and that you are learning the prefix directly from the neighbour:

    B12# show ip bgp neighbor 100.68.1.22 routes
    B12# show bgp ipv6 unicast neighbor 2001:db8:1:11::1 routes

Do some traceroutes towards your peer and make sure that the path is direct.

Try and ping your private peer’s routers from your routers. What do you see? If you ping your neighbour from your router connecting to them, you might find that you have to send the pings sourced from the Loopback 0 interface of your router. How do you do that? Use the CLI help to find out.

Remember to save your configurations.

You are done! You have configured BGP in a multihomed environment and BGP is selecting the paths based on default values.

## Direct Peering between the NREN and ISP

The direct BGP session between the NREN and the ISP will also need to be set up as shown in the above diagram.

First create the interface on the NREN router and on the ISP router using exactly the same best practice configurations we used at the start of the workshop.

For NREN1:

    interface GigabitEthernet2/0
     description P2P Link to ISP1
     ip address 100.101.2.1 255.255.255.252
     no ip redirects
     no ip proxy-arp
     ipv6 address 2001:11:0:20::/127
     ipv6 nd prefix default no-advertise
     ipv6 nd ra suppress all
     no shutdown
    !

Do the same for the ISP1, NREN2 and ISP2 routers. They will have a very similar configuration, just the addresses will be different - refer to the address plan.

And then set up the external BGP session between the NREN and ISP routers. Note that for now we will not configure any filters on the eBGP session - this will be done in the next exercise where we look at BGP policy.

Here is a sample configuration for the ISP1 router:

    router bgp 121
     address-family ipv4
      neighbor 100.101.2.1 remote-as 101
      neighbor 100.101.2.1 description eBGP with NREN1 (AS101)
      neighbor 100.101.2.1 password NSRC-BGP
      neighbor 100.101.2.1 activate
     !
     address-family ipv6
      neighbor 2001:11:0:20:: remote-as 101
      neighbor 2001:11:0:20:: description eBGP with NREN1 (AS101)
      neighbor 2001:11:0:20:: password NSRC-BGP
      neighbor 2001:11:0:20:: activate
     !

The configuration for NREN1, NREN2 and ISP2 routers will be very similar - again refer to the address plan for the correct IP addresses to use.

## Appendix - Complete Lab Diagram & Address Plan