I'm trying to set up a server with 192.... addresses that is able to access the outside world using the gateway provided by my colo. I'm looking at the "Directly connected gateway" example at https://netplan.io/examples#directly-connected-gateway

I also have looked at and tried:

How can I add a route that is "on the link", directly connected to the interface even if the IPs are not the same?

Routes in Netplan... using routes: from the example says unknown key

(but the second one is so obfuscated that I can't figure it out...)

My colo provided gateway is I want anything on the outside world to go through it. I guess I probably don't want things on local networks like 192..., 10..., etc to go through the gateway.

But if what I'm doing is possible I'll just set up another gateway.

Here's what I have so far that doesn't work, where I try to get the eno2 interface to go through the gateway:

version: 2
renderer: networkd
        addresses: []
        dhcp4: no
            addresses: [,]
        addresses: []
        dhcp4: no
            addresses: [,]
          - to:
            on-link: true

then I test it with a ping on that eno2 interface:

decker@dbu2:~$ ping -I eno2
PING ( from eno2: 56(84) bytes of data.
--- ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2043ms

The reason I'm doing this is because my gateway at went down, and rather than set up another gateway I'd like it if this server could just connect to the outside world on its own.

  • Is this Robert Decker of DEC fame? – heynnema Jan 25 '19 at 19:38
  • no, sorry, not me. – Robert A. Decker Jan 25 '19 at 21:35

It is unlikely that this is the correct network configuration for your provider. You should first test whether you are able to ping the gateway address at - chances are you can not.

Whatever network configuration you had previously on, you would need to mirror on your host.

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.