diff -rupN /tmp/RackTables-0.17.11/inc/database.php ./inc/database.php
--- /tmp/RackTables-0.17.11/inc/database.php	2010-05-09 21:16:42.000000000 +0200
+++ ./inc/database.php	2010-06-30 18:22:59.000000000 +0200
@@ -547,14 +547,16 @@ function getObjectPortsAndLinks ($object
 	{
 		$portid = $ret[$tmpkey]['id'];
 		$remote_id = NULL;
-		$query = "select porta, portb from Link where porta = {$portid} or portb = ${portid}";
+		$query = "select porta, portb, cable from Link where porta = {$portid} or portb = ${portid}";
 		$result = useSelectBlade ($query, __FUNCTION__);
+		$cable = "CableID n/a";
 		if ($row = $result->fetch (PDO::FETCH_ASSOC))
 		{
 			if ($portid != $row['porta'])
 				$remote_id = $row['porta'];
 			elseif ($portid != $row['portb'])
 				$remote_id = $row['portb'];
+			$cable = $row['cable'];
 		}
 		unset ($result);
 		if ($remote_id) // there's a remote end here
@@ -565,6 +567,7 @@ function getObjectPortsAndLinks ($object
 			{
 				$ret[$tmpkey]['remote_name'] = $row['name'];
 				$ret[$tmpkey]['remote_object_id'] = $row['object_id'];
+				$ret[$tmpkey]['cableid'] = $cable;
 			}
 			$ret[$tmpkey]['remote_id'] = $remote_id;
 			unset ($result);
@@ -1086,7 +1089,7 @@ function getAllIPv4Allocations ()
 	return $ret;
 }
 
-function linkPorts ($porta, $portb)
+function linkPorts ($porta, $portb, $cable="")
 {
 	if ($porta == $portb)
 		return "Ports can't be the same";
@@ -1097,7 +1100,7 @@ function linkPorts ($porta, $portb)
 		$portb = $tmp;
 	}
 	global $dbxlink;
-	$query1 = "insert into Link set porta='${porta}', portb='{$portb}'";
+	$query1 = "insert into Link set porta='${porta}', portb='{$portb}', cable='{$cable}'";
 	$query2 = "update Port set reservation_comment = NULL where id = ${porta} or id = ${portb} limit 2";
 	// FIXME: who cares about the return value?
 	$result = $dbxlink->exec ($query1);
diff -rupN /tmp/RackTables-0.17.11/inc/interface.php ./inc/interface.php
--- /tmp/RackTables-0.17.11/inc/interface.php	2010-05-14 03:27:47.000000000 +0200
+++ ./inc/interface.php	2010-06-30 18:25:54.000000000 +0200
@@ -871,7 +871,8 @@ function renderRackObject ($object_id)
 		echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>";
 		echo '<tr><th class=tdleft>Local name</th><th class=tdleft>Visible label</th>';
 		echo '<th class=tdleft>Interface</th><th class=tdleft>L2 address</th>';
-		echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+                echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+                echo '<th class=tdleft>Cable ID</th></tr>';
 		if (isset ($page['object']['ports']['header']))
 			echo $page['object']['ports']['header'] ();
 		echo '</tr>';
@@ -891,6 +892,7 @@ function renderRackObject ($object_id)
 				$remote_object = spotEntity ('object', $port['remote_object_id']);
 				echo "<td class=tdleft><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id'], 'hl_port_id'=>$port['remote_id']))."'>${remote_object['dname']}</a></td>";
 				echo "<td class=tdleft>${port['remote_name']}</td>";
+				echo "<td class=tdleft>${port['cableid']}</td>";
 			}
 			elseif (strlen ($port['reservation_comment']))
 			{
@@ -1145,7 +1147,7 @@ function renderPortsForObject ($object_i
 	
 	echo "<table cellspacing=0 cellpadding='5' align='center' class='widetable'>\n";
 	echo "<tr><th>&nbsp;</th><th class=tdleft>Local name</th><th class=tdleft>Visible label</th><th class=tdleft>Interface</th><th class=tdleft>L2 address</th>";
-	echo "<th class=tdcenter colspan=2>Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
+	echo "<th class=tdcenter colspan=2>Cable, Remote object and port</th><th class=tdcenter>(Un)link or (un)reserve</th><th>&nbsp;</th></tr>\n";
 	if (getConfigVar ('ADDNEW_AT_TOP') == 'yes')
 		printNewItemTR ($prefs);
 	foreach ($object['ports'] as $port)
@@ -1179,7 +1181,7 @@ function renderPortsForObject ($object_i
 		if ($port['remote_object_id'])
 		{
 			$remote_object = spotEntity ('object', $port['remote_object_id']);
-			echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
+			echo "<td>${port['cableid']}&nbsp;<a href='".makeHref(array('page'=>'object', 'object_id'=>$port['remote_object_id']))."'>${remote_object['dname']}</a></td>";
 			echo "<td>${port['remote_name']}</td>";
 			echo "<td class=tdcenter><a href='".
 				makeHrefProcess(array(
@@ -2221,7 +2223,14 @@ function renderIPv4SpaceEditor ()
 			}
 			else // only render clickable image for empty networks
 			{
-				if (count ($netinfo['addrlist']))
+				//if (count ($netinfo['addrlist']))
+                                $reservedCount = 0;
+                                foreach($netinfo['addrlist'] as $ipinfo)
+                                {
+                                        if( $ipinfo['reserved'] == 'yes')
+                                                $reservedCount++;
+                                }
+                               if (count ($netinfo['addrlist']) - $reservedCount)
 					printImageHREF ('nodestroy', 'There are ' . count ($netinfo['addrlist']) . ' allocations inside');
 				else
 				{
diff -rupN /tmp/RackTables-0.17.11/inc/ophandlers.php ./inc/ophandlers.php
--- /tmp/RackTables-0.17.11/inc/ophandlers.php	2010-05-30 11:21:41.000000000 +0200
+++ ./inc/ophandlers.php	2010-06-30 18:27:38.000000000 +0200
@@ -192,9 +192,10 @@ function linkPortForObject ()
 {
 	assertUIntArg ('port_id', __FUNCTION__);
 	assertUIntArg ('remote_port_id', __FUNCTION__);
+	assertStringArg ('cable', __FUNCTION__, TRUE);
 
 	// FIXME: ensure, that at least one of these ports belongs to the current object
-	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id']);
+	$error = linkPorts ($_REQUEST['port_id'], $_REQUEST['remote_port_id'], $_REQUEST['cable']);
 	if ($error != '')
 		return buildRedirectURL (__FUNCTION__, 'ERR', array ($error));
 	$local_port_info = getPortInfo ($_REQUEST['port_id']);
diff -rupN /tmp/RackTables-0.17.11/popup.php ./popup.php
--- /tmp/RackTables-0.17.11/popup.php	2010-05-19 17:57:39.000000000 +0200
+++ ./popup.php	2010-06-30 18:29:33.000000000 +0200
@@ -92,11 +92,13 @@ header ('Content-Type: text/html; charse
 			}
 			$spare_ports = findSparePorts ($port_id, $only_racks);
 			printSelect ($spare_ports, array ('name' => 'ports', 'id' => 'ports', 'size' => getConfigVar ('MAXSELSIZE')));
-			echo '<br><br>';
+			echo '<br>';
+			echo "Cable ID: <input type=text id=cable>";
+			echo '<br>';
 			echo "<input type='submit' value='Link' onclick='".
 			"if (getElementById(\"ports\").value != \"\") {".
-			"	opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value; ".
-			"	window.close();}'>";
+			"       opener.location=\"process.php?page=object&tab=ports&op=linkPort&object_id=${port_info['object_id']}&port_id=$port_id&remote_port_id=\"+getElementById(\"ports\").value+\"&cable=\"+getElementById(\"cable\").value; ".
+                        "       window.close();}'>";
 			echo '</form></div>';
 			break;
 		case 'inet4list':
