The BGP protocol is the internet protocol!
How the Internet works
Internet – Connecting multiple networks to each other on a global scale.
We assume that everyone is in IPv4. For part IPv6, we'll see later.
If you ask your friends to draw you a drawing of the Internet, they will draw you a Cloud.
As a future CCNA, you must have in mind:
– Internet is a cloud made up of several small cloud
– works entirely with the BGP protocol
– that each small Cloud represents an Internet Service Provider (ISP)
– each ISP has public IP address ranges as well as AS numbers
Each S a is made up of a multitude of routers and uses IGP (RIP, OSPF or EIGRP) protocols.
By whom and how are IP addresses and AS numbers distributed globally?
The distribution of IP addresses on a global scale is the responsibility of the Internet Assigned Numbers Authority (IANA).
THE IANA will delegate the work to:
– NCC RIPE
!! That's an example!!
THE IANA will decide the ranges of IP addresses by continent:
– AFRINIC – IP addresses from 0.X.X.X to 50.X.X.X.
– APNIC – IP addresses from 51.X.X.X to 100.X.X.X.
– ARIN – IP addresses from 100.X.X.X to 150.X.X.X.
– LACNIC – IP addresses from 150.X.X.X to 200.X.X.X.
– RIPE NCC – IP addresses from 200.X.X.X to 255.X.X.X.
The NCC RIPE will decide on IP address ranges for ISPs on its continent:
For France – 211.X.X.X
– Orange – IP addresses from 211.0.X.X to 211.63.X.X
– SFR – IP addresses from 211.64.X.X to 211.127.X.X
– Bouyges – IP addresses from 211.128.X.X to 211.191.X.X
– Free – IP addresses from 211.192.X.X to 211.255.X.X
!! That's an example!!
AS – Autonomus System:
– defined by RFC 1771
– on 16 bits or 65,535 possibilities
– managed by IANA and its delegations
|1 to 64,495||managed by IANA for public use|
|64,496 to 64,511||Booked for documentation|
|64,512 to 65,534||Private use|
The BGP protocol
BGP – Border Gateway Protocol
The BGP protocol is the only EGP protocol used today. It has exactly the same role as our IGP protocols are:
– learn from the roads of its neighbors
– choose the best route to take
– change the route in case of malfunction
As we have seen in the "Dynamic Routing" article, EGP routing protocols are designed to exchange routes with other companies (unlike IGP).
Each BGP network belonging to the same company forms an autonomous system.
Each stand-alone system is identified by an AS (AS) number. From there, the BGP protocol will work differently depending on this ASN number:
– iBGP (internal BGP) – Routing within the same ASN
– eBGP (external BGP) – Routing between ASN
When to use the BGP protocol?
Do WITHOUT the BGP protocol
– the BGP protocol is not under control
– your business is connected to a single AS (one Internet service provider).
– not enough bandwidth (the BGP protocol is very greedy in terms of update).
– when you don't need the whole world to know that your main or emergency link has fallen
Do WITH the BGP protocol
– you need high availability via multiple Internet service providers
– you are an internet service provider
– you must be contacted at all times (example: Google, American Express, Facebook)
– you have to announce to the whole world when you lost a link
There are four types of BGP architecture:
1) Single Homed
2) Dual Homed
3) Single MultiHomed
4) Dual MultiHomed
FingerInTheNet has applied for an IP address and an AS number (we agree, only one link to another AS does not justify the use of the BGP).
She now wants to connect her site router to the AS 500 from the Internet service provider "Orange".
As a network administrator, you need to set up this link:
Setting up our FingerInTheNet site router:
Ro-Finger (config) - router bgp 400 Ro-Finger (config-router) - neighbor 10.10.10.2 remote-as 500 Ro-Finger (config-router) network 192.168.10.0 mask 255.255.255.0
Router bgp 400:
Activates the BGP protocol for the AS 400 number.
Neighbor 10.10.10.2 remote-as 500:
In IGP protocols, we used to put the "Network" command in order to search for neighbors. For the BGP protocol, we are obliged to enter our neighbors and their AS numbers manually.
Network 192.168.10.0 mask 255.255.255.0:
– lets inform a network present in the routing table
– does not allow to look for a neighbor on this link as will OSPF or EIGRP
– this network must be in the routing table
– takes into account masks and not wildcard mask
Ro-Finger show ip bgp summary Ro-Finger show ip bgp
Choosing the best route
As with RIP, the BGP protocol will choose its best route based on the number of equipment that separates it from its destination. Except that there, it only takes into account the number of ASNs crossed.
On the example of the top, we put ourselves in the ASN 20. In order to reach the 192.168.0/24 network we have two possibilities:
-Either by asN 10, which takes us through 3 ASNs
-Either by the ASN 100, which takes us through 2 ASN
The AS-Path (AS Path) shows us the way to reach this network.
BGP will designate the shortest route as the best route.