diff --git a/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java b/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java
index 9f789b2..ab2ced3 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/AbstractHighlight.java
@@ -26,6 +26,7 @@
 public abstract class AbstractHighlight {
     private final TopoElementType type;
     private final String elementId;
+    private boolean keepSubdued = false;
 
     /**
      * Constructs the highlight.
@@ -39,6 +40,13 @@
     }
 
     /**
+     * Sets a flag to tell the renderer to keep this element subdued.
+     */
+    public void keepSubdued() {
+        keepSubdued = true;
+    }
+
+    /**
      * Returns the element type.
      *
      * @return element type
@@ -55,4 +63,13 @@
     public String elementId() {
         return elementId;
     }
+
+    /**
+     * Returns the subdued flag.
+     *
+     * @return subdued flag
+     */
+    public boolean subdued() {
+        return keepSubdued;
+    }
 }
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoJson.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoJson.java
index 8b4b354..91cbc05 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoJson.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoJson.java
@@ -90,20 +90,32 @@
     }
 
     private static ObjectNode json(DeviceHighlight dh) {
-        return objectNode()
+        ObjectNode n = objectNode()
                 .put(ID, dh.elementId());
+        if (dh.subdued()) {
+            n.put(SUBDUE, true);
+        }
+        return n;
     }
 
     private static ObjectNode json(HostHighlight hh) {
-        return objectNode()
+        ObjectNode n = objectNode()
                 .put(ID, hh.elementId());
+        if (hh.subdued()) {
+            n.put(SUBDUE, true);
+        }
+        return n;
     }
 
     private static ObjectNode json(LinkHighlight lh) {
-        return objectNode()
+        ObjectNode n = objectNode()
                 .put(ID, lh.elementId())
                 .put(LABEL, lh.label())
                 .put(CSS, lh.cssClasses());
+        if (lh.subdued()) {
+            n.put(SUBDUE, true);
+        }
+        return n;
     }
 
     /**
diff --git a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
index 6bd7762..7eb45ba 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
@@ -326,7 +326,9 @@
         data.hosts.forEach(function (host) {
             var hdata = api.findNodeById(host.id);
             if (hdata && !hdata.el.empty()) {
-                api.unsupNode(hdata.id, less);
+                if (!host.subdue) {
+                    api.unsupNode(hdata.id, less);
+                }
                 // TODO: further highlighting?
             }
         });
@@ -334,7 +336,9 @@
         data.devices.forEach(function (device) {
             var ddata = api.findNodeById(device.id);
             if (ddata && !ddata.el.empty()) {
-                api.unsupNode(ddata.id, less);
+                if (!device.subdue) {
+                    api.unsupNode(ddata.id, less);
+                }
                 // TODO: further highlighting?
             }
         });
@@ -345,10 +349,13 @@
                 units, portcls, magnitude;
 
             if (ldata && !ldata.el.empty()) {
-                api.unsupLink(ldata.key, less);
+                if (!link.subdue) {
+                    api.unsupLink(ldata.key, less);
+                }
                 ldata.el.classed(link.css, true);
                 ldata.label = lab;
 
+                // TODO: this needs to be pulled out into traffic overlay
                 // inject additional styling for port-based traffic
                 if (fs.endsWith(lab, 'bps')) {
                     units = lab.substring(lab.length-4);
