Return a unique id for the gateway.

def get_gateway_id(self):
        """Return a unique id for the gateway."""
        host, _ = self.server_address
        try:
            ip_address = ipaddress.ip_address(host)
        except ValueError:
            # Only hosts using ip address supports unique id.
            return None
        if ip_address.version == 6:
            mac = get_mac_address(ip6=host)
        else:
            mac = get_mac_address(ip=host)
        return mac