diff --git a/tests/daemon/face/ethernet-channel.t.cpp b/tests/daemon/face/ethernet-channel.t.cpp
new file mode 100644
index 0000000..238e193
--- /dev/null
+++ b/tests/daemon/face/ethernet-channel.t.cpp
@@ -0,0 +1,101 @@
+/* -*- 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 "face/ethernet-channel.hpp"
+
+#include "ethernet-fixture.hpp"
+
+namespace nfd {
+namespace face {
+namespace tests {
+
+class EthernetChannelFixture : public EthernetFixture
+{
+protected:
+  unique_ptr<EthernetChannel>
+  makeChannel()
+  {
+    BOOST_ASSERT(netifs.size() > 0);
+    return make_unique<EthernetChannel>(netifs.front(), time::seconds(2));
+  }
+};
+
+BOOST_AUTO_TEST_SUITE(Face)
+BOOST_FIXTURE_TEST_SUITE(TestEthernetChannel, EthernetChannelFixture)
+
+BOOST_AUTO_TEST_CASE(Uri)
+{
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  auto channel = makeChannel();
+  BOOST_CHECK_EQUAL(channel->getUri(), FaceUri::fromDev(netifs.front().name));
+}
+
+BOOST_AUTO_TEST_CASE(Listen)
+{
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  auto channel = makeChannel();
+  BOOST_CHECK_EQUAL(channel->isListening(), false);
+
+  channel->listen(nullptr, nullptr);
+  BOOST_CHECK_EQUAL(channel->isListening(), true);
+
+  // listen() is idempotent
+  BOOST_CHECK_NO_THROW(channel->listen(nullptr, nullptr));
+  BOOST_CHECK_EQUAL(channel->isListening(), true);
+}
+
+BOOST_AUTO_TEST_CASE(FaceClosure)
+{
+  SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
+
+  auto channel = makeChannel();
+  BOOST_CHECK_EQUAL(channel->size(), 0);
+
+  shared_ptr<nfd::Face> face;
+  channel->connect({0x00, 0x00, 0x5e, 0x00, 0x53, 0x5e},
+                   ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+                   [&face] (const shared_ptr<nfd::Face>& newFace) {
+                     BOOST_REQUIRE(newFace != nullptr);
+                     face = newFace;
+                   },
+                   [] (uint32_t status, const std::string& reason) {
+                     BOOST_FAIL("No error expected, but got: [" << status << ": " << reason << "]");
+                   });
+  BOOST_CHECK_EQUAL(channel->size(), 1);
+  BOOST_REQUIRE(face != nullptr);
+
+  face->close();
+  g_io.poll();
+  BOOST_CHECK_EQUAL(channel->size(), 0);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestEthernetChannel
+BOOST_AUTO_TEST_SUITE_END() // Face
+
+} // namespace tests
+} // namespace face
+} // namespace nfd
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index b8b07d1..5e7c6d2 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -153,7 +153,7 @@
     {
       ether
       {
-        mcast_group 01:00:00:00:00:01
+        mcast_group 01:00:5e:90:10:01
       }
     }
   )CONFIG";
@@ -162,7 +162,7 @@
     {
       ether
       {
-        mcast_group 01:00:00:00:00:02
+        mcast_group 01:00:5e:90:10:02
       }
     }
   )CONFIG";
@@ -171,14 +171,14 @@
   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)));
+                    FaceUri(ethernet::Address{0x01, 0x00, 0x5e, 0x90, 0x10, 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)));
+                    FaceUri(ethernet::Address{0x01, 0x00, 0x5e, 0x90, 0x10, 0x02}));
 }
 
 BOOST_AUTO_TEST_CASE(Whitelist)
@@ -286,7 +286,7 @@
       ether
       {
         mcast yes
-        mcast_group 02:00:00:00:00:01
+        mcast_group 00:00:5e:00:53:5e
       }
     }
   )CONFIG";
diff --git a/tests/daemon/face/ethernet-fixture.hpp b/tests/daemon/face/ethernet-fixture.hpp
index 029bb6e..5e3b612 100644
--- a/tests/daemon/face/ethernet-fixture.hpp
+++ b/tests/daemon/face/ethernet-fixture.hpp
@@ -56,7 +56,7 @@
   }
 
   void
-  initializeUnicast(ethernet::Address remoteAddr = {0x0A, 0x01, 0x23, 0x45, 0x67, 0x89},
+  initializeUnicast(ethernet::Address remoteAddr = {0x00, 0x00, 0x5e, 0x00, 0x53, 0x5e},
                     ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
   {
     BOOST_ASSERT(netifs.size() > 0);
@@ -67,7 +67,7 @@
   }
 
   void
-  initializeMulticast(ethernet::Address mcastGroup = ethernet::getDefaultMulticastAddress(),
+  initializeMulticast(ethernet::Address mcastGroup = {0x01, 0x00, 0x5e, 0x90, 0x10, 0x5e},
                       ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS)
   {
     BOOST_ASSERT(netifs.size() > 0);
