Alturic | Hi all. I'm trying for the life of me to make a netplan file that configured two NICs, and with the deprecations (gateway4, routes/routing-policy, etc) I'm having a hell of a time figuring out how to achieve this. Ultimately eth0 should be everything on the public iface, and eth1 should be everything on the private iface. Can anyone take a look and | 12:02 |
---|---|---|
Alturic | give me some pointers? https://pastebin.ubuntu.com/p/gYHtJhRnm8/ | 12:02 |
slyon | Alturic: Is there any specific reason that you specify a "to: default" route on eth1? I guess there should only be a single default route on your system (that reaches the public internet, i.e. the one on eth0) | 12:04 |
slyon | I'd suggest changing the route on eth1 to "to: 192.168.1.0/24" to make it handle traffic to your local/private network. | 12:05 |
Alturic | Realistically, yea there's only one default public and private route. Unless the private route(s) don't need to be specified because those are (at least currently) only ever going to be IP-to-IP connections. | 12:05 |
slyon | oh, also you probably want to drop the "table: 100/200" entries. as you're writing those routes to specific routing table (100/200), but don't have any policy to make use of it | 12:06 |
Alturic | Well the reason I put the tables keys (various ChatGPTs mentioned it) was because I was trying to use two routes. | 12:10 |
Alturic | So you're saying remoting the table keys, and removing the eth1 (private lan) route key everything should work as expected? | 12:11 |
Alturic | Also, just to see if I understand networking at all like I thought, wouldn't 192.168.1.160/24 and 192.168.1.0/24 ultimately be the same thing? 192.168.1.1-192.168.1.254? | 12:12 |
slyon | No. you still want the eth1 route, but not as a default route, but only "to: 192.168.1.0/24" (i.e. your private network) | 12:12 |
Alturic | Ah! You meant putting the route on eth1 to that, apologies. | 12:13 |
slyon | You'd need to use two different routing-tables, if you'd need to define two default routes, but I don't think that's necessary here. | 12:13 |
Alturic | Yea, like I said eth1 is all IP-to-IP connections on the LAN side so I don't know if routing is needed like that. | 12:14 |
slyon | Alturic: something like this might work: https://pastebin.ubuntu.com/p/Q74X98jnBj/ | 12:14 |
danilogondolfo | the route on eth1 is not needed actually | 12:15 |
danilogondolfo | eth1 is part of that network, so the entire 192.168.1.0/24 is reachable | 12:16 |
slyon | and btw: 192.168.1.160/24 is one specific IP address from within the 192.168.1.0/24 network (range of IP addresses 192.168.1.1-192.168.1.254) | 12:17 |
danilogondolfo | when you add the IP 192.168.1.160 to eth1, a route like "192.168.1.0/24 dev eth1" will be installed automatically to allow the system to reach 192.168.1.0/24 via eth1 | 12:18 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!