BGP Notes

BGP

 

Numbers

Port 179 TCP ports

eBGP AD = 20

iBGP AD = 200

 

Attributes

Path Vector Protocol.

 

 

When an update it sent it sends an Ack, updates are incremental… only sends updates when something changes.

 

Incremental and triggered.

 

Slowest convergence time.

 

 

 

BGP styles

 

Default Route Only – > Edge router sends a static route from the edge router to BGP through 0.0.0.0

 

Possible to advertise your networks into Bgp from IGP

 

 

Partial Updates – >

 

Business–à BGP -> 2nd Business.

-à 2nd BGP ->>>> 3rd business.

 

Having routes only for certain sites..

 

So routes for only 1st bgp to first Edge router etc.

 

 

Full updates

 

Edge Router gets the entire Routing Table of the internet..

 

BGP table, BEST paths to routes on the internet.

 

Without Tuning BGp acts similar to RIP! – > so if not configured it will hop from autonomous system to autonomous system.

 

Single Honed BGP – > Having one connection from a Router out to BGP

Dual Hones BGP – > two options

a.)    one router connected to 2 links out to a BGP

b.)    2 routers connected to two different links out to the same BGP

 

This is setup for load balancing and for Redundancy

 

Multi-Honed

One router or multiple routers going out to different BGPs per router.

 

BGP Speaker – > Any router that Runs BGP

 

 

 

Tables

Neighbors

BGP table – > a list of all BGP routes.

Routing table – > list of best Routes.

 

Public and Private AS#’s

 

iBGP – > 2 routers in the Same AS

eBGP – > Neighbor relationship linking 2 different AS

 

Peering – > When two routers form a Neighbor relationship

 

iBGP relationships – > Do not have to be physically connected together…  Since it runs over other routers in that AS, the Data/packets for new routes flow through the routes through non IBGP’s.

 

 

Blackhole – > since the traffic goes over a IGP router out to BGP… if it cant find the destination since it doesn’t have it.. it take a look at the destination does not know what exactly to do with it and it possibly drops the packet.

 

BGP Configuration..

 

BGP Neighbors are manually configured.

 

Config t

Router bgp 6500(AS)

 

 

How to configure a Neighbor? EBGP

 

Neighbor 10.1.45.1 (interface that connects) remote-as 5500(as system externally in)

 

Neighbors can peer with other neighbors without sending any data first.

 

BGP offers passive and active similar to EIGRP, Active is searching for a route

 

 

IBGP – > when configuring IBGP networks internally the best thing to do to neighbor then is to use loopbacks.. just incase the router that is attached to it goes down.

 

 

How to Configure a Neighbor?  IBGP?

Router bgp

neighbor 1.1.1.1 remote-as 5500

 

doing this the relationship will never form it will stay at active… this is only for internal

 

reason why is since they are attached via loop back address.  Since the router that see’s 1.1.1.1 as its neighbor will not have a interface that has a address of 1.1.1.1 being that it is a loop back.  So when it gets the neighbor packet from a lets say source 192.168.5.1 it is not going to form that neighbor relationship…. so on this router we have to do the following… this all has to do with the source address..

 

so we have to do the following..

 

neighbor 1.1.1.1 update-source lo1(the loopback interface on that neighbor)

 

this will move the neighbor relationship from active to passive/how many prefixes.

 

EBGP Multihop

 

neighbor 5.5.5.5 multi-hop 2(hops)

 

This is a bit confusing but, intstead of 1 hop to a loopback its 2… since you use a interface connected to a router + the loopback.

 

This command is really used for interfaces like a loopback that are not directly connected.

 

 

 

How to advertise networks

 

2 ways, Network command and Redistribution..

 

Using Network Command

 

Network 10.0.0.0 – > Will auto summarize this network into 10.0.0.0 like RIP

Every other BGP router will have 10.0.0.0 in its network..

Network 10.1.1.0 mask 255.255.255.0 – > this has to match the subnet mask for what I have set the interface for.

 

By default auto-summarazation is turned on.

 

So any redistributed route is Classful.

 

BGP Syncronization

 

