Skip to content
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

direction decision using eni mac/ip not the vni alone #351

Open
mgheorghe opened this issue Mar 16, 2023 · 3 comments
Open

direction decision using eni mac/ip not the vni alone #351

mgheorghe opened this issue Mar 16, 2023 · 3 comments
Assignees

Comments

@mgheorghe
Copy link
Collaborator

mgheorghe commented Mar 16, 2023

we have the ENI (that ENI has an ENI_IP, an ENI_MAC, and some tunnel IDs)

now this IP/MAC can be transported over vxlan, over nvgre, over ipsec or something else.

now if the packet has SRC_IP == ENI_IP and SCR_MAC == ENI_MAC and tunnel_id that is an outbound packet
now if the packet has DST_IP == ENI_IP and DST_MAC == ENI_MAC and tunnel_ids that is an inbound packet

i see a few advantages to this approach:

  1. removes the dependency on the tunneling protocol details (by removing vni as dependency and have it depend on a eni tunnel id irrespective of what protocol is choosing for tunneling)
  2. gives the flexibility in case of vxlan to be able to send and receive the traffic on any tunnel with any vni. (a tunnel is uniquely identified by the 2 vtep ips and by the vni, so having 2 tunnels with same vni will be possible)
@mgheorghe mgheorghe changed the title direction decision using eni mac/ip not the vni direction decision using eni mac/ip not the vni alone Mar 16, 2023
@KrisNey-MSFT
Copy link
Collaborator

KrisNey-MSFT commented Mar 22, 2023

Mircea to send packet captures and diagrams as this could be a bug possibly. (All packets were being tagged...)

Discussion from DASH Comm Meeting:
If we have a VXLan tunnel using VNI 3 (for example), and another one is using 3 as well, b/c direction is based on VNI, the pipeline will become confused.
Suggesting here to include IP and MAC of the ENI to help to uniquely define the ENI, AND a Tunnel-ID or Customer-ID or something more generic?
Or other tunneling protocols such as IPSec, NVGre, as a Protocol-Type?

Guohan: we use VNI + MAC address
Prince: host -> Appliance is where the special VNI is used.
Marian: VNI = Virtual Network Identifier, not a Tunnel Identifier. VNI is part of the Underlay allocated by the DataCenter, the Customer does not see this. According to DASH, MAC is not controlled by customer.

@mgheorghe
Copy link
Collaborator Author

mgheorghe commented Mar 29, 2023

SAI config showing multiple ENIs each using a different VNI for inbound and outbound.
DASH config does not allow this flexibility.
config.sai-baby-hero-out.json.zip

taking it further beyond what DASH SAI allows bellow config is a valid VxLAN scenario that allows the reuse of the same VNI over multiple tunnels.
image

vxlan RFC https://datatracker.ietf.org/doc/rfc7348/
2 ENIs can have same MAC "The VNI identifies the scope of the inner MAC frame originated by the
individual VM. Thus, you could have overlapping MAC addresses across
segments"

RFC 7348 page 16, shows also 2 VMs using same VNI, now with the DPU acting as "a bump in the wire" it should be possible to have 2 tunnels using same VNI, it should be up to the user to make the decision if they want to keep the traffic under same VNI or change the VNI ID., use of same VNI inbound and outbound is not allowed in SAI, since direction lookup is based on VNI alone.

{
"name": "direction_lookup_entry_#eni2",
"op": "create",
"type": "SAI_OBJECT_TYPE_DIRECTION_LOOKUP_ENTRY",
"key": {
"switch_id": "5",
"vni": "2"
},
"attributes": [
"SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION",
"SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION"
]
},

@mgheorghe
Copy link
Collaborator Author

mgheorghe commented Mar 29, 2023

diagram showing a mixed scenarios where communication happens over tunnels with same VNI or different VNI
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants