/srv/irclogs.ubuntu.com/2024/08/28/#netplan.txt

AlturicHi 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 and12:02
Alturicgive me some pointers? https://pastebin.ubuntu.com/p/gYHtJhRnm8/12:02
slyonAlturic: 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
slyonI'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
AlturicRealistically, 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
slyonoh, 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 it12:06
AlturicWell the reason I put the tables keys (various ChatGPTs mentioned it) was because I was trying to use two routes.12:10
AlturicSo you're saying remoting the table keys, and removing the eth1 (private lan) route key everything should work as expected?12:11
AlturicAlso, 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
slyonNo. 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
AlturicAh! You meant putting the route on eth1 to that, apologies.12:13
slyonYou'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
AlturicYea, 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
slyonAlturic: something like this might work: https://pastebin.ubuntu.com/p/Q74X98jnBj/12:14
danilogondolfothe route on eth1 is not needed actually12:15
danilogondolfoeth1 is part of that network, so the entire 192.168.1.0/24 is reachable12:16
slyonand 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
danilogondolfowhen 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 eth112:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!