03-30-2019 12:14 AM
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.
Solved! Go to Solution.
03-30-2019 06:38 AM
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
03-30-2019 12:52 AM
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...
03-30-2019 01:13 AM
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
03-30-2019 01:22 AM
Hello,
post the output of:
sh run
03-30-2019 01:30 AM
03-30-2019 01:35 AM
03-30-2019 02:28 AM
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"
03-30-2019 02:11 AM
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
03-30-2019 06:48 AM
@Jon Marshall Apologies didn’t notice you had already replied
03-30-2019 06:38 AM
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
03-31-2019 11:28 PM
Thanks lot Paul Driver!!.
Its very detailed information you what I received.
Thanks
Rag
03-31-2019 11:33 PM
04-01-2019 12:22 AM
Hello,
you are right: weight (and local preference) are used for outbound traffic, MED/AS-PATH/COMMUNITIES for inbound...
04-01-2019 01:38 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide