1

I recently installed Ubuntu MATE 20.04 (desktop) on the desktop computer I use in the office. I was previously using Ubuntu MATE 18.04, but version advancing failed, so I created a USB installation pen from the iso image and reinstalled. The computer is in an office with a local network. I installed open SSH server from synaptic.

At present, on my computer, network only works with automatic DHCP connection: my computer received the dynamic IP 192.168.1.39. I want to set up a static IP, 192.168.1.121.

To do that, I opened "advanced network configuration" from the control panel, I selected the IPv4 tab, Selected "Manual" rather than "Automatic (DHCP)", added the static IP 192.168.1.121, with Mask 255.255.255.0 and Gateway 192.168.1.255. I inserted 8.8.8.8 as DNS server. Saved (Mask become "24" after saving). And rebooted. Right after rebooting, only for a minute or so,

  • I could ping my static IP from another computer in the network
  • I could ping this other computer IP from my computer

However :

  • The notification applet shows many failed attempts to reach the network and I receive the notification that I do not have network access: "You are offline".
  • The browser cannot reach any site
  • (after a minute or so) I cannot ping my static IP from another computer in the network
  • (after a minute or so) I cannot ping other computer IPs from my computer

In the (working) dynamic/automatic/DHCP condition this is the output of ip addr:

$ ip addr
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_lft 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 fq_codel state UP group default qlen 1000
    link/ether 50:9a:4c:45:02:a2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.39/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6
       valid_lft 603749sec preferred_lft 603749sec
    inet6 fe80::d11e:576:f7a0:5998/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

After trying to set the static IP address, here is the output of ip addr

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_lft 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 fq_codel state UP group default qlen 1000
    link/ether 50:9a:4c:45:02:a2 brd ff:ff:ff:ff:ff:ff

I add that if I switch back to automatic DHCP (but leaving the additional IP address I added), as soon as I save the configuration, I receive the notification that I am now conneceted. I can ping my computer from another, and the other computer from mine. However the browser still cannot reach any site. The situation is the same after rebooting. In this condition the SSH server only works with the dynamic IP address. The new output of ip addr is:

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_lft 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 fq_codel state UP group default qlen 1000
    link/ether 50:9a:4c:45:02:a2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.39/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s31f6
       valid_lft 604642sec preferred_lft 604642sec
    inet 192.168.1.121/24 brd 192.168.1.255 scope global secondary noprefixroute enp0s31f6
       valid_lft forever preferred_lft forever
    inet6 fe80::d11e:576:f7a0:5998/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

If I stop the network, delete the additional IP and restart the network functionality, the network works with the dynamic IP (only). The browser reaches any sites.

How to do?

2
  • You have check gateway IP again. The .255 sounds weird. – N0rbert Oct 9 '20 at 10:31
  • @N0rbert, you are right! I changed to 254 and everything worked. – Francesco Uboldi Oct 9 '20 at 13:37
1

I solved my problem: I had supplied the wrong Gateway address. I find the correct one by logging in another computer of the network and using:

$ ip route | grep default

When I supplied the correct Gateway address everything worked. Thank again, @N0rbert. Sorry for bothering everybody.

1
  • It is great that you have solved the issue! – N0rbert Oct 9 '20 at 13:41
0

If you have access to the DHCP server/router you could allocate a specific IP address to that machine which avoids manually setting on the machine itself. The advantage is if the network changes the updated parts will happen automatically (eg changed gateway, DNS server etc) You could ensure that your DHCP pool of addresses does not overlap the fixed IP you want to use.

.255 is the broadcast address https://www.pcmag.com/encyclopedia/term/broadcast-address your mask would be /24 which is the scope of the network ie the last set of numbers, potentially 255 addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.