BGP - [Part 12] - BGP ATTRIBUTES - INTERVIEW QUESTION

Question - 1 What is purpose of BGP Attributes ?

BGP uses the multiple attribute to select the best path, it select the best path after evaluation of these attributes.

Question - 2 How many categories of BGP attribute ?

  • Well-known mandatory -  
  1. It will be recognized by all BGP routers.
  2. It will be present in all BGP updates
  3. It will be passed on to other BGP routers. Example - AS path, Origin, and Next hop.
  • Well-known discretionary - 
  1. It will be recognized by all BGP routers
  2. It will be passed on to other BGP routers 
  3. but no need to be present in an update. Example - Local Preference.
  • Optional transitive - 
  1. Might be recognized by a BGP router or might not be recognized 
  2. It will be passed on to other BGP routers. 
  3. If it will not be recognized, then it will be marked as partial. Example - Aggregator, Community.
  • Optional non-transitive - 
  1. Might be recognized by a BGP router or might not be recognized 
  2. It will not be passed on to other BGP routers. Example - Multi-Exit Discriminator (MED), Originator ID.

Question - 3 BGP Path selection criteria ?

BGP path selection criteria given below with sequence on basis of priority.
  1. Route with the highest Weight.
  2. Route with the highest Local Preference.
  3. Routes which is Originated from this router.
  4. Route with the shortest Autonomous System Path.
  5. Route with the lowest Origin Code (i - lowest, e - next, ? - last).
  6. Route with the lowest MED.
  7. An EBGP route over an IBGP route.
  8. Route through the nearest IGP neighbor as determined by the Lowest IGP Metric.
  9. Oldest Route
  10. Route through the neighbor with the Lowest Router ID.
  11. Route through the neighbor with the Lowest IP Address.

Question - 4 Explain BGP weight attribute.

  • It is Cisco proprietary attribute, so you will be find this in only Cisco devices.
  • Weight attribute is locally on the router, it cannot be propagate to any BGP peers 
  • It is used in the BGP path selection process, if there is more than one route available to the same destination
  • It is a numeric value and always set by a router. We can use this attribute for outbound traffic.
  • Range of value for Weight is 0 to 65535.
  • The default value for weight is 0 for all routes which are not originated by the local router. 
  • The default value for weight is 32768 for all routes which are originated by the local router.
  • Always a path with the highest weight will be preferred.
  • You can be changed weight per neighbor via command neighbor [neighbor ip address]  weight [0-65535] or in a  route-map using the command set weight [0-65535].
To know more about the Weight go to :-
BGP - [Part 8] - WEIGHT ATTRIBUTES - INTERVIEW QUESTIONS

Question - 5 Explain BGP Local Preference attribute.

  • Local preference is a Well-known and discretionary attribute.Local Preference is locally to Autonomous System, means it is globally within Autonomous System.
  • It advertise into the local Autonomous System only, so it is sent to all IBGP routers in an AS, cannot be exchanged between EBGP routers.
  • We can use local preference to select the outbound external BGP path. It will tell the Autonomous System about which path will exit the Autonomous System to reach a certain network.
  • Always a path with highest Local Preference will be preferred.
  • It is a numeric value. By default local preference value is 100 and it can be changed manually. 
  • You can be changed Local Preference via command bgp default local-preference [Local Preference value] or in a  route-map using the command set local-preference [Local Preference value].
To know more about the Local Preference go to:-  
BGP - [Part 9] - LOCAL PREFERENCE ATTRIBUTES - INTERVIEW QUESTIONS

Question - 6 Explain BGP AS-PATH attribute.

  • AS_Path is the number of ASNs in the AS Path.
  • It is Well-known mandatory attribute.
  • Always shortest AS_Path will be prefer. You can manipulate (Increase AS_Path length to make less preferable ) AS_Path by using the command as-path prepend or set as-path prepend last-as in route-map. Both command have a different behaviors depend on the inbound and outbound direction. Prepending use to add same ASN multiple time in AS_Path.
  • You can disable the AS_Path checking step from BGP path selection by using the command bgp bestpath as-path ignore.
To know more about the AS_Path go to:- 
BGP - [Part 10] - AS_PATH ATTRIBUTES - INTERVIEW QUESTIONS

Question - 7 Explain BGP Locally Generated routes.

  • Always locally originated routes will be prefer over externally routes. And locally originated routes always have weight 32768
  • These routes can be generated by using three command - network command, redistribute command and aggregate-address command.
  • If a network in the BGP table (You can check via Show IP BGP command) is showing next hop 0.0.0.0 means this network is locally originated, it may be configured with network command or aggregate command in BGP configuration or it may be redistributed from IGP to BGP.
  • Network command will be more preferable over redistribute commands and redistribute command will be more preferable over aggregate-address command.

Question - 8 Explain BGP Origin Code attribute.

  • There are three origin code.  i - IGP , e - EGP, ? - INCOMPLETE
  1. i - IGP   -  You can get this by network command in BGP. It is more preferable than EGP.
  2. e - EGP  -  For the route whic is learned via EGP. It is more preferable than INCOMPLETE.
  3. ? - INCOMPLETE  -  For redistributed network from IGP or static to BGP. It can be achieved by redistribute command.
  • It is Well-known mandatory attribute.

To know more about the Origin Code go to:- 
BGP - [Part 11] - ORIGIN CODE ATTRIBUTES - INTERVIEW QUESTIONS

Question - 9 Explain BGP MED attribute.

  • Always lowest MED will be preferable.
  • It is Optional non-transitive attribute.
  • MED is exchanged between AS.
  • It can be used to advertise to your neighbors to influence how they should enter in your AS 
  • Always MED is advertised to all router within the neighboring AS, note that it will not advertised to any other AS
To know more about the MED go to:- 
BGP - [Part 12] - MED ATTRIBUTES - INTERVIEW QUESTIONS

Question - 10 eBGP vs iBGP ?

Always eBGP is preferred over iBGP.

Question - 11 IGP Metric Next-Hop ?

Within the AS, path with lowest IGP metrics to the BGP next hop, will be preferable.

Question - 12 Oldest Path ?

  • Always oldest path will be preferable.
  • This process is only applicable to route which are learned from eBGP not from the iBGP.

Question - 13 Router-ID ?

  • Always the path with the lowest BGP neighbor router-id will be preferable.
  • A router-id is a 32-bit IP address, which is uniquely identifies a router in an Autonomous System. So a router-id is uniquely identifies a device in an Autonomous System.
  • You can configure router-id manually via command bgp router-id [ip address] 

BGP will follow the below listed way to obtain the correct router ID-
  • We can configure the router id manually, so if you will set it manually , BGP will prefer this.
  •  If you will not configure router-id, the BGP will prefer highest IP address on loop-back interface as router-id.
  • If there is no any loop-back interface, then BGP will prefer highest IP address on physical interface as router-id.
  • If you did not set any router-id manually, and there is no any loop-back and physical interface then BGP will show 0.0.0.0 as router-id.

Question - 14 Neighbor IP address ?

  • Always the path with the lowest neighbor ip addresses will be preferable.
  • If router-id will be same then in this situation neighbor IP address will be tiebreaker.

SHARE

Anubhav Upadhyay

Hello and welcome to networktopic Blog. My name is Anubhav. I am a Senior Network Egineer. I have created this blog specially to serve interview questions and answer on Network Routing and Switching, I will try my best to serve correct and updated networking knowledge for you as per my corporate experience.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

If you like my posts then please comment and if you don’t like then please suggest me to improve, and if you have any query related to post then please text me through the comment box or mail me on upadhyayambition@gmail.com , I will try my best to solve your queries as soon as possible.