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

[Sonic] PL on NSG and Inbound flows #341

Merged
merged 9 commits into from
Mar 24, 2023
Merged

[Sonic] PL on NSG and Inbound flows #341

merged 9 commits into from
Mar 24, 2023

Conversation

prsunny
Copy link
Collaborator

@prsunny prsunny commented Feb 16, 2023

Update Sonic HLD for:

  1. PL on NSG and example
  2. Encap DSCP/TTL values

@prsunny prsunny marked this pull request as ready for review February 20, 2023 02:14
Copy link
Collaborator

@mhanif mhanif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments and questions for the author.

@@ -915,6 +938,14 @@ For the example configuration above, the following is a brief explanation of loo
d. Packet gets transformed as: Overlay SIP fd00:108:0:d204:0:200::0a01:101, Overlay DIP 2603:10e1:100:2::3c01:201
e. Second Action is Static NVGRE encap.
f. Since underlay sip/dip is specified in the LPM table, It shall use Dst IP (25.1.2.1), Src IP (30.1.2.1)
g. Thus the packet is send with two headers - One Inner IPv6 and another Outer IPv4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: "is send" ==> "is sent"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

@@ -915,6 +938,14 @@ For the example configuration above, the following is a brief explanation of loo
d. Packet gets transformed as: Overlay SIP fd00:108:0:d204:0:200::0a01:101, Overlay DIP 2603:10e1:100:2::3c01:201
e. Second Action is Static NVGRE encap.
f. Since underlay sip/dip is specified in the LPM table, It shall use Dst IP (25.1.2.1), Src IP (30.1.2.1)
g. Thus the packet is send with two headers - One Inner IPv6 and another Outer IPv4
h. Inbound packet for this flow:
h.1 The return packet for the above flow shall land on an SLB MUX (30.1.2.1) as NVGRE packet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h.1 through h.5 need to be indented for a better read.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned

g. Thus the packet is send with two headers - One Inner IPv6 and another Outer IPv4
h. Inbound packet for this flow:
h.1 The return packet for the above flow shall land on an SLB MUX (30.1.2.1) as NVGRE packet
h.2 SLB MUX (30.1.2.1) shall encapsulate this to another header with standard GRE key, say 100 and forwards to Appliance VIP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what is an appliance VIP. How does SLB MUX know the appliance VIP (from packet header information)? In this case, I believe the appliance VIP is 25.1.2.1? In my view, we can do a better job in explaining h1 through h5. Also, it is not clear at which point the flow fixup happens and what will be the inbound flow after the flow fixup (which means we will bypass SLB MUX). Appliance receives a packet with three headers (each one GRE encapsulated). What does it mean for the receiving appliance? How will the packet be different when it arrives through the fast path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the statement. SLB MUX knows the appliance IP based on the incoming packet header. Appliance VIP here is not 25.1.2.1 but the PA. As mentioned, fastpath and flow fixup shall come as a separate documentation.

h.1 The return packet for the above flow shall land on an SLB MUX (30.1.2.1) as NVGRE packet
h.2 SLB MUX (30.1.2.1) shall encapsulate this to another header with standard GRE key, say 100 and forwards to Appliance VIP
h.3 Appliance shall first decapsulate the outer header and map it to a flow
h.4 Second header's dst mac shall correspond to ENI MAC, as overwritten by SLB MUX
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really true? I thought the SLB MUX drives the destination appliances' VIP from the inner DMAC? Why does it need to overwrite it? What am I missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, SLB MUX just overwrites the inner dst mac to the ENI mac. SLB mux drive the IP from the packet header (Dst IP, Port)

@@ -1008,7 +1075,7 @@ For the example configuration above, the following is a brief explanation of loo
g. Underlay DIP shall be 50.1.2.3 (from mapping), Underlay SIP shall be 55.1.2.3 (from ENI)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On e.3 (3 lines above), since both src and dst are CA addresses, we should call out that it is a source CA

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

g. Underlay DIP shall be 50.2.2.6 (from mapping), Underlay SIP shall be 55.1.2.3 (from ENI)
h. Third Action is Appliance Encap for id 22
i. Packet shall be encapsulated with Outer DIP as 100.8.1.2 and SIP as VIP of this originating appliance card with VNI of 101.
j. Inbound flow shall be similar to PL and outer encap shall be of the SLB MUX and not of the NSG appliance.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have not described inbound flow for a PL in any of the examples. Should we not describe it? Also, what happens when the flow fixup happens due to the ICMP redirect? What will be the resulting inbound flow look like when the packet comes through the fast-path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For PL, inbound flow is created based on outbound flow. I'll provide more details as a future commit. Also Fastpath will come as a separate section.

@KrisNey-MSFT
Copy link
Collaborator

@reshmaintel to take a look, per DASH Behavioral Model call on 3/16/2023

@prsunny prsunny merged commit 19999a2 into main Mar 24, 2023
@prsunny
Copy link
Collaborator Author

prsunny commented Mar 24, 2023

@mhanif , @reshmaintel , let me know if you've outstanding comments/concerns. I can address it in my next PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Nvgre required for inbound towards VM as well ? Would the appliance add Nvgre outbound if the packet is ST/PL and on inbound add VxLAN encap back to the VM ?

@prsunny prsunny deleted the prsunny-pl-nsg branch February 20, 2024 23:56
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

Successfully merging this pull request may close these issues.

5 participants