A method to use both ipv4 and ipv6 addresses