+ self.sw_if_index, self._local_ip6n, self.local_ip6_prefix_len,
+ is_ipv6=1)
+ self.has_ip6_config = True
+
+ def unconfig_ip6(self):
+ """Remove IPv6 address on the VPP interface."""
+ try:
+ if self.has_ip6_config:
+ self.test.vapi.sw_interface_add_del_address(
+ self.sw_if_index,
+ self.local_ip6n,
+ self.local_ip6_prefix_len,
+ is_ipv6=1, is_add=0)
+ except AttributeError:
+ self.has_ip6_config = False
+ self.has_ip6_config = False
+
+ def configure_ipv6_neighbors(self):
+ """For every remote host assign neighbor's MAC to IPv6 addresses.
+
+ :param vrf_id: The FIB table / VRF ID. (Default value = 0)
+ """
+ for host in self._remote_hosts:
+ macn = host.mac.replace(":", "").decode('hex')
+ ipn = host.ip6n
+ self.test.vapi.ip_neighbor_add_del(
+ self.sw_if_index, macn, ipn, is_ipv6=1)
+
+ def unconfig(self):
+ """Unconfigure IPv6 and IPv4 address on the VPP interface."""
+ self.unconfig_ip4()
+ self.unconfig_ip6()