@@ -644,16 +644,51 @@ func (v *VppRunner) configureVppUplinkInterface(
644644 return errors .Wrap (err , "Error enabling ARP proxy" )
645645 }
646646
647+ // Configure ND proxy for IPv6 - ND proxy allows VPP to respond to Neighbor Solicitations
648+ // ND proxy FIB lookups happen in the receiving interface's VRF, so add both cases to tap:
649+ // 1. Host's own addresses: Add to ND proxy table on tap, so VPP responds to NS for host addresses
650+ // 2. Gateway addresses: Add to ND proxy table on tap, so VPP proxies NS arriving from the host
651+ // (VPP responds with NA using its own MAC, then routes traffic to real gateway via uplink)
652+ // The ND proxy feature must be enabled on tap0 (where NS arrives from the host).
653+
654+ hasIPv6 := false
655+
656+ // Add host's own IPv6 addresses to ND proxy on tap interface
647657 for _ , addr := range ifState .Addresses {
648658 if addr .IP .To4 () == nil {
649- log .Infof ("Adding ND proxy for address %s" , addr .IP )
650- err = v .vpp .EnableIP6NdProxy (tapSwIfIndex , addr .IP )
659+ hasIPv6 = true
660+ log .Infof ("Adding ND proxy for host address %s on tap" , addr .IP )
661+ err = v .vpp .AddIP6NdProxyAddress (tapSwIfIndex , addr .IP )
662+ if err != nil {
663+ log .Errorf ("Error adding ND proxy address %s on tap: %v" , addr .IP .String (), err )
664+ }
665+ }
666+ }
667+
668+ // Add gateway addresses to ND proxy on TAP interface
669+ // The ND proxy FIB lookup happens in the interface's VRF, so we must add gateway
670+ // addresses to the tap interface for VPP to respond to NS from the host
671+ // VPP will respond with NA using its own MAC - acting as a proxy for the gateway
672+ for _ , route := range ifState .Routes {
673+ if route .Gw != nil && route .Gw .To4 () == nil {
674+ hasIPv6 = true
675+ log .Infof ("Adding ND proxy for gateway %s on tap (for host NS)" , route .Gw )
676+ err = v .vpp .AddIP6NdProxyAddress (tapSwIfIndex , route .Gw )
651677 if err != nil {
652- log .Errorf ("Error configuring nd proxy for address %s: %v" , addr . IP .String (), err )
678+ log .Errorf ("Error adding ND proxy for gateway %s on tap : %v" , route . Gw .String (), err )
653679 }
654680 }
655681 }
656682
683+ // Enable ND proxy feature on tap if we have any IPv6 addresses to proxy
684+ if hasIPv6 {
685+ log .Infof ("Enabling ND proxy feature on tap interface" )
686+ err = v .vpp .EnableIP6NdProxyFeature (tapSwIfIndex )
687+ if err != nil {
688+ log .Errorf ("Error enabling ND proxy feature on tap: %v" , err )
689+ }
690+ }
691+
657692 if * config .GetCalicoVppDebug ().GSOEnabled {
658693 err = v .vpp .EnableGSOFeature (tapSwIfIndex )
659694 if err != nil {
0 commit comments