def ip_to_bin(ipaddr):
    """
    This function changes dec IP-address to binary

    Parameters:
    -----------
    ipaddr:
        dec IP-address
    
    Returns:
    --------
    ipaddr:
        binary IP-address
    """
    ipaddr = ipaddr.split(".")
    ipaddr = "{:08b}{:08b}{:08b}{:08b}".format(int(ipaddr[0]), int(ipaddr[1]), int(ipaddr[2]), int(ipaddr[3]))

    return ipaddr