Changing IP on router for Ubuntu 24.04 server removes gateway from server

Ubuntu Version:

24.04 LTS

Desktop Environment (if applicable):

N/A Running as Server

Problem Description:
I have an Ubuntu 24.04 server that I use to run Plex and other stuff in docker containers. I’ve recently started to clean up my router’s DHCP assigned IP addresses and am attempting to move my server from .13 to .20 on the VLAN.

When it’s on .13 everything works fine.

When I move it to .20 and reboot I lose internet connectivity to the server. My machine gets the new .20 IP and the DNS info and I can ping out to IP addresses and domains but when I try to go to Plex, or QBitTorrent or any of those using even the IP address or try to SSH it doesn’t work.

When I run “ip route show” with .13 I get

default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.13 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
172.18.0.0/16 dev br-45cfb2e87c6d proto kernel scope link src 172.18.0.1
172.19.0.0/16 dev br-c90651989411 proto kernel scope link src 172.19.0.1
172.22.0.0/16 dev br-e89861e32588 proto kernel scope link src 172.22.0.1
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.13 metric 100

With .20 I get

default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.13 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
172.18.0.0/16 dev br-45cfb2e87c6d proto kernel scope link src 172.18.0.1
172.19.0.0/16 dev br-c90651989411 proto kernel scope link src 172.19.0.1
172.22.0.0/16 dev br-e89861e32588 proto kernel scope link src 172.22.0.1

What would cause this to happen by just changing the IP on the router? No other machine has a .20 address. There was a machine but it was moved off and everything was flushed/rebooted and when I ping .20 no host is reachable. I do not use netplan and I don’t want to set the static IP on the server. I would rather it continue thinking it is DHCP and have the router assign the IP address.

I’m just trying to understand what would cause the routing to go away for the default gateway just by getting a new IP address.

Relevant System Information:
Server environment running for Plex and other services in docker containers

Could it be a netplan thing? I don’t know what software you’re using but, Ubuntu’s a proponent of netplan. Look at /etc/netplan/01-network-manager-all.yaml and see if the default gateway is pointed at the IP you want.

Temporarily you can play with ip route all you want, but, it won’t make persistent changes.

Yeah I don’t have netplan enabled at all. My netplan directory is empty.

I have it working with .23 (a never used IP) but I just don’t know why 20 won’t work. I guess I can give it some time to further clear out use of that IP but it just seems weird that yesterday I couldn’t get out with 20 then this morning I can get out and ping the server from my PC but can’t SSH or access any of the apps.

I don’t like it when things “solve” themselves :slight_smile: I like to know why something is happening the way it is.

well, you need to provide more info… run the wireless-info script and either interpret it or post the results. Good luck.

Thanks but it’s wired so wireless-info wouldn’t really help me. Thanks for the luck. I think though it was just a clash with prior IP address that hadn’t cleared through. I moved it to an IP that had never been used and it worked fine so just trying to find out what is still holding on to the old IP.

No, it would, it does a lot more than check your wireless; the naming isn’t very apt. It pulls together your networking software, your configurations, your logs… etc.

(If the system doesn’t have wireless, it’s not fatal, it’s recorded, along with all other data marshaled. It’s really more of a network tool than a wifi tool)

It tries to obtain the info from lists of diagnostic software, common OS configuration locations and logging.

I typically run it to maintain a record of state, useful when adding new hardware/software or change detection…

Ahhh OK. I just went to the link and saw “This script gathers the infos necessary for troubleshooting a wireless connection” so thought it was for wireless. I’ll play around with it. Thanks.

This topic was automatically closed after 30 days. New replies are no longer allowed.