'Get ip address in local system which can communicate with query_ip.
:param query_ip: IP of client which wants to communicate with
autotest machine.
:return: IP address which can communicate with query_ip'

def get_ip_local(self, query_ip, netmask='24'):

    ip = utils.system_output(('ip    addr    show    to    %s/%s' % (query_ip, netmask)))
    ip = re.search('inet    ([0-9.]*)/', ip)
    if (ip is None):
        return ip
    return ip.group(1)
