openyurtio / raven

provide layer 3 and layer 7 network connectivity among pods in different physical regions
Apache License 2.0
57 stars 37 forks source link

refactor: add networkengine framework. #32

Closed DrmagicE closed 2 years ago

DrmagicE commented 2 years ago

This PR mainly makes the following changes:

  1. Decouple route and VPN implementation.
  2. Rename vxlan interface name raven to raven0.
  3. Calculate the desired network state from Gateway list on each change. This prevents mismatched state when the delete event is missed during watch connection getting reestablished.
  4. Enable loose mode reverse path filtering on raven0.
  5. Configure reverse-path route to avoid asymmetric routing.
  6. Add src field in route entries to preserved node cni IP.

fix #30

njucjc commented 2 years ago

It seems that the configuration for fdb is missing:

Without this configuration, the cross-edge traffic of the non-gateway node cannot be forwarded to the gateway node.

reference: http://just4coding.com/2020/04/20/vxlan-fdb/

DrmagicE commented 2 years ago

It seems that the configuration for fdb is missing:

  • on gateway node 00:00:00:00:00:00 dev raven0 dst <non_gateway_private_ip> self permanent
  • on non-gateway node 00:00:00:00:00:00 dev raven0 dst <gateway_private_ip> self permanent

Without this configuration, the cross-edge traffic of the non-gateway node cannot be forwarded to the gateway node.

reference: http://just4coding.com/2020/04/20/vxlan-fdb/

I miss that, will fix it today.

DrmagicE commented 2 years ago

It seems that the configuration for fdb is missing:

  • on gateway node 00:00:00:00:00:00 dev raven0 dst <non_gateway_private_ip> self permanent
  • on non-gateway node 00:00:00:00:00:00 dev raven0 dst <gateway_private_ip> self permanent

Without this configuration, the cross-edge traffic of the non-gateway node cannot be forwarded to the gateway node.

reference: http://just4coding.com/2020/04/20/vxlan-fdb/

Updated and tested, please have a look. https://github.com/openyurtio/raven/compare/a2c3d49c06294a11081b28e43b5839848f4d1e51..e46cca7c4a3b2afd547221be45e201a08654b003

njucjc commented 2 years ago

LGTM