BGP Weight and Local Preference - BGP In Depth 9

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello I'm Jay Neville and welcome to another bgp in-depth so for the next few videos I'm going to be focusing on bgp best path coming up bgp path attributes' and route selection then i'm going to be focusing on local traffic steering with weight then moving on to local AS traffic steering with a focus on local preference and I've got a couple of demos to illustrate the attributes for you bgp is not just about reach ability so if you think about routing protocols their basic role is to communicate destinations aka subnets or prefixes and BGP does do this by communicating their known prefixes in BGP update messages but this protocol goes much further than that and each prefix has additional information attached in the update message known as path attributes some must be included such as the well-known mandatory attributes some not here's the table showing the main BGP path for tributes as you can see at the top there we've got origin af path and next top there the well-known mandatory so they must be included in a BGP update next we've got local preference and atomic aggregates up next we've got community then we've got Med which is also known as metric finally a couple there which are for route reflectors which we've already dealt with originator ID and cluster lists and these paths for tributes are used along with other information to create path preference so if a BGP speaker receives two paths to a destination prefix it can use the path for tributes to decide which is the best path to take and this is where things get a bit funky with BGP with the BGP route selection table so here you can see it in all its glory this is the one for comm where each operating system that implements a BGP stack will somewhere buried in the configuration guide have a list like this which shows you the order of preference for the attribute this is how a BGP speaker decides which is the best path to take at the top there is the most preferred going right down to point 13 so this is quite a complex part of the protocol and something that I think many newcomers find hard to get their head around and as I said at the beginning this is pretty hard to remember and very easy to forget I find myself having to refer to this quite regularly to work out what's going on and why a path is preferred over another but the great thing is that this is actually laid out for you so it's knowable information you just need to keep this in mind and keep it to hand when you're working out in complex networks what exactly is going on in short you've got options and lots of them and this is what we know about BGP that granularity and control so at every bgv speaker you can implement pretty complex policy to decide not just filtering but which path to choose and as I'm sure you can appreciate it can be pretty confusing where you have to memorize or when you're trying to work out whether it's local preference is higher or its metric is lower that's the preferred value so let's move on and focus on the most preferred factor so this is step one in those route selection lists we are talking about weight and I should say that this is not actually a path of tribute so this is not including in bgp updates because it's only locally significant it only affects the local device and is not advertised to any of the peers and if we apply the mantra of thinking like two Rooter to work out what's going on here I always think of it as a case of the Rooter asking so do I go left or right so imagine it's got a left interface or a right interface on a diagram which of those paths to the destination does it prefer and with weight it makes its own decision it doesn't rely on the information coming from any other device Isis nor does it advertise this now I should mention that it for my demos I'm using comm wear devices I'm using vs ours I'm still waiting for my uber OS devices to return from a show I was doing recently and annoyingly enough come where uses a different term for weight it uses this preferred value at the top that but in every other operating system that I've come across with BGP it's called weight and it does the same thing so I'm just going to call it weight here use my demo network so I've got 4 vs are set up here I've got 2 in a s 6500 one with ibgp between them and then I've got two in a s 6500 two they do not run BGP between them but they're both advertising is 10 9900 / 24 and that's the target prefix so for weight what I've got here is two ebgp sessions 4 1 0 1 2 2 0 1 & 2 0 2 these are both advertising the 10 Network and with weight I can prefer one link over another so it's the local decision let's take a look at that on the CLI okay here's vsr-10 one of just SSH Don - that I'll show you the BGP configuration so it's pretty easy stuff there here's the BGP routing table and we can see that 10 9900 and I'm preferring that via the next stop of 2 so that's V sr20 1 that's preferred now if I wanted to steer the traffic to the 10 network across 3 wait is an option so income where it can be configured in a couple of ways what I can do is I can assign a higher way - I should say that the higher weight is preferred I can configure a higher eight for all the prefixes coming from a certain neighbor or I can use a route map to pick out a subset of prefixes and point the route map at the neighbor to just increase the weight of a subset of prefixes that are coming from that neighbor so well sure I'll show you the simple way of doing it which is upping the weight on a per neighbor basis so that's the pinger command to remember with Conway it's called preferred value but I'm ignoring that and calling it wait if we enter that command now look at the table again you can see that previously we had the next top 172 16 2.1 was preferred and now we have to a higher weight going via 1 7 to 16 3.1 weight has influenced the local decision and the best path to the 10.99 network I've now removed that to put it back to the default we'll check the table again and it's gone back via 172 16 1.2 2.1 sorry so we've reverted back to our default okay now let's look back at that route selection list number one was weight number two is the highest local preference let's move on to local preference now this is an actual path for tribute so this is included in bgp updates against prefixes it's well known so all bgp speakers must know of it but it's discretionary so it doesn't need to be included it's only included in certain updates and the point is that significant within naso it's not about ebgp sessions between a s it's significant for ibgp sessions within an a s and if we think like a Rooter what I tend to think of with local preference is that it is telling the ibgp neighbors within an a s like that this is the best exit so I know the best exit out of this AAS with the highest local preference referring back to the demo Network what I'm going to do is I am going to up the local preference sent from vsr-10 to for the 10 network across the vsr-10 1 so that 1 0 1 and 1 0 2 we'll take this link 2 1 7 to 16 4 across the sr20 2 to get to that 1099 Network so I'm essentially manipulating the exit path out of a s 6500 1 okay here's vsr-10 1 and I've also logged into vsr-10 2 2 as the local preference configuration checking the routing table for vgp we can see that the default as before so we're going across this one 7 to 16 to 1 across VSR to 0 1 to get to the destination and as mentioned what I want to do is not to take this link but to take this link he's vsr-10 to speed EP configuration here's the routing table at the moment we are preferring the fall link so to 170 64 locally but I want to influence VSL 1 0 1 as well so that all of the traffic goes across that link so I go into the unicast ipv4 address family and rather than a per peer or a route map what you have it's a little bit different this for local preference because you just set this it's similar on iOS as well and a river OS and con where that you can just set this default local preference for all of the prefixes that the local BGP speaker is advertising across any ibgp link so you just put in this default local preference set a value which is higher than the default so the default is 100 you need to set one that's higher than that so I put just one zero one one hundred and one for my local preference this is what it looks like in the configuration now the interesting part we look back at via cell 1 0 1 and you can see so this is it before and now you can see that it is choosing the ibgp session with the next top of 172 16 watt 4.1 obviously vsr-10 2 is not changing the next top that's correct behavior there but you can see there the local preference 1 0 1 so that is now being preferred now just to show you how this works with the route selection so if you recall weight was higher than local preference I can actually override that locally on vsr-10 1 by adding a weight statement pointing to let's say let's point it towards the vssr to 0 1 so across this link preferred value weight of course I'll just give that a 100 check the table again and we're back to running across the local ebgp session two two to recap then first of all we manipulated on a per pair basis we upped the weight which is number one then I showed you how you can use local preference and then I over I did that weave by by configuring weight again that's a simple example but with all of the 13 points here in the different path of tributes I'm sure you can appreciate that things can get pretty complicated in larger scale and more complex networks especially if you've got multiple BGP speakers injecting different attributes and lots of different paths which to me and my fellow nerds is all part of the fun or and appeal of BGP okay that's all for now so in the next video I'm going to be taking a look at another path atribute med but for now please like comment subscribe my name's Joe Neville thanks for watching and good bye you
Info
Channel: Airheads Broadcasting
Views: 10,755
Rating: undefined out of 5
Keywords: bgp, bgp best path, bgp attributes, bgp prefixes, bgp networks, networking bgp, ip networking, weight, local preference, Aruba, Hewlett Packard Enterprise, Aruba Networks, HPE, Networks, Networking, HP, Switching, Routing, How to, Comware, Router
Id: jsleAJHP-2k
Channel Id: undefined
Length: 15min 50sec (950 seconds)
Published: Fri Feb 17 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.