diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index c8dbcf9..78adf6f 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -15,8 +15,8 @@
 NFD_LOG_INIT("EthernetFactory")
 
 shared_ptr<EthernetFace>
-EthernetFactory::createMulticast(const ethernet::Endpoint& interface,
-                                 const ethernet::Address& address)
+EthernetFactory::createMulticastFace(const ethernet::Endpoint& interface,
+                                     const ethernet::Address& address)
 {
   std::vector<ethernet::Endpoint> ifs = findAllInterfaces();
   if (std::find(ifs.begin(), ifs.end(), interface) == ifs.end())
@@ -25,7 +25,7 @@
   if (!address.isMulticast())
     throw Error(address.toString() + " is not a multicast address");
 
-  shared_ptr<EthernetFace> face = findMulticast(interface, address);
+  shared_ptr<EthernetFace> face = findMulticastFace(interface, address);
   if (face)
     return face;
 
@@ -92,8 +92,8 @@
 }
 
 shared_ptr<EthernetFace>
-EthernetFactory::findMulticast(const ethernet::Endpoint& interface,
-                               const ethernet::Address& address) const
+EthernetFactory::findMulticastFace(const ethernet::Endpoint& interface,
+                                   const ethernet::Address& address) const
 {
   MulticastFacesMap::const_iterator i = m_multicastFaces.find(std::make_pair(interface, address));
   if (i != m_multicastFaces.end())
@@ -102,4 +102,12 @@
     return shared_ptr<EthernetFace>();
 }
 
+void
+EthernetFactory::createFace(const FaceUri& uri,
+                            const FaceCreatedCallback& onCreated,
+                            const FaceConnectFailedCallback& onConnectFailed)
+{
+  throw Error("EthernetFactory does not support 'createFace' operation");
+}
+
 } // namespace nfd
diff --git a/daemon/face/ethernet-factory.hpp b/daemon/face/ethernet-factory.hpp
index d676f47..2eeca7b 100644
--- a/daemon/face/ethernet-factory.hpp
+++ b/daemon/face/ethernet-factory.hpp
@@ -39,8 +39,8 @@
    * \throws EthernetFactory::Error or EthernetFace::Error
    */
   shared_ptr<EthernetFace>
-  createMulticast(const ethernet::Endpoint& interface,
-                  const ethernet::Address& address);
+  createMulticastFace(const ethernet::Endpoint& interface,
+                      const ethernet::Address& address);
 
   /**
    * \brief Get a list of devices that can be opened for a live capture
@@ -50,6 +50,13 @@
   static std::vector<ethernet::Endpoint>
   findAllInterfaces();
 
+  // from Factory
+
+  virtual void
+  createFace(const FaceUri& uri,
+             const FaceCreatedCallback& onCreated,
+             const FaceConnectFailedCallback& onConnectFailed);
+
 private:
   void
   afterFaceFailed(const ethernet::Endpoint& endpoint,
@@ -64,8 +71,8 @@
    * \throws never
    */
   shared_ptr<EthernetFace>
-  findMulticast(const ethernet::Endpoint& interface,
-                const ethernet::Address& address) const;
+  findMulticastFace(const ethernet::Endpoint& interface,
+                    const ethernet::Address& address) const;
 
 private:
   typedef std::map< std::pair<ethernet::Endpoint, ethernet::Address>,
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index f02941e..8a00bde 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -8,9 +8,26 @@
 #define NFD_FACE_PROTOCOL_FACTORY_HPP
 
 #include "common.hpp"
+#include "core/face-uri.hpp"
 
 namespace nfd {
 
+class Face;
+
+/**
+ * \brief Prototype for the callback called when face is created
+ *        (as a response to incoming connection or after connection
+ *        is established)
+ */
+typedef function<void(const shared_ptr<Face>& newFace)> FaceCreatedCallback;
+
+/**
+ * \brief Prototype for the callback that is called when face is failed to
+ *        get created
+ */
+typedef function<void(const std::string& reason)> FaceConnectFailedCallback;
+
+
 class ProtocolFactory
 {
 public:
@@ -21,6 +38,18 @@
   {
     Error(const std::string& what) : std::runtime_error(what) {}
   };
+
+  /** \brief Try to create Face using the supplied Face URI
+   *
+   * This method should automatically choose channel, based on supplied Face URI
+   * and create face.
+   *
+   * \throws Factory::Error if Factory does not support connect operation
+   */
+  virtual void
+  createFace(const FaceUri& uri,
+             const FaceCreatedCallback& onCreated,
+             const FaceConnectFailedCallback& onConnectFailed) = 0;
 };
 
 } // namespace nfd
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 072ce2e..45b1a48 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -6,13 +6,19 @@
 
 #include "tcp-factory.hpp"
 #include "core/global-io.hpp"
