diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index 62748cd..56373d0 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -48,15 +48,15 @@
 {
 public:
   std::vector<const Face*>
-  listEtherMcastFaces() const
+  listEtherMcastFaces(ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS) const
   {
-    return this->listFacesByScheme("ether", ndn::nfd::LINK_TYPE_MULTI_ACCESS);
+    return this->listFacesByScheme("ether", linkType);
   }
 
   size_t
-  countEtherMcastFaces() const
+  countEtherMcastFaces(ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS) const
   {
-    return this->listEtherMcastFaces().size();
+    return this->listEtherMcastFaces(linkType).size();
   }
 };
 
@@ -73,6 +73,7 @@
       {
         mcast yes
         mcast_group 01:00:5E:00:17:AA
+        mcast_ad_hoc no
         whitelist
         {
           *
@@ -90,18 +91,94 @@
   BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), netifs.size());
 }
 
-BOOST_AUTO_TEST_CASE(Omitted)
+BOOST_AUTO_TEST_CASE(EnableDisableMcast)
 {
-  const std::string CONFIG = R"CONFIG(
+  const std::string CONFIG_WITH_MCAST = R"CONFIG(
     face_system
     {
+      ether
+      {
+        mcast yes
+      }
+    }
+  )CONFIG";
+  const std::string CONFIG_WITHOUT_MCAST = R"CONFIG(
+    face_system
+    {
+      ether
+      {
+        mcast no
+      }
     }
   )CONFIG";
 
-  parseConfig(CONFIG, true);
-  parseConfig(CONFIG, false);
-
+  parseConfig(CONFIG_WITHOUT_MCAST, false);
   BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
+
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  parseConfig(CONFIG_WITH_MCAST, false);
+  g_io.poll();
+  BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), netifs.size());
+
+  parseConfig(CONFIG_WITHOUT_MCAST, false);
+  g_io.poll();
+  BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(McastAdHoc)
+{
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  const std::string CONFIG = R"CONFIG(
+    face_system
+    {
+      ether
+      {
+        mcast_ad_hoc yes
+      }
+    }
+  )CONFIG";
+
+  parseConfig(CONFIG, false);
+  BOOST_CHECK_EQUAL(this->countEtherMcastFaces(ndn::nfd::LINK_TYPE_AD_HOC), netifs.size());
+}
+
+BOOST_AUTO_TEST_CASE(ChangeMcastGroup)
+{
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  const std::string CONFIG1 = R"CONFIG(
+    face_system
+    {
+      ether
+      {
+        mcast_group 01:00:00:00:00:01
+      }
+    }
+  )CONFIG";
+  const std::string CONFIG2 = R"CONFIG(
+    face_system
+    {
+      ether
+      {
+        mcast_group 01:00:00:00:00:02
+      }
+    }
+  )CONFIG";
+
+  parseConfig(CONFIG1, false);
+  auto etherMcastFaces = this->listEtherMcastFaces();
+  BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
+  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getRemoteUri(),
+                    FaceUri(ethernet::Address(0x01, 0x00, 0x00, 0x00, 0x00, 0x01)));
+
+  parseConfig(CONFIG2, false);
+  g_io.poll();
+  etherMcastFaces = this->listEtherMcastFaces();
+  BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
+  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getRemoteUri(),
+                    FaceUri(ethernet::Address(0x01, 0x00, 0x00, 0x00, 0x00, 0x02)));
 }
 
 BOOST_AUTO_TEST_CASE(Whitelist)
@@ -154,76 +231,18 @@
   }), 0);
 }
 
-BOOST_AUTO_TEST_CASE(EnableDisableMcast)
+BOOST_AUTO_TEST_CASE(Omitted)
 {
-  const std::string CONFIG_WITH_MCAST = R"CONFIG(
+  const std::string CONFIG = R"CONFIG(
     face_system
     {
-      ether
-      {
-        mcast yes
-      }
-    }
-  )CONFIG";
-  const std::string CONFIG_WITHOUT_MCAST = R"CONFIG(
-    face_system
-    {
-      ether
-      {
-        mcast no
-      }
     }
   )CONFIG";
 
