diff --git a/staticlibs/tests/unit/host/python/apf_utils_test.py b/staticlibs/tests/unit/host/python/apf_utils_test.py
index 96b967b..2885460 100644
--- a/staticlibs/tests/unit/host/python/apf_utils_test.py
+++ b/staticlibs/tests/unit/host/python/apf_utils_test.py
@@ -25,8 +25,8 @@
     get_apf_capabilities,
     get_apf_counter,
     get_apf_counters_from_dumpsys,
-    get_ipv4_address,
-    get_ipv6_address,
+    get_ipv4_addresses,
+    get_ipv6_addresses,
     get_hardware_address,
     is_send_raw_packet_downstream_supported,
     send_raw_packet_downstream,
@@ -114,44 +114,53 @@
       get_hardware_address(self.mock_ad, "wlan0")
 
   @patch("net_tests_utils.host.python.adb_utils.adb_shell")
-  def test_get_ipv4_address_success(
+  def test_get_ipv4_addresses_success(
       self, mock_adb_shell: MagicMock
   ) -> None:
     mock_adb_shell.return_value = """
 54: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
-inet 192.168.195.162/24 brd 192.168.195.255 scope global wlan0
-valid_lft forever preferred_lft forever
+    inet 192.168.195.162/24 brd 192.168.195.255 scope global wlan0
+       valid_lft forever preferred_lft forever
+    inet 192.168.200.1/24 brd 192.168.200.255 scope global wlan0
+       valid_lft forever preferred_lft forever
 """
-    ip_address = get_ipv4_address(self.mock_ad, "wlan0")
-    asserts.assert_equal(ip_address, "192.168.195.162")
+    ip_addresses = get_ipv4_addresses(self.mock_ad, "wlan0")
+    asserts.assert_equal(ip_addresses, ["192.168.195.162", "192.168.200.1"])
 
   @patch("net_tests_utils.host.python.adb_utils.adb_shell")
-  def test_get_ipv4_address_not_found(
+  def test_get_ipv4_addresses_not_found(
       self, mock_adb_shell: MagicMock
   ) -> None:
-     mock_adb_shell.return_value = ""
-     with asserts.assert_raises(PatternNotFoundException):
-       get_ipv4_address(self.mock_ad, "wlan0")
+    mock_adb_shell.return_value = ""
+    ip_addresses = get_ipv4_addresses(self.mock_ad, "wlan0")
+    asserts.assert_equal(ip_addresses, [])
 
   @patch("net_tests_utils.host.python.adb_utils.adb_shell")
-  def test_get_ipv6_address_success(
+  def test_get_ipv6_addresses_success(
       self, mock_adb_shell: MagicMock
   ) -> None:
     mock_adb_shell.return_value = """
 54: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
-inet6 fe80::10a3:5dff:fe52:de32/64 scope link
-valid_lft forever preferred_lft forever
+    inet6 fe80::10a3:5dff:fe52:de32/64 scope link
+        valid_lft forever preferred_lft forever
+    inet6 2001:b400:e53f:164e:9c1e:780e:d1:4658/64 scope global dynamic mngtmpaddr noprefixroute
+        valid_lft 6995sec preferred_lft 6995sec
+    inet6 fe80::3aff:2199:2d8e:20d1/64 scope link noprefixroute
+        valid_lft forever preferred_lft forever
 """
-    ip_address = get_ipv6_address(self.mock_ad, "wlan0")
-    asserts.assert_equal(ip_address, "fe80::10a3:5dff:fe52:de32")
+    ip_addresses = get_ipv6_addresses(self.mock_ad, "wlan0")
+    asserts.assert_equal(ip_addresses,
+                         ["fe80::10a3:5dff:fe52:de32",
+                          "2001:b400:e53f:164e:9c1e:780e:d1:4658",
+                          "fe80::3aff:2199:2d8e:20d1"])
 
   @patch("net_tests_utils.host.python.adb_utils.adb_shell")
   def test_get_ipv6_address_not_found(
           self, mock_adb_shell: MagicMock
   ) -> None:
-      mock_adb_shell.return_value = ""
-      with asserts.assert_raises(PatternNotFoundException):
-          get_ipv6_address(self.mock_ad, "wlan0")
+    mock_adb_shell.return_value = ""
+    ip_addresses = get_ipv6_addresses(self.mock_ad, "wlan0")
+    asserts.assert_equal(ip_addresses, [])
 
   @patch("net_tests_utils.host.python.adb_utils.adb_shell")
   def test_send_raw_packet_downstream_success(
diff --git a/staticlibs/testutils/host/python/apf_utils.py b/staticlibs/testutils/host/python/apf_utils.py
index b312bcf..e84ba3e 100644
--- a/staticlibs/testutils/host/python/apf_utils.py
+++ b/staticlibs/testutils/host/python/apf_utils.py
@@ -83,14 +83,13 @@
   ad.log.debug("Getting apf counters: " + str(result))
   return result
 
-def get_ipv4_address(
+def get_ipv4_addresses(
     ad: android_device.AndroidDevice, iface_name: str
-) -> str:
-  """Retrieves the IPv4 address of a given interface on an Android device.
+) -> list[str]:
+  """Retrieves the IPv4 addresses of a given interface on an Android device.
 
   This function executes an ADB shell command (`ip -4 address show`) to get the
   network interface information and extracts the IPv4 address from the output.
-  If devices has multiple IPv4 addresses, return the first one.
   If devices have no IPv4 address, raise PatternNotFoundException.
 
   Args:
@@ -98,35 +97,31 @@
       iface_name: The name of the network interface (e.g., "wlan0").
 
   Returns:
-      The IPv4 address of the interface as a string.
-
-  Raises:
-      PatternNotFoundException: If the IPv4 address is not found in the command
-      output.
+      The IPv4 addresses of the interface as a list of string.
+      Return empty list if no IPv4 address.
   """
   # output format:
   # 54: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
-  # inet 192.168.195.162/24 brd 192.168.195.255 scope global wlan2
-  # valid_lft forever preferred_lft forever
+  #     inet 192.168.195.162/24 brd 192.168.195.255 scope global wlan2
+  #         valid_lft forever preferred_lft forever
+  #     inet 192.168.1.1/24 brd 192.168.1.255 scope global wlan2
+  #         valid_lft forever preferred_lft forever
   output = adb_utils.adb_shell(ad, f"ip -4 address show {iface_name}")
   pattern = r"inet\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/\d+"
-  match = re.search(pattern, output)
+  matches = re.findall(pattern, output)
 
-  if match:
-    return match.group(1)  # Extract the IPv4 address string.
+  if matches:
+    return matches
   else:
-    raise PatternNotFoundException(
-      "Cannot get hardware address for " + iface_name
-    )
+    return []
 
-def get_ipv6_address(
+def get_ipv6_addresses(
     ad: android_device.AndroidDevice, iface_name: str
-) -> str:
-  """Retrieves the IPv6 address of a given interface on an Android device.
+) -> list[str]:
+  """Retrieves the IPv6 addresses of a given interface on an Android device.
 
   This function executes an ADB shell command (`ip -6 address show`) to get the
   network interface information and extracts the IPv6 address from the output.
-  If devices has multiple IPv6 addresses, return the first one.
   If devices have no IPv6 address, raise PatternNotFoundException.
 
   Args:
@@ -134,29 +129,23 @@
       iface_name: The name of the network interface (e.g., "wlan0").
 
   Returns:
-      The IPv6 address of the interface as a string.
-
-  Raises:
-      PatternNotFoundException: If the IPv6 address is not found in the command
-      output.
+      The IPv6 addresses of the interface as a list of string.
+      Return empty list if no IPv6 address.
   """
   # output format
   # 54: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
-  # inet6 fe80::10a3:5dff:fe52:de32/64 scope link
-  # valid_lft forever preferred_lft forever
+  #     inet6 fe80::10a3:5dff:fe52:de32/64 scope link
+  #         valid_lft forever preferred_lft forever
+  #     inet6 fe80::1233:aadb:3d32:1234/64 scope link
+  #         valid_lft forever preferred_lft forever
   output = adb_utils.adb_shell(ad, f"ip -6 address show {iface_name}")
-  if output is "":
-    raise PatternNotFoundException(
-      "Cannot get ipv6 address for " + iface_name
-    )
   pattern = r"inet6\s+([0-9a-fA-F:]+)\/\d+"
-  match = re.search(pattern, output)
-  if match:
-    return match.group(1)  # Extract the IPv6 address string.
+  matches = re.findall(pattern, output)
+
+  if matches:
+    return matches
   else:
-    raise PatternNotFoundException(
-      "Cannot get IPv6 address for " + iface_name
-    )
+    return []
 
 def get_hardware_address(
     ad: android_device.AndroidDevice, iface_name: str
