Forum Discussion
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.
1 Reply
- Rory
Nimbostratus
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" fiOr you could make it an infinite loop with a sleep period.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
