diff --git a/tests/daemon/face/multicast-udp-transport-fixture.hpp b/tests/daemon/face/multicast-udp-transport-fixture.hpp
index 4c984f4..40c79ee 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-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -49,11 +49,11 @@
     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);
+      mcastAddr = ip::make_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");
+      auto v6Addr = ip::make_address_v6("FF01::114");
       v6Addr.scope_id(netif->getIndex());
       mcastAddr = v6Addr;
     }
diff --git a/tests/daemon/face/network-predicate.t.cpp b/tests/daemon/face/network-predicate.t.cpp
index 05094fc..0595b48 100644
--- a/tests/daemon/face/network-predicate.t.cpp
+++ b/tests/daemon/face/network-predicate.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -69,19 +69,19 @@
 protected:
   NetworkInterfacePredicateFixture()
   {
-    using namespace boost::asio::ip;
     using namespace ndn::net;
     namespace ethernet = ndn::ethernet;
+    namespace ip = boost::asio::ip;
 
     netifs.push_back(NetworkMonitorStub::makeNetworkInterface());
     netifs.back()->setIndex(0);
     netifs.back()->setName("eth0");
     netifs.back()->setEthernetAddress(ethernet::Address::fromString("3e:15:c2:8b:65:00"));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V4,
-      address_v4::from_string("129.82.100.1"), address_v4::from_string("129.82.255.255"),
+      ip::make_address_v4("129.82.100.1"), ip::make_address_v4("129.82.255.255"),
       16, AddressScope::GLOBAL, 0));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V6,
-      address_v6::from_string("2001:db8:1::1"), address_v6::from_string("2001:db8:1::ffff:ffff:ffff:ffff"),
+      ip::make_address_v6("2001:db8:1::1"), ip::make_address_v6("2001:db8:1::ffff:ffff:ffff:ffff"),
       64, AddressScope::GLOBAL, 0));
     netifs.back()->setFlags(IFF_UP);
 
@@ -90,10 +90,10 @@
     netifs.back()->setName("eth1");
     netifs.back()->setEthernetAddress(ethernet::Address::fromString("3e:15:c2:8b:65:01"));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V4,
-      address_v4::from_string("192.168.2.1"), address_v4::from_string("192.168.2.255"),
+      ip::make_address_v4("192.168.2.1"), ip::make_address_v4("192.168.2.255"),
       24, AddressScope::GLOBAL, 0));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V6,
-      address_v6::from_string("2001:db8:2::1"), address_v6::from_string("2001:db8:2::ffff:ffff:ffff:ffff"),
+      ip::make_address_v6("2001:db8:2::1"), ip::make_address_v6("2001:db8:2::ffff:ffff:ffff:ffff"),
       64, AddressScope::GLOBAL, 0));
     netifs.back()->setFlags(IFF_UP);
 
@@ -102,10 +102,10 @@
     netifs.back()->setName("eth2");
     netifs.back()->setEthernetAddress(ethernet::Address::fromString("3e:15:c2:8b:65:02"));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V4,
-      address_v4::from_string("198.51.100.1"), address_v4::from_string("198.51.100.255"),
+      ip::make_address_v4("198.51.100.1"), ip::make_address_v4("198.51.100.255"),
       24, AddressScope::GLOBAL, 0));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V6,
-      address_v6::from_string("2001:db8::1"), address_v6::from_string("2001:db8::ffff"),
+      ip::make_address_v6("2001:db8::1"), ip::make_address_v6("2001:db8::ffff"),
       112, AddressScope::GLOBAL, 0));
     netifs.back()->setFlags(IFF_MULTICAST | IFF_BROADCAST | IFF_UP);
 
@@ -114,7 +114,7 @@
     netifs.back()->setName("enp68s0f1");
     netifs.back()->setEthernetAddress(ethernet::Address::fromString("3e:15:c2:8b:65:03"));
     netifs.back()->addNetworkAddress(NetworkAddress(AddressFamily::V4,
-      address_v4::from_string("192.168.2.3"), address_v4::from_string("192.168.2.255"),
+      ip::make_address_v4("192.168.2.3"), ip::make_address_v4("192.168.2.255"),
       24, AddressScope::GLOBAL, 0));
     netifs.back()->setFlags(IFF_UP);
   }
@@ -382,10 +382,10 @@
   {
     using namespace boost::asio::ip;
 
-    addrs.push_back(address_v4::from_string("129.82.100.1"));
-    addrs.push_back(address_v6::from_string("2001:db8:1::1"));
-    addrs.push_back(address_v4::from_string("192.168.2.1"));
-    addrs.push_back(address_v6::from_string("2001:db8:2::1"));
+    addrs.emplace_back(make_address_v4("129.82.100.1"));
+    addrs.emplace_back(make_address_v6("2001:db8:1::1"));
+    addrs.emplace_back(make_address_v4("192.168.2.1"));
+    addrs.emplace_back(make_address_v6("2001:db8:2::1"));
   }
 
 protected:
