Thursday, April 13, 2023
HomeNetworkingBGP Native Desire Attribute Defined

BGP Native Desire Attribute Defined


What’s BGP Native Desire?

The BGP Native Desire attribute is used to govern one of the best outbound path and utilized on inbound exterior routes. Not like the Weight attribute, Native Desire is handed on to iBGP friends.

If a number of paths exist, Native Desire BGP informs iBGP routers how you can exit the AS i.e. which path to favor for outgoing visitors. Native Desire is a 32-bit quantity and might vary from 0 to 4294967295.

The default choice worth is 100. The better the Native choice e worth, the extra it turns into the popular path.

For BGP Path choice algorithm, in case of non-cisco gadget, the primary BGP Path Attribute taken beneath the consideration is Native Desire attribute. Native Desire isn’t a vendor dependent Attribute in contrast to Weight Attribute. Native Desire attribute is used to pick out exterior BGP paths. Totally different edge routers have completely different Native Preferences to an exterior vacation spot. These values are despatched between IBGP (Inside BGP) neighbors and in keeping with these values, the AS (Autonomous System) exit level is set.

Native Desire is utilized to the inbound path of the interface. It’s the exit level of your AS in direction of one other AS. Totally different routers have completely different Native Desire values for that vacation spot and this values is shared throughout the AS (Autonomous System). LOCAL_PREF is Properly-known and Discretionary BGP Path Attribute. LOCAL_PREF is supported in each BGP implementation (well-known) and each BGP router acknowledges it however it’s optionally current within the BGP Replace packet (discretionary).

A few of key options of Native Desire are –

  • Native to an AS.
  • LOCAL_PREF is about to 100 when heard from neighboring AS.
  • Used to affect BGP path choice.
  • Determines greatest path for outbound visitors.
  • Path with highest native choice wins.

Associated  – eBGP vs iBGP

BGP Native preferences might be utilized in 2 methods –

1. Straight placing default native choice by iBGP router to its neighbours. Eg –

R3(config)# router bgp 1
R3(config-router)# bgp default local-preference 200

2. On per route foundation by calling a Route-map and entry/prefix-list by means of a neighbour. Eg –

R3(config)# ip prefix-list net4 4.4.4.0/24
R3(config)# route-map PREF allow 10
R3(config-route-map)# match ip handle prefix-list net4
R3(config-route-map)# set local-preference 300
R3(config)# router bgp 1
R3(config)# neighbour 192.168.35.5 route-map PREF in

Beneath state of affairs will assist in clarifying how native choice BGP cisco might be configured –

bgp local preferenceAssociated- BGP Origin Attribute

As within the above diagram, we’re required to have R1 favor R3 as an alternative of R2 as one of the best path for reachability to community 4.4.4.0/24 (Loopback of R4).

Associated – BGP States

Below the traditional case, R1 will obtain route for R4 loopback from each iBGP neighbours R2 and R3 .R2 would be the most well-liked path based mostly on BGP path choice standards of R2 having decrease Router ID ie 192.168.12.2 and R3 with Router ID 192.168.13.3. Beneath is the snapshot.

snapshot in bgp local preference

Now, we configure the R3 to promote itself as a most well-liked path by manipulating the “Native Desire” worth as under –

R3(config)# ip prefix-list net4 4.4.4.0/24
R3(config)# route-map PREF allow 10
R3(config-route-map)# match ip handle prefix-list net4
R3(config-route-map)# set local-preference 300
R3(config)# router BGP 1
R3(config)# neighbour 192.168.35.5 route-map PREF in

As soon as the above configuration is carried out on R3 and the identical data is discovered by its iBGP neighbour i.e. R1, one of the best path for R1 modifications from R2 to R3 since R3 has Larger (extra most well-liked) Native choice than R2.

bgp-local-preference-attribute

How does BGP select one of the best path?

Utilizing one of the best path choice algorithm, BGP works by means of every attribute till it finds one to that provides a choice. If there is no such thing as a most well-liked attribute BGP will all the time route over the shortest AS path.

Is Native Desire Transitive?

Native Desire is transitive. It’s a Properly Identified attribute which means it may be supported by all BGP implementations and all well-known attributes are transitive. Native Desire isn’t hooked up to eBGP updates and it solely stays throughout the AS (iBGP).

What’s the distinction between Weight & LOCAL_PREF in BGP?

The most important distinction between the Weight and LOCAL_PREF attributes is that when the LOCAL_PREF attribute is utilized on router, the change is mirrored all through the AS. Quite the opposite, Weight attribute is domestically vital solely.

Beneath is one other lab state of affairs the place BGP Native Desire in manipulated on R2 and R3 (BGP talking Routers). For reaching community 10.10.100.0/24 (Loopback1 on R1) from R4, the trail ought to be R4-> R3 ->R1. In the identical method for reaching community 20.20.200.0/24 (Loopback2 on R1) from R4, the trail ought to be R4-> R2 ->R1. Therefore, Native Desire can be marketed from R2 and R3 in direction of R4, in order that R4 takes completely different paths (based mostly on larger Native choice) to achieve networks 10.10.100.0/24 and 20.20.200.0/24 respectively.

Configuration steps to implement Native Desire (on R2 and R3)

  1. An entry record will outline the community subnet.
  2. A route map might be assigned to the community (ACL) for an motion of allow or deny.
  3. The route map motion set to the LOCAL_PREF worth for the route.
  4. The route map will then be assigned to R3 and R2 towards the R4 neighbor, for outbound ads.

Beneath are the configuration steps –

R3(config)#access-list 2 allow 10.10.100.0 0.0.0.255

R3(config)#route-map LOCAL_PREF_200 allow 10

R3(config-route-map) #match ip add 2

R3(config-route-map) #set local-preference 200

R3(config-route-map) #route-map LOCAL_PREF_200 allow 20

R3(config-route-map) #set local-preference 100

R3(config-route-map) #exit

R3(config)#router bgp 200

R3(config-router) #neighbor 1.1.1.1 route-map LOCAL_PREF_200 out

R2(config)#access-list 3 allow 20.20.200.0 0.0.0.255

R2(config)#route-map LOCAL_PREF_200 allow 10

R2(config-route-map) #match ip add 3

R2(config-route-map) #set local-preference 200

R2(config-route-map) #route-map LOCAL_PREF_200 allow 20

R2(config-route-map) #set local-preference 100

R2(config-route-map) #exit

R2(config)#router bgp 200

R2(config-router) #neighbor 1.1.1.1 route-map LOCAL_PREF_200 out

Conclusion

We understood that BGP path might be manipulated through Native Desire attribute, with larger worth of Native Desire being favored in comparison with decrease worth.

Proceed Studying:

 BGP Interview Questions

BGP Allowas in

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments