SlideShare une entreprise Scribd logo
1  sur  26
Presentation on
BGP Path Selection & Attributes
BGP Weight
&
BGP AS-Path Prepending
Prsented By
• Shawan Roy
• Mobile: 01933827475
BGP Path Selection &
Attributes
Difference Between BGP & IGP Path Selection
• BGP (Border Gateway Protocol)
routers usually receive multiple
paths to the same destination.
• BGP however, selects the best
path based on a set of
attributes.
• IGPs select the path with the
lowest metric. For example:
• RIP selects the path with the
lowest hop count.
• OSPF selects the path with the
lowest cost.
• EIGRP selects the path with the
highest bandwidth and lowest
delay (unless you change the K
values).
How to know about best path in BGP?
Path is selected based on the following attributes
Priority Attribute
1 Weight
2 Local Preference
3 Originate
4 AS path length
5 Origin code
6 MED (MULTI_EXIT_DISC)
7 eBGP path over iBGP path
8 Shortest IGP path to BGP next hop
9 Oldest path
10 Router ID
11 Neighbor IP address
Quick overview of Each Attribute (1 of 3)
• Weight: Prefer the path with the highest weight. This is a value that is local to the router
and it’s Cisco proprietary. The default value is 0 for all routes that are not originated by
the local router.
• Local Preference: The local preference is used within an autonomous system and
exchanged between iBGP routers. We prefer the path with the highest local preference.
The default value is 100.
• Originate: Prefer the path that the local router originated. In the BGP table, you will see
next hop 0.0.0.0. You can get a path in the BGP table through the BGP network
command, aggregation, or redistribution. A BGP router will prefer routes that it installed
into BGP itself over a route that another router installed in BGP.
• AS path length: Prefer the path with the shortest AS path length. For example, AS path 1
2 3 is preferred over AS path 1 2 3 4 5.
Quick overview of Each Attribute (2 of 3)
• Origin code: Prefer the lowest origin code. There are three origin
codes: IGP, EGP, INCOMPLETE. IGP is lower than EGP and EGP is lower
than INCOMPLETE.
• MED (MULTI_EXIT_DISC): Prefer the path with the lowest MED. The
MED is exchanged between autonomous systems.
• eBGP path over iBGP path: Prefer eBGP (external BGP) over iBGP
(internal BGP) paths.
• Shortest IGP path to BGP next hop: Prefer the path within the
autonomous system with the lowest IGP metric to the BGP next hop.
Quick overview of Each Attribute (3 of 3)
• Oldest Path: Prefer the path that we received first, in other words, the
oldest path.
• Router ID: Prefer the path with the lowest BGP neighbor router ID.
The router ID is based on the highest IP address. If you have a
loopback interface, then the IP address on the loopback will be used.
The router ID can also be manually configured.
• Neighbor IP address: Prefer the path with the lowest neighbor IP
address. If you have two eBGP routers and two links in between then
the router ID will be the same. In this case, the neighbor IP address is
the tiebreaker.
BGP Weight Attribute
About BGP Weight Attribute (1 of 2)
• BGP weight attribute is a Cisco proprietary path attribute that is local
to the router and is used to influence local path selection on a certain
router.
• BGP weight is the first tie breaker for best path selection on a Cisco
router, the attribute is not propagated to other routers in the BGP
updates and only found on Cisco routers.
• The path with the highest weight is selected as the best toward a
destination.
About BGP Weight Attribute (2 of 2)
• The weight can be a number from 0 to 65,535. Paths that the router
originates have a weight of 32,768 by default, and other paths have a
weight of 0. As we mentioned earlier the path with the highest weight
value wins.
• BGP weight can be set using three ways on a Cisco router. Those are:
assigned per neighbor, using AS-Path access lists, using route-maps
(complex).
• BGP weight is the easiest way to manipulate the BGP path selection
on a single Cisco router for outbound traffic. The attribute is local and
will not be propagated to other routers in the network within the BGP
update messages.
BGP Weight Attribute Assigned per neighbor (1 of
4)
• R1 to get to R6 it has chosen the path through
R4-
When both paths are external prefer the oldest one –
This is the tiebreaker!
BGP Weight Attribute Assigned per neighbor (2 of
4)
• To prove that we can restart the bgp process on R4 to
make R5 the oldest route. On R4 I have done a clear ip
bgp * This now makes the route through R5 the oldest
one and is preferred.
BGP Weight Attribute Assigned per neighbor (3 of
4)
• Under BGP enter the following command – neighbor
10.0.14.4 weight 100
BGP Weight Attribute Assigned per neighbor (4 of
4)
• You will also notice that all prefixes received from R4 have
also had their weight changed to 100
BGP Weight Attribute Using AS-Path access lists (1
of 2)
• For this example we only want to set the weight for the
6.6.6.6/32 prefix. First we need to match this prefix in an
access list
This is now applied to the neighbor statement for R4 – we also need to remove the previous
weight attribute
BGP Weight Attribute Using AS-Path access lists (1
of 2)
• You can see now that we have changed the weight
attribute for the 6.6.6.6/32 prefix only. All other routes
have the default weight of 0.
BGP AS-Path Prepending
About BGP AS-Path Prepending
• AS-Path prepending is a way to manipulate the AS-Path attribute of a
BGP route.
• It allows prepending multiple entries of AS to a BGP route.
• This can come as a workaround if a specific path is required to be
followed, and other means like Multi-Exit Discriminator (MED) is not
supported.
• AS-Path prepending can be applied to inbound and outbound
direction using route-maps.
Outbound AS-Path Prepending (1 of 2)
• AS-Path prepending can be
applied to outbound direction
on R3 router as below-
• Outbound AS-Path prepending on
R3-
Outbound AS-Path Prepending (2 of 2)
• When R3 router advertises its 10.1.1.0/24 network
to R2 router, it prepends its own AS 200 multiple
times. However, R1 router receives the original
BGP route with a single AS-path entry.
• BGP tables on R1 and R2-
R2 router has two paths to 10.1.1.0/24. However, it
chooses the path through R1 since that path has
shortest AS-Path (indicated by a > sign, meaning best
route). Hence, the direct path through R3 router can
act as a backup path.
Inbound AS-Path Prepending (1 of 2)
• Inbound AS-Path prepending is configured using
set as-path prepend last-as command under route-
map which is then applied in inbound direction.
The last-as keyword copies the AS number of the
neighbor advertising the BGP route that matches
the route-map.
• Inbound AS-Path prepending on R1-
Inbound AS-Path Prepending (2 of 2)
• This configuration causes R1 to prepend the AS
number of R3 twice before installing in the BGP
table. As seen below, R3 does not prepend any AS
number by itself.
• BGP tables on R1 and R3-
References
• https://networklessons.com/bgp/bgp-attributes-and-path-selection
• http://www.networkers-online.com/blog/2012/05/bgp-weight/
• https://www.rogerperkin.co.uk/bgp/bgp-weight-attribute/
• https://sites.google.com/site/amitsciscozone/home/bgp/bgp-as-
path-prepending-and-as-path-filters
Thank You!

Contenu connexe

Tendances (20)

Ospf.ppt
Ospf.pptOspf.ppt
Ospf.ppt
 
Introduction to Segment Routing
Introduction to Segment RoutingIntroduction to Segment Routing
Introduction to Segment Routing
 
IS-IS Protocol Introduction
IS-IS Protocol IntroductionIS-IS Protocol Introduction
IS-IS Protocol Introduction
 
STP (spanning tree protocol)
STP (spanning tree protocol)STP (spanning tree protocol)
STP (spanning tree protocol)
 
BGP
BGP BGP
BGP
 
Segment Routing Lab
Segment Routing Lab Segment Routing Lab
Segment Routing Lab
 
MPLS Concepts and Fundamentals
MPLS Concepts and FundamentalsMPLS Concepts and Fundamentals
MPLS Concepts and Fundamentals
 
Ccna Commands In 10 Minutes
Ccna Commands In 10 MinutesCcna Commands In 10 Minutes
Ccna Commands In 10 Minutes
 
Mpls basic
Mpls basicMpls basic
Mpls basic
 
VPLS Fundamental
VPLS FundamentalVPLS Fundamental
VPLS Fundamental
 
Bgp
BgpBgp
Bgp
 
ospf routing protocol
ospf routing protocolospf routing protocol
ospf routing protocol
 
Mpls Services
Mpls ServicesMpls Services
Mpls Services
 
Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing Traffic Engineering Using Segment Routing
Traffic Engineering Using Segment Routing
 
About IPv6
About IPv6About IPv6
About IPv6
 
OSPF Configuration
OSPF ConfigurationOSPF Configuration
OSPF Configuration
 
Segment Routing: A Tutorial
Segment Routing: A TutorialSegment Routing: A Tutorial
Segment Routing: A Tutorial
 
MENOG-Segment Routing Introduction
MENOG-Segment Routing IntroductionMENOG-Segment Routing Introduction
MENOG-Segment Routing Introduction
 
