diff --git a/neutron_tempest_plugin/api/test_network_ip_availability.py b/neutron_tempest_plugin/api/test_network_ip_availability.py
index 22d2fc6..8ec268d 100644
--- a/neutron_tempest_plugin/api/test_network_ip_availability.py
+++ b/neutron_tempest_plugin/api/test_network_ip_availability.py
@@ -22,9 +22,12 @@
 from tempest.lib import exceptions
 
 from neutron_tempest_plugin.api import base
+from neutron_tempest_plugin import config
 
 from neutron_lib import constants as lib_constants
 
+CONF = config.CONF
+
 # 3 IP addresses are taken from every total for IPv4 these are reserved
 DEFAULT_IP4_RESERVED = 3
 # 2 IP addresses are taken from every total for IPv6 these are reserved
@@ -68,6 +71,20 @@
         availability = self._get_availability(network, net_availability)
         return availability and availability['used_ips']
 
+    def _wait_used_ips_after_subnet_create(self, network, initial_used_ips=0):
+
+        def _wait_used_ips_value(network, used_ips):
+            availabilities = self.admin_client.list_network_ip_availabilities()
+            current_used_ips = self._get_used_ips(network, availabilities)
+            return current_used_ips == used_ips
+
+        used_ips = initial_used_ips + CONF.network.service_ports_number
+
+        self.assertTrue(
+            test_utils.call_until_true(
+                _wait_used_ips_value, 60, 5, network, used_ips),
+            msg=f"Current used ips != {used_ips} after subnet create")
+
     def _assert_total_and_used_ips(self, expected_used, expected_total,
                                    network, net_availability):
         availability = self._get_availability(network, net_availability)
@@ -101,6 +118,7 @@
     @decorators.idempotent_id('3aecd3b2-16ed-4b87-a54a-91d7b3c2986b')
     def test_list_ip_availability_after_subnet_and_ports(self):
         subnet = self.create_subnet(self.network, enable_dhcp=False)
+        self._wait_used_ips_after_subnet_create(self.network)
         prefix = netaddr.IPNetwork(subnet['cidr']).prefixlen
         body = self.admin_client.list_network_ip_availabilities()
         used_ips_before_port_create = self._get_used_ips(self.network, body)
@@ -114,6 +132,7 @@
     @decorators.idempotent_id('9f11254d-757b-492e-b14b-f52144e4ee7b')
     def test_list_ip_availability_after_port_delete(self):
         self.create_subnet(self.network, enable_dhcp=False)
+        self._wait_used_ips_after_subnet_create(self.network)
         port = self.create_port(self.network)
         net_availability = self.admin_client.list_network_ip_availabilities()
         used_ips = self._get_used_ips(self.network, net_availability)
@@ -136,6 +155,7 @@
             self.network['id'])
         self._assert_total_and_used_ips(0, 0, self.network, net_availability)
         subnet = self.create_subnet(self.network, enable_dhcp=False)
+        self._wait_used_ips_after_subnet_create(self.network)
         prefix = netaddr.IPNetwork(subnet['cidr']).prefixlen
         net_availability = self.admin_client.show_network_ip_availability(
             self.network['id'])
@@ -153,6 +173,7 @@
     @decorators.idempotent_id('a4d1e291-c152-4d62-9316-8c9bf1c6aee2')
     def test_show_ip_availability_after_port_delete(self):
         self.create_subnet(self.network, enable_dhcp=False)
+        self._wait_used_ips_after_subnet_create(self.network)
         port = self.create_port(self.network)
         net_availability = self.admin_client.show_network_ip_availability(
             self.network['id'])
@@ -185,6 +206,7 @@
     def test_list_ipv6_ip_availability_after_subnet_and_ports(self):
         subnet = self.create_subnet(self.network, ip_version=self._ip_version,
                                     enable_dhcp=False)
+        self._wait_used_ips_after_subnet_create(self.network)
         prefix = netaddr.IPNetwork(subnet['cidr']).prefixlen
         body = self.admin_client.list_network_ip_availabilities()
         used_ips_before_port_create = self._get_used_ips(self.network, body)
