diff --git a/src/main/java/org/onosproject/segmentrouting/ArpHandler.java b/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
index 8f0b7d3..649f52e 100644
--- a/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/ArpHandler.java
@@ -25,8 +25,6 @@
 import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.Host;
-import org.onosproject.net.HostId;
 import org.onosproject.net.host.HostService;
 import org.onosproject.segmentrouting.config.DeviceConfigNotFoundException;
 import org.onosproject.segmentrouting.config.SegmentRoutingAppConfig;
@@ -106,6 +104,9 @@
             MacAddress targetMac = config.getRouterMacForAGatewayIp(pkt.target().getIp4Address());
             sendResponse(pkt, targetMac, hostService);
         } else {
+            // NOTE: Ignore ARP packets except those target for the router
+            //       We will reconsider enabling this when we have host learning support
+            /*
             Set<Host> hosts = hostService.getHostsByIp(pkt.target());
             if (hosts.size() > 1) {
                 log.warn("More than one host with the same ip {}", pkt.target());
@@ -118,6 +119,7 @@
             } else {
                 flood(pkt);
             }
+            */
         }
     }
 
@@ -127,6 +129,9 @@
             Ip4Address hostIpAddress = pkt.sender().getIp4Address();
             srManager.ipHandler.forwardPackets(pkt.inPort().deviceId(), hostIpAddress);
         } else {
+            // NOTE: Ignore ARP packets except those target for the router
+            //       We will reconsider enabling this when we have host learning support
+            /*
             HostId targetHostId = HostId.hostId(pkt.dstMac(), pkt.vlan());
             Host targetHost = hostService.getHost(targetHostId);
             // ARP reply for known hosts. Forward to the host.
@@ -140,6 +145,7 @@
                 }
                 flood(pkt);
             }
+            */
         }
     }
 
diff --git a/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java b/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
index 16784c2..a1327c0 100644
--- a/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/IcmpHandler.java
@@ -32,8 +32,6 @@
 import org.onosproject.incubator.net.neighbour.NeighbourMessageType;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.Host;
-import org.onosproject.net.HostId;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.host.HostService;
@@ -328,41 +326,32 @@
      * @param hostService the host service
      */
     private void handleNdpRequest(NeighbourMessageContext pkt, HostService hostService) {
-        /*
-         * ND request for the gateway. We have to reply on behalf
-         * of the gateway.
-         */
+        // ND request for the gateway. We have to reply on behalf of the gateway.
         if (isNdpForGateway(pkt)) {
             log.debug("Sending NDP reply on behalf of the router");
             sendResponse(pkt, config.getRouterMacForAGatewayIp(pkt.target()), hostService);
         } else {
+            // NOTE: Ignore NDP packets except those target for the router
+            //       We will reconsider enabling this when we have host learning support
             /*
-             * ND request for an host. We do a search by Ip.
-             */
+            // ND request for an host. We do a search by Ip.
             Set<Host> hosts = hostService.getHostsByIp(pkt.target());
-            /*
-             * Possible misconfiguration ? In future this case
-             * should be handled we can have same hosts in different
-             * vlans.
-             */
+            // Possible misconfiguration ? In future this case
+            // should be handled we can have same hosts in different VLANs.
             if (hosts.size() > 1) {
                 log.warn("More than one host with IP {}", pkt.target());
             }
             Host targetHost = hosts.stream().findFirst().orElse(null);
-            /*
-             * If we know the host forward to its attachment
-             * point.
-             */
+            // If we know the host forward to its attachment point.
             if (targetHost != null) {
                 log.debug("Forward NDP request to the target host");
                 pkt.forward(targetHost.location());
             } else {
-                /*
-                 * Flood otherwise.
-                 */
+                // Flood otherwise.
                 log.debug("Flood NDP request to the target subnet");
                 flood(pkt);
             }
+            */
         }
     }
 
@@ -378,21 +367,23 @@
             Ip6Address hostIpAddress = pkt.sender().getIp6Address();
             srManager.ipHandler.forwardPackets(pkt.inPort().deviceId(), hostIpAddress);
         } else {
+            // NOTE: Ignore NDP packets except those target for the router
+            //       We will reconsider enabling this when we have host learning support
+            /*
             HostId hostId = HostId.hostId(pkt.dstMac(), pkt.vlan());
             Host targetHost = hostService.getHost(hostId);
             if (targetHost != null) {
                 log.debug("Forwarding the reply to the host");
                 pkt.forward(targetHost.location());
             } else {
-                /*
-                 * We don't have to flood towards spine facing ports.
-                 */
+                // We don't have to flood towards spine facing ports.
                 if (pkt.vlan().equals(SegmentRoutingManager.INTERNAL_VLAN)) {
                     return;
                 }
                 log.debug("Flooding the reply to the subnet");
                 flood(pkt);
             }
+            */
         }
     }
 
