-
Notifications
You must be signed in to change notification settings - Fork 260
feat: Enable same VM same VNET packet tunneling to host for Transparent Vlan #1529
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
Conversation
Tests ok (all basic functionality, 2 VMs, NS, delete, add)
network/network_linux.go
Outdated
| _, err := nm.plClient.ExecuteCommand(DisableRPFilterCmd) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("[transparent vlan] failed to disable rp filter: %w", err) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets scope this to vnet namespace level.. set disable rp_filter in vnet namespace on its creation
| azureMac = "12:34:56:78:9a:bc" // Packets leaving the VM should have this MAC | ||
| loopbackIf = "lo" // The name of the loopback interface | ||
| numDefaultRoutes = 2 // VNET NS, when no containers use it, has this many routes | ||
| tunnelingTable = 2 // Packets not entering on the vlan interface go to this routing table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have same routing table number for different vnet namespaces?
| if err != nil { | ||
| return errors.Wrap(err, "transparent vlan failed to disable rp filter in vnet") | ||
| } | ||
| DisableRPFilterVlanIfCmd := strings.Replace(DisableRPFilterCmd, "all", client.vlanIfName, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be disableRPFilterVlanIfCmd
tamilmani1989
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Reason for Change:
Packets sent from a network container to another network container on the same VM and same VNET will now leave the VM, have NSG rules applied, and then return to the VM in the transparent vlan (formerly native) mode. Previously, they would be routed in the VNET namespace, never leaving the VM.
Issue Fixed:
N/A
Requirements:
Notes:
Disables rp filter to enable asymmetric routing.