import json


def mux_cable_server_ip(dut):
    """Function for retrieving all ip of servers connected to mux_cable

    Args:
        dut: The host object

    Returns:
        A dict: {"Ethernet12" : {"server_ipv4":"192.168.0.4/32", "server_ipv6":"fc02:1000::4/128"}, ....}
    """
    mux_cable_config = dut.shell("sonic-cfggen -d  --var-json 'MUX_CABLE'")['stdout']
    return json.loads(mux_cable_config)