Score:0

Multiple IP addresses assigned to the same physical interface AND unable to access internet

vn flag
Wes

Skip this paragraph if you don't want to hear about me. I am not a network engineer, I am not a software engineer. I am a video editor. I maintain a small network of storage servers, and have for quite a while. I have picked up a good bit of networking along the way, and have friends who work in the field (and yes I've asked them about this). I also have never posted to a forum like this before, so feel free to tell me what I'm doing wrong.

This problem started after a reboot of the server. I have no other information about what could have caused it, and I'm baffled as to how it could possibly happen.

Ubuntu version is: VERSION="20.04.3 LTS (Focal Fossa)"

Upon logging in via ssh, the server reports that enp6s0 has the ip address 192.168.0.5 (the address I use for ssh, and accurate to the dhcp server) and 192.168.1.2.

Output of server upon SSH connection being established:

Usage of /:   2.9% of 915.89GB   Users logged in:         0
Memory usage: 2%                 IPv4 address for enp6s0: 192.168.0.5
Swap usage:   0%                 IPv4 address for enp6s0: 192.168.1.2

Running the ifconfig command yields the following result:

enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.5  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::225:90ff:fe00:d2e0  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:00:d2:e0  txqueuelen 1000  (Ethernet)
        RX packets 3649  bytes 600206 (600.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1260  bytes 130567 (130.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xfbce0000-fbd00000

enp7s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:25:90:00:d2:e1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  memory 0xfbde0000-fbe00000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 205  bytes 16928 (16.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 205  bytes 16928 (16.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Reporting only the "correct" ip. However, upon attempting to ping "www.google.com" the following occurs:

From 192.168.1.2 (192.168.1.2) icmp_seq=1 Destination Host Unreachable
From 192.168.1.2 (192.168.1.2) icmp_seq=2 Destination Host Unreachable
From 192.168.1.2 (192.168.1.2) icmp_seq=3 Destination Host Unreachable

I can't think of a single reason that the server wouldn't have internet access. All other functions of the server seem to be normal, except for the fact that it cannot access the wider web.

My interfaces file:

auto enp6s0
iface enp6s0 inet static
        address 192.168.0.5
        netmask 255.255.255.0
        gateway 192.168.0.1
        dns-nameservers 192.168.0.107

Resolv.conf file:

# Generated by dhcpcd from enp6s0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 192.168.0.107
# /etc/resolv.conf.tail can replace this line

Where do I even start when troubleshooting this? Why is the server reporting two ipv4 addr for a single hardware interface? Why can't it access the internet/why is it trying from the "incorrect" interface?

And most importantly, how do I fix this?

Absolutely any help is appreciated - thanks.

chili555 avatar
cn flag
In Ubuntu 20.04, the /etc/network/interfaces method is deprecated. Please edit your question to show the result of the terminal command: `cat /etc/netplan/*.yaml` Welcome to Ask Ubuntu.
waltinator avatar
it flag
Look at `ip route`, and read `man ip ip-route`.
Score:0
vn flag
Wes

Turned out to be an issue with the network table, as waltinator suggested

Zanna avatar
kr flag
If you [edit] to explain how you fixed it, that might help future visitors with the same problem
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.