Forum Discussion
jcrew
Jul 16, 2014Nimbostratus
irule to disable interface
Trying to come up with a work around for not having BFD implemented between LTM and router in imish. Goal is to have interface shut down if far end of interconnect becomes ICMP unreachable. If far end becomes reachable, enable interface. I'm thinking I can do this in the Linux OS with a perl script, but any thoughts would be appreciated.
- RoryNimbostratus
How often are you wanting to run this? If it's on a per minute basis you could just add a crontab with a shell script like this:
!/bin/bash count=0 IP_ADDR="1.2.3.4" count="`ping -c 1 $IP_ADDR | grep 'packets transmitted' | awk '{print $4 }'`" if [ $count -eq 0 ] then echo "$count packets received" echo "ifconfig interface1 down" fi
Or you could make it an infinite loop with a sleep period.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects