diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index 1709476..ff52584 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -337,11 +337,13 @@
         Host host = event.subject();
         Host prevHost = event.prevSubject();
         String hostType = host.annotations().value(AnnotationKeys.UI_TYPE);
+        String connectionType = host.annotations().value(AnnotationKeys.CONNECTION_TYPE);
         String ip = ip(host.ipAddresses());
 
         ObjectNode payload = objectNode()
                 .put("id", host.id().toString())
-                .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType);
+                .put("type", isNullOrEmpty(hostType) ? "endstation" : hostType)
+                .put("connectionType", isNullOrEmpty(connectionType) ? "wired" : connectionType);
 
         // set most recent connect point (and previous if we know it)
         payload.set("cp", hostConnect(host.location()));
diff --git a/web/gui/src/main/webapp/app/view/topo/topoForce.js b/web/gui/src/main/webapp/app/view/topo/topoForce.js
index dacbda9..158a066 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoForce.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoForce.js
@@ -217,7 +217,9 @@
             };
             model.links.push(linkData);
 
-            var lnk = tms.createHostLink(model.id, cp.device, cp.port);
+            // Make cell-phone devices default to wireless; others have to be annotated explicitly
+            var cType = model.type === 'cellPhone' ? "wireless" : model.connectionType
+            var lnk = tms.createHostLink(model.id, cp.device, cp.port, cType);
             if (lnk) {
                 network.links.push(lnk);
                 lu[linkData.key] = lnk;
@@ -363,6 +365,7 @@
         var th = ts.theme(),
             el = ldata.el,
             type = ldata.type(),
+            connectionType = ldata.connectionType(),
             lw = ldata.linkWidth(),
             online = ldata.online(),
             modeCls = ldata.expected() ? 'inactive' : 'not-permitted',
@@ -382,10 +385,19 @@
             if (type) {
                 el.classed(type, true);
             }
-            el.transition()
-                .duration(delay)
-                .attr('stroke-width', linkScale(lw))
-                .attr('stroke', linkConfig[th].baseColor);
+
+            if (connectionType === 'wireless') {
+                el.transition()
+                    .duration(delay)
+                    .attr('stroke-width', linkScale(lw))
+                    .attr('stroke', linkConfig[th].baseColor)
+                    .attr('stroke-dasharray', '3 6');
+            } else {
+                el.transition()
+                    .duration(delay)
+                    .attr('stroke-width', linkScale(lw))
+                    .attr('stroke', linkConfig[th].baseColor);
+            }
         }
     }
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topoModel.js b/web/gui/src/main/webapp/app/view/topo/topoModel.js
index 1084b52..6454f5a 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoModel.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoModel.js
@@ -178,7 +178,7 @@
         return node;
     }
 
-    function createHostLink(hostId, devId, devPort) {
+    function createHostLink(hostId, devId, devPort, connectionType) {
         var linkKey = hostId + '/0-' + devId + '/' + devPort,
             lnk = linkEndPoints(hostId, devId);
 
@@ -194,6 +194,7 @@
             tgtPort: devPort,
 
             type: function () { return 'hostLink'; },
+            connectionType: function () { return connectionType; },
             expected: function () { return true; },
             online: function () {
                 // hostlink target is edge switch