-  parseConfig(CONFIG_WITHOUT_MCAST, false);
+  parseConfig(CONFIG, true);
+  parseConfig(CONFIG, false);
+
   BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
-
-  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
-
-  parseConfig(CONFIG_WITH_MCAST, false);
-  g_io.poll();
-  BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), netifs.size());
-
-  parseConfig(CONFIG_WITHOUT_MCAST, false);
-  g_io.poll();
-  BOOST_CHECK_EQUAL(this->countEtherMcastFaces(), 0);
-}
-
-BOOST_AUTO_TEST_CASE(ChangeMcastGroup)
-{
-  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
-
-  const std::string CONFIG1 = R"CONFIG(
-    face_system
-    {
-      ether
-      {
-        mcast_group 01:00:00:00:00:01
-      }
-    }
-  )CONFIG";
-  const std::string CONFIG2 = R"CONFIG(
-    face_system
-    {
-      ether
-      {
-        mcast_group 01:00:00:00:00:02
-      }
-    }
-  )CONFIG";
-
-  parseConfig(CONFIG1, false);
-  auto etherMcastFaces = this->listEtherMcastFaces();
-  BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
-  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getRemoteUri(),
-                    FaceUri(ethernet::Address(0x01, 0x00, 0x00, 0x00, 0x00, 0x01)));
-
-  parseConfig(CONFIG2, false);
-  g_io.poll();
-  etherMcastFaces = this->listEtherMcastFaces();
-  BOOST_REQUIRE_EQUAL(etherMcastFaces.size(), netifs.size());
-  BOOST_CHECK_EQUAL(etherMcastFaces.front()->getRemoteUri(),
-                    FaceUri(ethernet::Address(0x01, 0x00, 0x00, 0x00, 0x00, 0x02)));
 }
 
 BOOST_AUTO_TEST_CASE(BadMcast)
diff --git a/tests/daemon/face/ethernet-fixture.hpp b/tests/daemon/face/ethernet-fixture.hpp
index 4228f79..5769637 100644
--- a/tests/daemon/face/ethernet-fixture.hpp
+++ b/tests/daemon/face/ethernet-fixture.hpp
@@ -43,7 +43,7 @@
     for (const auto& netif : listNetworkInterfaces()) {
       if (!netif.isLoopback() && netif.isUp()) {
         try {
-          EthernetTransport transport(netif, ethernet::getBroadcastAddress());
+          EthernetTransport transport(netif, ethernet::getBroadcastAddress(), ndn::nfd::LINK_TYPE_MULTI_ACCESS);
           netifs.push_back(netif);
         }
         catch (const EthernetTransport::Error&) {
diff --git a/tests/daemon/face/ethernet-transport.t.cpp b/tests/daemon/face/ethernet-transport.t.cpp
index cd46a04..c0d5138 100644
--- a/tests/daemon/face/ethernet-transport.t.cpp
+++ b/tests/daemon/face/ethernet-transport.t.cpp
@@ -42,7 +42,9 @@
   SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
 
   auto netif = netifs.front();
-  EthernetTransport transport(netif, ethernet::getDefaultMulticastAddress());
+  EthernetTransport transport(netif,
+                              ethernet::getDefaultMulticastAddress(),
+                              ndn::nfd::LINK_TYPE_MULTI_ACCESS);
   checkStaticPropertiesInitialized(transport);
 
   BOOST_CHECK_EQUAL(transport.getLocalUri(), FaceUri::fromDev(netif.name));
@@ -55,7 +57,9 @@
 BOOST_AUTO_TEST_CASE(PersistencyChange)
 {
   SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
-  EthernetTransport transport(netifs.front(), ethernet::getDefaultMulticastAddress());
+  EthernetTransport transport(netifs.front(),
+                              ethernet::getDefaultMulticastAddress(),
+                              ndn::nfd::LINK_TYPE_MULTI_ACCESS);
 
   BOOST_CHECK_EQUAL(transport.canChangePersistencyTo(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND), false);
   BOOST_CHECK_EQUAL(transport.canChangePersistencyTo(ndn::nfd::FACE_PERSISTENCY_PERSISTENT), false);
