cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2273
Views
5
Helpful
13
Replies

BGP configuration

raghavendran.r
Level 1
Level 1

Hi ,

 

we have the situation now , BGP* default route is pointed to lower bandwidth circuit , instead primary 50 MB circuit.

 

Brief , 

 

we have 2 circuits connected to single router.

circuit 1 : 50 MB MPLS

Circuit 2 : 5 MB TDM.

Recently some 2 weeks back  50 MB circuit flapped , post that BGP* default route pointed to 5MB TDM .

 

Assuming if clear BGP session for TDM  then BGP* default  route will be pointed  again back to  50MB circuit , but I wanted achieve this  automatically ,when ever  50 MPLS is up then it should be always preferred.

 

Please refer the logs :

 

Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 152.164.92.9 0 65000 65000 i >>>>>>>>50 MPLS 
*> 152.162.126.133 0 65000 65000 i   >>>>>>>>>>>>>>5MB TDM.

1 Accepted Solution

Accepted Solutions

Hello

FYI - I am on my phone at present so apologies for the short reply but it hard to see you post of the configuration 

 

however just picking up on having 1 rtr with 2 ebgp isp peers

 

yoy can use the bgp WEIGHT attribute to influence your egress traffic - (higher value most preferred)

neighbour xxxx weight xxxxx

 

the above wiill preffer the default from the most preffered isp you specify by this bgp path attitude 

 

shouldnt have no need for any EEm scripting or condictional route advertising 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

13 Replies 13

Hello,

 

an IP SLA in conjunction with an EEM script should be able to accomplish this. Post the full configuration of your router so we can fill in the necessary bits and pieces...

Hello,

Thanks...

sh ip route

Gateway of last resort is 152.162.126.133 to network 0.0.0.0

B* 0.0.0.0/0 [20/0] via 152.162.126.133, 2w1d

 

-----------

ROUTER#sh ip bgp
BGP table version is 470, local router ID is 10.128.64.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 152.164.92.9 0 65000 65000 i
*> 152.162.126.133 0 65000 65000 i

 

BGP Config:

 

router bgp 65001
bgp log-neighbor-changes
timers bgp 12 36
redistribute connected

5MB circuit
neighbor 152.162.126.133 remote-as 65000
neighbor 152.162.126.133 description *Connection to PIP PE*
neighbor 152.162.126.133 password 
neighbor 152.162.126.133 route-map filter_in in

50MB circuit
neighbor 152.164.92.9 remote-as 65000
neighbor 152.164.92.9 password 
neighbor 152.164.92.9 route-map filter_in in

Hello,

 

post the output of:

 

sh run

Please find >> sh run

Please PFA

Hello,

 

if clearing the BGP session restores the default route, you could use the EEM script below to automate this. I am sure there are plenty of other ways to accomplish what you want, this is one option:

 

event manager applet CLEAR_BGP
event syslog pattern "%BGP-5-ADJCHANGE: neighbor 152.164.92.9"
action 1.0 cli command "enable"
action 2.0 cli command "clear ip bgp 152.162.126.133"

Jon Marshall
Hall of Fame
Hall of Fame

 

You can use IP SLA but BGP has built in features you can use for this. 

 

It looks like both connections are on the same router so you can use the BGP weight attribute to favour the MPLS link as long as it is up. 

 

Jon

@Jon Marshall  Apologies didn’t notice you had already replied 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello

FYI - I am on my phone at present so apologies for the short reply but it hard to see you post of the configuration 

 

however just picking up on having 1 rtr with 2 ebgp isp peers

 

yoy can use the bgp WEIGHT attribute to influence your egress traffic - (higher value most preferred)

neighbour xxxx weight xxxxx

 

the above wiill preffer the default from the most preffered isp you specify by this bgp path attitude 

 

shouldnt have no need for any EEm scripting or condictional route advertising 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks lot Paul Driver!!.

 

Its very detailed  information you what I received.

 

Thanks

Rag

 

 

Hi Paul ,

Understood highest weight will be preferred , but one doubt its only for outgoing/egress traffic , right?

Hello,

 

you are right: weight (and local preference) are used for outbound traffic, MED/AS-PATH/COMMUNITIES for inbound...

Hello

Correct -  egress/outbound
BGP Weight attribute is local to the rtr and as far as i am aware isnt advertised in any bgp updates, It is used to influence your internal traffic to choose the best path egress (outbound) from within you local ASN (one router) that has the highest weighted advertised route from your ISP.

 

BGP Local-Preference attribute is used between IBGP peers within your local ASN (dual routers) to choose the best path egress (outbound) and as far as am i aware these can be advertised in bgp updates, And either of these attributes, the higher specified value take precedence.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card