Eigrp.ppt
Eigrp.pptEigrp.ppt
Eigrp.ppt
 
Ospf
OspfOspf
Ospf
 

Similaire à BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending

bgp features presentation routing protocle
bgp features presentation routing protoclebgp features presentation routing protocle
bgp features presentation routing protocleBadr Belhajja
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)Netwax Lab
 
Describe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxDescribe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxearleanp
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPROIDEA
 
Study Notes BGP Exam
Study Notes BGP ExamStudy Notes BGP Exam
Study Notes BGP ExamDuane Bodle
 
Cisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review NotesCisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review NotesDuane Bodle
 
Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)NYversity
 
Routing Protocol EIGRP
Routing Protocol EIGRPRouting Protocol EIGRP
Routing Protocol EIGRPDmitry Figol
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)NetProtocol Xpert
 
Bgp 6 advanced transit as issues
Bgp 6   advanced transit as issuesBgp 6   advanced transit as issues
Bgp 6 advanced transit as issuesAuguste Behe
 
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PROIDEA
 
Routing Protocol in detail
Routing Protocol in detailRouting Protocol in detail
Routing Protocol in detailDil_E_Dastan
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocolsPalanivel Kuppusamy
 

Similaire à BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending (20)

bgp features presentation routing protocle
bgp features presentation routing protoclebgp features presentation routing protocle
bgp features presentation routing protocle
 
Bgp training
Bgp trainingBgp training
Bgp training
 
11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)
 
Describe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxDescribe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docx
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
 
Study Notes BGP Exam
Study Notes BGP ExamStudy Notes BGP Exam
Study Notes BGP Exam
 
Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Cisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review NotesCisco BGP Exam 642-661 Review Notes
Cisco BGP Exam 642-661 Review Notes
 
BGP Advanced topics
BGP Advanced topicsBGP Advanced topics
BGP Advanced topics
 
Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
 
Routing Protocol EIGRP
Routing Protocol EIGRPRouting Protocol EIGRP
Routing Protocol EIGRP
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
 
EIGRP Protocol.pptx
EIGRP Protocol.pptxEIGRP Protocol.pptx
EIGRP Protocol.pptx
 
Bgp 6 advanced transit as issues
Bgp 6   advanced transit as issuesBgp 6   advanced transit as issues
Bgp 6 advanced transit as issues
 
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
 
Routing Protocol in detail
Routing Protocol in detailRouting Protocol in detail
Routing Protocol in detail
 
B G P Part2
B G P  Part2B G P  Part2
B G P Part2
 
B G P Part2
B G P  Part2B G P  Part2
B G P Part2
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 

Plus de Shawan Roy

Presentation on Pretreatment (Scouring & Bleaching)
Presentation on Pretreatment (Scouring & Bleaching)Presentation on Pretreatment (Scouring & Bleaching)
Presentation on Pretreatment (Scouring & Bleaching)Shawan Roy
 
Presentation on Smart Textile
Presentation on Smart TextilePresentation on Smart Textile
Presentation on Smart TextileShawan Roy
 
Assignment on Camouflage Fabric
Assignment on Camouflage FabricAssignment on Camouflage Fabric
Assignment on Camouflage FabricShawan Roy
 
Presentation on Camouflage Fabric
Presentation on Camouflage FabricPresentation on Camouflage Fabric
Presentation on Camouflage FabricShawan Roy
 
Calculation of rf for maddar & turmeric
Calculation of rf for maddar & turmericCalculation of rf for maddar & turmeric
Calculation of rf for maddar & turmericShawan Roy
 
Assignment on latest development on dyeing technique
Assignment on latest development on dyeing techniqueAssignment on latest development on dyeing technique
Assignment on latest development on dyeing techniqueShawan Roy
 
Astm standard on apparel (Source Copy)
Astm standard on apparel (Source Copy)Astm standard on apparel (Source Copy)
Astm standard on apparel (Source Copy)Shawan Roy
 
ASTM Standard on Apparel
ASTM Standard on ApparelASTM Standard on Apparel
ASTM Standard on ApparelShawan Roy
 
Weft knit fabric geometry
Weft knit fabric geometryWeft knit fabric geometry
Weft knit fabric geometryShawan Roy
 
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)Shawan Roy
 
Presentation on children's wear
Presentation on children's wearPresentation on children's wear
Presentation on children's wearShawan Roy
 
Method for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureMethod for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureShawan Roy
 
Method for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureMethod for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureShawan Roy
 
Electromagnetic field (emf)
Electromagnetic field (emf)Electromagnetic field (emf)
Electromagnetic field (emf)Shawan Roy
 

Plus de Shawan Roy (15)

Presentation on Pretreatment (Scouring & Bleaching)
Presentation on Pretreatment (Scouring & Bleaching)Presentation on Pretreatment (Scouring & Bleaching)
Presentation on Pretreatment (Scouring & Bleaching)
 
Presentation on Smart Textile
Presentation on Smart TextilePresentation on Smart Textile
Presentation on Smart Textile
 
Assignment on Camouflage Fabric
Assignment on Camouflage FabricAssignment on Camouflage Fabric
Assignment on Camouflage Fabric
 
Presentation on Camouflage Fabric
Presentation on Camouflage FabricPresentation on Camouflage Fabric
Presentation on Camouflage Fabric
 
Calculation of rf for maddar & turmeric
Calculation of rf for maddar & turmericCalculation of rf for maddar & turmeric
Calculation of rf for maddar & turmeric
 
Assignment on latest development on dyeing technique
Assignment on latest development on dyeing techniqueAssignment on latest development on dyeing technique
Assignment on latest development on dyeing technique
 
Astm standard on apparel (Source Copy)
Astm standard on apparel (Source Copy)Astm standard on apparel (Source Copy)
Astm standard on apparel (Source Copy)
 
ASTM Standard on Apparel
ASTM Standard on ApparelASTM Standard on Apparel
ASTM Standard on Apparel
 
Weft knit fabric geometry
Weft knit fabric geometryWeft knit fabric geometry
Weft knit fabric geometry
 
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)
Presentation on Weft Knitting Machine (Single Jersey, Rib & Interlock)
 
Presentation on children's wear
Presentation on children's wearPresentation on children's wear
Presentation on children's wear
 
Method for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureMethod for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structure
 
RN cleaner
RN cleanerRN cleaner
RN cleaner
 
Method for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structureMethod for measuring or investigation of fiber structure
Method for measuring or investigation of fiber structure
 
Electromagnetic field (emf)
Electromagnetic field (emf)Electromagnetic field (emf)
Electromagnetic field (emf)
 

