diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index bcb799e..6082745 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -134,7 +134,7 @@
 MulticastUdpTransport::openRxSocket(protocol::socket& sock,
                                     const protocol::endpoint& multicastGroup,
                                     const boost::asio::ip::address& localAddress,
-                                    const shared_ptr<const ndn::net::NetworkInterface>& netif)
+                                    const ndn::net::NetworkInterface* netif)
 {
   BOOST_ASSERT(!sock.is_open());
 
@@ -148,16 +148,9 @@
                                                            localAddress.to_v4()));
   }
   else {
-    BOOST_ASSERT(localAddress.is_v6());
+    BOOST_ASSERT(multicastGroup.address().to_v6().scope_id() != 0);
     sock.set_option(boost::asio::ip::v6_only(true));
-#ifdef NFD_WITH_TESTS
-    // To simplify unit tests, we bind to the "any" IPv6 address if the supplied multicast
-    // address lacks a scope id. Calling bind() without a scope id would otherwise fail.
-    if (multicastGroup.address().to_v6().scope_id() == 0)
-      sock.bind(protocol::endpoint(boost::asio::ip::address_v6::any(), multicastGroup.port()));
-    else
-#endif
-      sock.bind(multicastGroup);
+    sock.bind(multicastGroup);
     sock.set_option(boost::asio::ip::multicast::join_group(multicastGroup.address().to_v6()));
   }
 
@@ -168,7 +161,7 @@
 void
 MulticastUdpTransport::openTxSocket(protocol::socket& sock,
                                     const protocol::endpoint& localEndpoint,
-                                    const shared_ptr<const ndn::net::NetworkInterface>& netif,
+                                    const ndn::net::NetworkInterface* netif,
                                     bool enableLoopback)
 {
   BOOST_ASSERT(!sock.is_open());
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index 23c1e1d..5295238 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -62,16 +62,22 @@
   ssize_t
   getSendQueueLength() final;
 
+  /**
+   * \brief Opens and configures the receive-side socket
+   */
   static void
   openRxSocket(protocol::socket& sock,
                const protocol::endpoint& multicastGroup,
-               const boost::asio::ip::address& localAddress,
-               const shared_ptr<const ndn::net::NetworkInterface>& netif = nullptr);
+               const boost::asio::ip::address& localAddress = {},
+               const ndn::net::NetworkInterface* netif = nullptr);
 
+  /**
+   * \brief Opens and configures the transmit-side socket
+   */
   static void
   openTxSocket(protocol::socket& sock,
                const protocol::endpoint& localEndpoint,
-               const shared_ptr<const ndn::net::NetworkInterface>& netif = nullptr,
+               const ndn::net::NetworkInterface* netif = nullptr,
                bool enableLoopback = false);
 
 private:
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 331174d..fafa29e 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -324,7 +324,7 @@
 }
 
 shared_ptr<Face>
