diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 8cfb622..d5ce2a8 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -39,7 +39,9 @@
 
 using DatagramTransportFixtures = boost::mpl::vector<
   GENERATE_IP_TRANSPORT_FIXTURE_INSTANTIATIONS(UnicastUdpTransportFixture),
-  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>,
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::LinkLocal, MulticastInterface::Yes>,
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::Global, MulticastInterface::Yes>
 >;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(Send, T, DatagramTransportFixtures, T)
diff --git a/tests/daemon/face/multicast-udp-transport-fixture.hpp b/tests/daemon/face/multicast-udp-transport-fixture.hpp
index 2b86833..5959821 100644
--- a/tests/daemon/face/multicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/multicast-udp-transport-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -45,7 +45,7 @@
 protected:
   MulticastUdpTransportFixture()
     : transport(nullptr)
-    , multicastEp(ip::address::from_string("230.15.19.47"), 7070)
+    , txPort(7001)
     , receivedPackets(nullptr)
     , remoteSockRx(g_io)
     , remoteSockTx(g_io)
@@ -55,21 +55,32 @@
   void
   initialize(ip::address address)
   {
-    localEp = udp::endpoint(address, 7001);
+    ip::address mcastAddr;
+    if (address.is_v4()) {
+      // the administratively scoped group 224.0.0.254 is reserved for experimentation (RFC 4727)
+      mcastAddr = ip::address_v4(0xE00000FE);
+    }
+    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());
+      mcastAddr = v6Addr;
+    }
+    mcastEp = udp::endpoint(mcastAddr, 7373);
+    remoteMcastEp = udp::endpoint(mcastAddr, 8383);
 
-    MulticastUdpTransport::openRxSocket(remoteSockRx, multicastEp, ip::address_v4::any());
-    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(udp::v4(), 0), true);
+    MulticastUdpTransport::openRxSocket(remoteSockRx, mcastEp, address);
+    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(address, 0), nullptr, true);
 
     udp::socket sockRx(g_io);
     udp::socket sockTx(g_io);
-    MulticastUdpTransport::openRxSocket(sockRx, udp::endpoint(multicastEp.address(), localEp.port()),
-                                        ip::address_v4::any());
-    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(udp::v4(), 0), true);
+    MulticastUdpTransport::openRxSocket(sockRx, remoteMcastEp, address);
+    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(address, txPort), nullptr, true);
 
     face = make_unique<Face>(
              make_unique<DummyReceiveLinkService>(),
-             make_unique<MulticastUdpTransport>(localEp, multicastEp, std::move(sockRx),
-                                                std::move(sockTx), ndn::nfd::LINK_TYPE_MULTI_ACCESS));
+             make_unique<MulticastUdpTransport>(mcastEp, std::move(sockRx), std::move(sockTx),
+                                                ndn::nfd::LINK_TYPE_MULTI_ACCESS));
     transport = static_cast<MulticastUdpTransport*>(face->getTransport());
     receivedPackets = &static_cast<DummyReceiveLinkService*>(face->getLinkService())->receivedPackets;
 
@@ -92,24 +103,31 @@
   void
   remoteWrite(const std::vector<uint8_t>& buf, bool needToCheck = true)
   {
-    remoteSockTx.async_send_to(boost::asio::buffer(buf), udp::endpoint(multicastEp.address(), 7001),
+    sendToGroup(remoteSockTx, buf, needToCheck);
+    limitedIo.defer(time::seconds(1));
+  }
+
+  void
+  sendToGroup(udp::socket& sock, const std::vector<uint8_t>& buf, bool needToCheck = true) const
+  {
+    sock.async_send_to(boost::asio::buffer(buf), remoteMcastEp,
       [needToCheck] (const boost::system::error_code& error, size_t) {
         if (needToCheck) {
           BOOST_REQUIRE_EQUAL(error, boost::system::errc::success);
         }
       });
-    limitedIo.defer(time::seconds(1));
   }
 
 protected:
   LimitedIo limitedIo;
   MulticastUdpTransport* transport;
-  udp::endpoint localEp;
-  udp::endpoint multicastEp;
+  udp::endpoint mcastEp;
+  uint16_t txPort;
   std::vector<Transport::Packet>* receivedPackets;
 
 private:
   unique_ptr<Face> face;
+  udp::endpoint remoteMcastEp;
   udp::socket remoteSockRx;
   udp::socket remoteSockTx;
 };
diff --git a/tests/daemon/face/multicast-udp-transport.t.cpp b/tests/daemon/face/multicast-udp-transport.t.cpp
index de6d30f..d8e7a60 100644
--- a/tests/daemon/face/multicast-udp-transport.t.cpp
+++ b/tests/daemon/face/multicast-udp-transport.t.cpp
@@ -36,17 +36,15 @@
 BOOST_AUTO_TEST_SUITE(Face)
 
 using MulticastUdpTransportFixtureWithAddress =
-  // TODO: change to AddressFamily::Any after IPv6 support is implemented
-  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4,
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::Any,
                      AddressScope::Global, MulticastInterface::Yes>;
 
 BOOST_FIXTURE_TEST_SUITE(TestMulticastUdpTransport, MulticastUdpTransportFixtureWithAddress)
 
 using MulticastUdpTransportFixtures = boost::mpl::vector<
-  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>
-  // TODO: IPv6 not supported yet
-  //IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::LinkLocal, MulticastInterface::Yes>,
-  //IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::Global, MulticastInterface::Yes>
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>,
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::LinkLocal, MulticastInterface::Yes>,
+  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V6, AddressScope::Global, MulticastInterface::Yes>
 >;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(StaticProperties, T, MulticastUdpTransportFixtures, T)
@@ -55,8 +53,8 @@
 
   checkStaticPropertiesInitialized(*this->transport);
 
-  BOOST_CHECK_EQUAL(this->transport->getLocalUri(), FaceUri(udp::endpoint(this->address, this->localEp.port())));
-  BOOST_CHECK_EQUAL(this->transport->getRemoteUri(), FaceUri(this->multicastEp));
+  BOOST_CHECK_EQUAL(this->transport->getLocalUri(), FaceUri(udp::endpoint(this->address, this->txPort)));
+  BOOST_CHECK_EQUAL(this->transport->getRemoteUri(), FaceUri(this->mcastEp));
   BOOST_CHECK_EQUAL(this->transport->getScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
   BOOST_CHECK_EQUAL(this->transport->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERMANENT);
   BOOST_CHECK_EQUAL(this->transport->getLinkType(), ndn::nfd::LINK_TYPE_MULTI_ACCESS);
@@ -78,9 +76,9 @@
 {
   TRANSPORT_TEST_INIT();
 
-  // remoteSockRx2 unnecessary for this test case - only remoteSockTx2 is needed
+  // we need a second remote tx socket for this test case
   udp::socket remoteSockTx2(this->g_io);
-  MulticastUdpTransport::openTxSocket(remoteSockTx2, udp::endpoint(udp::v4(), 7071), true);
+  MulticastUdpTransport::openTxSocket(remoteSockTx2, udp::endpoint(this->address, 0), nullptr, true);
 
   Block pkt1 = ndn::encoding::makeStringBlock(300, "hello");
   ndn::Buffer buf1(pkt1.begin(), pkt1.end());
@@ -98,15 +96,8 @@
   BOOST_CHECK_EQUAL(this->receivedPackets->at(0).remoteEndpoint,
                     this->receivedPackets->at(1).remoteEndpoint);
 
-  udp::endpoint destEp(this->multicastEp.address(), this->localEp.port());
-  remoteSockTx2.async_send_to(boost::asio::buffer(buf1), destEp,
-    [] (const boost::system::error_code& error, size_t) {
-      BOOST_REQUIRE_EQUAL(error, boost::system::errc::success);
-    });
-  remoteSockTx2.async_send_to(boost::asio::buffer(buf2), destEp,
-    [] (const boost::system::error_code& error, size_t) {
-      BOOST_REQUIRE_EQUAL(error, boost::system::errc::success);
-    });
+  this->sendToGroup(remoteSockTx2, buf1);
+  this->sendToGroup(remoteSockTx2, buf2);
   this->limitedIo.defer(time::seconds(1));
 
   BOOST_CHECK_EQUAL(this->transport->getCounters().nInPackets, 4);
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 5e7e615..01a24a0 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,6 @@
 #include "factory-test-common.hpp"
 
 #include <boost/algorithm/string/replace.hpp>
-#include <boost/range/algorithm/count_if.hpp>
 #include <ndn-cxx/net/address-converter.hpp>
 
 namespace nfd {
@@ -53,22 +52,54 @@
   UdpFactoryMcastFixture()
   {
     for (const auto& netif : collectNetworkInterfaces()) {
-      if (netif->isUp() && netif->canMulticast() &&
-          hasAddressFamily(*netif, ndn::net::AddressFamily::V4)) {
-        netifs.push_back(netif);
+      // same filtering logic as UdpFactory::applyMcastConfigToNetif()
+      if (netif->isUp() && !netif->isLoopback() && netif->canMulticast()) {
+        bool hasValidIpAddress = false;
+        if (hasAddressFamily(*netif, ndn::net::AddressFamily::V4)) {
+          hasValidIpAddress = true;
+          netifsV4.push_back(netif);
+        }
+        if (hasAddressFamily(*netif, ndn::net::AddressFamily::V6)) {
+          hasValidIpAddress = true;
+          netifsV6.push_back(netif);
+        }
+        if (hasValidIpAddress) {
+          netifs.push_back(netif);
+        }
       }
     }
-
     this->copyRealNetifsToNetmon();
   }
 
   shared_ptr<Face>
   createMulticastFace(const std::string& localIp, const std::string& mcastIp, uint16_t mcastPort)
   {
-    BOOST_ASSERT(!netifs.empty());
-    udp::Endpoint localEndpoint(ndn::ip::addressFromString(localIp), mcastPort);
+    auto localAddress = ndn::ip::addressFromString(localIp);
     udp::Endpoint mcastEndpoint(ndn::ip::addressFromString(mcastIp), mcastPort);
-    return factory.createMulticastFace(localEndpoint, mcastEndpoint, netifs.front());
+
+    if (localAddress.is_v4()) {
+      BOOST_ASSERT(!netifsV4.empty());
+      return factory.createMulticastFace(netifsV4.front(), localAddress, mcastEndpoint);
+    }
+    else {
+      BOOST_ASSERT(!netifsV6.empty());
+      return factory.createMulticastFace(netifsV6.front(), localAddress, mcastEndpoint);
+    }
+  }
+
+  /** \brief returns a non-loopback IP address suitable for the creation of a UDP multicast face
+   */
+  boost::asio::ip::address
+  findNonLoopbackAddressForMulticastFace(ndn::net::AddressFamily af) const
+  {
+    const auto& netifList = af == ndn::net::AddressFamily::V4 ? netifsV4 : netifsV6;
+    for (const auto& netif : netifList) {
+      for (const auto& a : netif->getNetworkAddresses()) {
+        if (a.getFamily() == af && !a.getIp().is_loopback())
+          return a.getIp();
+      }
+    }
+    return {};
   }
 
   std::vector<const Face*>
@@ -77,7 +108,13 @@
     return this->listFacesByScheme("udp4", linkType);
   }
 
-  /** \brief determine whether \p netif has at least one address of the given family
+  std::vector<const Face*>
+  listUdp6McastFaces(ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS) const
+  {
+    return this->listFacesByScheme("udp6", linkType);
+  }
+
+  /** \brief determine whether \p netif has at least one IP address of the given family
    */
   static bool
   hasAddressFamily(const NetworkInterface& netif, ndn::net::AddressFamily af)
@@ -89,17 +126,27 @@
   /** \brief determine whether a UDP multicast face is created on \p netif
    */
   static bool
-  isFaceOnNetif(const Face& face, const shared_ptr<const NetworkInterface>& netif)
+  isFaceOnNetif(const Face& face, const NetworkInterface& netif)
   {
-    auto ip = boost::asio::ip::address_v4::from_string(face.getLocalUri().getHost());
-    return std::any_of(netif->getNetworkAddresses().begin(), netif->getNetworkAddresses().end(),
+    auto ip = ndn::ip::addressFromString(face.getLocalUri().getHost());
+    return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
                        [ip] (const NetworkAddress& a) { return a.getIp() == ip; });
   }
 
 protected:
-  /** \brief MulticastUdpTransport-capable network interfaces
+  /** \brief MulticastUdpTransport-capable network interfaces (IPv4 + IPv6)
+   *
+   *  This should be used in test cases that do not depend on a specific address family
    */
   std::vector<shared_ptr<const NetworkInterface>> netifs;
+
+  /** \brief MulticastUdpTransport-capable network interfaces (IPv4 only)
+   */
+  std::vector<shared_ptr<const NetworkInterface>> netifsV4;
+
+  /** \brief MulticastUdpTransport-capable network interfaces (IPv6 only)
+   */
+  std::vector<shared_ptr<const NetworkInterface>> netifsV6;
 };
 
 #define SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(n) \
@@ -111,6 +158,24 @@
     } \
   } while (false)
 
+#define SKIP_IF_UDP_MCAST_V4_NETIF_COUNT_LT(n) \
+  do { \
+    if (this->netifsV4.size() < (n)) { \
+      BOOST_WARN_MESSAGE(false, "skipping assertions that require " #n \
+                                " or more IPv4 MulticastUdpTransport-capable network interfaces"); \
+      return; \
+    } \
+  } while (false)
+
+#define SKIP_IF_UDP_MCAST_V6_NETIF_COUNT_LT(n) \
+  do { \
+    if (this->netifsV6.size() < (n)) { \
+      BOOST_WARN_MESSAGE(false, "skipping assertions that require " #n \
+                                " or more IPv6 MulticastUdpTransport-capable network interfaces"); \
+      return; \
+    } \
+  } while (false)
+
 BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestUdpFactory, UdpFactoryFixture)
 
@@ -184,11 +249,6 @@
 
 BOOST_FIXTURE_TEST_CASE(EnableDisableMcast, UdpFactoryMcastFixture)
 {
-#ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
-  SKIP_IF_NOT_SUPERUSER();
-#endif // __linux__
-
   const std::string CONFIG_WITH_MCAST = R"CONFIG(
     face_system
     {
@@ -210,22 +270,28 @@
 
   parseConfig(CONFIG_WITHOUT_MCAST, false);
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
+  BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
 
-  SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
+#ifdef __linux__
+  // need superuser privileges to create multicast faces on Linux
+  SKIP_IF_NOT_SUPERUSER();
+#endif // __linux__
 
   parseConfig(CONFIG_WITH_MCAST, false);
   g_io.poll();
-  BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), netifs.size());
+  BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), netifsV4.size());
+  BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), netifsV6.size());
 
   parseConfig(CONFIG_WITHOUT_MCAST, false);
   g_io.poll();
   BOOST_CHECK_EQUAL(this->listUdp4McastFaces().size(), 0);
+  BOOST_CHECK_EQUAL(this->listUdp6McastFaces().size(), 0);
 }
 
 BOOST_FIXTURE_TEST_CASE(McastAdHoc, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
   SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
@@ -241,16 +307,17 @@
   )CONFIG";
 
   parseConfig(CONFIG, false);
-  BOOST_CHECK_EQUAL(this->listUdp4McastFaces(ndn::nfd::LINK_TYPE_AD_HOC).size(), netifs.size());
+  BOOST_CHECK_EQUAL(this->listUdp4McastFaces(ndn::nfd::LINK_TYPE_AD_HOC).size(), netifsV4.size());
+  BOOST_CHECK_EQUAL(this->listUdp6McastFaces(ndn::nfd::LINK_TYPE_AD_HOC).size(), netifsV6.size());
 }
 
-BOOST_FIXTURE_TEST_CASE(ChangeMcastEndpoint, UdpFactoryMcastFixture)
+BOOST_FIXTURE_TEST_CASE(ChangeMcastEndpointV4, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
-  SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
+  SKIP_IF_UDP_MCAST_V4_NETIF_COUNT_LT(1);
 
   const std::string CONFIG1 = R"CONFIG(
     face_system
@@ -275,22 +342,65 @@
 
   parseConfig(CONFIG1, false);
   auto udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifs.size());
-  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(),
-                    FaceUri("udp4://239.66.30.1:7011"));
+  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifsV4.size());
+  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(), FaceUri("udp4://239.66.30.1:7011"));
 
   parseConfig(CONFIG2, false);
   g_io.poll();
   udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifs.size());
