def get_node_id(ip):
    """A consul's node id is derived from the last two octets of its ip.

    Args:
        ip (string): Instance's ip address.

    Returns:
        (string): Node id as known to Consul cluster.
    """
    octets = ip.split('.')
    return octets[2] + octets[3]