Do not advertise a route learned via IBGP Until you learn from that route from the IGP……. So a route has to be learned via ospf eigrp etc etc until BGP will syncronize and send that route.

 

or…. you can turn off router syncronization..

 

Simply typing in

router bgp 6500

no sycnchronization

 

BGP next Hop process…

 

When configuring routes, keep in mind.

 

When IBGP forms routes it will keep the same Next hop this is bad.

When EBGP forms route it will change appropriately

 

So if I have routes to outside of my Own AS, my igrp will have that address instead of the router that is correctly adjacent to it which should not get the right IP.

 

Neighbor 1.1.1.1 next-hop-self – > tells that other router(1.1.1.1) For all its routing that the next hop will be itself….. so I telling my neighbor 1.1.1.1 I am the next hop.

 

BGP tuning and Attributes..

 

Manditory Attributes – > example is a next hop address..

 

Well known Attributes..

AS Path – > mandatory

Next Hop – > mandatory

Origin – > mandatory

 

 

Local Preference – > discretionary

Atomic Aggregate – > discretionary

 

Optional Attributes..

Aggregator

Multi-exit Discriminator(Med/Metric)

 

Goes from top down… Bold are the most important.

 

How BGP finds the best path / Metric.

Ignore routes with Inaccessible next hop address

Highest Weight

Highest Local_Pref

Prefer the path that was locally originated with Network commands

Shortest AS_Path

Path with lowest origin type

Lowest MED

eBGP over iBGP

Lowest IGP metric to the BGP next hop

Determine If multiple paths require installation for BGP Multipath

If both paths are external, prefer the path received first

Prefer the route that comes from BGP router lowest RID

If the originater Rid if the same for multiple path with the minimum cluster list length

Prefer the path tha comes from the lowest Neighbor address.

 

Weight / Local_pref, AS_Path etc etc are all set the same.. so they are all tied by default.. so they have to bet set.

 

Weight = Cisco Propriatary, Stays Local to a BGP router,

You can specificy a router to have higher weight from R1 over R2 , if you get a router that has multiple routes… it will say the weight of R1 is higher so take R1 instead of R2.

 

Weight is automatically set to 0

More Weight = the better

This is Local per Router.

 

Setting the weight..

R1(config –router)BGP 5500

Neighbor 10.1.15.5 weight 500(sets the weight for all the routes to that neighbor to 500)

So for neighbor 10.1.15.5 any routes I know that that neighbor has it will send it there opposed to the other weights if they were 0

 

 

 

 

 

 

If weight is tied we go to LOCAL_PREF

 

Local Pref – > Something that is advertised to other routers…

 

AS_path – > Highly unlike but it is Hop count from the original BGP router.

 

More attribute Information…

 

Weight

AS-Path

Next Hop Address

Origin

Local Preference

Metric

 

Things that would not allow a BGP route to be in the IP Route table..

1st.) Syncronization

2.) Remember to look at the next hop address.. remember that EBGP will change the Hop to the next hop AS.  Next Hop Self would work.

 

 

Clear ip BGP *

 

 

Neighbor 10.1.15.2 shutdown  – > shuts down that neighbor but, it will keep all the attributes……….. so to add that neighbor again it will come back up with all the attribute settings.

 

 

Origin Attribute – > Where the route came from…. Typically its from a network command if it says i… if it is denoted at ? it is normally redistributed into bgp.

 

 

Local_pref – > Path with Highest local preference. The difference between the Local preference and weight is that Local Preference will advertise to the entire AS, does not get advertised outside of the AS.

 

Default = 100

 

Using local to make a BGP Router in a AS..

 

Bgp default local-preference 600

So every single route it advertises to other routes it will mark as 600, keep in mind if the weight is different that will break the ties.

 

 

Metric attribute…

 

0 is default

Tries to influence other AS

Works between AS

Different than a IGP Lower = Better.

 

<Config-router>Default-metric 200

 

Or you can do a route map.

 

Config-route-map#set metric 200

 

 

 

Neighbor command more than likely just tells the packet where to go to what destination…

 

 

 

 

 

 

 

 

 

 

 

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: