diff --git a/src/main/java/org/opencord/cordvtn/api/net/VtnNetwork.java b/src/main/java/org/opencord/cordvtn/api/net/VtnNetwork.java
index 84cac7b..c4ae68e 100644
--- a/src/main/java/org/opencord/cordvtn/api/net/VtnNetwork.java
+++ b/src/main/java/org/opencord/cordvtn/api/net/VtnNetwork.java
@@ -25,6 +25,7 @@
 import org.openstack4j.model.network.Network;
 import org.openstack4j.model.network.Subnet;
 
+import java.util.Comparator;
 import java.util.Objects;
 import java.util.Set;
 
@@ -60,6 +61,9 @@
         this.serviceIp = serviceIp;
     }
 
+    public static final Comparator<VtnNetwork> VTN_NETWORK_COMPARATOR =
+            (net1, net2) -> net1.serviceIp().compareTo(net2.serviceIp());
+
     /**
      * Returns the network ID.
      *
diff --git a/src/main/java/org/opencord/cordvtn/api/net/VtnPort.java b/src/main/java/org/opencord/cordvtn/api/net/VtnPort.java
index 3ba4192..1f07218 100644
--- a/src/main/java/org/opencord/cordvtn/api/net/VtnPort.java
+++ b/src/main/java/org/opencord/cordvtn/api/net/VtnPort.java
@@ -58,7 +58,7 @@
     }
 
     public static final Comparator<VtnPort> VTN_PORT_COMPARATOR =
-            (port1, port2) -> port1.netId().id().compareTo(port2.netId().id());
+            (port1, port2) -> port1.ip().compareTo(port2.ip());
 
     /**
      * Returns the network ID of this port.
diff --git a/src/main/java/org/opencord/cordvtn/cli/CordVtnNetworkListCommand.java b/src/main/java/org/opencord/cordvtn/cli/CordVtnNetworkListCommand.java
index a97a7ae..fac50f8 100644
--- a/src/main/java/org/opencord/cordvtn/cli/CordVtnNetworkListCommand.java
+++ b/src/main/java/org/opencord/cordvtn/cli/CordVtnNetworkListCommand.java
@@ -18,12 +18,14 @@
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.google.common.collect.Lists;
 import org.apache.karaf.shell.commands.Command;
 import org.onosproject.cli.AbstractShellCommand;
 import org.opencord.cordvtn.api.core.CordVtnService;
 import org.opencord.cordvtn.api.net.VtnNetwork;
 
-import java.util.Set;
+import java.util.Collections;
+import java.util.List;
 
 import static com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT;
 
@@ -39,7 +41,8 @@
     @Override
     protected void execute() {
         CordVtnService service = AbstractShellCommand.get(CordVtnService.class);
-        Set<VtnNetwork> networks = service.vtnNetworks();
+        List<VtnNetwork> networks = Lists.newArrayList(service.vtnNetworks());
+        Collections.sort(networks, VtnNetwork.VTN_NETWORK_COMPARATOR);
 
         if (outputJson()) {
             try {
@@ -59,7 +62,7 @@
         }
     }
 
-    private JsonNode json(Set<VtnNetwork> networks) {
+    private JsonNode json(List<VtnNetwork> networks) {
         ArrayNode result = mapper().enable(INDENT_OUTPUT).createArrayNode();
         for (VtnNetwork net: networks) {
             ArrayNode providers = mapper().createArrayNode();
diff --git a/src/main/java/org/opencord/cordvtn/cli/CordVtnPortListCommand.java b/src/main/java/org/opencord/cordvtn/cli/CordVtnPortListCommand.java
index 361b220..32eaa22 100644
--- a/src/main/java/org/opencord/cordvtn/cli/CordVtnPortListCommand.java
+++ b/src/main/java/org/opencord/cordvtn/cli/CordVtnPortListCommand.java
@@ -24,8 +24,6 @@
 import org.apache.karaf.shell.commands.Command;
 import org.onosproject.cli.AbstractShellCommand;
 import org.opencord.cordvtn.api.core.CordVtnService;
-import org.opencord.cordvtn.api.net.NetworkId;
-import org.opencord.cordvtn.api.net.VtnNetwork;
 import org.opencord.cordvtn.api.net.VtnPort;
 
 import java.util.Collections;
@@ -41,7 +39,7 @@
         description = "Lists all VTN ports")
 public class CordVtnPortListCommand extends AbstractShellCommand {
 
-    private static final String FORMAT = "%-40s%-20s%-18s%-6s%s";
+    private static final String FORMAT = "%-40s%-20s%-18s%-8s%s";
 
     @Argument(name = "networkId", description = "Network ID")
     private String networkId = null;
@@ -50,19 +48,10 @@
     protected void execute() {
         CordVtnService service = AbstractShellCommand.get(CordVtnService.class);
 
-        List<VtnPort> ports;
-        if (Strings.isNullOrEmpty(networkId)) {
-            ports = Lists.newArrayList(service.vtnPorts());
-        } else {
-            VtnNetwork vtnNet = service.vtnNetwork(NetworkId.of(networkId));
-            if (vtnNet == null) {
-                print("Network %s does not exists", networkId);
-                return;
-            }
-            ports = service.vtnPorts().stream()
-                    .filter(p -> p.netId().equals(NetworkId.of(networkId)))
-                    .collect(Collectors.toList());
-            Collections.sort(ports, VtnPort.VTN_PORT_COMPARATOR);
+        List<VtnPort> ports = Lists.newArrayList(service.vtnPorts());
+        Collections.sort(ports, VtnPort.VTN_PORT_COMPARATOR);
+        if (!Strings.isNullOrEmpty(networkId)) {
+            ports.removeIf(port -> !port.netId().id().equals(networkId));
         }
 
         if (outputJson()) {
@@ -72,7 +61,7 @@
                 print("Failed to list networks in JSON format");
             }
         } else {
-            print(FORMAT, "ID", "MAC", "IP", "VLAN", "Additional IPs");
+            print(FORMAT, "ID", "MAC", "IP", "VLAN", "WAN IPs");
             for (VtnPort port: ports) {
                 List<String> floatingIps = port.addressPairs().stream()
                         .map(ip -> ip.ip().toString())
