You are on page 1of 4

Computer Communication and Networks

Lab 12

Engr. Ruqia Bibi


Border Gateway Protocol
BGP (Border Gateway Protocol) is protocol that manages how packets are routed across the
internet through the exchange of routing and reachability information between edge routers. BGP
directs packets between autonomous systems (AS) -- networks managed by a single enterprise or
service provider. Traffic that is routed within a single network AS is referred to as internal BGP,
or iBGP. More often, BGP is used to connect one AS to other autonomous systems, and it is then
referred to as an external BGP, or eBGP.
To identify each autonomous system, a 'globally unique' number is assigned to them from a
centralized authority (IANA) so that there are no duplicate numbers. Within the entire Internet all
around the globe, the AS number should be unique. The AS number will be from 1 to 65,535.
These numbers are referred to as 'AS numbers'. The Internet Assigned Numbers Authority (IANA)
is the authority responsible for tracking and assigning these numbers as well as managing IP
address allocations and assignments.

BGP routing basics:


BGP sends updated router table information only when something changes -- and even then, it
sends only the affected information. BGP has no automatic discovery mechanism, which means
connections between peers have to be set up manually, with peer addresses programmed in at both
ends. BGP makes best-path decisions based on current reachability, hop counts and other path
characteristics. In situations where multiple paths are available -- as within a major hosting facility
-- BGP can be used to communicate an organization's own preferences in terms of what path traffic
should follow in and out of its networks. BGP even has a mechanism for defining arbitrary tags,
called communities, which can be used to control route advertisement behavior by agreement
among peers.

Ratified in 2006, BGP-4, the current version of BGP, supports both IPv6 and classless inter
domain routing (CIDR), which enables the continued viability of IPv4. Use of the CIDR is a way
to have more addresses within the network than with the current IP address assignment scheme.

Task 1: Build the network.


Step 1: Cable a network that is like the one in the Topology Diagram.
Step 2: Clear any existing configurations on the routers.
Task 2: Configure and Activate Ethernet and Serial interfaces on Routers.
Step 1: Configure interfaces on R1, R2, and R3. Configure the Ethernet and Serial interfaces on
the R1, R2, and R3 routers with the IP addresses as shown in Topology Diagram.
Step 2: Verify IP addressing and interfaces. Use the show ip interface brief command to verify
that the IP addressing is correct and that the interfaces are active.
Task 3: Configure BGP on the Routers:
R1(config)#router bgp 200
R1(config-router)#neighbor 10.10.10.2 remote-as 100
R1(config-router)#neighbor 20.20.20.2 remote-as 200
R1(config-router)#network 192.168.1.0
R1(config-router)#network 10.10.10.0 mask 255.255.255.252
R1(config-router)#network 20.20.20.0 mask 255.255.255.252

Router2:

R2(config)#router bgp 100


R2(config-router)#neighbor 10.10.10.1 remote-as 200
R2(config-router)#neighbor 30.30.30.2 remote-as 200
R2(config-router)#network 192.168.2.0
R2(config-router)#network 10.10.10.0 mask 255.255.255.252
R2(config-router)#network 30.30.30.0 mask 255.255.255.252

Router3:

R3(config)#router bgp 200


R3(config-router)#neighbor 20.20.20.1 remote-as 200
R3(config-router)#neighbor 30.30.30.1 remote-as 100
R3(config-router)#network 192.168.3.0
R3(config-router)#network 20.20.20.0 mask 255.255.255.252
R3(config-router)#network 30.30.30.0 mask 255.255.255.252

Task 4: use show ip route bgp command and illustrate the output.
Task 5: use show ip bgp command and mention the output below.
At the very top of bgp table, we can see the version and the local router ID (the one of this router).
Then, we have a quick explanation and all the entries. For each, we have several fields.

• At the beginning, we have the status code, represented by symbols. We want to see a star
(*) for each entry, because it indicates that the entry is valid. If we also see a greater than
(>) symbol, it means that this is the best route. In other words, this is the best path to reach
this destination BGP is providing. As a result, the router try to inject all routes with that
symbol into global routing table.
• The network indicates the destination network.
• The Next Hop indicates the next-hop for the route: if you see zero, it means that the route
didn’t come from BGP.
• Then we have Metric, Local Preference and Weight: some BGP-specific attributes.
• The last column is the Path: the list of AS to traverse in order to get to the destination.

Task 6: Verify Neighbors using show ip bgp summary command and mention the output
below.
The first thing we can see from this command is an extensive overview of the BGP configuration.
However, we don’t need that. It contains a lot of advanced information that we don’t even need to
check at basic level. Instead, we want to check the neighbor table at the end. You can see that we
have a list of neighbors in a table. For each, we can see:

• In the neighbor field, its IP address


• The “V” field indicates the BGP version we are running with that peer
• Then we have the AS the peer belongs to
• Message Received and Message Sent are here for statistical purposes, the same as In Queue
and Out Queue
• Table Version indicates the BGP Table Version the peer is holding
• In the Up/Down field, we can see how long ago the peer changed state (going from down
to up, or vice versa)
• The State/Prefix Received indicates the current state of the peer. If it is up and running,
you are going to see a number here: the number of networks received. So, we always want
to see a number here.

You might also like