diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 632cf060b626..1fd6b7b56e8d 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1505,7 +1505,12 @@ def get_mux_cable_entries(mux_cable_ports, neighbors, devices): entry = {} neighbor = neighbors[intf]['name'] entry['state'] = 'auto' - entry['server_ipv4'] = devices[neighbor]['lo_addr'] + + # Always force a /32 prefix for server IPv4 loopbacks + server_ipv4_lo_addr = devices[neighbor]['lo_addr'].split("/")[0] + server_ipv4_lo_prefix = ipaddress.ip_network(UNICODE_TYPE(server_ipv4_lo_addr)) + entry['server_ipv4'] = str(server_ipv4_lo_prefix) + if 'lo_addr_v6' in devices[neighbor]: entry['server_ipv6'] = devices[neighbor]['lo_addr_v6'] mux_cable_table[intf] = entry