In order to have a virtual ip, I sometimes add another IP for my interface enp2s0f0
using
# ifconfig enp2s0f0:1 192.168.201.33 up
I also send a gratitus arp in order to publish the new ip of the device.
I've noticed that the device answers to pings alternatively: when it answers to 192.168.201.224
(its original ip) it doesn't answer to 192.168.201.33
(vip), and the opposite.
# ip addr show dev enp2s0f0
2: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 78:e7:d1:e2:2f:51 brd ff:ff:ff:ff:ff:ff
inet 192.168.201.224/24 brd 192.168.201.255 scope global enp2s0f0
valid_lft forever preferred_lft forever
inet 192.168.201.33/24 brd 192.168.201.255 scope global secondary enp2s0f0:1
valid_lft forever preferred_lft forever
Even though there's no ping, I was able to connect through ssh
to both of the ips.
Once after removing the vip with ifconfig enp2s0f0:1 192.168.201.33 down
I couldn't login the device using ssh
and lost connectivity for open sessions, but unfortunately I can't say what happened.
Is this behavior normal? What should I expect?