05-14-2018 03:34 AM - edited 03-05-2019 10:26 AM
Hi Friends,
I have a router where BGP is running.. problem is some time outgoing traffic to internet fluctuates which hamper our services..
We want to do something, where router auto check some internet destination on basis of ping , and if it observe drops, it shut down the defined port.
Can any body help us…
Thans in advance.
05-14-2018 04:02 AM
Hi,
EEM will help you to make port shutdown but it is not a good idea. You can try with IP SLA.
Regards,
Deepak Kumar
05-14-2018 05:00 AM - edited 05-14-2018 05:05 AM
Hi
How it was mentioned previously, you could create a EEM script and using IP SLA, the idea is generate an error message to enable automatically the script, for example:
This script is monitoring the remote IP peering and if the link is down it will shutdown the peering, you can write a script to shutdown the peer or shutdown an interface, the script will do what you want, you can set up the script just on 1 router:
BGP100 ROUTER 1 (10.12.0.1) -------- (10.12.0.2) BGP200 ROUTER 2
ip sla 10
icmp-echo 10.12.0.2
frequency 5
ip sla schedule 10 life forever start-time now
track 10 ip sla 10 reachability
**If the peering is down, it will generate a message like:
%TRACK-6-STATE: 10 ip sla 10 reachability Up -> Down
So your script should be something like:
event manager applet MY-BGP-SCRIPT
event syslog pattern "%TRACK-6-STATE: 10 ip sla 10 reachability Up -> Down"
action 1 cli command "enable"
action 2 cli command "configure terminal"
action 3 cli command "router bgp 100"
action 4 cli command "neighbor 10.12.0.2 shutdown"
Some SLA commands could be vary per the device models. You can create other script to enable the peer again manually but if you want to avoid any flapping or problem with the users I suggest enable it manually once the link is stable.
Hope it is useful
:-)
05-14-2018 05:30 AM
Hi,
I agree with Julio. On a side note, I would suggest to track down the culprit that causes intermittent reachability to internet. This could be due to high utilization of circuit or CRC errors on the circuit, if the circuit is getting saturated at random intervals then you can either look at implementing some sort of QOS policy or upgrade the circuit. For any circuit errors you would need to involve ISP.
Without resolving the underlying issue you would have to rely on manually "no shut" the circuit, so the eem will give you temporary relief, but in the long term it will become a hassle.
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