-  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(),
-                    FaceUri("udp4://239.66.30.2:7012"));
+  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifsV4.size());
+  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(), FaceUri("udp4://239.66.30.2:7012"));
+}
+
+BOOST_FIXTURE_TEST_CASE(ChangeMcastEndpointV6, UdpFactoryMcastFixture)
+{
+#ifdef __linux__
+  // need superuser privileges to create multicast faces on Linux
+  SKIP_IF_NOT_SUPERUSER();
+#endif // __linux__
+  SKIP_IF_UDP_MCAST_V6_NETIF_COUNT_LT(1);
+
+  const std::string CONFIG1 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_group_v6 ff02::1101
+        mcast_port_v6 7011
+      }
+    }
+  )CONFIG";
+  const std::string CONFIG2 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_group_v6 ff02::1102
+        mcast_port_v6 7012
+      }
+    }
+  )CONFIG";
+
+  parseConfig(CONFIG1, false);
+  auto udpMcastFaces = this->listUdp6McastFaces();
+  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifsV6.size());
+  auto expectedAddr = boost::asio::ip::address_v6::from_string("ff02::1101");
+  expectedAddr.scope_id(netifsV6.front()->getIndex());
+  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(), FaceUri(udp::Endpoint(expectedAddr, 7011)));
+
+  parseConfig(CONFIG2, false);
+  g_io.poll();
+  udpMcastFaces = this->listUdp6McastFaces();
+  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), netifsV6.size());
+  expectedAddr = boost::asio::ip::address_v6::from_string("ff02::1102");
+  expectedAddr.scope_id(netifsV6.front()->getIndex());
+  BOOST_CHECK_EQUAL(udpMcastFaces.front()->getRemoteUri(), FaceUri(udp::Endpoint(expectedAddr, 7012)));
 }
 
 BOOST_FIXTURE_TEST_CASE(Whitelist, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
   SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
@@ -310,15 +420,21 @@
   boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
+
   auto udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), 1);
-  BOOST_CHECK(isFaceOnNetif(*udpMcastFaces.front(), netifs.front()));
+  BOOST_CHECK_LE(udpMcastFaces.size(), 1);
+  auto udpMcastFacesV6 = this->listUdp6McastFaces();
+  BOOST_CHECK_LE(udpMcastFacesV6.size(), 1);
+  udpMcastFaces.insert(udpMcastFaces.end(), udpMcastFacesV6.begin(), udpMcastFacesV6.end());
+  BOOST_CHECK_GE(udpMcastFaces.size(), 1);
+  BOOST_CHECK(std::all_of(udpMcastFaces.begin(), udpMcastFaces.end(),
+                          [this] (const Face* face) { return isFaceOnNetif(*face, *netifs.front()); }));
 }
 
 BOOST_FIXTURE_TEST_CASE(Blacklist, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
   SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
@@ -338,17 +454,21 @@
   boost::replace_first(CONFIG, "%ifname", netifs.front()->getName());
 
   parseConfig(CONFIG, false);
+
   auto udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_CHECK_EQUAL(udpMcastFaces.size(), netifs.size() - 1);
-  BOOST_CHECK_EQUAL(boost::count_if(udpMcastFaces, [this] (const Face* face) {
-    return isFaceOnNetif(*face, netifs.front());
-  }), 0);
+  BOOST_CHECK_GE(udpMcastFaces.size(), netifsV4.size() - 1);
+  auto udpMcastFacesV6 = this->listUdp6McastFaces();
+  BOOST_CHECK_GE(udpMcastFacesV6.size(), netifsV6.size() - 1);
+  udpMcastFaces.insert(udpMcastFaces.end(), udpMcastFacesV6.begin(), udpMcastFacesV6.end());
+  BOOST_CHECK_LT(udpMcastFaces.size(), netifsV4.size() + netifsV6.size());
+  BOOST_CHECK(std::none_of(udpMcastFaces.begin(), udpMcastFaces.end(),
+                           [this] (const Face* face) { return isFaceOnNetif(*face, *netifs.front()); }));
 }
 
 BOOST_FIXTURE_TEST_CASE(ChangePredicate, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
   SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(2);
@@ -370,15 +490,23 @@
   boost::replace_first(CONFIG2, "%ifname", netifs.back()->getName());
 
   parseConfig(CONFIG1, false);
+
   auto udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), 1);