+#include "core/resolver.hpp"
 
 namespace nfd {
 
-shared_ptr<TcpChannel>
-TcpFactory::create(const tcp::Endpoint& endpoint)
+TcpFactory::TcpFactory(const std::string& defaultPort/* = "6363"*/)
+  : m_defaultPort(defaultPort)
 {
-  shared_ptr<TcpChannel> channel = find(endpoint);
+}
+
+shared_ptr<TcpChannel>
+TcpFactory::createChannel(const tcp::Endpoint& endpoint)
+{
+  shared_ptr<TcpChannel> channel = findChannel(endpoint);
   if(static_cast<bool>(channel))
     return channel;
 
@@ -22,7 +28,7 @@
 }
 
 shared_ptr<TcpChannel>
-TcpFactory::create(const std::string& localHost, const std::string& localPort)
+TcpFactory::createChannel(const std::string& localHost, const std::string& localPort)
 {
   using boost::asio::ip::tcp;
 
@@ -34,11 +40,11 @@
   if (i == end)
     return shared_ptr<TcpChannel>();
 
-  return create(*i);
+  return createChannel(*i);
 }
 
 shared_ptr<TcpChannel>
-TcpFactory::find(const tcp::Endpoint& localEndpoint)
+TcpFactory::findChannel(const tcp::Endpoint& localEndpoint)
 {
   ChannelMap::iterator i = m_channels.find(localEndpoint);
   if (i != m_channels.end())
@@ -47,4 +53,47 @@
     return shared_ptr<TcpChannel>();
 }
 
+void
+TcpFactory::createFace(const FaceUri& uri,
+                       const FaceCreatedCallback& onCreated,
+                       const FaceConnectFailedCallback& onConnectFailed)
+{
+  resolver::AddressSelector addressSelector = resolver::AnyAddress();
+  if (uri.getScheme() == "tcp4")
+    addressSelector = resolver::Ipv4Address();
+  else if (uri.getScheme() == "tcp6")
+    addressSelector = resolver::Ipv6Address();
+
+  using boost::asio::ip::tcp;
+  Resolver<tcp>::asyncResolve(uri.getDomain(),
+                              uri.getPort().empty() ? m_defaultPort : uri.getPort(),
+                              bind(&TcpFactory::continueCreateFaceAfterResolve, this, _1,
+                                   onCreated, onConnectFailed),
+                              onConnectFailed,
+                              addressSelector);
+}
+
+void
+TcpFactory::continueCreateFaceAfterResolve(const tcp::Endpoint& endpoint,
+                                           const FaceCreatedCallback& onCreated,
+                                           const FaceConnectFailedCallback& onConnectFailed)
+{
+  // very simple logic for now
+
+  for (ChannelMap::iterator channel = m_channels.begin();
+       channel != m_channels.end();
+       ++channel)
+    {
+      if ((channel->first.address().is_v4() && endpoint.address().is_v4()) ||
+          (channel->first.address().is_v6() && endpoint.address().is_v6()))
+        {
+          channel->second->connect(endpoint, onCreated, onConnectFailed);
+          return;
+        }
+    }
+  onConnectFailed("No channels available to connect to "
+                  + boost::lexical_cast<std::string>(endpoint));
+}
+
+
 } // namespace nfd
diff --git a/daemon/face/tcp-factory.hpp b/daemon/face/tcp-factory.hpp
index fbda795..1886f24 100644
--- a/daemon/face/tcp-factory.hpp
+++ b/daemon/face/tcp-factory.hpp
@@ -23,6 +23,9 @@
     Error(const std::string& what) : ProtocolFactory::Error(what) {}
   };
 
+  explicit
+  TcpFactory(const std::string& defaultPort = "6363");
+
   /**
    * \brief Create TCP-based channel using tcp::Endpoint
    *
@@ -41,7 +44,7 @@
    *      for details on ways to create tcp::Endpoint
    */
   shared_ptr<TcpChannel>
-  create(const tcp::Endpoint& localEndpoint);
+  createChannel(const tcp::Endpoint& localEndpoint);
 
   /**
    * \brief Create TCP-based channel using specified host and port number
@@ -54,7 +57,14 @@
    * \throws TcpFactory::Error
    */
   shared_ptr<TcpChannel>
-  create(const std::string& localHost, const std::string& localPort);
+  createChannel(const std::string& localHost, const std::string& localPort);
+
+  // from Factory
+
+  virtual void
+  createFace(const FaceUri& uri,
+             const FaceCreatedCallback& onCreated,
+             const FaceConnectFailedCallback& onConnectFailed);
 
 private:
   /**
@@ -66,11 +76,18 @@
    * \throws never
    */
   shared_ptr<TcpChannel>
-  find(const tcp::Endpoint& localEndpoint);
+  findChannel(const tcp::Endpoint& localEndpoint);
+
+  void
+  continueCreateFaceAfterResolve(const tcp::Endpoint& endpoint,
+                                 const FaceCreatedCallback& onCreated,
+                                 const FaceConnectFailedCallback& onConnectFailed);
 
 private:
   typedef std::map< tcp::Endpoint, shared_ptr<TcpChannel> > ChannelMap;
   ChannelMap m_channels;
+
+  std::string m_defaultPort;
 };
 
 } // namespace nfd
diff --git a/daemon/face/unix-stream-factory.cpp b/daemon/face/unix-stream-factory.cpp
index 070d8c1..20c01d9 100644
--- a/daemon/face/unix-stream-factory.cpp
+++ b/daemon/face/unix-stream-factory.cpp
@@ -12,13 +12,13 @@
 namespace nfd {
 
 shared_ptr<UnixStreamChannel>
-UnixStreamFactory::create(const std::string& unixSocketPath)
+UnixStreamFactory::createChannel(const std::string& unixSocketPath)
 {
   boost::filesystem::path p(unixSocketPath);
   p = boost::filesystem::canonical(p.parent_path()) / p.filename();
   unix_stream::Endpoint endpoint(p.string());
 
-  shared_ptr<UnixStreamChannel> channel = find(endpoint);
+  shared_ptr<UnixStreamChannel> channel = findChannel(endpoint);
   if (channel)
     return channel;
 
@@ -29,7 +29,7 @@
 }
 
 shared_ptr<UnixStreamChannel>
-UnixStreamFactory::find(const unix_stream::Endpoint& endpoint)
+UnixStreamFactory::findChannel(const unix_stream::Endpoint& endpoint)
 {
   ChannelMap::iterator i = m_channels.find(endpoint);
   if (i != m_channels.end())
@@ -38,4 +38,12 @@
     return shared_ptr<UnixStreamChannel>();
 }
 
+void
+UnixStreamFactory::createFace(const FaceUri& uri,
+                              const FaceCreatedCallback& onCreated,
+                              const FaceConnectFailedCallback& onConnectFailed)
+{
+  throw Error("UnixStreamFactory does not support 'createFace' operation");
+}
+
 } // namespace nfd
diff --git a/daemon/face/unix-stream-factory.hpp b/daemon/face/unix-stream-factory.hpp
index 4b26a3f..ef857d8 100644
--- a/daemon/face/unix-stream-factory.hpp
+++ b/daemon/face/unix-stream-factory.hpp
@@ -36,7 +36,14 @@
    * \throws UnixStreamFactory::Error
    */
   shared_ptr<UnixStreamChannel>
-  create(const std::string& unixSocketPath);
+  createChannel(const std::string& unixSocketPath);
+
+  // from Factory
+
+  virtual void
+  createFace(const FaceUri& uri,
+             const FaceCreatedCallback& onCreated,
+             const FaceConnectFailedCallback& onConnectFailed);
 
 private:
   /**
@@ -48,7 +55,7 @@
    * \throws never
    */
   shared_ptr<UnixStreamChannel>
-  find(const unix_stream::Endpoint& endpoint);
+  findChannel(const unix_stream::Endpoint& endpoint);
 
 private:
   typedef std::map< unix_stream::Endpoint, shared_ptr<UnixStreamChannel> > ChannelMap;
diff --git a/daemon/main.cpp b/daemon/main.cpp
index e971a35..bd511bb 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -172,8 +172,8 @@
 initializeTcp()
 {
   g_tcpFactory = new TcpFactory();
-  g_tcpChannel = g_tcpFactory->create(g_options.m_tcpListen.first,
-                                      g_options.m_tcpListen.second);
+  g_tcpChannel = g_tcpFactory->createChannel(g_options.m_tcpListen.first,
+                                             g_options.m_tcpListen.second);
   g_tcpChannel->listen(
     bind(&onFaceEstablish, _1, static_cast<std::vector<Name>*>(0)),
     &onFaceError);
@@ -191,7 +191,7 @@
 initializeUnix()
 {
   g_unixFactory = new UnixStreamFactory();
-  g_unixChannel = g_unixFactory->create(g_options.m_unixListen);
+  g_unixChannel = g_unixFactory->createChannel(g_options.m_unixListen);
 
   g_unixChannel->listen(
     bind(&onFaceEstablish, _1, static_cast<std::vector<Name>*>(0)),
diff --git a/tests/face/ethernet.cpp b/tests/face/ethernet.cpp
index f2e7134..9322d4c 100644
--- a/tests/face/ethernet.cpp
+++ b/tests/face/ethernet.cpp
@@ -22,18 +22,21 @@
   if (interfaces.size() > 0)
     {
       shared_ptr<EthernetFace> face1;
-      BOOST_REQUIRE_NO_THROW(face1 = factory.createMulticast(interfaces[0],
-                                                             ethernet::getBroadcastAddress()));
+      BOOST_REQUIRE_NO_THROW(face1 =
+                             factory.createMulticastFace(interfaces[0],
+                                                     ethernet::getBroadcastAddress()));
       shared_ptr<EthernetFace> face1bis;
-      BOOST_REQUIRE_NO_THROW(face1bis = factory.createMulticast(interfaces[0],
-                                                                ethernet::getBroadcastAddress()));
+      BOOST_REQUIRE_NO_THROW(face1bis =
+                             factory.createMulticastFace(interfaces[0],
+                                                         ethernet::getBroadcastAddress()));
       BOOST_CHECK_EQUAL(face1, face1bis);
 
       if (interfaces.size() > 1)
         {
           shared_ptr<EthernetFace> face2;
-          BOOST_REQUIRE_NO_THROW(face2 = factory.createMulticast(interfaces[1],
-                                                                 ethernet::getBroadcastAddress()));
+          BOOST_REQUIRE_NO_THROW(face2 =
+                                 factory.createMulticastFace(interfaces[1],
+                                                             ethernet::getBroadcastAddress()));
           BOOST_CHECK_NE(face1, face2);
         }
       else
@@ -43,8 +46,9 @@
         }
 
       shared_ptr<EthernetFace> face3;
-      BOOST_REQUIRE_NO_THROW(face3 = factory.createMulticast(interfaces[0],
-                                                             ethernet::getDefaultMulticastAddress()));
+      BOOST_REQUIRE_NO_THROW(face3 =
+                             factory.createMulticastFace(interfaces[0],
+                                                         ethernet::getDefaultMulticastAddress()));
       BOOST_CHECK_NE(face1, face3);
     }
   else
@@ -67,7 +71,7 @@
     }
 
   shared_ptr<EthernetFace> face =
-    factory.createMulticast(interfaces[0], ethernet::getDefaultMulticastAddress());
+    factory.createMulticastFace(interfaces[0], ethernet::getDefaultMulticastAddress());
 
   BOOST_REQUIRE(static_cast<bool>(face));
   BOOST_CHECK_EQUAL(face->isLocal(), false);
diff --git a/tests/face/tcp.cpp b/tests/face/tcp.cpp
index bc65c8b..b601be2 100644
--- a/tests/face/tcp.cpp
+++ b/tests/face/tcp.cpp
@@ -19,11 +19,11 @@
 {
   TcpFactory factory;
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel1a = factory.create("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel1a = factory.createChannel("127.0.0.1", "20070");
   BOOST_CHECK_EQUAL(channel1, channel1a);
   
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   BOOST_CHECK_NE(channel1, channel2);
 }
 
@@ -181,8 +181,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
@@ -257,8 +257,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
@@ -275,14 +275,14 @@
 
   BOOST_CHECK_EQUAL(m_faces.size(), 2);
   
-  shared_ptr<TcpChannel> channel3 = factory.create("127.0.0.1", "20072");
+  shared_ptr<TcpChannel> channel3 = factory.createChannel("127.0.0.1", "20072");
   channel3->connect("127.0.0.1", "20070",
                     bind(&EndToEndFixture::channel_onFaceCreated, this, _1),
                     bind(&EndToEndFixture::channel_onConnectFailed, this, _1),
                     time::seconds(4)); // very short timeout
 
 
-  shared_ptr<TcpChannel> channel4 = factory.create("127.0.0.1", "20073");
+  shared_ptr<TcpChannel> channel4 = factory.createChannel("127.0.0.1", "20073");
 
   BOOST_CHECK_NE(channel3, channel4);
   
@@ -324,8 +324,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
diff --git a/tests/face/unix-stream.cpp b/tests/face/unix-stream.cpp
index c7cec87..beed83e 100644
--- a/tests/face/unix-stream.cpp
+++ b/tests/face/unix-stream.cpp
@@ -21,11 +21,11 @@
 {
   UnixStreamFactory factory;
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
-  shared_ptr<UnixStreamChannel> channel1a = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
+  shared_ptr<UnixStreamChannel> channel1a = factory.createChannel("foo");
   BOOST_CHECK_EQUAL(channel1, channel1a);
 
-  shared_ptr<UnixStreamChannel> channel2 = factory.create("bar");
+  shared_ptr<UnixStreamChannel> channel2 = factory.createChannel("bar");
   BOOST_CHECK_NE(channel1, channel2);
 }
 
@@ -147,7 +147,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
 
@@ -217,7 +217,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel = factory.createChannel("foo");
   channel->listen(bind(&EndToEndFixture::channel_onFaceCreated,   this, _1),
                   bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
 
@@ -319,7 +319,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
 
