[00:17] Any netplan wizards know the syntax/tricks (if any) for requesting multiple dhcp4 addresses on the same interface? [00:23] that's an interesting question, I can't recall seeing it raised before === shokohsc3 is now known as shokohsc [00:42] I'm pretty sure I could do it if I used vlans, but don't really need that kind of separation. [00:43] can this actually work (without vlans), since dhcp uses arp addressing initially? [00:43] I poked around the systemd-networkd docs a bit and couldn't spot anything that looked like it would get you there :( maybe I just don't know how to drive it.. [00:44] it looks easy enough to get systemd-network to assign multiple static addresses to an interface, but dhcp? I didn't see it :( [00:44] I assume (without knowing) that you'd have to take some steps to get the one nic to do multiple MACs, and I haven't got a clue how you'd configure that [00:45] https://serverfault.com/questions/223601/multiple-mac-addresses-on-one-physical-network-interface-linux [00:46] says the internet [00:46] * inscw00table nods. [01:09] macvlan seems like the most promising of those options... [01:13] is 'vlan' is 'macvlan' at all related to 'vlan' the network segmentation tool? [01:17] https://developers.redhat.com/blog/2018/10/22/introduction-to-linux-interfaces-for-virtual-networking looks useful for telling these apart [01:18] After dinner I will dive down the vlan rabbit hole. [01:19] now i'm not sure whether macvlan are only useful / usable with netns [01:19] if only they'd taught me networking at school... [01:21] "Please see the commit message." -- aka "here be dragons"? :) [01:21] :) [01:22] tomreyn: so, this page here has more than doubled my knowledge on the matter :) buuuut I think the netns in the macvlan section is strictly about making it *easy* to use the different addresses, rather than having to tell the applications which interfaces or addresses to use [01:23] if i would be able to remember what i read, this would apply to me as well. [01:24] :D [01:24] so you're saying the macvlan section on this document is strictly about making it *easy* to use the different MAC or IPv4 addresses? [01:25] you can do ip addr add all you want to add multiple IPs to an address, but they'll all use the same mac [01:26] the macvlan thing lets you give each ip address their own arp addresses, too [01:27] yes, that's what the goal was, wasn't it? [01:27] I think the bridge *might* let you do the same thing, I'm less sure there :( -- but I think using the tap or veth devices requires something like a netns or vm to use the other half of it.. [01:27] yeah [01:27] I think blahdeblah's right, the macvlan thing seems most likely to work [01:31] i mean the second image at https://developers.redhat.com/blog/2018/10/22/introduction-to-linux-interfaces-for-virtual-networking#macvlan looks as it it should be possible to communicate with multiple MACs on a single physical network interface by using MACVLAN, without a network bridge, and without the network switch (or the other endpoint) being aware of it. but it could also be oversimplified. [01:32] I think the opening paragraph takes that away "With MACVLAN, you can create multiple interfaces with different Layer 2 (that is, Ethernet MAC) addresses on top of a single one." [01:32] the commit message still refers to "VLAN", which makes it sound you would actually need to tag packets, though, so not sure [01:33] yes, i liked that first sentence, too, sounds nice and simple :) [01:33] Always a good idea to stop reading after the first sentence. [01:33] :) [01:35] * sarnold nods [01:35] maybe even just skim it! [01:36] chatgpt: make it work for me! [01:39] :D [04:24] I have a fresh installation of Ubuntu 22.04 server minimal install, I have the network configured and a default route set but when the host comes up and the network interface comes up it's not arping it's default gateway so no host not on the same subnet can connect to it, how can I fix this? [04:41] ladeda: Put your network configuration along with 'ip route' and 'ip addr' output in a pastebin and we'll be able to help better. [04:42] Sure, I'll also include the arp table as well. [04:42] sarnold, inscw00table, tomreyn: My understanding of macvlan is that it allows you to set up virtual networking in such a way that the traffic is segregated simply by its MAC address and doesn't need any specific VLAN tags. [04:42] ladeda: good plan :-) [04:44] ladeda: 'ip neigh ls' is the better way to do that nowadays, BTW. [04:44] Actually just thinking, I can't copy and paste I dont have access to a shell or anything I am accessing the host over KVM... [04:45] Links to screenshots are OK, as long as the text is clearly legible. [04:46] Both those commands pull from the same data in /proc right? so no difference really. [04:54] I believe iproute2 uses the netlink API under the covers rather than reading from /proc, but don't quote me on that. The important thing is that iproute2 isn't deprecated, whereas the traditional commands like arp, ifconfig, netstat, route, etc. are. [04:55] Ahh, understood. Thank you for the information. [05:07] blahdeblah: where do you recommend I upload the screen shots? [05:08] Wherever works for you; imgur or just google "image pastebin" [05:11] Alright here it is. Just to restate the problem even though the interface is properly configured and has a default gateway set when the interface comes up it never does a gratuitous arp to populate it's arp table with the mac address of it's gateway. https://pasteboard.co/jQXR8foi2I27.png [05:23] Should it be doing a gratuitous ARP by default? I wouldn't have thought so, but it has been a long time since I've read any RFCs on the matter. I would normally expect a normal ARP for the gateway MAC, followed by a normal ARP from the gateway for its MAC. Can you ping the default gateway and then run 'ip neigh ls' again? [05:23] I can ping the default gateway [05:24] but that will initiate an ARP and populate the arp table. [05:24] Which is correct.. [05:24] What I can't do is ping the host from outside of the subnet [05:24] Can you grab a packet capture of a ping for the default gateway followed by a ping for a remote host? [05:24] well let me step back. [05:24] so I am spinning up this Ubuntu 22.04 through an automated provisioning workflow I am testing [05:25] so Ill spin it up and then tear it down [05:25] so the IP it gets is getting a new mac address associated with it every time. [05:25] my switches are keeping the old mac address and IP in their arp table. [05:26] so when I spin up a new host with the same IP address but different mac address I can't connect to it until it sends out an garp so the switches know the update their arp table. [05:27] So the switch is the default gateway? [05:27] every other template I use in this provisioning workflow never have this issue CentOS 7, Rocky, RHEL, not even Ubuntu 18.04 and 20.04 they all send out a garp when the interface comes up, but Ubuntu 22.04 is not [05:27] OK, that's weird [05:28] and yes the switch would be its default gateway [05:28] But regardless, it shouldn't matter; an ARP who-has for the default gateway address from its IP address should be enough to get the gateway to flush its ARP cache. [05:29] (because the IP/MAC combo doesn't match what's in the gateway's cache) [05:29] but it never does that [05:29] It never does any kind of ARPing when the interface comes up [05:29] even when you ping something? [05:29] bare minimal it should at least being arping the default gateway [05:29] That would be enough to make this problem not happen, but it is not [05:29] no [05:30] if I ping that will trigger the ARP and the problem will resolve. [05:31] but other distros even other versions of Ubuntu do the arp when the interface comes up they don't wait for some type of network activity internally to happen [05:31] It would break things like its doing for me :( [05:34] That's definitely not expected; feels like something else is not quite right, like a missing NIC driver or busted config. [05:34] What are you using for network configuration? Netplan? ifupdown? [05:37] Enabling arp_notify doesn't even fix this issue which is unusual. [05:37] Yes netplan === shokohsc8 is now known as shokohsc [19:31] blahdeblah: cool, thanks ;) (re macvlan, vlan tagging) [19:48] blahdeblah: you think it's a driver issue? I mean once I talk to my gateway then things resolve and the host can be accessed from outside the subnet [22:39] ladeda, I've been doing some poking, and here's what I think: the key is arp_notify=1 sends a garp when the interface comes up and when the hardware (mac) address has changed, but not when an IP address is added. [22:40] ladeda, interfaces are brought up by the kernel very early (to set up the IPv6 link local address and start looking for router advertisements). [22:42] ladeda, I believe at some point networkd , using the network units created by netplan, started just adding the IP address, not bringing up the interface again since it was already up. [22:44] ladeda, I suspect the other versions that are sending an arp are either bringing up the interface anew (ifup would probably do that) or are doing something (like fetching the time) which generates a packet going to the gateway, forcing an ARP request to find it. [22:47] ladeda, I see three things you could do: set a MAC address in the netplan, run something at boot that would send something to the gateway, or run a garp (9) command sometime late, like in a oneshot unit dependent on the network unit. [22:50] ladeda, https://bugzilla.kernel.org/show_bug.cgi?id=194879 was interesting, and googling on various combos of "arp_notify" and "gratuitous arp" pops up quite a few people who've tripped over this. [22:50] -ubottu:#ubuntu-server- bugzilla.kernel.org bug 194879 in Networking "arp_notify does not send grace ARP on ip address add" [Low, Resolved: Will_not_fix] [22:56] ladeda, oh- one more thing (which is actually what I do and is why I never see this problem) -- if your gateway is also a dhcp server (as most small-network ones are), configure the interface as dhcp and add the static address you need (probably to port-forward to.) This works fine, nothing in Linux cares about having multiple IP addresses configured on an interface. [22:58] ladeda, the dhcp transaction would automatically create some traffic on the gateway address and force the ARP query which would clear the poison from the gateway's ARP cache. [22:59] ladeda, and after that burst, I'm gonna take a nap. Should be back later... [23:45] rfm: Thank you for looking into it... so you think the interface is coming up before it's actually configured and then netplan is configuring it so no garp goes out?