-  BOOST_CHECK(isFaceOnNetif(*udpMcastFaces.front(), netifs.front()));
+  auto udpMcastFacesV6 = this->listUdp6McastFaces();
+  udpMcastFaces.insert(udpMcastFaces.end(), udpMcastFacesV6.begin(), udpMcastFacesV6.end());
+  BOOST_CHECK_GE(udpMcastFaces.size(), 1);
+  BOOST_CHECK(std::all_of(udpMcastFaces.begin(), udpMcastFaces.end(),
+                          [this] (const Face* face) { return isFaceOnNetif(*face, *netifs.front()); }));
 
   parseConfig(CONFIG2, false);
   g_io.poll();
+
   udpMcastFaces = this->listUdp4McastFaces();
-  BOOST_REQUIRE_EQUAL(udpMcastFaces.size(), 1);
-  BOOST_CHECK(isFaceOnNetif(*udpMcastFaces.front(), netifs.back()));
+  udpMcastFacesV6 = this->listUdp6McastFaces();
+  udpMcastFaces.insert(udpMcastFaces.end(), udpMcastFacesV6.begin(), udpMcastFacesV6.end());
+  BOOST_CHECK_GE(udpMcastFaces.size(), 1);
+  BOOST_CHECK(std::all_of(udpMcastFaces.begin(), udpMcastFaces.end(),
+                          [this] (const Face* face) { return isFaceOnNetif(*face, *netifs.back()); }));
 }
 
 BOOST_AUTO_TEST_CASE(Omitted)
@@ -394,6 +522,7 @@
 
   BOOST_CHECK_EQUAL(factory.getChannels().size(), 0);
   BOOST_CHECK_EQUAL(this->listFacesByScheme("udp4", ndn::nfd::LINK_TYPE_MULTI_ACCESS).size(), 0);
+  BOOST_CHECK_EQUAL(this->listFacesByScheme("udp6", ndn::nfd::LINK_TYPE_MULTI_ACCESS).size(), 0);
 }
 
 BOOST_AUTO_TEST_CASE(AllDisabled)
@@ -446,7 +575,7 @@
   BOOST_CHECK_THROW(parseConfig(CONFIG, false), ConfigFile::Error);
 }
 
-BOOST_AUTO_TEST_CASE(BadMcastGroup)
+BOOST_AUTO_TEST_CASE(BadMcastGroupV4)
 {
   // not an address
   const std::string CONFIG1 = R"CONFIG(
@@ -491,7 +620,52 @@
   BOOST_CHECK_THROW(parseConfig(CONFIG3, false), ConfigFile::Error);
 }
 
-BOOST_AUTO_TEST_CASE(BadMcastPort)
+BOOST_AUTO_TEST_CASE(BadMcastGroupV6)
+{
+  // not an address
+  const std::string CONFIG1 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_group_v6 foo
+      }
+    }
+  )CONFIG";
+
+  BOOST_CHECK_THROW(parseConfig(CONFIG1, true), ConfigFile::Error);
+  BOOST_CHECK_THROW(parseConfig(CONFIG1, false), ConfigFile::Error);
+
+  // non-multicast address
+  const std::string CONFIG2 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_group_v6 fe80::1234
+      }
+    }
+  )CONFIG";
+
+  BOOST_CHECK_THROW(parseConfig(CONFIG2, true), ConfigFile::Error);
+  BOOST_CHECK_THROW(parseConfig(CONFIG2, false), ConfigFile::Error);
+
+  // wrong address family
+  const std::string CONFIG3 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_group_v6 224.0.23.170
+      }
+    }
+  )CONFIG";
+
+  BOOST_CHECK_THROW(parseConfig(CONFIG3, true), ConfigFile::Error);
+  BOOST_CHECK_THROW(parseConfig(CONFIG3, false), ConfigFile::Error);
+}
+
+BOOST_AUTO_TEST_CASE(BadMcastPortV4)
 {
   const std::string CONFIG1 = R"CONFIG(
     face_system
@@ -520,6 +694,35 @@
   BOOST_CHECK_THROW(parseConfig(CONFIG2, false), ConfigFile::Error);
 }
 
+BOOST_AUTO_TEST_CASE(BadMcastPortV6)
+{
+  const std::string CONFIG1 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_port_v6 bar
+      }
+    }
+  )CONFIG";
+
+  BOOST_CHECK_THROW(parseConfig(CONFIG1, true), ConfigFile::Error);
+  BOOST_CHECK_THROW(parseConfig(CONFIG1, false), ConfigFile::Error);
+
+  const std::string CONFIG2 = R"CONFIG(
+    face_system
+    {
+      udp
+      {
+        mcast_port_v6 99999
+      }
+    }
+  )CONFIG";
+
+  BOOST_CHECK_THROW(parseConfig(CONFIG2, true), ConfigFile::Error);
+  BOOST_CHECK_THROW(parseConfig(CONFIG2, false), ConfigFile::Error);
+}
+
 BOOST_AUTO_TEST_CASE(UnknownOption)
 {
   const std::string CONFIG = R"CONFIG(
@@ -563,67 +766,107 @@
   BOOST_CHECK_NE(channel2, channel3);
   BOOST_CHECK_EQUAL(channel3->getUri().toString(), "udp6://[::1]:20071");
 
-  // createChannel with multicast address
-  BOOST_CHECK_EXCEPTION(createChannel("224.0.0.1", 20070), UdpFactory::Error,
-                        [] (const UdpFactory::Error& e) {
-                          return strcmp(e.what(),
-                                        "createChannel is only for unicast channels. The provided endpoint "
-                                        "is multicast. Use createMulticastFace to create a multicast face") == 0;
-                        });
-
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
-  SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
 
   // createChannel with a local endpoint that has already been allocated for a UDP multicast face
-  auto multicastFace = createMulticastFace("127.0.0.1", "224.0.0.1", 20072);
-  BOOST_CHECK_EXCEPTION(createChannel("127.0.0.1", 20072), UdpFactory::Error,
-                        [] (const UdpFactory::Error& e) {
-                          return strcmp(e.what(),
-                                        "Cannot create the requested UDP unicast channel, local "
-                                        "endpoint is already allocated for a UDP multicast face") == 0;
-                        });
+  if (!netifsV4.empty()) {
+    auto mcastFace = createMulticastFace("127.0.0.1", "224.0.0.254", 20072);
+    BOOST_CHECK_EXCEPTION(createChannel("127.0.0.1", 20072), UdpFactory::Error,
+                          [] (const UdpFactory::Error& e) {
+                            return strcmp(e.what(),
+                                          "Cannot create UDP channel on 127.0.0.1:20072, "
+                                          "endpoint already allocated for a UDP multicast face") == 0;
+                          });
+  }
+  if (!netifsV6.empty()) {
+    auto mcastFace = createMulticastFace("::1", "ff02::114", 20072);
+    BOOST_CHECK_EXCEPTION(createChannel("::1", 20072), UdpFactory::Error,
+                          [] (const UdpFactory::Error& e) {
+                            return strcmp(e.what(),
+                                          "Cannot create UDP channel on [::1]:20072, "
+                                          "endpoint already allocated for a UDP multicast face") == 0;
+                          });
+  }
 }
 
