Index: trunk/FACT++/src/DimSetup.cc
===================================================================
--- trunk/FACT++/src/DimSetup.cc	(revision 19231)
+++ trunk/FACT++/src/DimSetup.cc	(revision 19232)
@@ -158,5 +158,5 @@
 //!     Address of the Dim-dns
 //!
-void Dim::Setup(const std::string &dns, const std::string &host)
+void Dim::Setup(const std::string &dns, const std::string &host, const uint16_t &port)
 {
     if (dns.empty())
@@ -172,6 +172,10 @@
     setenv("DIM_DNS_NODE",  dns.c_str(), 1);
     setenv("DIM_HOST_NODE", loc.c_str(), 1);
+    if (port>0)
+        setenv("DIM_DNS_PORT", to_string(port).c_str(), 1);
 
-    cout << "Setting DIM_DNS_NODE =" << dns << endl;
+    cout << "Setting DIM_DNS_NODE =" << dns;
+    if (port>0)
+        cout << ':' << port << endl;
     cout << "Setting DIM_HOST_NODE=" << loc << endl;
 }
Index: trunk/FACT++/src/DimSetup.h
===================================================================
--- trunk/FACT++/src/DimSetup.h	(revision 19231)
+++ trunk/FACT++/src/DimSetup.h	(revision 19232)
@@ -8,5 +8,5 @@
     //std::string GetLocalIp(const std::string &dns="192.168.0.255");
     std::string GetLocalIp(const std::string &dns="10.0.100.1");
-    void Setup(const std::string &dns="", const std::string &host="");
+    void Setup(const std::string &dns="", const std::string &host="", const uint16_t &port=0);
 }
 
Index: trunk/FACT++/src/Main.h
===================================================================
--- trunk/FACT++/src/Main.h	(revision 19231)
+++ trunk/FACT++/src/Main.h	(revision 19232)
@@ -29,6 +29,7 @@
         po::options_description config("Program options");
         config.add_options()
-            ("dns",        var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
-            ("host",       var<string>(),                  "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
+            ("dns",        var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
+            ("port",       var<uint16_t>(DNS_PORT),  "Port to connect to dim nameserver.")
+            ("host",       var<string>(""),          "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
             ("log,l",      var<string>(n), "Name of local log-file")
             ("logpath",    var<string>(),  "Absolute path to log-files (default: excutable's directory)")
@@ -45,4 +46,5 @@
 
         conf.AddEnv("dns",  "DIM_DNS_NODE");
+        conf.AddEnv("port", "DIM_DNS_PORT");
         conf.AddEnv("host", "DIM_HOST_NODE");
         conf.AddEnv("home", "HOME");
@@ -88,5 +90,5 @@
     int execute(Configuration &conf, bool dummy=false)
     {
-        Dim::Setup(conf.Get<string>("dns"), conf.Has("host")?conf.Get<string>("host"):"");
+        Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"), conf.Get<uint16_t>("port"));
 
         // -----------------------------------------------------------------
