I recently wrote a document on http://jon.spriggs.org.uk/blog explaining how to monitor the interface of a McAfee sidewinder to see when it failed over. I don’t know why I didn’t write it on Posterous, but if you’re following me on Posterous, and you think that you might want to know how to use Perl to repeatedly loop over the same command, and show the results with a date stamp underneath it (a bit like the watch command) then you’ll find this page really useful. In the mean time, I’ve also written the same script for the CSH shell, which is used, amongst other places, on Nokia Firewalls.
- SSH to the Secondary node.
- Check you’re not already primary with the command ifconfig eth-s1p1c0 | grep inet this should return one line showing something like inet mtu 1500 1.2.3.4/24 broadcast 1.2.3.255
- Type this
while (-e /bin/csh)
ifconfig eth-s1p1c0 | grep inet
date
sleep 5
end - Perform your action to provoke fail-over, which may be to unplug an interface attached to the primary firewall, reboot the firewall or unplug a switch directly attached to the firewall. In response (and after approx 1 minute, based on your HA configuration) you should now see in the script’s output, it now shows two lines (or maybe three) – as follows:
inet mtu 1500
inet 1.2.3.4/24 broadcast 1.2.3.255
inet 1.2.3.5/24 broadcast 1.2.3.255 vrrpmac 0:0:aa:bb:cc:dd - Perform your failback and after 1 minute or so, it should revert to just the single line – 1.2.3.4 or equivelent for your network.