-BOOST_FIXTURE_TEST_CASE(CreateMulticastFace, UdpFactoryMcastFixture)
+BOOST_FIXTURE_TEST_CASE(CreateMulticastFaceV4, UdpFactoryMcastFixture)
 {
 #ifdef __linux__
-  // need superuser privilege for creating multicast faces on Linux
+  // need superuser privileges to create multicast faces on Linux
   SKIP_IF_NOT_SUPERUSER();
 #endif // __linux__
-  SKIP_IF_UDP_MCAST_NETIF_COUNT_LT(1);
+  SKIP_IF_UDP_MCAST_V4_NETIF_COUNT_LT(1);
 
-  auto multicastFace1  = createMulticastFace("127.0.0.1", "224.0.0.1", 20070);
-  auto multicastFace1a = createMulticastFace("127.0.0.1", "224.0.0.1", 20070);
+  auto multicastFace1  = createMulticastFace("127.0.0.1", "224.0.0.254", 20070);
+  auto multicastFace1a = createMulticastFace("127.0.0.1", "224.0.0.254", 20070);
+  auto multicastFace2  = createMulticastFace("127.0.0.1", "224.0.0.254", 20030);
   BOOST_CHECK_EQUAL(multicastFace1, multicastFace1a);
+  BOOST_CHECK_NE(multicastFace1, multicastFace2);
 
-  // createMulticastFace with an IPv4 local endpoint already used by a channel
+  auto address = findNonLoopbackAddressForMulticastFace(ndn::net::AddressFamily::V4);
+  if (!address.is_unspecified()) {
+    auto multicastFace3  = createMulticastFace(address.to_string(), "224.0.0.254", 20070);
+    BOOST_CHECK_NE(multicastFace1, multicastFace3);
+    BOOST_CHECK_NE(multicastFace2, multicastFace3);
+  }
+
+  // create with a local endpoint already used by a channel
   auto channel = createChannel("127.0.0.1", 20071);
-  BOOST_CHECK_EXCEPTION(createMulticastFace("127.0.0.1", "224.0.0.1", 20071), UdpFactory::Error,
+  BOOST_CHECK_EXCEPTION(createMulticastFace("127.0.0.1", "224.0.0.254", 20071), UdpFactory::Error,
                         [] (const UdpFactory::Error& e) {
                           return strcmp(e.what(),
-                                        "Cannot create the requested UDP multicast face, local "
-                                        "endpoint is already allocated for a UDP unicast channel") == 0;
+                                        "Cannot create UDP multicast face on 127.0.0.1:20071, "
+                                        "endpoint already allocated for a UDP channel") == 0;
                         });
 
-  // createMulticastFace with an IPv4 local endpoint already
-  // used by a multicast face on a different multicast group
+  // create with a local endpoint already used by a multicast face on a different multicast group
   BOOST_CHECK_EXCEPTION(createMulticastFace("127.0.0.1", "224.0.0.42", 20070), UdpFactory::Error,
                         [] (const UdpFactory::Error& e) {
                           return strcmp(e.what(),
-                                        "Cannot create the requested UDP multicast face, local "
-                                        "endpoint is already allocated for a UDP multicast face "
-                                        "on a different multicast group") == 0;
+                                        "Cannot create UDP multicast face on 127.0.0.1:20070, "
+                                        "endpoint already allocated for a different UDP multicast face") == 0;
                         });
+}
 
-  // createMulticastFace with an IPv6 multicast address
-  BOOST_CHECK_EXCEPTION(createMulticastFace("::1", "ff01::114", 20073), UdpFactory::Error,
+BOOST_FIXTURE_TEST_CASE(CreateMulticastFaceV6, UdpFactoryMcastFixture)
+{
+#ifdef __linux__
+  // need superuser privileges to create multicast faces on Linux
+  SKIP_IF_NOT_SUPERUSER();
+#endif // __linux__
+  SKIP_IF_UDP_MCAST_V6_NETIF_COUNT_LT(1);
+
+  auto multicastFace1  = createMulticastFace("::1", "ff02::114", 20070);
+  auto multicastFace1a = createMulticastFace("::1", "ff02::114", 20070);
+  auto multicastFace2  = createMulticastFace("::1", "ff02::114", 20030);
+  BOOST_CHECK_EQUAL(multicastFace1, multicastFace1a);
+  BOOST_CHECK_NE(multicastFace1, multicastFace2);
+
+  auto address = findNonLoopbackAddressForMulticastFace(ndn::net::AddressFamily::V6);
+  if (!address.is_unspecified()) {
+    auto multicastFace3  = createMulticastFace(address.to_string(), "ff02::114", 20070);
+    BOOST_CHECK_NE(multicastFace1, multicastFace3);
+    BOOST_CHECK_NE(multicastFace2, multicastFace3);
+  }
+
+  // create with a local endpoint already used by a channel
+  auto channel = createChannel("::1", 20071);
+  BOOST_CHECK_EXCEPTION(createMulticastFace("::1", "ff02::114", 20071), UdpFactory::Error,
                         [] (const UdpFactory::Error& e) {
                           return strcmp(e.what(),
-                                        "IPv6 multicast is not supported yet. Please provide an IPv4 "
-                                        "address") == 0;
+                                        "Cannot create UDP multicast face on [::1]:20071, "
+                                        "endpoint already allocated for a UDP channel") == 0;
+                        });
+
+  // create with a local endpoint already used by a multicast face on a different multicast group
+  BOOST_CHECK_EXCEPTION(createMulticastFace("::1", "ff02::42", 20070), UdpFactory::Error,
+                        [] (const UdpFactory::Error& e) {
+                          return strcmp(e.what(),
+                                        "Cannot create UDP multicast face on [::1]:20070, "
+                                        "endpoint already allocated for a different UDP multicast face") == 0;
                         });
 }
 
