cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
936
Views
0
Helpful
3
Replies

Auto port shutdown.

iqbal_2535
Level 1
Level 1

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.

3 Replies 3

Deepak Kumar
VIP Alumni
VIP Alumni

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

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

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 

:-)

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

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.

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card