SteelRose | Hello all! I am having some issues with netplan when adding a second NIC. I created this https://pastebin.com/EFNyR4ka to describe the problem. Your help is appreciated! Thanks! | 07:57 |
---|---|---|
schopin | SteelRose: hi! In your pastebin you mention wanting to connect on a different VLAN? I don't see any mention of vlan in your config file. | 08:28 |
SteelRose | schopin: let me rephrase it: I need to have 1 NIC on one network with its own GW, and 1 NIC on another network with its own GW | 08:36 |
schopin | Ah. OK. | 08:37 |
SteelRose | I found this example https://netplan.io/examples/#using-multiple-addresses-with-multiple-gateways - it is OK if I have 1 NIC with 2 IP addresses but now I cannot reach the server using the secondary IP ... | 08:37 |
SteelRose | having 2 IP addresses on one NIC is now what I was hoping for but it will do for now.. | 08:38 |
schopin | SteelRose: sorry if this seems obvious, but have you invoked `netplan try` or `netplan apply`? | 08:38 |
SteelRose | schopin: yes :-) | 08:38 |
SteelRose | netplan create first, then apply | 08:39 |
SteelRose | after the apply is when I loose connectivity with the server (my ssh session freezes right away) | 08:39 |
SteelRose | so my question to the channel: do you guys have a working example of 2 NICs, each with a different IP + gateway for each range? | 08:40 |
kjetilho | SteelRose: are you sure you need multiple gateways? | 08:41 |
schopin | SteelRose: multiple gateways don't make sense on a system level. | 08:41 |
schopin | Recent versions of netplan should actually emit a warning if multiple gateways are configured. | 08:41 |
schopin | Also, could you paste the content of /run/systemd/network/*netplan-* after running `netplan apply`? This is where netplan puts the generated systemd-networkd configuration files. | 08:43 |
schopin | ... wait, I just noticed you used different routing tables. Disregard my gateway comment then :) | 08:44 |
SteelRose | OK; I need to rephrase again: "different IPs + routing for each range" :-) | 08:45 |
schopin | Eh. It's morning where I am, coffee hasn't kicked in yet ;-) | 08:46 |
SteelRose | schopin: it's morning here as well | 08:47 |
schopin | Also, it would be nice to have whatever netplan outputs (if anything), as well as the output of `ip l` and `ip a`? | 08:47 |
schopin | I'm not down on the troubleshooting routines of netplan yet :P | 08:48 |
schopin | Oh, and perhaps simply `netplan get`. This last one dumps all the config that netplan sees. | 08:49 |
SteelRose | schopin: I modified the netplan following the official example https://netplan.io/examples/#using-multiple-addresses-with-multiple-gateways - but now I cannot ping the secondary IP | 08:52 |
schopin | The problem can be in a lot of places, from netplan failing to find the updated config, to it failing to generate the correct config for systemd-networkd, to networkd failing to configure the interface, or the routes... Hence my different questions :) | 08:54 |
SteelRose | thanks schopin ... I'll review every step and might come back with some updates | 09:20 |
SteelRose | re | 09:20 |
kjetilho | SteelRose: in my experience, policy routing is required when you have different subnets behind different interfaces | 10:03 |
kjetilho | so the example doc you linked isn't relevant for you, I think | 10:04 |
SteelRose | kjetilho: do you have any working example? | 10:04 |
kjetilho | (and sorry, I didn't look at your pastebin earlier, I underestimated your understanding :) | 10:04 |
SteelRose | :-) | 10:04 |
kjetilho | SteelRose: in my working config, I have from: nic-local-address on each route | 10:06 |
kjetilho | and also the I use that nic-local-address in my routing-policy, but that shouldn't matter I think | 10:07 |
kjetilho | oh, and I don't have a gateway set on the secondary NIC | 10:07 |
kjetilho | *and* I have `link-local: [ ]` | 10:08 |
SteelRose | kjetilho: would you mind sharing your config? of course, I expect that you fake the addresses :-) | 10:32 |
kjetilho | so much work to fake addresses consistently :) | 10:33 |
kjetilho | the above is a pretty accurate diff | 10:33 |
SteelRose | :-/ | 10:39 |
kjetilho | SteelRose: oh, another difference: I just use plain gateway4 on ens160. | 12:18 |
SteelRose | kjetilho: that is what I had... anyway, I had to put that netplan config on ice as something more important landed on my desk | 13:52 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!