Re: [vpp-dev] Custom VxLAN port
Hi Artem, > I don't fully understand, > If I want to support configurable UDP port per tunnel, I need to extend > "vxlan_tunnel_t" or "vxlan_gpe_tunnel_t" or "vxlan_gbp_tunnel_t" or all of > them. So this is what I meant in point 2. Why 2.5? :) > Or can I only use the "vxlan_gbp_tunnel_t" for this purpose? It would be good if you could do it for all VXLAN flavours. Looks like VXLAN GBP uses it's own port number from VXLAN too. Best regards, Ole -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18169): https://lists.fd.io/g/vpp-dev/message/18169 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Custom VxLAN port
Hi Paul et al, > VPP's vxlan may be great for in memory transfers between containers, but > it is hard on real network infrastructure, because it doesn't provide the > signals to upstream routers for ECMP. > > /* UDP header, randomize src port on something, maybe? */ > udp->src_port = clib_host_to_net_u16 (4789); This is not completely accurate: VPP VxLAN tunnels comes in 2 flavors: L2 and L3. The code you refer to is the L3 encapsulation code path and is used when doing L3 forwarding into a VxLAN tunnel. This is not the most common usecase for VxLAN as far as I know. The common usecase (think: virtual switch with VMs) is L2 switching and in that case VxLAN encap is done through a virtual interface instead (because L2: we cannot rely on the fib), and supports ECMP (see src/vnet/vxlan/encap.c): u32 flow_hash0 = vnet_l2_compute_flow_hash (b0); [...] udp0->src_port = flow_hash0; So, we do support ECMP but for L2 only. The reason it was not done for L3 is probably because nobody asked for it... Do you have a usecase where it would be useful? Best ben -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18158): https://lists.fd.io/g/vpp-dev/message/18158 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Custom VxLAN port
See the vxlan rfc. https://tools.ietf.org/html/rfc7348 VXLAN is a layer-2 tech - see section 5, Figure, 1 with the Ethernet header as the outermost header. ECMP is a layer-3 concept. See Figure 3 for when an IP network connects two VXLAN networks. Also see Figure 4. Hemant -Original Message- From: vpp-dev@lists.fd.io On Behalf Of Benoit Ganne (bganne) via lists.fd.io Sent: Thursday, November 26, 2020 11:17 AM To: Paul Vinciguerra ; Artem Glazychev Cc: vpp-dev Subject: Re: [vpp-dev] Custom VxLAN port Hi Paul et al, > VPP's vxlan may be great for in memory transfers between containers, > but it is hard on real network infrastructure, because it doesn't > provide the signals to upstream routers for ECMP. > > /* UDP header, randomize src port on something, maybe? */ > udp->src_port = clib_host_to_net_u16 (4789); This is not completely accurate: VPP VxLAN tunnels comes in 2 flavors: L2 and L3. The code you refer to is the L3 encapsulation code path and is used when doing L3 forwarding into a VxLAN tunnel. This is not the most common usecase for VxLAN as far as I know. The common usecase (think: virtual switch with VMs) is L2 switching and in that case VxLAN encap is done through a virtual interface instead (because L2: we cannot rely on the fib), and supports ECMP (see src/vnet/vxlan/encap.c): u32 flow_hash0 = vnet_l2_compute_flow_hash (b0); [...] udp0->src_port = flow_hash0; So, we do support ECMP but for L2 only. The reason it was not done for L3 is probably because nobody asked for it... Do you have a usecase where it would be useful? Best ben smime.p7s Description: S/MIME cryptographic signature -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18159): https://lists.fd.io/g/vpp-dev/message/18159 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Custom VxLAN port
Hi Ole, Artem, For the benefit of others, VPP's vxlan may be great for in memory transfers between containers, but it is hard on real network infrastructure, because it doesn't provide the signals to upstream routers for ECMP. */* UDP header, randomize src port on something, maybe? */ *udp->src_port = clib_host_to_net_u16 (4789); On Thu, Nov 26, 2020 at 8:35 AM Artem Glazychev wrote: > Ole, > > I don't fully understand, > If I want to support configurable UDP port per tunnel, I need to extend > "vxlan_tunnel_t" or "vxlan_gpe_tunnel_t" or "vxlan_gbp_tunnel_t" or all of > them. So this is what I meant in point 2. Why 2.5? :) > Or can I only use the "vxlan_gbp_tunnel_t" for this purpose? > > Thanks > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18157): https://lists.fd.io/g/vpp-dev/message/18157 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Custom VxLAN port
Ole, I don't fully understand, If I want to support configurable UDP port per tunnel, I need to extend "vxlan_tunnel_t" or "vxlan_gpe_tunnel_t" or "vxlan_gbp_tunnel_t" or all of them. So this is what I meant in point 2. Why 2.5? :) Or can I only use the "vxlan_gbp_tunnel_t" for this purpose? Thanks -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18153): https://lists.fd.io/g/vpp-dev/message/18153 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Custom VxLAN port
Artem, 2.5. Make existing code support configurable UDP port. Either per system (if so put it in the _main_t structure. Or per tunnel (vxlan_gbp_tunnel_t) or per makes sense. Best regards, Ole > On 25 Nov 2020, at 20:45, Artem Glazychev wrote: > > Hi everyone, > > I want to discuss the enhancement of VxLAN. > As we know VxLAN supports only 4789 udp-port (IANA standard). > > What if we expand on the current implementation and let the user choose the > port he wants to? > I have some thoughts on this. > > 1. Add an additional nodes in existing feature if possible. > Ex.: > [vxlan4-encap] -> [new_node_out] -> ... -> [new_node_in] -> [vxlan4-input] > In new_node_out: 4789 -> USR_PORT. In new_node_in USR_PORT -> 4789 > Comment: it seems bad. Because there is [ip4-rewrite] node and two udp-ports > for one tunnel will be open (default and user’s). > > 2. Make changes directly to existing code. > There will be something like: > If USR_PORT { > udp_register_dst_port (USR_PORT) > } else { > udp_register_dst_port (4789) > } > Comment: there are places in the code that rely only on the default port > constant. > > For 1-2 opts CLI would be something like: > vpp# create vxlan tunnel src 1.1.1.1 dst 1.1.1.2 vni 1 src_port dst_port > > If src_port is not defined, default_port (4789) will be used. > > 3. Create a separate plugin. Seems it will be very similar to 1, but with a > separate API. > > I would be glad to know your thoughts on this matter. > Thanks! > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18144): https://lists.fd.io/g/vpp-dev/message/18144 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Custom VxLAN port
Hi everyone, I want to discuss the enhancement of VxLAN. As we know VxLAN supports only 4789 udp-port (IANA standard). What if we expand on the current implementation and let the user choose the port he wants to? I have some thoughts on this. *1.* Add an additional nodes in existing feature if possible. Ex.: [vxlan4-encap] -> [ *new_node_out* ] -> ... -> [ *new_node_in* ] -> [vxlan4-input] In *new_node_out* : 4789 -> USR_PORT. In *new_node_in* USR_PORT -> 4789 Comment: it seems bad. Because there is [ip4-rewrite] node and two udp-ports for one tunnel will be open (default and user’s). *2.* Make changes directly to existing code. There will be something like: If USR_PORT { udp_register_dst_port (USR_PORT) } else { udp_register_dst_port (4789) } Comment: there are places in the code that rely only on the default port constant. For 1-2 opts CLI would be something like: vpp# create vxlan tunnel src 1.1.1.1 dst 1.1.1.2 vni 1 src_port dst_port If src_port is not defined, default_port (4789) will be used. *3.* Create a separate plugin. Seems it will be very similar to 1, but with a separate API. I would be glad to know your thoughts on this matter. Thanks! -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18142): https://lists.fd.io/g/vpp-dev/message/18142 Mute This Topic: https://lists.fd.io/mt/78507623/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-