Dernier

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Dernier (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending

  • 1. Presentation on BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
  • 2. Prsented By • Shawan Roy • Mobile: 01933827475
  • 3. BGP Path Selection & Attributes
  • 4. Difference Between BGP & IGP Path Selection • BGP (Border Gateway Protocol) routers usually receive multiple paths to the same destination. • BGP however, selects the best path based on a set of attributes. • IGPs select the path with the lowest metric. For example: • RIP selects the path with the lowest hop count. • OSPF selects the path with the lowest cost. • EIGRP selects the path with the highest bandwidth and lowest delay (unless you change the K values).
  • 5. How to know about best path in BGP?
  • 6. Path is selected based on the following attributes Priority Attribute 1 Weight 2 Local Preference 3 Originate 4 AS path length 5 Origin code 6 MED (MULTI_EXIT_DISC) 7 eBGP path over iBGP path 8 Shortest IGP path to BGP next hop 9 Oldest path 10 Router ID 11 Neighbor IP address
  • 7. Quick overview of Each Attribute (1 of 3) • Weight: Prefer the path with the highest weight. This is a value that is local to the router and it’s Cisco proprietary. The default value is 0 for all routes that are not originated by the local router. • Local Preference: The local preference is used within an autonomous system and exchanged between iBGP routers. We prefer the path with the highest local preference. The default value is 100. • Originate: Prefer the path that the local router originated. In the BGP table, you will see next hop 0.0.0.0. You can get a path in the BGP table through the BGP network command, aggregation, or redistribution. A BGP router will prefer routes that it installed into BGP itself over a route that another router installed in BGP. • AS path length: Prefer the path with the shortest AS path length. For example, AS path 1 2 3 is preferred over AS path 1 2 3 4 5.
  • 8. Quick overview of Each Attribute (2 of 3) • Origin code: Prefer the lowest origin code. There are three origin codes: IGP, EGP, INCOMPLETE. IGP is lower than EGP and EGP is lower than INCOMPLETE. • MED (MULTI_EXIT_DISC): Prefer the path with the lowest MED. The MED is exchanged between autonomous systems. • eBGP path over iBGP path: Prefer eBGP (external BGP) over iBGP (internal BGP) paths. • Shortest IGP path to BGP next hop: Prefer the path within the autonomous system with the lowest IGP metric to the BGP next hop.
  • 9. Quick overview of Each Attribute (3 of 3) • Oldest Path: Prefer the path that we received first, in other words, the oldest path. • Router ID: Prefer the path with the lowest BGP neighbor router ID. The router ID is based on the highest IP address. If you have a loopback interface, then the IP address on the loopback will be used. The router ID can also be manually configured. • Neighbor IP address: Prefer the path with the lowest neighbor IP address. If you have two eBGP routers and two links in between then the router ID will be the same. In this case, the neighbor IP address is the tiebreaker.
  • 11. About BGP Weight Attribute (1 of 2) • BGP weight attribute is a Cisco proprietary path attribute that is local to the router and is used to influence local path selection on a certain router. • BGP weight is the first tie breaker for best path selection on a Cisco router, the attribute is not propagated to other routers in the BGP updates and only found on Cisco routers. • The path with the highest weight is selected as the best toward a destination.
  • 12. About BGP Weight Attribute (2 of 2) • The weight can be a number from 0 to 65,535. Paths that the router originates have a weight of 32,768 by default, and other paths have a weight of 0. As we mentioned earlier the path with the highest weight value wins. • BGP weight can be set using three ways on a Cisco router. Those are: assigned per neighbor, using AS-Path access lists, using route-maps (complex). • BGP weight is the easiest way to manipulate the BGP path selection on a single Cisco router for outbound traffic. The attribute is local and will not be propagated to other routers in the network within the BGP update messages.
  • 13. BGP Weight Attribute Assigned per neighbor (1 of 4) • R1 to get to R6 it has chosen the path through R4- When both paths are external prefer the oldest one – This is the tiebreaker!
  • 14. BGP Weight Attribute Assigned per neighbor (2 of 4) • To prove that we can restart the bgp process on R4 to make R5 the oldest route. On R4 I have done a clear ip bgp * This now makes the route through R5 the oldest one and is preferred.
  • 15. BGP Weight Attribute Assigned per neighbor (3 of 4) • Under BGP enter the following command – neighbor 10.0.14.4 weight 100
  • 16. BGP Weight Attribute Assigned per neighbor (4 of 4) • You will also notice that all prefixes received from R4 have also had their weight changed to 100
  • 17. BGP Weight Attribute Using AS-Path access lists (1 of 2) • For this example we only want to set the weight for the 6.6.6.6/32 prefix. First we need to match this prefix in an access list This is now applied to the neighbor statement for R4 – we also need to remove the previous weight attribute
  • 18. BGP Weight Attribute Using AS-Path access lists (1 of 2) • You can see now that we have changed the weight attribute for the 6.6.6.6/32 prefix only. All other routes have the default weight of 0.
  • 20. About BGP AS-Path Prepending • AS-Path prepending is a way to manipulate the AS-Path attribute of a BGP route. • It allows prepending multiple entries of AS to a BGP route. • This can come as a workaround if a specific path is required to be followed, and other means like Multi-Exit Discriminator (MED) is not supported. • AS-Path prepending can be applied to inbound and outbound direction using route-maps.
  • 21. Outbound AS-Path Prepending (1 of 2) • AS-Path prepending can be applied to outbound direction on R3 router as below- • Outbound AS-Path prepending on R3-
  • 22. Outbound AS-Path Prepending (2 of 2) • When R3 router advertises its 10.1.1.0/24 network to R2 router, it prepends its own AS 200 multiple times. However, R1 router receives the original BGP route with a single AS-path entry. • BGP tables on R1 and R2- R2 router has two paths to 10.1.1.0/24. However, it chooses the path through R1 since that path has shortest AS-Path (indicated by a > sign, meaning best route). Hence, the direct path through R3 router can act as a backup path.
  • 23. Inbound AS-Path Prepending (1 of 2) • Inbound AS-Path prepending is configured using set as-path prepend last-as command under route- map which is then applied in inbound direction. The last-as keyword copies the AS number of the neighbor advertising the BGP route that matches the route-map. • Inbound AS-Path prepending on R1-
  • 24. Inbound AS-Path Prepending (2 of 2) • This configuration causes R1 to prepend the AS number of R3 twice before installing in the BGP table. As seen below, R3 does not prepend any AS number by itself. • BGP tables on R1 and R3-
  • 25. References • https://networklessons.com/bgp/bgp-attributes-and-path-selection • http://www.networkers-online.com/blog/2012/05/bgp-weight/ • https://www.rogerperkin.co.uk/bgp/bgp-weight-attribute/ • https://sites.google.com/site/amitsciscozone/home/bgp/bgp-as- path-prepending-and-as-path-filters