Scenario:
– Server A and Server B hardware are of the same model and capacity
– Server A and Server B hard drives were been swapped recently, where Server A hard drives had been transferred to be installed in Server B and vice versa
– Server A was running Ubuntu Linux, and Server B’s OS was VMWare
– Server A, which had Server B’s VMWare OS was able to boot without any problems
– Server B, which had Server A’s Ubuntu Server OS was able to boot.
– Other servers on the same VLAN were able to connect to Server B without problems
– Users from different VLANs complained that they could not reach Server B using its original Server A’s Ubuntu Linux IP address, even though that IP was statically configured on Server A prior to the hard drive switching incident
– Ping results to Server B were intermittent successes and failures
From 10.10.140.128 icmp_seq=760 Destination Host Unreachable
From 10.10.140.128 icmp_seq=761 Destination Host Unreachable
From 10.10.140.128 icmp_seq=762 Destination Host Unreachable
64 bytes from 10.10.100.228: icmp_seq=1 ttl=64 time=1.199 ms
From 10.10.140.128 icmp_seq=760 Destination Host Unreachable
From 10.10.140.128 icmp_seq=761 Destination Host Unreachable
From 10.10.140.128 icmp_seq=762 Destination Host Unreachable
From 10.10.140.128 icmp_seq=762 Destination Host Unreachable
64 bytes from 10.10.100.228: icmp_seq=1 ttl=64 time=1.199 ms
Troubleshooting:
– On clients with issues connecting to the server, run the ‘arp -a’ command to discover the MAC address associated with the server’s ip
– It appeared that the MAC address for the original server A’s IP, which now resided in Server B’s chassis, pointed to Server B mac address.
– It was also confirmed on Server B by running either ‘ifconfig’ or ‘ip addr show’
testuser@ubuntu-server:~$ ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.100.228 netmask 255.255.255.0 broadcast 192.168.100.255
ether 72:c8:fb:5e:1d:eb txqueuelen 1000 (Ethernet)
RX packets 543498 bytes 634630257 (634.6 MB)
RX errors 0 dropped 5 overruns 0 frame 0
TX packets 118913 bytes 17683157 (17.6 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xb8a00000-b8a20000
testuser@ubuntu-server:/home/kim# ip addr show
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 72:c8:fb:5e:1d:eb brd ff:ff:ff:ff:ff:ff
inet 10.10.100.228/24 brd 192.168.100.255 scope global dynamic noprefixroute eno1
valid_lft 85514sec preferred_lft 85514sec
Resolution:
Whenever a Ubuntu Server hard drive has been moved to a different server, one must also reconfigure its MAC address to reflect its new host’s network interface.
Here’s the instruction via GUI: click on the network icon > select Edit connections > Select your current network > Edit the selected connection > select the Ethernet tab > set Clone Mac address = {input the desired MAC address}, stable, or Permanent > Disconnect > re-connect the interface
CLI method:
# Edit the interfaces file
sudo vim /etc/network/interfaces
# add this entry for the eth0 interface
iface eth0 inet static
hwaddress ether 00:00:00:00:MAC-ADDRESS-HERE
# restart server
sudo reboot now
Optional: the intermediary routers and switches should automatically update its ARP table with the changes so that clients could be redirected to the desired and correct Server. Here are some commands to flush the ARP table on switch or router running a Linux based OS:
# flush Mac Table of a Linux based router/switch
admin@test-switch:~$ sudo ip -s -s neigh flush all
[sudo] password for kim:
10.10.100.100 dev eno1 used 1420/1495/1417 probes 6 FAILED
10.10.100.50 dev eno1 lladdr 00:0c:29:27:3b:13 used 2599/2159/2099 probes 6 STALE
10.10.100.2 dev eno1 used 1026/1338/1023 probes 6 FAILED
10.10.100.1 dev eno1 lladdr 74:83:c2:df:f9:8b ref 1 used 2617/0/2617 probes 4 REACHABLE
10.10.100.11 dev eno1 used 971/2677/969 probes 6 FAILED
10.10.100.5 dev eno1 lladdr 00:11:32:e4:c5:ca used 137/132/108 probes 1 STALE
*** Round 1, deleting 6 entries ***
*** Flush is complete after 1 round ***