Netplan directly connected gateway












0















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 207.178.166.185. 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:



network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [192.168.1.10/24]
gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
eno2:
addresses: [192.168.1.11/24]
#gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
routes:
- to: 0.0.0.0/0
via: 207.178.166.185
on-link: true


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



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


The reason I'm doing this is because my gateway at 192.168.1.20 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.










share|improve this question























  • Is this Robert Decker of DEC fame?

    – heynnema
    Jan 25 at 19:38











  • no, sorry, not me.

    – Robert A. Decker
    Jan 25 at 21:35
















0















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 207.178.166.185. 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:



network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [192.168.1.10/24]
gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
eno2:
addresses: [192.168.1.11/24]
#gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
routes:
- to: 0.0.0.0/0
via: 207.178.166.185
on-link: true


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



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


The reason I'm doing this is because my gateway at 192.168.1.20 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.










share|improve this question























  • Is this Robert Decker of DEC fame?

    – heynnema
    Jan 25 at 19:38











  • no, sorry, not me.

    – Robert A. Decker
    Jan 25 at 21:35














0












0








0








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 207.178.166.185. 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:



network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [192.168.1.10/24]
gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
eno2:
addresses: [192.168.1.11/24]
#gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
routes:
- to: 0.0.0.0/0
via: 207.178.166.185
on-link: true


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



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


The reason I'm doing this is because my gateway at 192.168.1.20 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.










share|improve this question














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 207.178.166.185. 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:



network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [192.168.1.10/24]
gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
eno2:
addresses: [192.168.1.11/24]
#gateway4: 192.168.1.20
dhcp4: no
nameservers:
addresses: [207.178.128.20, 207.178.128.21]
routes:
- to: 0.0.0.0/0
via: 207.178.166.185
on-link: true


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



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


The reason I'm doing this is because my gateway at 192.168.1.20 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.







netplan






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 25 at 18:39









Robert A. DeckerRobert A. Decker

1




1













  • Is this Robert Decker of DEC fame?

    – heynnema
    Jan 25 at 19:38











  • no, sorry, not me.

    – Robert A. Decker
    Jan 25 at 21:35



















  • Is this Robert Decker of DEC fame?

    – heynnema
    Jan 25 at 19:38











  • no, sorry, not me.

    – Robert A. Decker
    Jan 25 at 21:35

















Is this Robert Decker of DEC fame?

– heynnema
Jan 25 at 19:38





Is this Robert Decker of DEC fame?

– heynnema
Jan 25 at 19:38













no, sorry, not me.

– Robert A. Decker
Jan 25 at 21:35





no, sorry, not me.

– Robert A. Decker
Jan 25 at 21:35










1 Answer
1






active

oldest

votes


















0














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 207.178.166.185 - chances are you can not.



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






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1112877%2fnetplan-directly-connected-gateway%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    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 207.178.166.185 - chances are you can not.



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






    share|improve this answer




























      0














      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 207.178.166.185 - chances are you can not.



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






      share|improve this answer


























        0












        0








        0







        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 207.178.166.185 - chances are you can not.



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






        share|improve this answer













        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 207.178.166.185 - chances are you can not.



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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 30 at 18:24









        slangasekslangasek

        2,50811419




        2,50811419






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1112877%2fnetplan-directly-connected-gateway%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido