Score:-2

What does "routes" mean? [Netplan, YAML file]

nu flag

Here's an example I've taken from somewhere:

routes:
    - to: default
      via: 10.225.192.1

I've seen that this syntax has replaced the "gateway4", however, I've searched for infomation about the concept "route" and seems to be different from "gateway".

Here is what I know:

gateway: It is the ip of the device that allows us to connect to other networks.

route: It is the path that a package takes to go from computer "A" to computer "B".

So...
1: Are my definitions right?
2. How is the concept of "route" applied in the syntax?
3. Could you explain me the syntax?
Note: I've assumed that what goes next to "via" had to be the ip what would go in the gateway, but "to: default"? I'm not sure what its function is.

David avatar
cn flag
Did you Google what a route is in networking?
Camy07 avatar
nu flag
Yes, the definition I've written on the question is what I've understood. So I'm asking because I still don't understand how it is applied in the syntax of the yaml file.
David avatar
cn flag
You could just look at some of the other sites the search produces till you understand.
Score:0
vn flag

The Netplan reference has information on this.

Default routes

The most common need for routing concerns the definition of default routes to reach the wider Internet. Those default routes can only defined once per IP family and routing table.

The Netplan reference is the de facto standard for understanding the Netplan syntax.

The default route is also commonly referred to as default gateway (hence the Netplan property gateway, which is now replaced by default route as in your example).

If you want to learn more about networking terminology, Ask Ubuntu probably isn't the most obvious place. You could start on Wikipedia though (Routing and Default route).

paladin avatar
kr flag
Many people are confusing gateway with router. Even many IT folks. There is a definitive difference between a gateway and a router. A gateway is per definition a device which is able to translate network protocols into other network protocols. A router is a device which forwards/sends IP packages from/to the correct network segment.
I sit in a Tesla and translated this thread with Ai:

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.