diff --git a/tests/daemon/face/ethernet-channel.t.cpp b/tests/daemon/face/ethernet-channel.t.cpp
index af9f788..78f5015 100644
--- a/tests/daemon/face/ethernet-channel.t.cpp
+++ b/tests/daemon/face/ethernet-channel.t.cpp
@@ -38,7 +38,7 @@
   makeChannel()
   {
     BOOST_ASSERT(netifs.size() > 0);
-    return make_unique<EthernetChannel>(netifs.front().asNetworkInterface(), time::seconds(2));
+    return make_unique<EthernetChannel>(netifs.front(), time::seconds(2));
   }
 };
 
@@ -50,7 +50,7 @@
   SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
 
   auto channel = makeChannel();
-  BOOST_CHECK_EQUAL(channel->getUri(), FaceUri::fromDev(netifs.front().name));
+  BOOST_CHECK_EQUAL(channel->getUri(), FaceUri::fromDev(netifs.front()->getName()));
 }
 
 BOOST_AUTO_TEST_CASE(Listen)
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index b83e331..856a942 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -195,12 +195,12 @@
       }
     }
   )CONFIG";
-  boost::replace_first(CONFIG, "%ifname", netifs.front().name);
+  boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
   auto etherMcastFaces = this->listEtherMcastFaces();
   BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), 1);
-  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getLocalUri().getHost(), netifs.front().name);
+  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getLocalUri().getHost(), netifs.front()->getName());
 }
 
 BOOST_AUTO_TEST_CASE(Blacklist)
@@ -219,13 +219,13 @@
       }
     }
   )CONFIG";
-  boost::replace_first(CONFIG, "%ifname", netifs.front().name);
+  boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
   auto etherMcastFaces = this->listEtherMcastFaces();
   BOOST_CHECK_EQUAL(etherMcastFaces.size(), netifs.size() - 1);
   BOOST_CHECK_EQUAL(boost::count_if(etherMcastFaces, [=] (const Face* face) {
-    return face->getLocalUri().getHost() == netifs.front().name;
+    return face->getLocalUri().getHost() == netifs.front()->getName();
   }), 0);
 }
 
diff --git a/tests/daemon/face/ethernet-fixture.hpp b/tests/daemon/face/ethernet-fixture.hpp
index c1f2b8e..334fe21 100644
--- a/tests/daemon/face/ethernet-fixture.hpp
+++ b/tests/daemon/face/ethernet-fixture.hpp
@@ -26,11 +26,11 @@
 #ifndef NFD_TESTS_DAEMON_FACE_ETHERNET_FIXTURE_HPP
 #define NFD_TESTS_DAEMON_FACE_ETHERNET_FIXTURE_HPP
 
-#include "core/network-interface.hpp"
 #include "face/multicast-ethernet-transport.hpp"
 #include "face/unicast-ethernet-transport.hpp"
 
 #include "tests/limited-io.hpp"
