Score:2

ubuntu 20.04 wrong ip in LAN

my flag

After updating Ubuntu 20.04 and installing wireguard I'm facing an issue. My machine wasn't reachable via ssh and pings anymore.
ping 192.168.178.42 (the LAN ip of the ubuntu machine) outputs:

$ ping 192.168.178.42
PING 192.168.178.42 (192.168.178.42) 56(84) bytes of data.
From 192.168.178.55 icmp_seq=1 Destination Host Unreachable
From 192.168.178.55 icmp_seq=2 Destination Host Unreachable
From 192.168.178.55 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.178.42 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6274ms
pipe 4

so I went in physically and disabled ufw... still unreachable

the output of ip a is:

# ip a
1: lo: <LOOPBACK, UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_Ift forever preferred_lft forever
    inet6 ::1/128 scope host
       valid _lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST, MULTICAST, UP,LOWER _UP> mtu 1500 qdisc fa_codel state UP group default qlen 1000
    link/ether 18:31:bf:ba:7e:54 brd ff:ff:ff:ff:ff:ff
    inet 192.168.179.32/24 brd 192.168.179.255 scope global dynamic enp0s31f6
       valid_lft 18238sec preferred_lft 18238sec
    inet6 fd00::1:1a31:bfff:feba:7e54/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 7031sec preferred_lft 3431sec
    inet6 fe80::1a31:bfff:feba:7e54/64 scope link
       valid_lft forever preferred_lft forever
3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP› mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none
    inet 192.168.6.1/24 scope global wg0
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP› mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:34:c5:78:af bra ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

which is wierd because i dont know where address 192.168.179.32 is coming from.
192.168.178.42 used to be the ip the router assigned to ubuntu

netstat -r outputs:

# netstat -r
Kernel IP routing table
Destination      Gateway       Genmask         Flags  MSS Window  irtt Iface
default          fritz.box     0.0.0.0         UG     0   0       0    enp0s31f6
172.17.0.0       0.0.0.0       255.255.0.0     U      0   0       0    docker0
192.168.6.0      0.0.0.0       255.255.255.0   U      0   0       0    wg0
192.168.179.0    0.0.0.0       255.255.255.0   U      0   0       0    enp0s31f6
fritz.box        0.0.0.0       255.255.255.255 UH     0   0       0    enp0s31f6

and ip r:

# ip r
default via 192.168.179.1 dev emp0s31f6 proto dhcp src 192.168.179.32 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.6.0/24 dev wg0 proto kernel scope link src 192.168.6.1
192.168.179.0/24 dev empos31f6 proto kernel scope link src 192.168.179.32
192.168.179.1 dev enpos31f6 proto dhcp scope link src 192.168.179.32 metric 100

could the error be that my machine is thinking 192.168.179.32 is its local ip? is /etc/netplan/ wrong?

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp0s31f6:
      dhcp4: true
  version: 2

I initially thought this was an issue with my router, but all my other devices still have their 192.168.178.x ip and are ping / ssh-able.

Thank you in advance :)

Bram avatar
cn flag
Does your computer have multiple ethernet ports? If so, if you plug the cable in the other port, the router will see a different MAC address. Check your router settings which MAC has been assigned the expected IP. Then check that MAC with the output of `ip a` link/ether.
dummyuser avatar
uy flag
Sounds like this might not be an ubuntu issue. Please check the settings of your Fritzbox. Is th “Guest” network enabled? Does it use the range `192.168.179.0/24`? Are you connected to `LAN4` of the Fritzbox? What do the network settins tell you about the old IP and the IP in the fritzbox?
bj4rne avatar
my flag
@dummyuser i investigated futher and found out there is in fact a guest network using the `192.168.179.x` range.
Score:1
uy flag

Sounds like this is not an ubuntu issue. Fritzbox uses the IP range 192.168.179.0/24 for the “Guest” network by default. For some - to me unknown - reasons you are connected to the Guest network and not to your internal network.

Possible Solutions:

  1. Reconfigure the fritzbox and disable the Guest network
  2. Use Lan Port 1-3 instead of LAN Port 4 at the Fritzbox (Port 4 is in the guest network) (depending on Fritzbox Version)
  3. check any other option in the fritzbox

Reboot after implementation.

I sit in a Tesla and translated this thread with Ai:

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.