Index: source/ariba/communication/BaseCommunication.cpp
===================================================================
--- source/ariba/communication/BaseCommunication.cpp	(revision 7496)
+++ source/ariba/communication/BaseCommunication.cpp	(revision 7744)
@@ -38,5 +38,7 @@
 
 #include "BaseCommunication.h"
+
 #include "networkinfo/AddressDiscovery.h"
+#include "ariba/utility/types/PeerID.h"
 
 #ifdef UNDERLAY_OMNET
@@ -52,4 +54,6 @@
 namespace ariba {
 namespace communication {
+
+using ariba::utility::PeerID;
 
 use_logging_cpp(BaseCommunication);
@@ -100,4 +104,8 @@
 	currentSeqnum = 0;
 
+	// set local peer id
+	localDescriptor.getPeerId() = PeerID::random();
+	logging_info( "Using PeerID: " << localDescriptor.getPeerId() );
+
 	// creating transports
 	logging_info( "Creating transports ..." );
@@ -114,6 +122,9 @@
 
 	logging_info( "Searching for local locators ..." );
-	if(localDescriptor.getEndpoints().to_string().length() == 0)
-		AddressDiscovery::discover_endpoints( localDescriptor.getEndpoints() );
+	/**
+	 * DONT DO THAT: if(localDescriptor.getEndpoints().to_string().length() == 0)
+	 * since addresses are used to initialize transport addresses
+	 */
+	AddressDiscovery::discover_endpoints( localDescriptor.getEndpoints() );
 	logging_info( "Done. Local endpoints = " << localDescriptor.toString() );
 
@@ -177,4 +188,5 @@
 	AribaBaseMsg baseMsg( AribaBaseMsg::typeLinkRequest, linkid );
 	baseMsg.getLocalDescriptor() = localDescriptor;
+	baseMsg.getRemoteDescriptor().getPeerId() = descriptor.getPeerId();
 
 	// serialize and send message
@@ -338,4 +350,15 @@
 			logging_debug( "Received link open request" );
 
+			/// not the correct peer id-> skip request
+			if (!msg->getRemoteDescriptor().getPeerId().isUnspecified()
+				&& msg->getRemoteDescriptor().getPeerId() != localDescriptor.getPeerId()) {
+				logging_info("Received link request for "
+					<< msg->getRemoteDescriptor().getPeerId().toString()
+					<< "but i'm "
+					<< localDescriptor.getPeerId()
+					<< ": Ignoring!");
+				break;
+			}
+
 			/// only answer the first request
 			if (!queryRemoteLink(msg->getLocalLink()).isUnspecified()) {
Index: source/ariba/communication/EndpointDescriptor.h
===================================================================
--- source/ariba/communication/EndpointDescriptor.h	(revision 7496)
+++ source/ariba/communication/EndpointDescriptor.h	(revision 7744)
@@ -43,4 +43,5 @@
 #include <set>
 #include "ariba/utility/serialization.h"
+#include "ariba/utility/types/PeerID.h"
 #include "ariba/utility/addressing/endpoint_set.hpp"
 
@@ -51,4 +52,5 @@
 using namespace std;
 using namespace ariba::addressing;
+using ariba::utility::PeerID;
 
 class EndpointDescriptor: public VSerializeable { VSERIALIZEABLE
@@ -120,6 +122,17 @@
 	}
 
+	/// returns a reference to the peer id
+	PeerID& getPeerId() {
+		return peerId;
+	}
+
+
+	/// returns a reference to the constant peer id
+	const PeerID& getPeerId() const {
+		return peerId;
+	}
 private:
 	endpoint_set endpoints;
+	PeerID peerId;
 };
 
@@ -127,5 +140,9 @@
 
 sznBeginDefault( ariba::communication::EndpointDescriptor, X ){
-	// serialize endpoints
+
+	// serialize peer id
+	X && &peerId;
+
+	// serialize end-points
 	uint16_t len = endpoints.to_bytes_size();
 	X && len;
Index: source/ariba/communication/networkinfo/AddressDiscovery.cpp
===================================================================
--- source/ariba/communication/networkinfo/AddressDiscovery.cpp	(revision 7496)
+++ source/ariba/communication/networkinfo/AddressDiscovery.cpp	(revision 7744)
@@ -107,4 +107,8 @@
 		if (addr==NULL) continue;
 
+		// ignore tun devices
+		string device = string(i->ifa_name);
+		if(device.find_first_of("tun") == 0) continue;
+
 		if (addr->sa_family == AF_INET) {
 			// look for ipv4
