Ubuntu Static Public IP not working (22.04)

netplanstatic-ipUbuntuubuntu-22.04

We are trying to install a Machine with Ubuntu Server 22.04 in a Data Centre. The DC Host told us these public IP Addresses:

  • IPv4 Net: XXX.XXX.XXX.160/29
  • Gateway: XXX.XXX.XXX.161
    (The X's are the same for IPv4 and Gateway)

So, we are not really Networking experts but following some Guides we changed the netplan Config File to:

  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      addresses: [XXX.XXX.XXX.160/29]
      routes:
        - to: default
          via: XXX.XXX.XXX.161
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]
    eno2:
      dhcp4: true

Its still not working and we tried a loooot of things in many hours. Here some more informations and behaviours:

  • Our server rack has a fibre glass cable, that should connect us to the Internet. I have never seen this, but a guy in the data centre gave us a Unmanaged Media Converter T RJ45 to X SFP. Does this makes sense? Never seen such a device.
  • When we connect the server to the internet (via the Media Converter) the Gateway IP recieves Pings from the outside world. Also traceroutes do work.
  • We cannot Ping the Outside world at all. We also cant Ping the Gateway IP from the Server.
  • Tracerouting the IP ending with .160 does not work. It ends in an endless loop.
  • SSH to the Gateway IP throws us a "Connection Refused". SSH to the .160 – .167 IPs throws us a "No route to host" error.
  • When disconnecting the Server from the Media Converter (the Media Converter is still plugged into the Fibre Glass Cable) we still get the same SSH errors, but we cant ping the gateway anymore.
  • We brought a Router from home to connect a Laptop to the Server at the DC. Could this break any configs in ubuntu permanently? We also disconnected the router from the server all the time we tried a connection and also restarted the server a couple of times.
  • A nmap scan showed us, that the port 646 is open. Is that maybe a hint for something? Is it maybe the Media Converter?
  • Of course we ran "sudo netplan apply" all the time. As mentioned we also restarted the server regulary.

We don't know what the problem is. Are we missing something? Are some extra configurations in Ubuntu needed. Do we maybe need an extra device like a router or switch? Did our Data Centre Host forget to tell us an information, that could be important?

Thanks for your help

Best Answer

  • IPv4 Net: XXX.XXX.XXX.160/29
  • Gateway: XXX.XXX.XXX.161 (The X's are the same for IPv4 and Gateway)

You have a /29 network. That means that .160 is the network address, and the gateway (.161) is at the first usable address in the subnet.

Thus the first address free for your use are xxx.xxx.xxx.162 and the last .166, with .167 for broadcast. Try changing .160 to .162, and my bet is that things will work:

addresses: [XXX.XXX.XXX.160/29]

to

addresses: [XXX.XXX.XXX.162/29]

ipcalc 192.0.0.160/29 will give you this information.