-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only one NIC reachable on VM with openvswitch virtual network with IP spoofing #3249
Comments
This issue applies to KVM as well, the flows applied by the network driver, block any packet entering the ovswitch switch if the ip and mac address do not match the ones in the NIC connected to the port of the switch. The following picture shows the container one-10, where eth1 isn't reachable The ping response is returned via eth0 and it is blocked in ovsbr0 because its source address don't match eth0 but eth1. In order to fix the issue, it is necessary to create policy-based routing, to return the packets from the nic it comes from. The container one-9, with 3 nics, was fixed issuing,
Which creates a route table per extra nic and handles the traffic matching the source ip address in that tables. Then, the direct delivery is migrated from the normal routing table to the custom table in order to leave the regular behavior only matching eth0. This solution could be automated and handled in the context package, since it is solved inside the host. |
With the previous comment and proposed solution (also networks can be created with different masks to force routing in each interface) we are closing this issue. |
Since it has a lot of complexity, and it's a corner case, the patch could be automated as a script for specific VMs and run as a startup script using contextualization |
(cherry picked from commit 2345ff8)
Description
When creating a LXD container with more than one NIC on an openvswitch network, with IP spoofing enabled, the container will only be reachable by one of those NICs. Either attaching a new one or deploying with several ones, the result is the same.
To Reproduce
Expected behavior
The container should be reachable on all of the nics
Details
Additional context
Add any other context about the problem here.
Progress Status
The text was updated successfully, but these errors were encountered: