diff -rupN RackTables/inc/database.php RackTables.cable/inc/database.php
--- RackTables/inc/database.php	2010-07-09 17:01:54.000000000 +0200
+++ RackTables.cable/inc/database.php	2010-08-27 13:28:48.000000000 +0200
@@ -518,14 +518,16 @@ function getObjectPortsAndLinks ($object
 	{
 		$portid = $ret[$tmpkey]['id'];
 		$remote_id = NULL;
-		$query = "select porta, portb from Link where porta = ? or portb = ?";
+		$query = "select porta, portb, cable from Link where porta = ? or portb = ?";
 		$result = usePreparedSelectBlade ($query, array ($portid, $portid));
+		$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
@@ -536,6 +538,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);
@@ -945,7 +948,7 @@ function getAllIPv4Allocations ()
 	return $ret;
 }
 
-function linkPorts ($porta, $portb)
+function linkPorts ($porta, $portb, $cable="")
 {
 	if ($porta == $portb)
 		throw new InvalidArgException ('porta/portb', $porta, "Ports can't be the same");
@@ -955,7 +958,7 @@ function linkPorts ($porta, $portb)
 		$porta = $portb;
 		$portb = $tmp;
 	}
-	$ret = FALSE !== usePreparedInsertBlade ('Link', array ('porta' => $porta, 'portb' => $portb));
+	$ret = FALSE !== usePreparedInsertBlade ('Link', array ('porta' => $porta, 'portb' => $portb, 'cable' => $cable));
 	$ret = $ret and FALSE !== usePreparedExecuteBlade
 	(
 		'UPDATE Port SET reservation_comment=NULL WHERE id IN(?, ?)',
diff -rupN RackTables/inc/interface.php RackTables.cable/inc/interface.php
--- RackTables/inc/interface.php	2010-07-09 17:07:24.000000000 +0200
+++ RackTables.cable/inc/interface.php	2010-08-27 13:34:49.000000000 +0200
@@ -951,7 +951,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></tr>';
+		echo '<th class=tdcenter colspan=2>Remote object and port</th>';
+		echo '<th class=tdleft>Cable ID</th></tr>';
 		foreach ($info['ports'] as $port)
 		{
 			echo '<tr';
@@ -964,6 +965,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']))
 			{
@@ -1216,7 +1218,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)
@@ -1248,7 +1250,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']}<input type=hidden name=reservation_comment value=''></td>";
 			echo "<td class=tdcenter><a href='".
 				makeHrefProcess(array(
diff -rupN RackTables/inc/ophandlers.php RackTables.cable/inc/ophandlers.php
--- RackTables/inc/ophandlers.php	2010-07-05 19:07:09.000000000 +0200
+++ RackTables.cable/inc/ophandlers.php	2010-08-27 13:35:52.000000000 +0200
@@ -190,9 +190,10 @@ function linkPortForObject ()
 {
 	assertUIntArg ('port_id');
 	assertUIntArg ('remote_port_id');
+	assertStringArg ('cable');
 
 	// 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));
 	global $sic;
diff -rupN RackTables/popup.php RackTables.cable/popup.php
--- RackTables/popup.php	2010-06-25 12:54:06.000000000 +0200
+++ RackTables.cable/popup.php	2010-08-27 13:37:22.000000000 +0200
@@ -117,10 +117,12 @@ header ('Content-Type: text/html; charse
 			$spare_ports = findSparePorts ($port_id, $only_racks);
 
 			printSelect ($spare_ports, array ('name' => '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; ".
+			"	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;
