Re: [ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
> On 15-Nov-2023, at 3:01 AM, Numan Siddique wrote: > > On Fri, Nov 10, 2023 at 2:46 PM Naveen Yerramneni > wrote: >> >> >> >>> On 10-Nov-2023, at 10:52 PM, Numan Siddique wrote: >>> >>> On Fri, Nov 3, 2023 at 1:36 PM naveen.yerramneni >>> wrote: This patch contains changes to enable DHCP Relay Agent support for overlay subnets. NOTE: - - This patch has required changes to enable basic DHCP Relay functionality for overlay subnets. Sending this for review to get the initial feedback about the approach taken. POST RFC REVIEW 1. Address review comments/suggestions 2. Address TODOs 3. Add unit tests 4. Complete testing USE CASE: -- - Enable IP address assignment for overlay subnets from the centralized DHCP server present in the underlay network. PREREQUISITES -- - Logical Router Port IP should be assigned (statically) from the same overlay subnet which is managed by DHCP server. - LRP IP is used for GIADRR field when relaying the DHCP packets and also same IP needs to be configured as default gateway for the overlay subnet. - Overlay subnets managed by external DHCP server are expected to be directly reachable from the underlay network. EXPECTED PACKET FLOW: -- Following is the expected packet flow inorder to support DHCP rleay functionality in OVN. 1. DHCP client originates DHCP discovery (broadcast). 2. DHCP relay (running on the OVN) receives the broadcast and forwards the packet to the DHCP server by converting it to unicast. While forwarding the packet, it updates the GIADDR in DHCP header to its interface IP on which DHCP packet is received. 3. DHCP server uses GIADDR field to decide the IP address pool from which IP has to be assigned and DHCP offer is sent to the same IP (GIADDR). 4. DHCP relay agent forwards the offer to the client, it resets the GIADDR field when forwarding the offer to the client. 5. DHCP client sends DHCP request (broadcast) packet. 6. DHCP relay (running on the OVN) receives the broadcast and forwards the packet to the DHCP server by converting it to unicast. While forwarding the packet, it updates the GIADDR in DHCP header to its interface IP on which DHCP packet is received. 7. DHCP Server sends the ACK packet. 8. DHCP relay agent forwards the ACK packet to the client, it resets the GIADDR field when forwarding the ACK to the client. 9. All the future renew/release packets are directly exchanged between DHCP client and DHCP server. OVN DHCP RELAY PACKET FLOW: To add DHCP Relay support on OVN, we need to replicate all the behavior described above using distributed logical switch and logical router. At, highlevel packet flow is distributed among Logical Switch and Logical Router on source node (where VM is deployed) and redirect chassis(RC) node. 1. Request packet gets processed on the source node where VM is deployed and relays the packet to DHCP server. 2. Response packet is first processed on RC node (which first recieves the packet from underlay network). RC node forwards the packet to the right node by filling in the dest MAC and IP. OVN Packet flow with DHCP relay is explained below. 1. DHCP client (VM) sends the DHCP discover packet (broadcast). 2. Logical switch converts the packet to L2 unicast by setting the destination MAC to LRP's MAC 3. Logical Router receives the packet and redirects it to the OVN controller. 4. OVN controller updates the required information(GIADDR) in the DHCP payload after doing the required checks. If any check fails, packet is dropped. 5. Logical Router converts the packet to L3 unicast and forwards it to the server. This packets gets routed like any other packet (via RC node). 6. Server replies with DHCP offer. 7. RC node processes the DHCP offer and forwards it to the OVN controller. 8. OVN controller does sanity checks and updates the destination MAC (available in DHCP header), destination IP (available in DHCP header), resets GIADDR and reinjects the packet to datapath. If any check fails, packet is dropped. 9. Logical router updates the source IP and port and forwards the packet to logical switch. 10. Logical switch delivers the packet to the DHCP client. 11. Similar steps are performed for Request and Ack packets. 12. All the future renew/release packets are directly
Re: [ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
On Fri, Nov 10, 2023 at 2:46 PM Naveen Yerramneni wrote: > > > > > On 10-Nov-2023, at 10:52 PM, Numan Siddique wrote: > > > > On Fri, Nov 3, 2023 at 1:36 PM naveen.yerramneni > > wrote: > >> > >>This patch contains changes to enable DHCP Relay Agent support for > >> overlay subnets. > >> > >>NOTE: > >>- > >> - This patch has required changes to enable basic DHCP Relay > >> functionality for overlay subnets. Sending this for review to get the > >> initial feedback about the approach taken. > >> > >>POST RFC REVIEW > >> > >> 1. Address review comments/suggestions > >> 2. Address TODOs > >> 3. Add unit tests > >> 4. Complete testing > >> > >>USE CASE: > >>-- > >> - Enable IP address assignment for overlay subnets from the > >> centralized DHCP server present in the underlay network. > >> > >>PREREQUISITES > >>-- > >> - Logical Router Port IP should be assigned (statically) from the > >> same overlay subnet which is managed by DHCP server. > >> - LRP IP is used for GIADRR field when relaying the DHCP packets and > >> also same IP needs to be configured as default gateway for the overlay > >> subnet. > >> - Overlay subnets managed by external DHCP server are expected to be > >> directly reachable from the underlay network. > >> > >>EXPECTED PACKET FLOW: > >>-- > >>Following is the expected packet flow inorder to support DHCP rleay > >> functionality in OVN. > >> 1. DHCP client originates DHCP discovery (broadcast). > >> 2. DHCP relay (running on the OVN) receives the broadcast and > >> forwards the packet to the DHCP server by converting it to unicast. While > >> forwarding the packet, it updates the GIADDR in DHCP header to its > >> interface IP on which DHCP packet is received. > >> 3. DHCP server uses GIADDR field to decide the IP address pool from > >> which IP has to be assigned and DHCP offer is sent to the same IP (GIADDR). > >> 4. DHCP relay agent forwards the offer to the client, it resets the > >> GIADDR field when forwarding the offer to the client. > >> 5. DHCP client sends DHCP request (broadcast) packet. > >> 6. DHCP relay (running on the OVN) receives the broadcast and > >> forwards the packet to the DHCP server by converting it to unicast. While > >> forwarding the packet, it updates the GIADDR in DHCP header to its > >> interface IP on which DHCP packet is received. > >> 7. DHCP Server sends the ACK packet. > >> 8. DHCP relay agent forwards the ACK packet to the client, it resets > >> the GIADDR field when forwarding the ACK to the client. > >> 9. All the future renew/release packets are directly exchanged > >> between DHCP client and DHCP server. > >> > >>OVN DHCP RELAY PACKET FLOW: > >> > >>To add DHCP Relay support on OVN, we need to replicate all the behavior > >> described above using distributed logical switch and logical router. > >>At, highlevel packet flow is distributed among Logical Switch and > >> Logical Router on source node (where VM is deployed) and redirect > >> chassis(RC) node. > >> 1. Request packet gets processed on the source node where VM is > >> deployed and relays the packet to DHCP server. > >> 2. Response packet is first processed on RC node (which first > >> recieves the packet from underlay network). RC node forwards the packet to > >> the right node by filling in the dest MAC and IP. > >> > >>OVN Packet flow with DHCP relay is explained below. > >> 1. DHCP client (VM) sends the DHCP discover packet (broadcast). > >> 2. Logical switch converts the packet to L2 unicast by setting the > >> destination MAC to LRP's MAC > >> 3. Logical Router receives the packet and redirects it to the OVN > >> controller. > >> 4. OVN controller updates the required information(GIADDR) in the > >> DHCP payload after doing the required checks. If any check fails, packet > >> is dropped. > >> 5. Logical Router converts the packet to L3 unicast and forwards it > >> to the server. This packets gets routed like any other packet (via RC > >> node). > >> 6. Server replies with DHCP offer. > >> 7. RC node processes the DHCP offer and forwards it to the OVN > >> controller. > >> 8. OVN controller does sanity checks and updates the destination MAC > >> (available in DHCP header), destination IP (available in DHCP header), > >> resets GIADDR and reinjects the packet to datapath. > >> If any check fails, packet is dropped. > >> 9. Logical router updates the source IP and port and forwards the > >> packet to logical switch. > >> 10. Logical switch delivers the packet to the DHCP client. > >> 11. Similar steps are performed for Request and Ack packets. > >> 12. All the future renew/release packets are directly exchanged > >> bet
Re: [ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
> On 10-Nov-2023, at 10:52 PM, Numan Siddique wrote: > > On Fri, Nov 3, 2023 at 1:36 PM naveen.yerramneni > wrote: >> >>This patch contains changes to enable DHCP Relay Agent support for >> overlay subnets. >> >>NOTE: >>- >> - This patch has required changes to enable basic DHCP Relay >> functionality for overlay subnets. Sending this for review to get the >> initial feedback about the approach taken. >> >>POST RFC REVIEW >> >> 1. Address review comments/suggestions >> 2. Address TODOs >> 3. Add unit tests >> 4. Complete testing >> >>USE CASE: >>-- >> - Enable IP address assignment for overlay subnets from the centralized >> DHCP server present in the underlay network. >> >>PREREQUISITES >>-- >> - Logical Router Port IP should be assigned (statically) from the same >> overlay subnet which is managed by DHCP server. >> - LRP IP is used for GIADRR field when relaying the DHCP packets and >> also same IP needs to be configured as default gateway for the overlay >> subnet. >> - Overlay subnets managed by external DHCP server are expected to be >> directly reachable from the underlay network. >> >>EXPECTED PACKET FLOW: >>-- >>Following is the expected packet flow inorder to support DHCP rleay >> functionality in OVN. >> 1. DHCP client originates DHCP discovery (broadcast). >> 2. DHCP relay (running on the OVN) receives the broadcast and forwards >> the packet to the DHCP server by converting it to unicast. While forwarding >> the packet, it updates the GIADDR in DHCP header to its >> interface IP on which DHCP packet is received. >> 3. DHCP server uses GIADDR field to decide the IP address pool from >> which IP has to be assigned and DHCP offer is sent to the same IP (GIADDR). >> 4. DHCP relay agent forwards the offer to the client, it resets the >> GIADDR field when forwarding the offer to the client. >> 5. DHCP client sends DHCP request (broadcast) packet. >> 6. DHCP relay (running on the OVN) receives the broadcast and forwards >> the packet to the DHCP server by converting it to unicast. While forwarding >> the packet, it updates the GIADDR in DHCP header to its >> interface IP on which DHCP packet is received. >> 7. DHCP Server sends the ACK packet. >> 8. DHCP relay agent forwards the ACK packet to the client, it resets >> the GIADDR field when forwarding the ACK to the client. >> 9. All the future renew/release packets are directly exchanged between >> DHCP client and DHCP server. >> >>OVN DHCP RELAY PACKET FLOW: >> >>To add DHCP Relay support on OVN, we need to replicate all the behavior >> described above using distributed logical switch and logical router. >>At, highlevel packet flow is distributed among Logical Switch and Logical >> Router on source node (where VM is deployed) and redirect chassis(RC) node. >> 1. Request packet gets processed on the source node where VM is >> deployed and relays the packet to DHCP server. >> 2. Response packet is first processed on RC node (which first recieves >> the packet from underlay network). RC node forwards the packet to the right >> node by filling in the dest MAC and IP. >> >>OVN Packet flow with DHCP relay is explained below. >> 1. DHCP client (VM) sends the DHCP discover packet (broadcast). >> 2. Logical switch converts the packet to L2 unicast by setting the >> destination MAC to LRP's MAC >> 3. Logical Router receives the packet and redirects it to the OVN >> controller. >> 4. OVN controller updates the required information(GIADDR) in the DHCP >> payload after doing the required checks. If any check fails, packet is >> dropped. >> 5. Logical Router converts the packet to L3 unicast and forwards it to >> the server. This packets gets routed like any other packet (via RC node). >> 6. Server replies with DHCP offer. >> 7. RC node processes the DHCP offer and forwards it to the OVN >> controller. >> 8. OVN controller does sanity checks and updates the destination MAC >> (available in DHCP header), destination IP (available in DHCP header), >> resets GIADDR and reinjects the packet to datapath. >> If any check fails, packet is dropped. >> 9. Logical router updates the source IP and port and forwards the >> packet to logical switch. >> 10. Logical switch delivers the packet to the DHCP client. >> 11. Similar steps are performed for Request and Ack packets. >> 12. All the future renew/release packets are directly exchanged between >> DHCP client and DHCP server >> >>NEW OVN ACTIONS >>--- >> >> 1. dhcp_relay_req(, ) >> - This action executes on the source node on which the DHCP request >> originated. >> - This action relays the DHCP requ
Re: [ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
On Fri, Nov 3, 2023 at 1:36 PM naveen.yerramneni wrote: > > This patch contains changes to enable DHCP Relay Agent support for > overlay subnets. > > NOTE: > - > - This patch has required changes to enable basic DHCP Relay > functionality for overlay subnets. Sending this for review to get the initial > feedback about the approach taken. > > POST RFC REVIEW > > 1. Address review comments/suggestions > 2. Address TODOs > 3. Add unit tests > 4. Complete testing > > USE CASE: > -- > - Enable IP address assignment for overlay subnets from the centralized > DHCP server present in the underlay network. > > PREREQUISITES > -- > - Logical Router Port IP should be assigned (statically) from the same > overlay subnet which is managed by DHCP server. > - LRP IP is used for GIADRR field when relaying the DHCP packets and > also same IP needs to be configured as default gateway for the overlay subnet. > - Overlay subnets managed by external DHCP server are expected to be > directly reachable from the underlay network. > > EXPECTED PACKET FLOW: > -- > Following is the expected packet flow inorder to support DHCP rleay > functionality in OVN. > 1. DHCP client originates DHCP discovery (broadcast). > 2. DHCP relay (running on the OVN) receives the broadcast and forwards > the packet to the DHCP server by converting it to unicast. While forwarding > the packet, it updates the GIADDR in DHCP header to its > interface IP on which DHCP packet is received. > 3. DHCP server uses GIADDR field to decide the IP address pool from > which IP has to be assigned and DHCP offer is sent to the same IP (GIADDR). > 4. DHCP relay agent forwards the offer to the client, it resets the > GIADDR field when forwarding the offer to the client. > 5. DHCP client sends DHCP request (broadcast) packet. > 6. DHCP relay (running on the OVN) receives the broadcast and forwards > the packet to the DHCP server by converting it to unicast. While forwarding > the packet, it updates the GIADDR in DHCP header to its > interface IP on which DHCP packet is received. > 7. DHCP Server sends the ACK packet. > 8. DHCP relay agent forwards the ACK packet to the client, it resets > the GIADDR field when forwarding the ACK to the client. > 9. All the future renew/release packets are directly exchanged between > DHCP client and DHCP server. > > OVN DHCP RELAY PACKET FLOW: > > To add DHCP Relay support on OVN, we need to replicate all the behavior > described above using distributed logical switch and logical router. > At, highlevel packet flow is distributed among Logical Switch and Logical > Router on source node (where VM is deployed) and redirect chassis(RC) node. > 1. Request packet gets processed on the source node where VM is > deployed and relays the packet to DHCP server. > 2. Response packet is first processed on RC node (which first recieves > the packet from underlay network). RC node forwards the packet to the right > node by filling in the dest MAC and IP. > > OVN Packet flow with DHCP relay is explained below. > 1. DHCP client (VM) sends the DHCP discover packet (broadcast). > 2. Logical switch converts the packet to L2 unicast by setting the > destination MAC to LRP's MAC > 3. Logical Router receives the packet and redirects it to the OVN > controller. > 4. OVN controller updates the required information(GIADDR) in the DHCP > payload after doing the required checks. If any check fails, packet is > dropped. > 5. Logical Router converts the packet to L3 unicast and forwards it to > the server. This packets gets routed like any other packet (via RC node). > 6. Server replies with DHCP offer. > 7. RC node processes the DHCP offer and forwards it to the OVN > controller. > 8. OVN controller does sanity checks and updates the destination MAC > (available in DHCP header), destination IP (available in DHCP header), resets > GIADDR and reinjects the packet to datapath. > If any check fails, packet is dropped. > 9. Logical router updates the source IP and port and forwards the > packet to logical switch. > 10. Logical switch delivers the packet to the DHCP client. > 11. Similar steps are performed for Request and Ack packets. > 12. All the future renew/release packets are directly exchanged between > DHCP client and DHCP server > > NEW OVN ACTIONS > --- > > 1. dhcp_relay_req(, ) > - This action executes on the source node on which the DHCP request > originated. > - This action relays the DHCP request coming from client to the > server. Relay-ip is used to update GIADDR in the DHCP header. > 2. dhcp_relay_re
Re: [ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
References: <[email protected]> Bleep bloop. Greetings naveen.yerramneni, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. git-am: .git/rebase-apply/patch:41: trailing whitespace. [OVN_DHCP_MSG_RELEASE] = "RELEASE", .git/rebase-apply/patch:128: trailing whitespace. .git/rebase-apply/patch:186: trailing whitespace. .git/rebase-apply/patch:231: trailing whitespace. dhcp_msg_str_get(*in_dhcp_msg_type), .git/rebase-apply/patch:315: trailing whitespace. warning: squelched 9 whitespace errors warning: 14 lines add whitespace errors. error: failed to create path 'ovs': perhaps a D/F conflict? error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 DHCP Relay Agent support for overlay subnets When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Please check this out. If you feel there has been an error, please email [email protected] Thanks, 0-day Robot ___ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [RFC OVN] DHCP Relay Agent support for overlay subnets
This patch contains changes to enable DHCP Relay Agent support for overlay subnets. NOTE: - - This patch has required changes to enable basic DHCP Relay functionality for overlay subnets. Sending this for review to get the initial feedback about the approach taken. POST RFC REVIEW 1. Address review comments/suggestions 2. Address TODOs 3. Add unit tests 4. Complete testing USE CASE: -- - Enable IP address assignment for overlay subnets from the centralized DHCP server present in the underlay network. PREREQUISITES -- - Logical Router Port IP should be assigned (statically) from the same overlay subnet which is managed by DHCP server. - LRP IP is used for GIADRR field when relaying the DHCP packets and also same IP needs to be configured as default gateway for the overlay subnet. - Overlay subnets managed by external DHCP server are expected to be directly reachable from the underlay network. EXPECTED PACKET FLOW: -- Following is the expected packet flow inorder to support DHCP rleay functionality in OVN. 1. DHCP client originates DHCP discovery (broadcast). 2. DHCP relay (running on the OVN) receives the broadcast and forwards the packet to the DHCP server by converting it to unicast. While forwarding the packet, it updates the GIADDR in DHCP header to its interface IP on which DHCP packet is received. 3. DHCP server uses GIADDR field to decide the IP address pool from which IP has to be assigned and DHCP offer is sent to the same IP (GIADDR). 4. DHCP relay agent forwards the offer to the client, it resets the GIADDR field when forwarding the offer to the client. 5. DHCP client sends DHCP request (broadcast) packet. 6. DHCP relay (running on the OVN) receives the broadcast and forwards the packet to the DHCP server by converting it to unicast. While forwarding the packet, it updates the GIADDR in DHCP header to its interface IP on which DHCP packet is received. 7. DHCP Server sends the ACK packet. 8. DHCP relay agent forwards the ACK packet to the client, it resets the GIADDR field when forwarding the ACK to the client. 9. All the future renew/release packets are directly exchanged between DHCP client and DHCP server. OVN DHCP RELAY PACKET FLOW: To add DHCP Relay support on OVN, we need to replicate all the behavior described above using distributed logical switch and logical router. At, highlevel packet flow is distributed among Logical Switch and Logical Router on source node (where VM is deployed) and redirect chassis(RC) node. 1. Request packet gets processed on the source node where VM is deployed and relays the packet to DHCP server. 2. Response packet is first processed on RC node (which first recieves the packet from underlay network). RC node forwards the packet to the right node by filling in the dest MAC and IP. OVN Packet flow with DHCP relay is explained below. 1. DHCP client (VM) sends the DHCP discover packet (broadcast). 2. Logical switch converts the packet to L2 unicast by setting the destination MAC to LRP's MAC 3. Logical Router receives the packet and redirects it to the OVN controller. 4. OVN controller updates the required information(GIADDR) in the DHCP payload after doing the required checks. If any check fails, packet is dropped. 5. Logical Router converts the packet to L3 unicast and forwards it to the server. This packets gets routed like any other packet (via RC node). 6. Server replies with DHCP offer. 7. RC node processes the DHCP offer and forwards it to the OVN controller. 8. OVN controller does sanity checks and updates the destination MAC (available in DHCP header), destination IP (available in DHCP header), resets GIADDR and reinjects the packet to datapath. If any check fails, packet is dropped. 9. Logical router updates the source IP and port and forwards the packet to logical switch. 10. Logical switch delivers the packet to the DHCP client. 11. Similar steps are performed for Request and Ack packets. 12. All the future renew/release packets are directly exchanged between DHCP client and DHCP server NEW OVN ACTIONS --- 1. dhcp_relay_req(, ) - This action executes on the source node on which the DHCP request originated. - This action relays the DHCP request coming from client to the server. Relay-ip is used to update GIADDR in the DHCP header. 2. dhcp_relay_resp_fwd(, ) - This action executes on the first node (RC node) which processes the DHCP response from the server. - This action updates the destination MAC and destination IP so that the response can be forwarded to the appropriat