+#include "test-netif-ip.hpp"
 
 namespace nfd {
 namespace face {
@@ -38,16 +38,17 @@
 
 using namespace nfd::tests;
 
+/** \brief a fixture providing a list of EthernetTransport-capable network interfaces
+ */
 class EthernetFixture : public virtual BaseFixture
 {
 protected:
   EthernetFixture()
   {
-    for (const auto& netif : listNetworkInterfaces()) {
-      if (!netif.isLoopback() && netif.isUp()) {
+    for (const auto& netif : collectNetworkInterfaces()) {
+      if (!netif->isLoopback() && netif->isUp()) {
         try {
-          MulticastEthernetTransport transport(*netif.asNetworkInterface(),
-                                               ethernet::getBroadcastAddress(),
+          MulticastEthernetTransport transport(*netif, ethernet::getBroadcastAddress(),
                                                ndn::nfd::LINK_TYPE_MULTI_ACCESS);
           netifs.push_back(netif);
         }
@@ -58,37 +59,40 @@
     }
   }
 
+  /** \brief create a UnicastEthernetTransport
+   */
   void
   initializeUnicast(ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
                     ethernet::Address remoteAddr = {0x00, 0x00, 0x5e, 0x00, 0x53, 0x5e})
   {
     BOOST_ASSERT(netifs.size() > 0);
-    localEp = netifs.front().name;
+    localEp = netifs.front()->getName();
     remoteEp = remoteAddr;
-    transport = make_unique<UnicastEthernetTransport>(*netifs.front().asNetworkInterface(),
-                                                      remoteEp, persistency, time::seconds(2));
+    transport = make_unique<UnicastEthernetTransport>(*netifs.front(), remoteEp, persistency, time::seconds(2));
   }
 
+  /** \brief create a MulticastEthernetTransport
+   */
   void
   initializeMulticast(ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS,
                       ethernet::Address mcastGroup = {0x01, 0x00, 0x5e, 0x90, 0x10, 0x5e})
   {
     BOOST_ASSERT(netifs.size() > 0);
-    localEp = netifs.front().name;
+    localEp = netifs.front()->getName();
     remoteEp = mcastGroup;
-    transport = make_unique<MulticastEthernetTransport>(*netifs.front().asNetworkInterface(),
-                                                        remoteEp, linkType);
+    transport = make_unique<MulticastEthernetTransport>(*netifs.front(), remoteEp, linkType);
   }
 
 protected:
   LimitedIo limitedIo;
-  unique_ptr<EthernetTransport> transport;
-  std::string localEp;
-  ethernet::Address remoteEp;
 
   /** \brief EthernetTransport-capable network interfaces
    */
-  std::vector<NetworkInterfaceInfo> netifs;
+  std::vector<shared_ptr<const ndn::net::NetworkInterface>> netifs;
+
+  unique_ptr<EthernetTransport> transport;
+  std::string localEp;
+  ethernet::Address remoteEp;
 };
 
 #define SKIP_IF_ETHERNET_NETIF_COUNT_LT(n) \
diff --git a/tests/daemon/face/multicast-udp-transport-fixture.hpp b/tests/daemon/face/multicast-udp-transport-fixture.hpp
index 574cb58..00a9451 100644
--- a/tests/daemon/face/multicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/multicast-udp-transport-fixture.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -30,7 +30,7 @@
 #include "face/face.hpp"
 
 #include "dummy-receive-link-service.hpp"
-#include "test-ip.hpp"
+#include "test-netif-ip.hpp"
 #include "tests/limited-io.hpp"
 
 namespace nfd {
@@ -47,7 +47,7 @@
   MulticastUdpTransportFixture()
     : transport(nullptr)
     , multicastEp(ip::address::from_string("230.15.19.47"), 7070)
-    , defaultAddr(getTestIp<ip::address_v4>(LoopbackAddress::No, MulticastInterface::Yes))
+    , defaultAddr(getTestIp<AddressFamily::V4>(LoopbackAddress::No, MulticastInterface::Yes))
     , receivedPackets(nullptr)
     , remoteSockRx(g_io)
     , remoteSockTx(g_io)
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index 986d471..d1a9626 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -25,8 +25,7 @@
 
 #include "tcp-channel-fixture.hpp"
 
-#include "test-ip.hpp"
-
+#include "test-netif-ip.hpp"
 #include <boost/mpl/vector.hpp>
 
 namespace nfd {
@@ -36,16 +35,17 @@
 BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestTcpChannel, TcpChannelFixture)
 
-using AddressFamilies = boost::mpl::vector<boost::asio::ip::address_v4,
-                                           boost::asio::ip::address_v6>;
+using AddressFamilies = boost::mpl::vector<
+  std::integral_constant<AddressFamily, AddressFamily::V4>,
+  std::integral_constant<AddressFamily, AddressFamily::V6>>;
 
-BOOST_AUTO_TEST_CASE_TEMPLATE(ConnectTimeout, A, AddressFamilies)
+BOOST_AUTO_TEST_CASE_TEMPLATE(ConnectTimeout, F, AddressFamilies)
 {
-  auto address = getTestIp<A>(LoopbackAddress::Yes);
+  auto address = getTestIp<F::value>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   // do not listen
 
-  auto channel = this->makeChannel(A());
+  auto channel = this->makeChannel(typename IpAddressFromFamily<F::value>::type());
   channel->connect(tcp::Endpoint(address, 7040),
     ndn::nfd::FACE_PERSISTENCY_PERSISTENT, false,
     [this] (const shared_ptr<nfd::Face>&) {
diff --git a/tests/daemon/face/tcp-transport-fixture.hpp b/tests/daemon/face/tcp-transport-fixture.hpp
index 08f55b6..b792e9c 100644
--- a/tests/daemon/face/tcp-transport-fixture.hpp
+++ b/tests/daemon/face/tcp-transport-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
 #include "face/face.hpp"
 
 #include "dummy-receive-link-service.hpp"
-#include "test-ip.hpp"
+#include "test-netif-ip.hpp"
 #include "tests/limited-io.hpp"
 
 namespace nfd {
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index 0d5578f..c2b0235 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -36,7 +36,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -52,7 +52,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv6)
 {
-  auto address = getTestIp<ip::address_v6>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V6>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -68,7 +68,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::No);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::No);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -86,7 +86,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv6)
 {
-  auto address = getTestIp<ip::address_v6>(LoopbackAddress::No);
+  auto address = getTestIp<AddressFamily::V6>(LoopbackAddress::No);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -104,7 +104,7 @@
 
 BOOST_AUTO_TEST_CASE(PersistencyChange)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -115,7 +115,7 @@
 
 BOOST_AUTO_TEST_CASE(PermanentReconnect)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, ndn::nfd::FACE_PERSISTENCY_PERMANENT);
 
@@ -140,7 +140,7 @@
   // when persistency is changed out of permanent while transport is DOWN,
   // the transport immediately goes into FAILED state
 
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, ndn::nfd::FACE_PERSISTENCY_PERMANENT);
 
@@ -206,7 +206,7 @@
 
 BOOST_AUTO_TEST_CASE(PermanentReconnectWithExponentialBackoff)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
 
   tcp::endpoint remoteEp(address, 7070);
diff --git a/tests/daemon/face/tcp-udp-channel.t.cpp b/tests/daemon/face/tcp-udp-channel.t.cpp
index 88d9cba..e568bd6 100644
--- a/tests/daemon/face/tcp-udp-channel.t.cpp
+++ b/tests/daemon/face/tcp-udp-channel.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -26,8 +26,7 @@
 #include "tcp-channel-fixture.hpp"
 #include "udp-channel-fixture.hpp"
 
-#include "test-ip.hpp"
-
+#include "test-netif-ip.hpp"
 #include <boost/mpl/vector.hpp>
 
 namespace nfd {
@@ -37,18 +36,19 @@
 BOOST_AUTO_TEST_SUITE(Face)
 BOOST_AUTO_TEST_SUITE(TestTcpUdpChannel)
 
-template<typename F, typename A>
+template<typename F, AddressFamily AF>
 struct FixtureAndAddress
 {
   using Fixture = F;
-  using Address = A;
+  static constexpr AddressFamily ADDRESS_FAMILY = AF;
+  using Address = typename IpAddressFromFamily<AF>::type;
 };
 
 using FixtureAndAddressList = boost::mpl::vector<
-  FixtureAndAddress<TcpChannelFixture, boost::asio::ip::address_v4>,
-  FixtureAndAddress<TcpChannelFixture, boost::asio::ip::address_v6>,
-  FixtureAndAddress<UdpChannelFixture, boost::asio::ip::address_v4>,
-  FixtureAndAddress<UdpChannelFixture, boost::asio::ip::address_v6>
+  FixtureAndAddress<TcpChannelFixture, AddressFamily::V4>,
+  FixtureAndAddress<TcpChannelFixture, AddressFamily::V6>,
+  FixtureAndAddress<UdpChannelFixture, AddressFamily::V4>,
+  FixtureAndAddress<UdpChannelFixture, AddressFamily::V6>
 >;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(Uri, T, FixtureAndAddressList, T::Fixture)
@@ -73,7 +73,7 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(MultipleAccepts, T, FixtureAndAddressList, T::Fixture)
 {
-  auto address = getTestIp<typename T::Address>(LoopbackAddress::Yes);
+  auto address = getTestIp<T::ADDRESS_FAMILY>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->listen(address);
 
@@ -125,7 +125,7 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(FaceClosure, T, FixtureAndAddressList, T::Fixture)
 {
-  auto address = getTestIp<typename T::Address>(LoopbackAddress::Yes);
+  auto address = getTestIp<T::ADDRESS_FAMILY>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->listen(address);
 
diff --git a/tests/daemon/face/test-ip.cpp b/tests/daemon/face/test-ip.cpp
deleted file mode 100644
index a4cda7d..0000000
--- a/tests/daemon/face/test-ip.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "test-ip.hpp"
-
-#include "core/network-interface.hpp"
-
-namespace nfd {
-namespace tests {
-namespace {
-
-template<typename E>
-bool
-matchTristate(E e, bool b)
-{
-  return (e == E::DontCare) ||
-         (e == E::Yes && b) ||
-         (e == E::No && !b);
-}
-
-} // unnamed namespace
-
-template<>
-boost::asio::ip::address_v4
-getTestIp(LoopbackAddress loopback, MulticastInterface mcast)
-{
-  for (const auto& interface : listNetworkInterfaces()) {
-    if (interface.isUp() &&
-        matchTristate(loopback, interface.isLoopback()) &&
-        matchTristate(mcast, interface.isMulticastCapable())) {
-      for (const auto& address : interface.ipv4Addresses) {
-        if (!address.is_unspecified() &&
-            matchTristate(loopback, address.is_loopback())) {
-          return address;
-        }
-      }
-    }
-  }
-  return {};
-}
-
-template<>
-boost::asio::ip::address_v6
-getTestIp(LoopbackAddress loopback, MulticastInterface mcast)
-{
-  for (const auto& interface : listNetworkInterfaces()) {
-    if (interface.isUp() &&
-        matchTristate(loopback, interface.isLoopback()) &&
-        matchTristate(mcast, interface.isMulticastCapable())) {
-      for (const auto& address : interface.ipv6Addresses) {
-        if (!address.is_unspecified() &&
-            !address.is_link_local() && // see #1428
-            matchTristate(loopback, address.is_loopback())) {
-          return address;
-        }
-      }
-    }
-  }
-  return {};
-}
-
-} // namespace tests
-} // namespace nfd
diff --git a/tests/daemon/face/test-ip.hpp b/tests/daemon/face/test-ip.hpp
deleted file mode 100644
index 2aa6203..0000000
--- a/tests/daemon/face/test-ip.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_TESTS_DAEMON_FACE_TEST_IP_HPP
-#define NFD_TESTS_DAEMON_FACE_TEST_IP_HPP
-
-#include <boost/asio/ip/address_v4.hpp>
-#include <boost/asio/ip/address_v6.hpp>
-
-#define SKIP_IF_IP_UNAVAILABLE(address) \
-  do { \
-    if ((address).is_unspecified()) { \
-      BOOST_WARN_MESSAGE(false, "skipping assertions that require a valid IP address"); \
-      return; \
-    } \
-  } while (false)
-
-namespace nfd {
-namespace tests {
-
-enum class LoopbackAddress {
-  No,
-  Yes,
-  DontCare,
-  Default = Yes
-};
-
-enum class MulticastInterface {
-  No,
-  Yes,
-  DontCare,
-  Default = DontCare
-};
-
-/** \brief get an IP address for test purposes from any available network interface
- *  \tparam A the address type, either boost::asio::ip::address_v4 or boost::asio::ip::address_v6
- *  \param loopback specifies if the address can, must, or must not be a loopback address
- *  \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
- *  \return an IP address
- *  \retval default-constructed A, if no appropriate address is available
- */
-template<typename A>
-A
-getTestIp(LoopbackAddress loopback = LoopbackAddress::Default,
-          MulticastInterface mcast = MulticastInterface::Default);
-
-template<>
-boost::asio::ip::address_v4
-getTestIp(LoopbackAddress loopback, MulticastInterface mcast);
-
-template<>
-boost::asio::ip::address_v6
-getTestIp(LoopbackAddress loopback, MulticastInterface mcast);
-
-} // namespace tests
-} // namespace nfd
-
-#endif // NFD_TESTS_DAEMON_FACE_TEST_IP_HPP
diff --git a/tests/daemon/face/test-netif-ip.cpp b/tests/daemon/face/test-netif-ip.cpp
new file mode 100644
index 0000000..3471ba3
--- /dev/null
+++ b/tests/daemon/face/test-netif-ip.cpp
@@ -0,0 +1,122 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2017,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "test-netif-ip.hpp"
+#include "core/global-io.hpp"
+#include <ndn-cxx/net/network-monitor.hpp>
+
+namespace nfd {
+namespace tests {
+
+std::vector<shared_ptr<const NetworkInterface>>
+collectNetworkInterfaces(bool allowCached)
+{
+  using ndn::net::NetworkMonitor;
+
+  static std::vector<shared_ptr<const NetworkInterface>> cached;
+  // cached.empty() indicates there's no cached list of netifs.
+  // Although it could also mean a system without any network interface, this situation is rare
+  // because the loopback interface is present on almost all systems.
+
+  if (!allowCached || cached.empty()) {
+    NetworkMonitor netmon(getGlobalIoService());
+    if ((netmon.getCapabilities() & NetworkMonitor::CAP_ENUM) == 0) {
+      BOOST_THROW_EXCEPTION(NetworkMonitor::Error("NetworkMonitor::CAP_ENUM is unavailable"));
+    }
+
+    netmon.onEnumerationCompleted.connect([] { getGlobalIoService().stop(); });
+    getGlobalIoService().run();
+    getGlobalIoService().reset();
+
+    cached = netmon.listNetworkInterfaces();
+  }
+
+  return cached;
+}
+
+namespace {
+
+template<typename E>
+bool
+matchTristate(E e, bool b)
+{
+  return (e == E::DontCare) ||
+         (e == E::Yes && b) ||
+         (e == E::No && !b);
+}
+
+template<AddressFamily AF>
+typename IpAddressFromFamily<AF>::type
+fromIpAddress(const boost::asio::ip::address& a);
+
+template<>
+IpAddressFromFamily<AddressFamily::V4>::type
+fromIpAddress<AddressFamily::V4>(const boost::asio::ip::address& a)
+{
+  return a.to_v4();
+}
+
+template<>
+IpAddressFromFamily<AddressFamily::V6>::type
+fromIpAddress<AddressFamily::V6>(const boost::asio::ip::address& a)
+{
+  return a.to_v6();
+}
+
+} // unnamed namespace
+
+template<AddressFamily AF>
+typename IpAddressFromFamily<AF>::type
+getTestIp(LoopbackAddress loopback, MulticastInterface mcast)
+{
+  for (const auto& interface : collectNetworkInterfaces()) {
+    if (!interface->isUp() ||
+        !matchTristate(loopback, interface->isLoopback()) ||
+        !matchTristate(mcast, interface->canMulticast())) {
+      continue;
+    }
+    for (const auto& address : interface->getNetworkAddresses()) {
+      if (isAddressFamily<AF>(address) &&
+          !address.getIp().is_unspecified() &&
+          address.getScope() != ndn::net::AddressScope::NOWHERE &&
+          address.getScope() != ndn::net::AddressScope::LINK && // link-local addresses are not supported yet (#1428)
+          matchTristate(loopback, address.getIp().is_loopback())) {
+        return fromIpAddress<AF>(address.getIp());
+      }
+    }
+  }
+  return {};
+}
+
+template
+IpAddressFromFamily<AddressFamily::V4>::type
+getTestIp<AddressFamily::V4>(LoopbackAddress loopback, MulticastInterface mcast);
+
+template
+IpAddressFromFamily<AddressFamily::V6>::type
+getTestIp<AddressFamily::V6>(LoopbackAddress loopback, MulticastInterface mcast);
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/face/test-netif-ip.hpp b/tests/daemon/face/test-netif-ip.hpp
new file mode 100644
index 0000000..dc076d7
--- /dev/null
+++ b/tests/daemon/face/test-netif-ip.hpp
@@ -0,0 +1,144 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2017,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_TESTS_DAEMON_FACE_TEST_NETIF_IP_HPP
+#define NFD_TESTS_DAEMON_FACE_TEST_NETIF_IP_HPP
+
+#include "core/common.hpp"
+#include <type_traits>
+#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio/ip/address_v6.hpp>
+#include <ndn-cxx/net/network-address.hpp>
+#include <ndn-cxx/net/network-interface.hpp>
+
+namespace nfd {
+namespace tests {
+
+using ndn::net::AddressFamily;
+using ndn::net::NetworkAddress;
+using ndn::net::NetworkInterface;
+
+// ---- network interface ----
+
+/** \brief Collect information about network interfaces
+ *  \param allowCached if true, previously collected information can be returned
+ *  \note This function is blocking if \p allowCached is false or no previous information exists
+ *  \throw ndn::net::NetworkMonitor::Error NetworkMonitor::CAP_ENUM is unavailable
+ */
+std::vector<shared_ptr<const NetworkInterface>>
+collectNetworkInterfaces(bool allowCached = true);
+
+template<AddressFamily AF>
+bool
+isAddressFamily(const NetworkAddress& a)
+{
+  return a.getFamily() == AF;
+}
+
+template<AddressFamily AF>
+bool
+hasAddressFamily(const NetworkInterface& netif)
+{
+  return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
+                     &isAddressFamily<AF>);
+}
+
+// ---- IP address ----
+
+enum class LoopbackAddress {
+  No,
+  Yes,
+  DontCare,
+  Default = Yes
+};
+
+enum class MulticastInterface {
+  No,
+  Yes,
+  DontCare,
+  Default = DontCare
+};
+
+/** \brief Derives IP address type from AddressFamily
+ */
+template<AddressFamily AF>
+struct IpAddressFromFamily;
+
+template<>
+struct IpAddressFromFamily<AddressFamily::V4>
+{
+  using type = boost::asio::ip::address_v4;
+};
+
+template<>
+struct IpAddressFromFamily<AddressFamily::V6>
+{
+  using type = boost::asio::ip::address_v6;
+};
+
+/** \brief Get an IP address from any available network interface
+ *  \tparam F address family, either AddressFamily::V4 or AddressFamily::V6
+ *  \param loopback specifies if the address can, must, or must not be a loopback address
+ *  \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
+ *  \return an IP address, either boost::asio::ip::address_v4 or boost::asio::ip::address_v6
+ *  \retval unspecified address, if no appropriate address is available
+ */
+template<AddressFamily F>
+typename IpAddressFromFamily<F>::type
+getTestIp(LoopbackAddress loopback = LoopbackAddress::Default,
+          MulticastInterface mcast = MulticastInterface::Default);
+
+extern template
+IpAddressFromFamily<AddressFamily::V4>::type
+getTestIp<AddressFamily::V4>(LoopbackAddress loopback, MulticastInterface mcast);
+
+extern template
+IpAddressFromFamily<AddressFamily::V6>::type
+getTestIp<AddressFamily::V6>(LoopbackAddress loopback, MulticastInterface mcast);
+
+/** \brief Skip rest of the test case if \p address is unavailable
+ *
+ *  This macro can be used in conjunction with \p nfd::tests::getTestIp in a test case. Example:
+ *  \code
+ *  BOOST_AUTO_TEST_CASE(TestCase)
+ *  {
+ *    auto ip = getTestIp<AddressFamily::V4>();
+ *    SKIP_IF_IP_UNAVAILABLE(ip);
+ *    // Test something that requires an IPv4 address.
+ *  }
+ *  \endcode
+ */
+#define SKIP_IF_IP_UNAVAILABLE(address) \
+  do { \
+    if ((address).is_unspecified()) { \
+      BOOST_WARN_MESSAGE(false, "skipping assertions that require a valid IP address"); \
+      return; \
+    } \
+  } while (false)
+
+} // namespace tests
+} // namespace nfd
+
+#endif // NFD_TESTS_DAEMON_FACE_TEST_NETIF_IP_HPP
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index d74ba69..b5ddb8a 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -28,6 +28,7 @@
 #include "factory-test-common.hpp"
 #include "face-system-fixture.hpp"
 #include "tests/limited-io.hpp"
+#include "test-netif-ip.hpp"
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/range/algorithm.hpp>
 
@@ -114,8 +115,8 @@
 protected:
   UdpMcastConfigFixture()
   {
-    for (const auto& netif : listNetworkInterfaces()) {
-      if (netif.isUp() && netif.isMulticastCapable() && !netif.ipv4Addresses.empty()) {
+    for (const auto& netif : collectNetworkInterfaces()) {
+      if (netif->isUp() && netif->canMulticast() && hasAddressFamily<AddressFamily::V4>(*netif)) {
         netifs.push_back(netif);
       }
     }
@@ -136,16 +137,17 @@
   /** \brief determine whether a UDP multicast face is created on \p netif
    */
   static bool
-  isFaceOnNetif(const Face& face, const NetworkInterfaceInfo& netif)
+  isFaceOnNetif(const Face& face, const shared_ptr<const ndn::net::NetworkInterface>& netif)
   {
     auto ip = boost::asio::ip::address_v4::from_string(face.getLocalUri().getHost());
-    return boost::count(netif.ipv4Addresses, ip) > 0;
+    return std::any_of(netif->getNetworkAddresses().begin(), netif->getNetworkAddresses().end(),
+                       [ip] (const ndn::net::NetworkAddress& a) { return a.getIp() == ip; });
   }
 
 protected:
   /** \brief MulticastUdpTransport-capable network interfaces
    */
-  std::vector<NetworkInterfaceInfo> netifs;
+  std::vector<shared_ptr<const ndn::net::NetworkInterface>> netifs;
 };
 
 #define SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(n) \
@@ -282,7 +284,7 @@
       }
     }
   )CONFIG";
-  boost::replace_first(CONFIG, "%ifname", netifs.front().name);
+  boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
   auto udpMcastFaces = this->listUdpMcastFaces();
@@ -310,7 +312,7 @@
       }
     }
   )CONFIG";
-  boost::replace_first(CONFIG, "%ifname", netifs.front().name);
+  boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
   auto udpMcastFaces = this->listUdpMcastFaces();
@@ -341,8 +343,8 @@
     }
   )CONFIG";
   std::string CONFIG2 = CONFIG1;
-  boost::replace_first(CONFIG1, "%ifname", netifs.front().name);
-  boost::replace_first(CONFIG2, "%ifname", netifs.back().name);
+  boost::replace_first(CONFIG1, "%ifname", netifs.front()->getName());
+  boost::replace_first(CONFIG2, "%ifname", netifs.back()->getName());
 
   parseConfig(CONFIG1, false);
   auto udpMcastFaces = this->listUdpMcastFaces();
diff --git a/tests/daemon/face/unicast-udp-transport-fixture.hpp b/tests/daemon/face/unicast-udp-transport-fixture.hpp
index 74de35d..ef8f588 100644
--- a/tests/daemon/face/unicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/unicast-udp-transport-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
 #include "face/face.hpp"
 
 #include "dummy-receive-link-service.hpp"
-#include "test-ip.hpp"
+#include "test-netif-ip.hpp"
 #include "tests/limited-io.hpp"
 
 namespace nfd {
@@ -47,7 +47,7 @@
   UnicastUdpTransportFixture()
     : transport(nullptr)
     , remoteSocket(g_io)
-    , defaultAddr(getTestIp<ip::address_v4>())
+    , defaultAddr(getTestIp<AddressFamily::V4>())
     , receivedPackets(nullptr)
   {
   }
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index c73e5e6..abb3a58 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -36,7 +36,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -52,7 +52,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv6)
 {
-  auto address = getTestIp<ip::address_v6>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V6>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -68,7 +68,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::No);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::No);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -86,7 +86,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv6)
 {
-  auto address = getTestIp<ip::address_v6>(LoopbackAddress::No);
+  auto address = getTestIp<AddressFamily::V6>(LoopbackAddress::No);
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -104,7 +104,7 @@
 
 BOOST_AUTO_TEST_CASE(PersistencyChange)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address);
 
@@ -115,7 +115,7 @@
 
 BOOST_AUTO_TEST_CASE(ExpirationTime)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
   BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
@@ -129,7 +129,7 @@
 
 BOOST_AUTO_TEST_CASE(IdleClose)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
 
@@ -162,7 +162,7 @@
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(RemoteClose, Persistency, RemoteClosePersistencies)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, Persistency::value);
 
@@ -188,7 +188,7 @@
 
 BOOST_AUTO_TEST_CASE(RemoteClosePermanent)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   initialize(address, ndn::nfd::FACE_PERSISTENCY_PERMANENT);
 
diff --git a/tests/daemon/face/websocket-channel.t.cpp b/tests/daemon/face/websocket-channel.t.cpp
index 8c1f6c8..8c45af8 100644
--- a/tests/daemon/face/websocket-channel.t.cpp
+++ b/tests/daemon/face/websocket-channel.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -27,7 +27,7 @@
 #include "face/websocket-transport.hpp"
 
 #include "channel-fixture.hpp"
-#include "test-ip.hpp"
+#include "test-netif-ip.hpp"
 
 namespace nfd {
 namespace face {
@@ -182,7 +182,7 @@
 
 BOOST_AUTO_TEST_CASE(MultipleAccepts)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->listen(address);
 
@@ -213,7 +213,7 @@
 
 BOOST_AUTO_TEST_CASE(Send)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address);
   auto transport = listenerFaces.front()->getTransport();
@@ -241,7 +241,7 @@
 
 BOOST_AUTO_TEST_CASE(Receive)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address);
 
@@ -265,7 +265,7 @@
 
 BOOST_AUTO_TEST_CASE(FaceClosure)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address);
 
@@ -275,7 +275,7 @@
 
 BOOST_AUTO_TEST_CASE(RemoteClose)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address);
 
