Border Gateway Protocol
Hello, so we will continue our discussion on the course on Computer Networks andInternet. As we are last few lectures we are discussing on IP Routing, so, today we willcontinue that discussion. Today we will discuss on on BGP protocol border gatewayprotocol. If you recollect that in the previous lectures or previous talks, we discussed ontwo category of things right: one is interior routing protocols and another is exteriorrouting protocols. So, the routing protocols, which are within the autonomous systems,and the routing protocols, that is across autonomous systems right. So, BGP or the bordergateway protocol is this exterior this routing protocol, which helps in routing packetsacross autonomous systems right.So, just a quick slide that is a autonomous system. So, how we define? It is a logicalportion of a large IP network or the whole internet. And autonomous system normallyconsist of an internetwork within an organization control. That means, it is under oneadministrative control and it is administered by a single management authority like IITKharagpur, can be a autonomous systems which is managed by the IIT Kharagpurauthority or the cell which is handling those thing.(Refer Slide Time: 01:55)And an autonomous system can collect connect to other autonomous systems managedby the same organization or other organization public or private. In other sense ourwhole network is divided into several autonomous systems, which consist of severalnetworks and there are routers or which takes care of the whole information of theautonomous system that, we have seen that there are there is a backbone area router orthis backbone router which takes care of those type of things.So, our basic objective is to how if a packet from a autonomous system here wants tocommunicate to a autonomous system in some other place, so how it will be routed. So,one is that there should be some internal routing protocol, which will take care of thiswithin the autonomous system and there are some, there are, there should be a protocolwhich goes across these things. If you recollect, so we talked about a path vectorprotocol which established a path between these different autonomous systems right. So,it is a sequential set of autonomous systems like I say that the packet 1 should travel byautonomous system 6, 8, 9, 10 or 6, 8, 9, 12 and so and so forth to reach the destinationautonomous system.(Refer Slide Time: 03:24)So, what we try to, what we are talking about is, routing protocol is one category isinterior gateway protocols IGPs, that is interior gateway protocol allows router toexchange information within a autonomous system. Examples of these protocols areOSPF and RIP predominantly used protocol is OSPF. Exterior gateway protocol EGPsthat is which are which follow a path vector protocol and it allows exchange ofinformation across autonomous system.So, one of the popular or the protocol for this EGP or exterior gateway protocols isborder gateway protocol or BGP. So, today we will be as we are discussing is the basicfeature of BGP protocol.(Refer Slide Time: 04:26)So, BGP as we are discussing is a exterior gateway protocol right. It was originallydeveloped to provide loop-free method of exchanging information between autonomoussystems, so there should not be any loop right. BGP has since evolved to supportaggregation and summarization of the routing informations right. So, if you see that if welook at the whole internet or network of networks, so there are in order to push this orany forwarding any information from one system or one network to another, it has to hopthrough several networks and autonomous systems right.So, there should be some way of forwarding across autonomous systems where we try tolook at this BGP. So, BGP presently the popular version is BGP 4 is an IETF standardprotocol; that means, all BGP enabled devices also called BGP routers or BGP devicesfollow a standard which allows it to route packets right.(Refer Slide Time: 05:35)So, if we look at the BGP components, so we see if this is the autonomous system AS1,AS2, so, there are several thing one special device or things or router is called BGPspeaker we will come to that. There can be several networks inside the things. Inside theautonomous system there are protocols called OSPF and RIP which can be within theautonomous system, as each autonomous system under single administrative control so,the administrator is free to choose which protocol to use right. And if you again recollectwhat we talked about the autonomous system is again divided into different area, out ofthat one area is or area 0 is the or the backbone area right. And there are other areas, sothat this backbone area or this backbone area router collects this information about thesewhole autonomous systems.So, it is those designated routers, which takes care of the whole information base of theautonomous systems and it does not mean that that all this all traffic of the area shouldgo through the area border router or all traffic should go through that router, but, but itwhat it means that it collects or it has the information about the whole autonomoussystems.Now, the within across the autonomous system we have the protocol called EBGP orbetween the within the autonomous systems we have this protocol called IBGP. We willcome to those things right.(Refer Slide Time: 07:32)So, let us look at some of the components. So, one thing what we have seen is the BGPspeaker. So, it is a router configured to support BGP. So, a device or a router which isconfigured to support BGP is a what we say BGP speaker. There are BGP neighbors orpairs, that a pair a pair of BGP speakers that exchange routing informations are calledpairs right.So, there are there can be two type of neighbors, the neighbors within the autonomoussystem and neighbor across the autonomous systems. There accordingly we have internalneighbor or IBGP a pair of BGP speakers within the autonomous systems and we haveexternal neighbor or EBGP or a pair of BGP neighbors each in a different autonomoussystems right. So, if we again come back to this figure, so there is IBGP, this is theinternal and these are the two BGP speaker or two routers which there can be n numberof routers within this particular autonomous systems. So, these are IBGP and there theseare EBGP right.So, a pair of neighbors each in a different days these neighbors typically share directlytypically share a directly connected network right. So, that is they are directly connectednetwork scenario. There is a concept of BGP session, a TCP session connecting 2 BGPneighbors right. The season is used to exchange routing information and neighborsmonitor the state of session by sending keep alive messages. So, periodically send thatkeep alive messages, so that monitor the state of the other sessions like. So, it is somesort of a pinging and after every or beaconing at every at a regular interval.There is a AS number for any autonomous systems, which is a 16 bit number uniquelydefined a particular autonomous system. So, it is a so you can see that with the 16 we canhave so, many number of AS, right. So, it is say two to the power 16 number of AS arepossible that is a quite a large number considering that the AS are having several router,several network source inside the things. This is a terminology or there is a concept ofAS path list of number or numbers, AS number describing the route through the networka BGP neighbor communicates the path to its peers right.So that means, if I want to go from network say n 1 1 of AS 1 to network 6 2 of a n 6 2 ofsay a 6 then, what are the path I need to follow right. So, I start with AS 1 to AS 3 to AS4 to AS 6 or some other paths type of things. So, it is a set of or sequential set of ASnumbers, which allow this routing within the network.(Refer Slide Time: 10:50)Now, if we look at it, there are if we look at the BGP traffic there are typically two typeof traffic, one is local traffic, the traffic local to AS, either originates or terminates withinthe AS right. So, it originates or terminates within the AS right, so it originates orterminates within. Either the source or the destination resides in the AS. So, if the sourceor destination is residing in the AS, then the traffic for that particular BGP session we saythat is a local traffic. Whereas, in a transit any transit that is not local traffic is transittraffic. That means one goal of the BGP is to minimize the amount of transit traffic thatmeans it is neither originating nor terminating the AS, but it is passing through this ASright.So, in other sense, it is a traffic which is a load on that AS, so to say right. So, it is one ofthe objective may minimize this type of transit traffic. So, there are a lot of transit trafficmeans you overload the things right.And if we look at the AS types, so BGP defines primarily 3 type of autonomous systemsright. One is stub. A stub AS is a single connection to another AS right. A stub AS cancarrying only local traffic because, it is a one connection to the AS, but there is no otherAS across that. That means, it is a stub connection so, that is only have local traffic thereis no transit traffic per say. There is a multi homed AS. There is a multi homed AS hasconnections to 2 or more AS, ASes rather autonomous systems. However, a multi homeAS has been configured. So, that it does not forward traffic. So, a multi home AS can beconfigured that, it does not transmit say what we say transit traffic, it may drop or blockand type of things.There is a transit AS. A transit AS has connection of 2 or more autonomous systems likemulti homed AS but carries both local and transit traffic. The AS that impose policyrestriction on the types of transit traffic that will be forwarded right. So, autonomoussystems can be either multi homed AS or transit AS. So, primarily the autonomoussystems are multi homed or transit stub is a special case of those scenarios.So, what we see that primarily two types of things are there, there is one is multi homedand transit though there are more than one connection but in case of a multi homed youmay not allow transit traffic. And there is a stub type of things, where the where there isno there is only local traffic either it originates or terminates.And as we understand there can be policy as these are all path vector, so I can havepolicy defined that which can be transit to the things and like that right. So, there can berestriction on which sort of AS it should first type of thing that you allow it to transit thetraffic.(Refer Slide Time: 14:20)There are few more concepts one is that routing policy that is important the set of rulesconstraining the flow of data packets through the network right. That is what we look atthe routing policy. So, lighting policy are not defined per say in BGP protocol rather,they are used to configure a BGP device right.In other sense the while I am configuring the BGP device, I embed that policy into thatthe thing. For example, a BGP device can be configured, so that a multi home AS canrefuse to act as a transit right. So, that is a policy, that I will not allow. This isaccomplished by advertising only those networks, which are either trans terminating ororiginating that AS right So, it is confined within that particular AS.So, a multihome AS can perform transit AS routing for restricted set of agentautonomous systems. It does this by advertising or by tailoring the routing advertisementto send to the EBGP vapors. In other sense what it tries to say that, while advertising thatrouting information to the other EBGP routers, so what it does? It does a tailoring of thethings. That means, it modifies the things in a such a way that, which is within its policyparadigm.Or an AS can optimize traffic to use specific AS path for certain category of traffic. LikeI say I get a traffic of streaming video or a particular type of traffic then, it says that itshould be channelized to a through a particular path. So, it can be configured orchannelized through a particular path. So, that that can be one such on such policy typeof things.There is a concept of network layer reachability information. Network layer reachabilityinformation also known as NLRI, so NLRI is used by BGP to advertise routes right. So,it says that what is the network layer information; so it is consist of a set of networkrepresented by a tuple that is length and prefix like it says that tuple 14 202 like oneexample represent that the CIDR route as this so and so forth right. So, it is networklayer reachability information; that means that which ports and or which domain of thenetwork you can access right. So, in this case that slash 14 is the thing.Routes and paths with respect to BGP: a route associates a destination with a collectionof attributes describing the path to the destination. A destination specified by NLRIformat. The path is reported as a collection of path attributes this information advertisedby the update things. So, now how a route do I define, it is a defined by a set of AS. Howthis AS is defined is by a set of path parameters right, and the destination of the thingswhere it will go because, when it when it goes through this BGP router it need to knowthat where the destination is that is in that NLRI format. And it goes on these this itbasically takes this path attributes along with the things right. So, through which the a forthrough which the which AS it will hops. And when that this advertisement is for thisadvertisement, this update message format or the updates message protocol is used in theBGP; we will come to that that what is update. Actually we discussed little bit of whatare the different type of BGP formats and that update is there any way we will discussagain.
Border Gateway Protocol-Part 2
Now, so we have EBGP external BGP to communicate with the acrosses IBGP tocommunicate within the AS. So, we have BGP, EBGP, IBGP communication. Finally, tomake this happen, so if you see it is not only external right, it once it enters it go onhopping with the networks and go through some other router to the type of things right.And this paths is also there are BGP with the for the external and there are OSPF or whatdo I say that, internal protocols are IGP protocols are running that OSPF, RIP protocolsare running. So, there should be a proper coordination between them right. Otherwise,the packet forwarding will be not will not be possible right.(Refer Slide Time: 19:19)So, BGP does not replace IGP operating within AS. So, it is not like that it replace OSPFor RIP type of protocol right. Instead what we are saying coordinates or cooperates withthe IGP to establish communication between autonomous systems right. So, BGP withinAS is used to advertise the local IGP routes right. Within the AS it has to advertise thelocal IGP routes because, within the AS that is the predominant right. These routes areadvertised to BGP peers in other AS right. So, this has to be known to the BGP peers inthe other AS.So, what we look at the communication. So, roll of BGP and IGP: so, both BGP and IGPthat is border gateway protocol in that the internet gateway protocol. That is, OSPF andRIP are used to carry out information carry information through an AS right, sootherwise how the packet will be forwarded. Establishing TCP sessions between the twopairs, before establishing BGP session the device verifies that BGP devices, the routinginformation is available in each peer. So, it should be available in each peer BGP, EBGPpeers that these EBGP peers statically a typically share a directly connected network.So, these in case of a EBGP peers as we discussed couple of slides back it typically sharea directly connected network. The routing information need to be exchanged by the BGPpackets between these peers is trivial right, it is directly connected thing. If for IGP IBGPpeers can be located anywhere within the AS. So, they do not need to be directlyconnected. BGP relies on the IG IGP that is, the internal gateway protocols to locate apeer. Packet forwarded between the IBGP peers uses a IBGP learned routes. So thatmeans, the what I what we mean to say that, OSPF or RIP protocols whatever, it islearned that those are with those information are being used by this BGP.So, full mesh BGP sessions within the AS like IBGP speakers assume that, a full meshBGP session has been established between the peers in the same AS right. So, it is a fullmeshed BGP sessions. So, everybody knows or everybody connected to others. So, it is afully mesh connection. When a BGP speakers receives a router update, from a IBGPpeer, the receiving speaker uses the EBGP to propagate to update the external peers right.Because, the receiving speaker assume full mesh IBGP sessions have been established, itdoes not propagate the update to the other BGP peers.So, as this is a full mesh, so the full mesh IBGP sessions have been establish it does notpropagate to the update to the other because, it knows that it the update has been takencare by this full this particular way of connectivity.So, the same thing what we were discussing; so if we have so there are there are severalBGP routers. So, there is a IBGP protocols which are connected across the thing. Andthis when this protocol BGP this BGP device R6 connected to the a BGP R1 throughthese IBGP updated to BGP R3 and goes like that and so and so forth right. So, that is theway of connectivity.Now, as we mentioned earlier, so what are the different BGP packet types right. So, oneis open, other is update, notification, keep alive. So, these are the typical four types ofpackets with the BGPs. The open is that this message type establish a BGP sessionbetween two peer nodes right. So, this is this is so establishing a BGP session betweentwo peer nodes that is the open. Update this message type transfer, routing informationbetween the BGP peers, so, there is a typo it should be BGP peers. So, this is thismessage information that is update is basically, routing information from between theBGP peers.Notification this is when a error occurs in is detected. So, if there is any abnormalsituation, so it requires a notification of the thing. Keep alive, this determines if the peersare reachable or not. So, it is some sort of a beckoning type of things which goes onthings. So, one is the open opening the season between the two BGP peers another is theupdate, updating routing information across the BGP peers right. Another is what we sothere is again a typo it should be notification in this here it should be notification. So,then another message is notification, this message is sent when a error occurs, your erroris detected. And then, other is a keep alive that is the beckoning say that the peers arereachable or not to determine whether the peers are reachable or not, we have thosethings.(Refer Slide Time: 24:54)Now, if we look at the different functionalities, one is opening and confirming BGPconnection is the functionality. Primarily after a TCP session has been establishedbetween the two BGP peers, each router sends a open message to the neighbor to itsneighbor. That is the opening and confirming BGP connection as we mentioned earlierthat is establishing the connection. Another is maintaining BGP connection so on it isopen and thing is then next is maintaining the BGP connection. That BGP does not useany transport layer keep alive to determine if the peers are reachable or not. Instead BGPmessage are periodically exchanged between the peers right.If no messages are received from the peer for duration specified by the whole time, thewhole time, the originating router assumed that an error has occurred right. When thishappens the error notification is sends to the things. So, it is go on beaconing betweenthe peers whenever, whenever it is not receiving within a particular time period, so itgoes on a it thinks that there is the BGP that the peer BGP device is not responding andaccordingly a error notification or error or a condition is generated and the information issent to the things.Sending reachability information, reachability information is exchanged by the updatemessage right. As we seen that reachability informations is primarily finding that morethat is the routing information. If there is a information change in the information orupdating the reachability information it is exchanged between the peers in the updatemessage.So, update message is used to advertise feasible routers to or withdraw infeasible routers.So, both advertising the possible feasible routers, and withdrawing infeasible routers. So,notification of error conditions, a BGP device can observe error can observe errorcondition impacting the connection to a peer. So that means it is it may not be respondingor some other error situation arises. So, notification message has sent to the neighbor orsent to the neighbor, when the conditions are detected. After the message is sent, the BGPtransport connection is closed. This means, all the resources for the BGP connection aredeallocated right. So that means, once the notification sends, the particular connection tothat particular BGP peer of the device is closed and the resource says, provisioned orallocated for that things are released right.So, the routing table entries associated with the remote peer are mark invalid finally,other peers are notified. So, you see so once we see that the connection with one BGProuter or the peer device is there, this is notified and the connection is closed, allresources are released. And now it has a new update right. So, it has to find a new pathand it is being advertised to the other or marked as invalid that particular path and it isadvertised to the other peers right. So, that is important.(Refer Slide Time: 28:22)So, there are other things like BGP selection, BGP is a path vector protocol as wediscussed. So, in a path vector, the path is expressed in terms of domains orconfigurations transferred. So, path has to be defined how. So, path is defined a series ofways within the properties and type of things or which domain it is hopping through. Thebest path is obtained by comparing the number of domains of each feasible routes right.So, one is that how many domains need to be hopped. There is no universal agreed uponmetric that can be used to evaluate the external path. So, that is important that is difficultbecause, each AS has his own criteria of path evaluation right. So, there is no universalmetric because it is a large network right it say large networks of networks and thesethere are several AS, so each AS has the own way of finding the optimal path. So, whichis based on the path attributes. So, there are several path attributes are used to describeand evaluate a path, peers exchange path attributes along with other routing informationsSo, when a BGP router advise a route, it can add or modify the path attributes beforeadvertising the route to a peer. So, once a BGP router receives a this update then, whileupdating the things it can basically update the path attributes before transmitting it to thepeer.The combination of attribute, are used to select the best path right. The combination ofattributes are used to select the best path of the things. That means, what we want to saythis your path is defined by these several AS which are in turn defined by the attribute setof this AS right, or that particular path and which can be used this attributes values areused to find the optimal path based on the particular by based on the policy of the thatgiven AS.(Refer Slide Time: 30:39)So, there are we also discussed in earlier thing, we will go quickly that is there are fourpath attribute categories, as we have discussed in the path vector protocol. One is wellknown mandatory the attribute must be recognized by all BGP implementation, is mustbe same for every update message. This is a well known and mandatory well knowndiscretionary, that is the attribute must be recognized by all BGP implementation.However, it is not required to send for every message. So, it is a discretion ordiscretionary optional transitive that is, it is not required for every BGP implementationto recognize this type of attribute right it is of optional. By a path with a unrecognizedoptional transitive attribute is accepted and simply forwarded to the BGP peers. So, if itis unrecognized optional attribute transitive attribute; that means, it is being transmittedto the peer without doing any analysis or without taking any call on it right.Optional non transitive if it is not required for every BGP implementation recognize thistype of attribute. These attributes can be ignored and not passed along with the things.So, it is one is optional transitive, that means, it is optional, but it may not recognize, butit can transmit. Another is optional in non transitive, if it is if it is not recognized or it canbe ignored and may not be transmitted to the other side.(Refer Slide Time: 32:13)And if we look at that a previous lecture or previous to previous lecture we discussed. Sowhat we see that this is the N1, R1, AS1 this is the particular reachability of the things.So, in order from here if I want to see N1, R2, N1, R2, AS2, AS1 is the path and so andso forth.So, where from these R4 we see this is the AS3 AS2 and AS1 and then a next router isrouter 3 and the destination network is N1. So, next router 3 then AS3 AS2 AS1 and thenyou have the router. So, these are way the paths can be defined and for different networkwhat is the next router and paths can be defined.(Refer Slide Time: 33:06)So, 2 quick concept, one is the BGP aggregation, so a major improvement in BGPversion four for CIDR and route aggregation. So that means, the feature allows BGPpeers to consolidate multiple contiguous routing entries into a single advertisement and itsignificantly enhances the scalability of the BGP to the large network. So, I cancontiguous routing advertisement in a single entry and in doing so, it basically helps inscaling the things.(Refer Slide Time: 33:43)There is another concept called BGP configuration. So, BGP requires all speakers withina single AS have fully meshed set of IBGP connections right.So, if it is basically, this creates a problem in scalability. If there are a large number ofspeakers within the AS making this connection and if it is dynamic then making andbreaking these connections become a major challenge. So, I can have different sub a sortof things within the AS right or what we say that is a configurations of AS is there right.So, a BGP configuration creates a set of autonomous systems that represent a single ASright. So, AS1 can have different AS 1 1 2 type of things and two peers external to theconfiguration. This removes the full mesh requirement and reduces the manageability.Because, the full mesh requirement is now confined within that particular AS where, orsub AS type of things or configuration is maintained.So, in way in this way the manageability may be made much or scalability is facilitated.So, what we see in try to what we discussed today is that, different feature of BGProuting protocols, how it can be defined how path is defined and so and so forth. How, ithelps in sending a packet from a particular network, in a particular AS autonomoussystem to a other AS in the autonomous systems right.So, we will continue our discussion on this computer network and internet protocols inthe subsequent lecture. Slowly we will look at other layers other as we are following a,top down approach now we will look at the other layers on the TCP/IP model.With this let us conclude our discussion today.Thank you.
Log in to save your progress and obtain a certificate in Alison’s free Advanced Diploma in Computer Networks and Internet Protocol online course
Sign up to save your progress and obtain a certificate in Alison’s free Advanced Diploma in Computer Networks and Internet Protocol online course
Please enter you email address and we will mail you a link to reset your password.