diff --git a/www/newnode-defs.php3 b/www/newnode-defs.php3
index 59ecdba0562aef701189597f6caf0ccffcd45f35..6de6e2a819eb22ae45f8437356522464a52e75e5 100644
--- a/www/newnode-defs.php3
+++ b/www/newnode-defs.php3
@@ -50,15 +50,15 @@ function find_switch_macs(&$mac_list) {
 	    if ($ELABINELAB) {
 		# We let switchmac tell us.
 		$mac_list[$MAC]["class"] = $class;
+		# Need this to reorder the interfaces.
+		$mac_list[$MAC]["iface"] = $iface;
 	    }
 	}
 	$line = fgets($macs);
     }
 
-    pclose($macs);
-
-    return 1;
-
+    # Return exit status to caller! 
+    return pclose($macs);
 }
 
 function guess_node_type($proc,$disk) {
diff --git a/www/newnodes_list.php3 b/www/newnodes_list.php3
index f3ecd2fc7d33f58effd80f3f6527fcaffda2a4cf..ccb5fdc039b8875b1a41e3a425802078eee9494a 100644
--- a/www/newnodes_list.php3
+++ b/www/newnodes_list.php3
@@ -143,7 +143,44 @@ if ($research) {
     }
 
     echo "<h3>Looking for MACs, this could take a while...</h3>";
-    find_switch_macs($mac_list);
+    $retval = find_switch_macs($mac_list);
+    if ($ELABINELAB && $retval == 0) {
+	#
+	# Ick, Ick, Ick. Must reorder the interfaces so that they are
+	# the same as the outside Emulab, so that when we request the
+	# outer emulab to create a vlan, both are talking about the same
+	# interface. This is of course, bogus. I think I will have to
+	# change it so that we use the MACs instead of the iface name.
+	# That should be an easy change to snmpit_remote and the xmlrpc
+	# server stub (or the proxy I guess).
+	#
+	#  Move them out of the way
+	#
+	foreach ($mac_list as $mac => $switchport) {
+	    DBQueryFatal("update new_interfaces set card = card + 100 " .
+			 "where new_node_id='$switchport[new_node_id]' and " .
+			 "      card=$switchport[card]");
+	}
+	#
+	# Now move them back to proper location, as specifed by the iface
+	# that the outer emulab return to us. 
+	# 
+	foreach ($mac_list as $mac => $switchport) {
+	    $iface = $switchport["iface"];
+
+	    if (preg_match("/^(.*\D)(\d+)$/", $iface, $matches)) {
+		$newcard = $matches[2];
+		$oldcard = $switchport["card"] + 100;
+
+		DBQueryFatal("update new_interfaces set card = $newcard " .
+			     "where new_node_id='$switchport[new_node_id]' " .
+			     "  and card=$oldcard");
+
+		# Remember, $switchport is a *copy*, so must change $mac_list
+		$mac_list[$mac]["card"] = $newcard;
+	    }
+	}
+    }
     foreach ($mac_list as $mac => $switchport) {
         if ($switchport["switch"]) {
 	    $extra_set = "";