diff --git a/tests/daemon/face/tcp-factory.t.cpp b/tests/daemon/face/tcp-factory.t.cpp
index fba95fe..e2aa73d 100644
--- a/tests/daemon/face/tcp-factory.t.cpp
+++ b/tests/daemon/face/tcp-factory.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -42,7 +42,7 @@
   shared_ptr<TcpChannel>
   createChannel(const std::string& localIp, const std::string& localPort)
   {
-    tcp::Endpoint endpoint(boost::asio::ip::address::from_string(localIp),
+    tcp::Endpoint endpoint(boost::asio::ip::make_address(localIp),
                            boost::lexical_cast<uint16_t>(localPort));
     return factory.createChannel(endpoint);
   }
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index 68b66cd..2dd9da5 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
   if (netmon.getCapabilities() & NetworkMonitor::CAP_ENUM) {
     netmon.onEnumerationCompleted.connect([] { getGlobalIoService().stop(); });
     getGlobalIoService().run();
-    getGlobalIoService().reset();
+    getGlobalIoService().restart();
   }
   return netmon.listNetworkInterfaces();
 }
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 259dbb3..106ba0b 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-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -42,7 +42,7 @@
   shared_ptr<UdpChannel>
   createChannel(const std::string& localIp, uint16_t localPort)
   {
-    udp::Endpoint endpoint(boost::asio::ip::address::from_string(localIp), localPort);
+    udp::Endpoint endpoint(boost::asio::ip::make_address(localIp), localPort);
     return factory.createChannel(endpoint, 5_min);
   }
 };
@@ -75,8 +75,8 @@
   shared_ptr<Face>
   createMulticastFace(const std::string& localIp, const std::string& mcastIp, uint16_t mcastPort)
   {
-    auto localAddress = boost::asio::ip::address::from_string(localIp);
-    udp::Endpoint mcastEndpoint(boost::asio::ip::address::from_string(mcastIp), mcastPort);
+    auto localAddress = boost::asio::ip::make_address(localIp);
+    udp::Endpoint mcastEndpoint(boost::asio::ip::make_address(mcastIp), mcastPort);
 
     if (localAddress.is_v4()) {
       BOOST_ASSERT(!netifsV4.empty());
@@ -129,7 +129,7 @@
   static bool
   isFaceOnNetif(const Face& face, const NetworkInterface& netif)
   {
-    auto ip = boost::asio::ip::address::from_string(face.getLocalUri().getHost());
+    auto ip = boost::asio::ip::make_address(face.getLocalUri().getHost());
     return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
                        [ip] (const auto& a) { return a.getIp() == ip; });
   }
@@ -427,9 +427,9 @@
   auto uri = udpMcastFaces.front()->getRemoteUri();
   BOOST_CHECK_EQUAL(uri.getScheme(), "udp6");
   // check the address ignoring the scope id
-  auto addr = boost::asio::ip::address_v6::from_string(uri.getHost());
+  auto addr = boost::asio::ip::make_address_v6(uri.getHost());
   addr.scope_id(0);
-  BOOST_CHECK_EQUAL(addr, boost::asio::ip::address_v6::from_string("ff02::1101"));
+  BOOST_CHECK_EQUAL(addr, boost::asio::ip::make_address_v6("ff02::1101"));
   BOOST_CHECK_EQUAL(uri.getPort(), "7011");
 
   parseConfig(CONFIG2, false);
@@ -439,9 +439,9 @@
   uri = udpMcastFaces.front()->getRemoteUri();
   BOOST_CHECK_EQUAL(uri.getScheme(), "udp6");
   // check the address ignoring the scope id
-  addr = boost::asio::ip::address_v6::from_string(uri.getHost());
+  addr = boost::asio::ip::make_address_v6(uri.getHost());
   addr.scope_id(0);
-  BOOST_CHECK_EQUAL(addr, boost::asio::ip::address_v6::from_string("ff02::1102"));
+  BOOST_CHECK_EQUAL(addr, boost::asio::ip::make_address_v6("ff02::1102"));
   BOOST_CHECK_EQUAL(uri.getPort(), "7012");
 }
 
diff --git a/tests/daemon/face/websocket-factory.t.cpp b/tests/daemon/face/websocket-factory.t.cpp
index aac1eca..c133671 100644
--- a/tests/daemon/face/websocket-factory.t.cpp
+++ b/tests/daemon/face/websocket-factory.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,7 +41,7 @@
   shared_ptr<WebSocketChannel>
   createChannel(const std::string& localIp, const std::string& localPort)
   {
-    websocket::Endpoint endpoint(boost::asio::ip::address::from_string(localIp),
+    websocket::Endpoint endpoint(boost::asio::ip::make_address(localIp),
                                  boost::lexical_cast<uint16_t>(localPort));
     return factory.createChannel(endpoint);
   }
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index 23d15f0..d28d8a3 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -63,7 +63,7 @@
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(StaticPropertiesV4Mapped, T, StaticPropertiesV4MappedFixtures, T)
 {
   TRANSPORT_TEST_CHECK_PRECONDITIONS();
-  auto mappedAddr = ip::address_v6::v4_mapped(this->address.to_v4());
+  auto mappedAddr = ip::make_address_v6(ip::v4_mapped, this->address.to_v4());
   BOOST_REQUIRE(mappedAddr.is_v4_mapped());
   WebSocketTransportFixture::initialize(this->interface, mappedAddr);
 
