I have a bond consisting of 3 IPs
bond1 – 10.196.124.35
bond1:1 – 10.196.124.36
bond1:2 is a virtual interface – 10.196.124.30
When I open a putty session to one of the IPs, how can I check from the shell if I’m currently using the virtual interface or to one of the physicals?
You can figure out which target IP you are using (with openssh server). Variable SSH_CONNECTION contains source IP, source port, target IP and target port.
read -r sip sp tip tp <<< $SSH_CONNECTION echo "$tip" Output (eg.):10.196.124.30 Read more