8. Dynamic Routing-BGP

 

8. Dynamic Routing-BGP



14.12.2018
Topic Progress:

Dynamic Routing – BGP – Video: Register for Course


Dynamic Routing – BGP – Transcript:

What will you learn

BGP Internet Architecture

BGP – formally Border Gatawey Protocol was designed to solve the big scale Internet routing problem than none of known distance vector nor link statee protocols were not able to deal with. AS seen on chart in march 2018 the overal IPV4 prefix numer in glboal Internet routing table exteended the 711 000. Such numer of possbile paths, reconvergence on global scale demads something that is stable and can handle large amount of prefixes. The Border Gatawey Protocol was the right answer for this.

Autonomou System

BGP is called border Gateway in the familiy of exterior gatway protocols. This means that Border Gatawey Protocol connect the routing domains called autonomous systems. Public Internet is devided into autonomous systems in terms of addressing. Autonomous systems are groups of administrative authorities that are assigned with given IP address pools. Those pools belong to particular Autonomous System. Thanks to this concept Internet registrars bodies are able to coordinate the ip pools belongin and companies that requests the pools and also companies that owns the AS numbers. Ases are conected with each other and the protocol that helps to connect the AS-es is exactly Border Gatawey Protocol

BGP Patch Vector Protocol

The Border Gatawey Protocol is called a path vector protocol meaning that the one of the attributes that is responsible for proper path calculation is the AS path vector. Is more less similar to distance vector behavior but much more sophisticated. Each BGP routing update with IP prefix inside which traverses the Ases keeps track of each AS numbers. This is the mechanism that allows to decide what path to route packet to prefix (shorter wins) and the second purpose of this is to ensure the loop detection. The Border Gatawey Protocol update which has the my as in the as path means that it traversed my as before so i can drop it to avoid routing loop. Look at the picutre AS 2 is advertising the A network , the upadate flows via router of AS1 so that router in that as ads the as 1 number to the as path. Routing in As 4 receving this update sees the wole as path inside the update.

ASN IP

The fact that Public Internet addressing is devided into autonomous systems is the source of some regulations that are always needes to provide some order in addressin assignment. Those bodies are calles registries and we have tchem 5 : APNIC responsible for ASN and public IP assignment for Asia and Pacyfic region, RIPE NCC responsible for Europe regions, AFRINIC responsible for Africa regions, ARIN for north america and LACNIC for south andd central America.

ASN IP

Here we have some example of the ripe ncc list of ipv4 prefixes , network length and AS numbers for some entities in Europe. This is publicly accessible list available at ripe ftp resource that everyone can check anytime.

BGP Real Life Applications

Now lets talk about Border Gatawey Protocol in real life application and scenarios  where you can meet the bgp protocol. The first one is internet Edge scenario in enterprsie environments. In such scenario the enterprise has redundancy based on two different ISP links. In such case BGP ensures the flaback mechanism in case of primary link fails. Thanks to Border Gatawey Protocol on internet Edge a company can use its own public addresses regardles the ISP what is curcial when having some Internet services hossted at internet Edge under public adressing. Another advantage of this solution is the flexibility of the ISP change. In case of ISP is not satfisying enterprise requirements related to speeds, SLA it is easier to change the ISP having Border Gatawey Protocol own AS and public Provider Independent pool.

BGP Real Life Application

Another Border Gatawey Protocol implementation is enterprsie WAN example. In this scenario service provider of for examlple L3 VPN service allows for BGP usage between SP CE MPLS router or WAN Router SP and our enterprise wan router. In such case it is often eBGP configuration between enterprise wan and sp wan routers. Enterprise sites redistribute the prefixes to WAN service provider network and WAN router of SP on the other sites delivers prefixes to our enterprise wan router.

Real Life Applications

Another sceneario is typical service provider environemnt in glboal internet where giant telecoms and providers connect to each other making connections between their public as-es. There is BGP in between AS-es. Those AS-es are public. Then those providers have their customers very often connected with Border Gatawey Protocolas well.

Real Life Applications

One more scenario often used in SP networks for business customers is BGP based on which SP build multitenant netwrok infrastrucutre. Physically there are MPLS routers that serve as privder routers and provider Edge routers. Provider Edge routers have many virtual routing tables so called VRF to differentiate traffic between customers inside SP cloud there are P routers that transparently switch the labeled packets that belongs to dfiferent customers. To make the multi tenatnt environemnt work and deliver prefixes in particular VRFs the Multi Protocol Border Gatawey Protocol or MP BGP is used. Such BGP is protocol that is extended handling router targets and route distinguishers that differentates the customers VRFs. In such way service providers simplify the infrastrucutre building virtualisation layer on physical devices.

BGP Session

BGP uses TCP Layer 4 protocol as a transport and makes use of reliability ensured by Transmission Control Protocol. BGP uses TCP 179 port by default. That is why we often say BGP session because of tcp session. Before BGP establishes neighborhood with other bgp router it is in idle state waiting for the other site. If properly configured starts to sent Border Gatawey Protocol Open messages after regular 3 way handshake. After other side confirms the Open message with Open Confirm they exchange first keepalive and BGP session become established. Established state is the right one in playing with BGP what is worth to remember. Within established bgp session router speaking bgp exchange the routing updates containing prefixes along with their attributes.

BGP timers

BGP Timers play important role in BGP convergence. You can see that they are quite large. For hello the time interval is by default 60 seconds. If routers misses 3 hellos from the bgp neighbor it consideres it down. Those three hellos make 180 seconds which is Hold time. The value of timers is not an accident. This is for the reason that BGP is stable protocol and designed for large scale. 180 seconds causes the stability and if somewhere in Internet there is a flapping link the bgp routers wait 180 seconds before treat it as unavailable. If the timer was set to few seconds that could cause unsteady state on large scale. Of course BGP uses few other mechanisms that improve security and make BGP stable but this will be scope of BGP advanced sessions.

BGP Connection Oriented

The fact that BGP uses TCP as transport protocol leads to situation that BGP can be established between two routers that are not directly connected in terms of layer 3. Two BGP speaking routers can be conected being few l3 hops away from each other because their both use TCP IP sockets to make connection. In other words They are not listen or speak multicast on interface but point directly to remote socket. There is one thing related to this setup : both routers to form bgp session needs to have underlaying connectivity like static or other dynamic routing ensured. They simply need to know how to get to bgp neighbor. If BGP  routers are not directly connected the BGP session between tchem is called multi hop bgp.

Internal BGP

We can consider iBGP which is internal BGP and eBGP external BGP. The first one is when two bgp routers have the same ASN. Ebgp session is when both routers have different ASNs. This has impact on routes learned from Border Gatawey Protocol Routes learned from iBGP neighbors receive the AD value of 200 by default and routes learned from ebgp neighbors recevive ad 20 by default. So eBGP has higher priority than iBGP.


Log in to gain an access to videos, full transcripts and certification!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code


 

Newsletter