Replies: 3 comments
-
@sbrivio-rh @dgibson ideas here? |
Beta Was this translation helpful? Give feedback.
-
There's currently no way to do this with pasta. We can't really "preserve" the original source MAC address from packets because we don't get it from the kernel -- that would need a There would be one possibility though: https://passt.top/passt/tree/tap.c?id=5ec3634b07215337c2e69d88f9b1d74711897d7d#n130 query the ARP table (preferably via netlink, i.e. |
Beta Was this translation helpful? Give feedback.
-
My first thought is that I'm not sure this is really in scope for passt/pasta. Pasta's model is based pretty strongly in an IP-level view of the network, so preserving L2 information like MAC addresses is not a natural fit. That said, I think @sbrivio-rh 's idea of using ARP lookups to fake this should be pretty solid. If we did that one question is whether pasta should also then do a non-trivial ARP implementation on its simulated link, and essentially pass on ARP requests to the outside. There are some existing cases where we preserve some link-specific information, mostly in regard to IPv6 link local addresses. The way we do that is a bit muddled at the moment, but I do have plans to clean that up (essentially by having two different modes - one which makes the host look like a gateway router to the guest/container, and another which simulates the guest peeking out one specific interface on the host). In any case, this seems like a fairly niche requirement, so I don't think it's something either I or @sbrivio-rh are likely to work on in the near future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, even though it correctly preserves hostname and ip address, it seems to always use the host's interface MAC address, leading to some minor interface bugs in Pi-hole, which I'm trying to run in a container, where it treats all devices as being a single one that have a bunch of different hostnames and IPs. There is probably an easy way to solve this that I'm not seeing after reading passt's man page.
my current run command:
Thank you for any help!
Beta Was this translation helpful? Give feedback.
All reactions