Score:0

Netplan config with Gateway outside subnet

cn flag

I'm having trouble with some routing. I cannot get to 192.168.1.1 Below is the config. I have tried with onlink and without. Not sure what onlink does really. There are a few switches this machine goes through before it would hit the router. is there something i'm missing? ip route show shows that it has added the routes correctly.

Thanks!

Netplan config

network:
  renderer: networkd
  ethernets:
    enp7s0:
       addresses:
            - 192.168.0.172/24
       routes:
          - to: 0.0.0.0/0
            via: 192.168.1.1
      nameservers:
           addresses:
               - 192.168.1.1
version: 2
David avatar
cn flag
I'm having trouble with some routing ... What is the trouble? What is it not doing you expect it to do? What are the error messages? The people who might be able to help you can not if you do not give any information.
Score:0
us flag

You have listed as your default gateway an address, 192.168.1.1, which is not part of the configured local network, 192.168.0.172/24. Either the gateway for your default route should be on the 192.168.0.0 network, or you need to provide information about what the intermediate router is that lets you get to 192.168.1.1.

shanock avatar
cn flag
That makes sense. However, I don't understand how to provide information on how to route to it. How are routes set up if this was through ubuntu desktop and just connecting to the network because that works fine. Should I try to list ip tables and routes on that type of installation and copy it over?
us flag
Yes, if you have another machine on the same subnet with working networking, that's a good source for copying the correct information for your network.
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.