@@ -288,7 +288,7 @@
 BOOST_AUTO_TEST_CASE(SetPingInterval)
 {
   auto pingInterval = time::milliseconds(300);
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address, pingInterval, time::milliseconds(1000));
 
@@ -300,7 +300,7 @@
 
 BOOST_AUTO_TEST_CASE(SetPongTimeOut)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   this->initialize(address, time::milliseconds(500), time::milliseconds(300));
   clientShouldPong = false;
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index 5d537ab..c974802 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -27,7 +27,7 @@
 #include "face/face.hpp"
 
 #include "dummy-receive-link-service.hpp"
-#include "test-ip.hpp"
+#include "test-netif-ip.hpp"
 #include "transport-test-common.hpp"
 #include "tests/limited-io.hpp"
 
@@ -227,7 +227,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address);
   ip::tcp::endpoint ep(address, 20070);
   this->endToEndInitialize(ep);
@@ -244,7 +244,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesNonLocalIpv4)
 {
-  auto address = getTestIp<ip::address_v4>(LoopbackAddress::No);
+  auto address = getTestIp<AddressFamily::V4>(LoopbackAddress::No);
   SKIP_IF_IP_UNAVAILABLE(address);
   ip::tcp::endpoint ep(address, 20070);
   this->endToEndInitialize(ep);
@@ -261,7 +261,7 @@
 
 BOOST_AUTO_TEST_CASE(StaticPropertiesLocalIpv4MappedIpv6)
 {
-  auto address4 = getTestIp<ip::address_v4>(LoopbackAddress::Yes);
+  auto address4 = getTestIp<AddressFamily::V4>(LoopbackAddress::Yes);
   SKIP_IF_IP_UNAVAILABLE(address4);
   auto address6 = ip::address_v6::v4_mapped(address4);
   BOOST_REQUIRE(address6.is_v4_mapped());
@@ -280,7 +280,7 @@
 
 BOOST_AUTO_TEST_CASE(PersistencyChange)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
@@ -291,7 +291,7 @@
 
 BOOST_AUTO_TEST_CASE(PingPong)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070),
                            time::milliseconds(500), time::milliseconds(300));
@@ -316,7 +316,7 @@
 
 BOOST_AUTO_TEST_CASE(Send)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
@@ -343,7 +343,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveNormal)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
@@ -365,7 +365,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveMalformed)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
@@ -391,7 +391,7 @@
 
 BOOST_AUTO_TEST_CASE(Close)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
@@ -419,7 +419,7 @@
 
 BOOST_AUTO_TEST_CASE(RemoteClose)
 {
-  auto address = getTestIp<ip::address_v4>();
+  auto address = getTestIp<AddressFamily::V4>();
   SKIP_IF_IP_UNAVAILABLE(address);
   this->endToEndInitialize(ip::tcp::endpoint(address, 20070));
 
