Skip to content

Commit

Permalink
Enable IP forwarding on the Windows bridge local interface
Browse files Browse the repository at this point in the history
Traffic from the uplink interface will be output to the bridge local
interface directly. When an external client connects to a LoadBalancer
type Service, and the packets of the connection are routed to the
selected backend Pod via the bridge interface; if we do not enable IP
forwarding on the bridge interface, the connection will be discarded
on the bridge interface as the destination of the connection is not the
Node.

Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
  • Loading branch information
hongliangl committed Jan 25, 2022
1 parent 12f20a7 commit d1f6d96
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/agent/agent_windows.go
Expand Up @@ -170,6 +170,14 @@ func (i *Initializer) prepareOVSBridge() error {
i.ifaceStore.AddInterface(uplinkInterface)
ovsCtlClient := ovsctl.NewClient(i.ovsBridge)

// Enable IP forwarding on the bridge local interface. Traffic from the uplink interface will be output to the bridge
// local interface directly. When an external client connects to a LoadBalancer type Service, and the packets of the
// connection are routed to the selected backend Pod via the bridge interface; if we do not enable IP forwarding on
// the bridge interface, the packet will be discarded on the bridge interface as the destination of the packet
// is not the Node.
if err = util.EnableIPForwarding(brName); err != nil {
return err
}
// Set the uplink with "no-flood" config, so that the IP of local Pods and "antrea-gw0" will not be leaked to the
// underlay network by the "normal" flow entry.
if err = ovsCtlClient.SetPortNoFlood(config.UplinkOFPort); err != nil {
Expand Down

0 comments on commit d1f6d96

Please sign in to comment.