Forum Discussion
james_lee_31100
Nimbostratus
Aug 25, 2017What is the best way to verify new IP address is not used on F5 ltm
Hi, Everyone:
I am trying to use Ansible to build a lot of VIPs, Is there a way to verify new IP addresses is not used on LTM, currently I am doing following (grep /config/bigip.conf, and grep ...
Juraj
Cirrus
Mar 28, 2019This will show you all self-IPs, float IPs, and all VS IPs:
( tmsh list /ltm virtual one-line ; tmsh list /net self one-line ) | egrep '^(ltm virtual|net self) ' | sed -e 's/^.* destination //g' -e 's/^net self //g' | cut -d' ' -f1 | cut -d: -f1 | sort -t. -n -k1,1 -k2,2 -k3,3 -k4,4 | uniq
You need to run it on F5
Or, remotely via SSH:
ssh YOUR-BIG-IP "( tmsh list /ltm virtual one-line ; tmsh list /net self one-line )" | egrep '^(ltm virtual|net self) ' | sed -e 's/^.* destination //g' -e 's/^net self //g' | cut -d' ' -f1 | cut -d: -f1 | sort -t. -n -k1,1 -k2,2 -k3,3 -k4,4 | uniq
Or, if you don't have a full shell, but tmsh cli only:
ssh YOUR-BIG-IP "list /ltm virtual one-line ; list /net self one-line" | egrep '^(ltm virtual|net self) ' | sed -e 's/^.* destination //g' -e 's/^net self //g' | cut -d' ' -f1 | cut -d: -f1 | sort -t. -n -k1,1 -k2,2 -k3,3 -k4,4 | uniq
I have written a wrapper script for it, which shows me all used and free F5 IPs in a specific subnet. I might just share it somewhere.
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