Support both IPv4 and IPv6