-UdpFactory::createMulticastFace(const shared_ptr<const net::NetworkInterface>& netif,
+UdpFactory::createMulticastFace(const net::NetworkInterface& netif,
                                 const ip::address& localAddress,
                                 const udp::Endpoint& multicastEndpoint)
 {
@@ -337,7 +337,7 @@
   if (mcastEp.address().is_v6()) {
     // in IPv6, a scope id on the multicast address is always required
     auto mcastAddress = mcastEp.address().to_v6();
-    mcastAddress.scope_id(netif->getIndex());
+    mcastAddress.scope_id(netif.getIndex());
     mcastEp.address(mcastAddress);
   }
 
@@ -358,9 +358,9 @@
   }
 
   ip::udp::socket rxSock(getGlobalIoService());
-  MulticastUdpTransport::openRxSocket(rxSock, mcastEp, localAddress, netif);
+  MulticastUdpTransport::openRxSocket(rxSock, mcastEp, localAddress, &netif);
   ip::udp::socket txSock(getGlobalIoService());
-  MulticastUdpTransport::openTxSocket(txSock, udp::Endpoint(localAddress, 0), netif);
+  MulticastUdpTransport::openTxSocket(txSock, udp::Endpoint(localAddress, 0), &netif);
 
   GenericLinkService::Options options;
   options.allowCongestionMarking = m_wantCongestionMarking;
@@ -442,7 +442,7 @@
 
   std::vector<shared_ptr<Face>> faces;
   for (const auto& addr : addrs) {
-    auto face = this->createMulticastFace(netif, addr,
+    auto face = this->createMulticastFace(*netif, addr,
                                           addr.is_v4() ? m_mcastConfig.group : m_mcastConfig.groupV6);
     if (face->getId() == INVALID_FACEID) {
       // new face: register with forwarding
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index 475621d..f0cd686 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -90,7 +90,7 @@
    * \throw UdpFactory::Error
    */
   shared_ptr<Face>
-  createMulticastFace(const shared_ptr<const ndn::net::NetworkInterface>& netif,
+  createMulticastFace(const ndn::net::NetworkInterface& netif,
                       const boost::asio::ip::address& localAddress,
                       const udp::Endpoint& multicastEndpoint);
 
diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 4e88ff2..d86f669 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -26,8 +26,6 @@
 #include "unicast-udp-transport-fixture.hpp"
 #include "multicast-udp-transport-fixture.hpp"
 
-#include "transport-test-common.hpp"
-
 #include <boost/mpl/vector.hpp>
 
 namespace nfd::tests {
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index 5c57341..e44c73c 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -25,9 +25,9 @@
 
 #include "face/internal-face.hpp"
 
-#include "transport-test-common.hpp"
 #include "tests/key-chain-fixture.hpp"
 #include "tests/daemon/global-io-fixture.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
diff --git a/tests/daemon/face/multicast-ethernet-transport.t.cpp b/tests/daemon/face/multicast-ethernet-transport.t.cpp
index bff61c7..2791ca7 100644
--- a/tests/daemon/face/multicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/multicast-ethernet-transport.t.cpp
@@ -23,12 +23,12 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "ethernet-fixture.hpp"
 
 #include "common/global.hpp"
 
+#include "tests/daemon/face/transport-test-common.hpp"
+
 namespace nfd::tests {
 
 using namespace nfd::face;
diff --git a/tests/daemon/face/multicast-udp-transport-fixture.hpp b/tests/daemon/face/multicast-udp-transport-fixture.hpp
index 959ca9c..4c984f4 100644
--- a/tests/daemon/face/multicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/multicast-udp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -43,7 +44,7 @@
 {
 protected:
   void
-  initialize(ip::address address)
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>& netif, const ip::address& address)
   {
     ip::address mcastAddr;
     if (address.is_v4()) {
@@ -53,19 +54,19 @@
     else {
       // the group FF0X::114 is reserved for experimentation at all scope levels (RFC 4727)
       auto v6Addr = ip::address_v6::from_string("FF01::114");
-      v6Addr.scope_id(address.to_v6().scope_id());
+      v6Addr.scope_id(netif->getIndex());
       mcastAddr = v6Addr;
     }
     mcastEp = udp::endpoint(mcastAddr, 7373);
     remoteMcastEp = udp::endpoint(mcastAddr, 8383);
 
     MulticastUdpTransport::openRxSocket(remoteSockRx, mcastEp, address);
-    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(address, 0), nullptr, true);
+    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(address, 0), &*netif, true);
 
     udp::socket sockRx(g_io);
     udp::socket sockTx(g_io);
     MulticastUdpTransport::openRxSocket(sockRx, remoteMcastEp, address);
-    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(address, txPort), nullptr, true);
+    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(address, txPort), &*netif, true);
 
     face = make_unique<Face>(make_unique<DummyLinkService>(),
                              make_unique<MulticastUdpTransport>(mcastEp, std::move(sockRx), std::move(sockTx),
diff --git a/tests/daemon/face/multicast-udp-transport.t.cpp b/tests/daemon/face/multicast-udp-transport.t.cpp
index efdd4f2..2457e6d 100644
--- a/tests/daemon/face/multicast-udp-transport.t.cpp
+++ b/tests/daemon/face/multicast-udp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "multicast-udp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
@@ -34,12 +32,7 @@
 using namespace nfd::face;
 
 BOOST_AUTO_TEST_SUITE(Face)
-
-using MulticastUdpTransportFixtureWithAddress =
-  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::Any,
-                     AddressScope::Global, MulticastInterface::Yes>;
-
-BOOST_FIXTURE_TEST_SUITE(TestMulticastUdpTransport, MulticastUdpTransportFixtureWithAddress)
+BOOST_AUTO_TEST_SUITE(TestMulticastUdpTransport)
 
 using MulticastUdpTransportFixtures = boost::mpl::vector<
   IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>,
@@ -63,7 +56,12 @@
   BOOST_CHECK_GT(this->transport->getSendQueueCapacity(), 0);
 }
 
-BOOST_AUTO_TEST_CASE(PersistencyChange)
+using MulticastUdpTransportFixtureWithAddress = IpTransportFixture<MulticastUdpTransportFixture,
+                                                                   AddressFamily::Any,
+                                                                   AddressScope::LinkLocal,
+                                                                   MulticastInterface::Yes>;
+
+BOOST_FIXTURE_TEST_CASE(PersistencyChange, MulticastUdpTransportFixtureWithAddress)
 {
   TRANSPORT_TEST_INIT();
 
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index ad5e4cf..451f21c 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -27,7 +27,7 @@
 #include "face/null-transport.hpp"
 
 #include "tests/daemon/global-io-fixture.hpp"
-#include "transport-test-common.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
diff --git a/tests/daemon/face/stream-transport.t.cpp b/tests/daemon/face/stream-transport.t.cpp
index 2acacfb..c827900 100644
--- a/tests/daemon/face/stream-transport.t.cpp
+++ b/tests/daemon/face/stream-transport.t.cpp
@@ -26,8 +26,6 @@
 #include "tcp-transport-fixture.hpp"
 #include "unix-stream-transport-fixture.hpp"
 
-#include "transport-test-common.hpp"
-
 #include <boost/asio/read.hpp>
 #include <boost/mpl/vector.hpp>
 
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index 9f838c4..8937f5b 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -44,7 +44,7 @@
   SKIP_IF_IP_UNAVAILABLE(address);
   // do not listen
 
-  auto channel = this->makeChannel(typename IpAddressFromFamily<F::value>::type());
+  auto channel = this->makeChannel(IpAddressTypeFromFamily<F::value>());
   channel->connect(tcp::Endpoint(address, 7040), {},
     [this] (const shared_ptr<nfd::Face>&) {
       BOOST_FAIL("Connect succeeded when it should have failed");
diff --git a/tests/daemon/face/tcp-transport-fixture.hpp b/tests/daemon/face/tcp-transport-fixture.hpp
index 2ea4a2b..1d1d5ac 100644
--- a/tests/daemon/face/tcp-transport-fixture.hpp
+++ b/tests/daemon/face/tcp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -64,7 +65,7 @@
   }
 
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&, const ip::address& address,
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
   {
     tcp::endpoint remoteEp(address, 7070);
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index 3d86064..9e52dfd 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "tcp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
diff --git a/tests/daemon/face/tcp-udp-channel.t.cpp b/tests/daemon/face/tcp-udp-channel.t.cpp
index 6a29660..cd57b80 100644
--- a/tests/daemon/face/tcp-udp-channel.t.cpp
+++ b/tests/daemon/face/tcp-udp-channel.t.cpp
@@ -40,7 +40,7 @@
 {
   using Fixture = F;
   static constexpr AddressFamily ADDRESS_FAMILY = AF;
-  using Address = typename IpAddressFromFamily<AF>::type;
+  using Address = IpAddressTypeFromFamily<AF>;
 };
 
 using FixtureAndAddressList = boost::mpl::vector<
diff --git a/tests/daemon/face/test-ip.cpp b/tests/daemon/face/test-ip.cpp
index 593797e..2cf01c9 100644
--- a/tests/daemon/face/test-ip.cpp
+++ b/tests/daemon/face/test-ip.cpp
@@ -84,6 +84,12 @@
 boost::asio::ip::address
 getTestIp(AddressFamily family, AddressScope scope, MulticastInterface mcast)
 {
+  return std::get<boost::asio::ip::address>(getTestInterfaceAndIp(family, scope, mcast));
+}
+
+std::tuple<shared_ptr<const ndn::net::NetworkInterface>, boost::asio::ip::address>
+getTestInterfaceAndIp(AddressFamily family, AddressScope scope, MulticastInterface mcast)
+{
   for (const auto& interface : collectNetworkInterfaces()) {
     if (!interface->isUp() ||
         !matchTristate(mcast, interface->canMulticast())) {
@@ -97,7 +103,7 @@
            static_cast<int>(scope) == static_cast<int>(address.getScope())) &&
           (scope != AddressScope::Loopback ||
            address.getIp().is_loopback())) {
-        return address.getIp();
+        return {interface, address.getIp()};
       }
     }
   }
diff --git a/tests/daemon/face/test-ip.hpp b/tests/daemon/face/test-ip.hpp
index c2bb8ca..9fb57ab 100644
--- a/tests/daemon/face/test-ip.hpp
+++ b/tests/daemon/face/test-ip.hpp
@@ -30,6 +30,7 @@
 
 #include <boost/asio/ip/address.hpp>
 #include <ndn-cxx/net/network-address.hpp>
+#include <ndn-cxx/net/network-interface.hpp>
 
 namespace nfd::tests {
 
@@ -61,8 +62,6 @@
 std::ostream&
 operator<<(std::ostream& os, MulticastInterface mcast);
 
-/** \brief Derives IP address type from AddressFamily
- */
 template<AddressFamily AF>
 struct IpAddressFromFamily;
 
@@ -78,18 +77,36 @@
   using type = boost::asio::ip::address_v6;
 };
 
-/** \brief Get an IP address from any available network interface
- *  \param family the desired address family
- *  \param scope the desired address scope
- *  \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
+/**
+ * \brief Derives IP address type from AddressFamily
  */
-boost::asio::ip::address
+template<AddressFamily AF>
+using IpAddressTypeFromFamily = typename IpAddressFromFamily<AF>::type;
+
+/**
+ * \brief Get an IP address from any available network interface, satisfying the given requirements
+ * \param family the desired address family
+ * \param scope the desired address scope
+ * \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
+ */
+[[nodiscard]] boost::asio::ip::address
 getTestIp(AddressFamily family = AddressFamily::Any,
           AddressScope scope = AddressScope::Any,
           MulticastInterface mcast = MulticastInterface::Any);
 
+/**
+ * \brief Get a network interface and an IP address on it that satisfy the given requirements
+ * \param family the desired address family
+ * \param scope the desired address scope
+ * \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
+ */
+[[nodiscard]] std::tuple<shared_ptr<const ndn::net::NetworkInterface>, boost::asio::ip::address>
+getTestInterfaceAndIp(AddressFamily family = AddressFamily::Any,
+                      AddressScope scope = AddressScope::Any,
+                      MulticastInterface mcast = MulticastInterface::Any);
+
 } // namespace nfd::tests
 
 /** \brief Skip the rest of the test case if \p address is unavailable
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index 1a2752b..68b66cd 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -28,6 +28,9 @@
 
 namespace nfd::tests {
 
+using ndn::net::NetworkInterface;
+using ndn::net::NetworkMonitor;
+
 std::vector<shared_ptr<const NetworkInterface>>
 enumerateNetworkInterfaces(NetworkMonitor& netmon)
 {
diff --git a/tests/daemon/face/test-netif.hpp b/tests/daemon/face/test-netif.hpp
index a1e354e..9e32d60 100644
--- a/tests/daemon/face/test-netif.hpp
+++ b/tests/daemon/face/test-netif.hpp
@@ -28,30 +28,25 @@
 
 #include "core/common.hpp"
 
-#include <ndn-cxx/net/network-address.hpp>
 #include <ndn-cxx/net/network-interface.hpp>
 #include <ndn-cxx/net/network-monitor.hpp>
 
 namespace nfd::tests {
 
-using ndn::net::NetworkAddress;
-using ndn::net::NetworkInterface;
-using ndn::net::NetworkMonitor;
-
 /** \brief Enumerate network interfaces using the given NetworkMonitor
  *  \param netmon a NetworkMonitor constructed on the global io_service.
  *  \note This function is blocking
  *  \note Signals are supported if caller keeps \p netmon running
  */
-std::vector<shared_ptr<const NetworkInterface>>
-enumerateNetworkInterfaces(NetworkMonitor& netmon);
+std::vector<shared_ptr<const ndn::net::NetworkInterface>>
+enumerateNetworkInterfaces(ndn::net::NetworkMonitor& netmon);
 
 /** \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
  *  \warning Signals are not triggered on returned NetworkInterfaces because NetworkMonitor is not running
  */
-std::vector<shared_ptr<const NetworkInterface>>
+std::vector<shared_ptr<const ndn::net::NetworkInterface>>
 collectNetworkInterfaces(bool allowCached = true);
 
 } // namespace nfd::tests
diff --git a/tests/daemon/face/transport-test-common.hpp b/tests/daemon/face/transport-test-common.hpp
index 34133a1..c257a04 100644
--- a/tests/daemon/face/transport-test-common.hpp
+++ b/tests/daemon/face/transport-test-common.hpp
@@ -61,29 +61,35 @@
 protected:
   IpTransportFixture()
   {
+    std::tie(interface, address) = getTestInterfaceAndIp(AF, AS, MC);
+
     BOOST_TEST_MESSAGE("Testing with AddressFamily=" << AF <<
                        " AddressScope=" << AS <<
                        " MulticastInterface=" << MC <<
-                       " TestIp=" << address);
+                       " TestInterface=" << (interface == nullptr ? "N/A" : interface->getName()) <<
+                       " TestIp=" << (address.is_unspecified() ? "N/A" : address.to_string()));
   }
 
-  [[nodiscard]] std::pair<bool, std::string>
+  [[nodiscard]] std::tuple<bool, std::string>
   checkPreconditions() const
   {
-    return {!address.is_unspecified(), "no appropriate IP address available"};
+    return {interface != nullptr && !address.is_unspecified(),
+            "no appropriate interface or IP address available"};
   }
 
   template<typename... Args>
   void
   initialize(Args&&... args)
   {
-    TransportFixtureBase::initialize(address, std::forward<Args>(args)...);
+    TransportFixtureBase::initialize(interface, address, std::forward<Args>(args)...);
   }
 
 protected:
   static constexpr AddressFamily addressFamily = AF;
   static constexpr AddressScope addressScope = AS;
-  const boost::asio::ip::address address = getTestIp(AF, AS, MC);
+
+  shared_ptr<const ndn::net::NetworkInterface> interface;
+  boost::asio::ip::address address;
 };
 
 } // namespace nfd::tests
diff --git a/tests/daemon/face/udp-channel.t.cpp b/tests/daemon/face/udp-channel.t.cpp
index d36e2f5..b95ac78 100644
--- a/tests/daemon/face/udp-channel.t.cpp
+++ b/tests/daemon/face/udp-channel.t.cpp
@@ -44,7 +44,7 @@
   SKIP_IF_IP_UNAVAILABLE(address);
   this->listen(address,1452);
 
-  auto ch1 = this->makeChannel(typename IpAddressFromFamily<F::value>::type(), 0, 1232);
+  auto ch1 = this->makeChannel(IpAddressTypeFromFamily<F::value>(), 0, 1232);
   connect(*ch1);
 
   BOOST_CHECK_EQUAL(this->limitedIo.run(2, 1_s), LimitedIo::EXCEED_OPS);
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 5d9613e..41a5dfd 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -34,6 +34,7 @@
 
 using face::UdpChannel;
 using face::UdpFactory;
+using ndn::net::NetworkInterface;
 
 class UdpFactoryFixture : public FaceSystemFactoryFixture<UdpFactory>
 {
@@ -79,11 +80,11 @@
 
     if (localAddress.is_v4()) {
       BOOST_ASSERT(!netifsV4.empty());
-      return factory.createMulticastFace(netifsV4.front(), localAddress, mcastEndpoint);
+      return factory.createMulticastFace(*netifsV4.front(), localAddress, mcastEndpoint);
     }
     else {
       BOOST_ASSERT(!netifsV6.empty());
-      return factory.createMulticastFace(netifsV6.front(), localAddress, mcastEndpoint);
+      return factory.createMulticastFace(*netifsV6.front(), localAddress, mcastEndpoint);
     }
   }
 
@@ -120,7 +121,7 @@
   hasAddressFamily(const NetworkInterface& netif, ndn::net::AddressFamily af)
   {
     return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
-                       [af] (const NetworkAddress& a) { return a.getFamily() == af; });
+                       [af] (const auto& a) { return a.getFamily() == af; });
   }
 
   /** \brief determine whether a UDP multicast face is created on \p netif
@@ -130,7 +131,7 @@
   {
     auto ip = boost::asio::ip::address::from_string(face.getLocalUri().getHost());
     return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
-                       [ip] (const NetworkAddress& a) { return a.getIp() == ip; });
+                       [ip] (const auto& a) { return a.getIp() == ip; });
   }
 
 protected:
diff --git a/tests/daemon/face/unicast-ethernet-transport.t.cpp b/tests/daemon/face/unicast-ethernet-transport.t.cpp
index 54c262d..6e4dd6b 100644
--- a/tests/daemon/face/unicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/unicast-ethernet-transport.t.cpp
@@ -23,12 +23,12 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "ethernet-fixture.hpp"
 
 #include "common/global.hpp"
 
+#include "tests/daemon/face/transport-test-common.hpp"
+
 namespace nfd::tests {
 
 using namespace nfd::face;
diff --git a/tests/daemon/face/unicast-udp-transport-fixture.hpp b/tests/daemon/face/unicast-udp-transport-fixture.hpp
index e7fb76d..7ec4896 100644
--- a/tests/daemon/face/unicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/unicast-udp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -43,7 +44,7 @@
 {
 protected:
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&, const ip::address& address,
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
   {
     udp::socket sock(g_io);
@@ -61,7 +62,7 @@
   }
 
   void
-  remoteConnect(ip::address address = ip::address_v4::loopback())
+  remoteConnect(const ip::address& address = ip::address_v4::loopback())
   {
     udp::endpoint remoteEp(address, 7070);
     remoteSocket.open(remoteEp.protocol());
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index bb5605e..e69904a 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "unicast-udp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
diff --git a/tests/daemon/face/unix-stream-transport-fixture.hpp b/tests/daemon/face/unix-stream-transport-fixture.hpp
index 9603247..d95be2c 100644
--- a/tests/daemon/face/unix-stream-transport-fixture.hpp
+++ b/tests/daemon/face/unix-stream-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 #include <boost/filesystem.hpp>
 
@@ -87,7 +88,7 @@
   {
   }
 
-  std::pair<bool, std::string>
+  [[nodiscard]] std::tuple<bool, std::string>
   checkPreconditions() const
   {
     return {true, ""};
diff --git a/tests/daemon/face/unix-stream-transport.t.cpp b/tests/daemon/face/unix-stream-transport.t.cpp
index 41acb0b..692f601 100644
--- a/tests/daemon/face/unix-stream-transport.t.cpp
+++ b/tests/daemon/face/unix-stream-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "unix-stream-transport-fixture.hpp"
 
 namespace nfd::tests {
diff --git a/tests/daemon/face/websocket-channel.t.cpp b/tests/daemon/face/websocket-channel.t.cpp
index a396530..15d1a57 100644
--- a/tests/daemon/face/websocket-channel.t.cpp
+++ b/tests/daemon/face/websocket-channel.t.cpp
@@ -41,16 +41,14 @@
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Uri, F, AddressFamilies)
 {
-  using Address = typename IpAddressFromFamily<F::value>::type;
-  websocket::Endpoint ep(Address::loopback(), 20070);
+  websocket::Endpoint ep(IpAddressTypeFromFamily<F::value>::loopback(), 20070);
   auto channel = this->makeChannel(ep.address(), ep.port());
   BOOST_CHECK_EQUAL(channel->getUri(), FaceUri(ep, "ws"));
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Listen, F, AddressFamilies)
 {
-  using Address = typename IpAddressFromFamily<F::value>::type;
-  auto channel = this->makeChannel(Address());
+  auto channel = this->makeChannel(IpAddressTypeFromFamily<F::value>());
   BOOST_CHECK_EQUAL(channel->isListening(), false);
 
   channel->listen(nullptr);
diff --git a/tests/daemon/face/websocket-transport-fixture.hpp b/tests/daemon/face/websocket-transport-fixture.hpp
index 2e1e61e..eed4923 100644
--- a/tests/daemon/face/websocket-transport-fixture.hpp
+++ b/tests/daemon/face/websocket-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -86,10 +87,12 @@
     client.connect(con);
   }
 
-  /** \brief initialize both server and client, and have each other connected, create Transport
+  /**
+   * \brief Initialize both server and client, and have each other connected, create Transport
    */
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&,
+             const ip::address& address,
              time::milliseconds pingInterval = 10_s,
              time::milliseconds pongTimeout = 1_s)
   {
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index e8733b2..23d15f0 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "websocket-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
@@ -67,7 +65,7 @@
   TRANSPORT_TEST_CHECK_PRECONDITIONS();
   auto mappedAddr = ip::address_v6::v4_mapped(this->address.to_v4());
   BOOST_REQUIRE(mappedAddr.is_v4_mapped());
-  WebSocketTransportFixture::initialize(mappedAddr);
+  WebSocketTransportFixture::initialize(this->interface, mappedAddr);
 
   checkStaticPropertiesInitialized(*this->transport);
 
