diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index 9f5040a..8a0e673 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -344,6 +344,14 @@
         return (ls.connected) ? "connected " + timeAgo : "disconnected " + timeAgo;
     }
 
+    private boolean isLocallyConnected(DeviceId deviceId) {
+        LocalStatus ls = deviceLocalStatus.get(deviceId);
+        if (ls == null) {
+            return false;
+        }
+        return ls.connected;
+    }
+
     @Override
     public long getLastUpdatedInstant(DeviceId deviceId) {
         LocalStatus ls = deviceLocalStatus.get(deviceId);
@@ -353,14 +361,21 @@
         return ls.dateTime.toEpochMilli();
     }
 
-    // Check a device for control channel connectivity.
+    // Check a device for control channel connectivity
+    // and changes local-status appropriately.
     private boolean isReachable(DeviceId deviceId) {
         if (deviceId == null) {
             return false;
         }
         DeviceProvider provider = getProvider(deviceId);
         if (provider != null) {
-            return provider.isReachable(deviceId);
+            boolean reachable = provider.isReachable(deviceId);
+            if (reachable && !isLocallyConnected(deviceId)) {
+                deviceLocalStatus.put(deviceId, new LocalStatus(true, Instant.now()));
+            } else if (!reachable && isLocallyConnected(deviceId)) {
+                deviceLocalStatus.put(deviceId, new LocalStatus(false, Instant.now()));
+            }
+            return reachable;
         } else {
             log.debug("Provider not found for {}", deviceId);
             return false;
