Help configuring network to reflect new Linode IPv4 instead of snapshot IPv4
I need help configuring this newly deployed Linode's networking settings. I deployed an image of an old Linode snapshot. I need to replace the old network configuration to reflect that of the new IPv4 address. It appears the IPv4 currently showing is from the snapshot (Old Linode). It also appears the IPv6 is reflecting the new IPv6? Either way, I need to get this Linode's network config'd properly.
I accidentally deleted one of my Linodes while cleaning out some older ones. Fortunately, Linode takes a snapshot of each Linode (whether you ask them to or not), for situations like this, so we can deploy the snapshot to a new Linode. The only downside besides the near-heart-attack that emerges when one realizes they deleted their entire business, is when restoring the Image, it must be done to a new Linode, which means a new IPv4 Address.
After launching this image on a brand new Linode, I cannot SSH in. Checking my network settings, the Linode's network settings shows the IPv4 address of the previous Linode. This makes sense, as it is a literal snapshot of the previous linode. However, I do not know how to reconfigure this Linode's settings to reflect the new IPv4 Address. After googling a bit, I cannot seem to find a tutorial that reflects Linode's basic configuration. Most tutorials want me to hardcore an IP address, whereas I cannot find any hardcoded IP addresses inside the Linode's config.
NOTE: The IPv6 seems to have been updated, but not the IPv4.
IPv4 should be: 173.255.214.177
IPv6 should be: 2600:3c01::f03c:93ff:fed9:0693
IPv4 currently is: 45.33.44.62 (IP from Deleted Linode)
IPv6 currently is: 2600:3c01::f03c:93ff:fed9:693
I can get inside the LISH Console. When it loads… The info printed on the screen is from the previous setup, and was not refreshed or updated when I restarted the Linode. Below I mark OLD near the old IP that should not be there anymore.
System load: 0.22
Usage of /: 60.5% of 78.20GB
Memory usage: 21%
Swap usage: 22%
Processes: 179
Users logged in: 0
IPv4 address for br-e24496f61c68: 172.20.0.1
IPv4 address for br-e3393d8ad97a: 172.31.0.1
IPv4 address for docker0: 172.17.0.1
IPv4 address for eth0: ** OLD ** 45.33.44.62
IPv6 address for eth0: ** CURRENT ** 2600:3c01::f03c:93ff:fed9:0693
Again, this is out of date:
root@localhost:~# ifconfig eth0
eth0: flags=4163<up,broadcast,running,multicast> mtu 1500
inet 45.33.44.62 netmask 255.255.255.0 broadcast 45.33.44.255
inet6 fe80::f03c:93ff:fed9:693 prefixlen 64 scopeid 0x20<link>
inet6 2600:3c01::f03c:93ff:fed9:693 prefixlen 64 scopeid 0x0<global>
ether f2:3c:93:d9:06:93 txqueuelen 1000 (Ethernet)
RX packets 14161 bytes 1367454 (1.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7775 bytes 455378 (455.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</global></up,broadcast,running,multicast>
On most tutorials, it wants me to edit the netplan(5) config to add a static IP directly to the config. But that is not how my current setup is.
cat /etc/netplan/01-netcfg.yaml
───────┬──────────────────────────────────────────────────────────────
│ File: /etc/netplan/01-netcfg.yaml
───────┼──────────────────────────────────────────────────────────────
1 │ # This file describes the network interfaces available on your system
2 │ # For more information, see netplan(5).
3 │ network:
4 │ version: 2
5 │ renderer: networkd
6 │ ethernets:
7 │ eth0:
8 │ dhcp4: yes
───────┴──────────────────────────────────────────────────────────────
I have "Network Helper" enabled in settings. I have restarted my Linode. I'm stuck! I'm sure there's a simple fix. Can anyone help?
1 Reply
If you have Network Helper enabled, your network configuration files should be rewritten at boot to reflect the new Linode's IP. You said you have it enabled in "Settings" but I'm wondering if it may be disabled for this specific Linode. I would double check you have it enabled in the Configuration Profile for this instance and reboot if you had to enable it.
If it was enabled and just wasn't working properly, then you will want to disable it and manually configure your network files. This guide titled Network Configuration Using systemd-networkd will help you configure the IPv4 and IPv6 addresses statically for your Linode.