mirror of
https://github.com/dtzp555-max/aci-sim.git
synced 2026-07-19 09:46:33 +00:00
fix(isn): flip sub-interface naming to real-gear conventions (v0.19.1)
Owner review of the v0.19.0 demo + Cisco docs/real spine CLI verification: ACI spines name the VLAN-4 sub-if after the PORT (eth1/49.49, cf. Eth1/29.29-style in show ip ospf neighbors vrf overlay-1); the ISN Nexus names its dot1q-4 sub-if after the VLAN (Ethernet1/1.4). v0.19.0 had the two conventions swapped. 908 tests green.
This commit is contained in:
@@ -273,12 +273,14 @@ def build(topo: Topology, site: Site, store: MITStore) -> None:
|
||||
# ISN CSW LLDP neighbor — multi-site only, one per spine's dedicated ISN
|
||||
# uplink PHYSICAL port (eth1/{49+si} — see interfaces.py/underlay.py: the
|
||||
# OSPF logical interface on this port is a routed VLAN-4 sub-interface,
|
||||
# "eth1/{49+si}.4", but real LLDP is advertised on the physical port
|
||||
# itself even when a routed sub-if carries the IP, so this adjacency
|
||||
# deliberately targets the base port, not the sub-if). autoACI's Topology
|
||||
# "Fabric (physical)" view derives this uplink row from ospfIf (port +
|
||||
# local IP) + ospfAdjEp (remote IP) + this lldpAdjEp (CSW-side port), so
|
||||
# without it the neighbor port/name show up blank in that view.
|
||||
# "eth1/{49+si}.{49+si}" per the ACI naming convention, but LLDP itself is
|
||||
# advertised per physical port, so this adjacency targets the base port).
|
||||
# The CSW-side port-id follows the IPN/ISN Nexus convention — a dot1q-4
|
||||
# routed sub-interface named after the VLAN ("Ethernet1/x.4", e.g. real
|
||||
# IPN configs `interface Ethernet1/1.4` + `encapsulation dot1q 4`).
|
||||
# autoACI's Topology "Fabric (physical)" view derives this uplink row from
|
||||
# ospfIf (port + local IP) + ospfAdjEp (remote IP) + this lldpAdjEp
|
||||
# (CSW-side port), so without it the neighbor port/name show up blank.
|
||||
if len(topo.sites) > 1:
|
||||
isn_ip = f"172.16.{site.id}.254"
|
||||
for si, spine in enumerate(site.spine_nodes()):
|
||||
@@ -287,7 +289,7 @@ def build(topo: Topology, site: Site, store: MITStore) -> None:
|
||||
pod=pod,
|
||||
local_node_id=spine.id,
|
||||
local_port=f"eth1/{49 + si}",
|
||||
remote_port=f"Ethernet1/{si + 1}",
|
||||
remote_port=f"Ethernet1/{si + 1}.4",
|
||||
neighbor_name=f"ISN-CSW{site.id}",
|
||||
neighbor_mgmt_ip=isn_ip,
|
||||
neighbor_kind="switch",
|
||||
|
||||
@@ -95,11 +95,15 @@ def build(topo: Topology, site: Site, store: MITStore) -> None:
|
||||
# is now the routed VLAN-4 sub-interface of the eth1/{49+si} ISN
|
||||
# uplink port interfaces.py builds a dedicated l1PhysIf for — real
|
||||
# ACI multi-site spines carry the ISN-facing OSPF address on this
|
||||
# kind of sub-if, not the bare physical port. `addr` uses the same
|
||||
# /24 as the peer ipn_ip below so the adjacency stays
|
||||
# kind of sub-if, not the bare physical port. NAMING (verified
|
||||
# against real spine CLI, e.g. "Eth1/29.29"/"Eth1/33.33" in
|
||||
# `show ip ospf neighbors vrf overlay-1`): the ACI-side sub-if
|
||||
# NUMBER equals the PORT number — the encap is always vlan-4 but
|
||||
# only the IPN/ISN-router side names its sub-if ".4". `addr` uses
|
||||
# the same /24 as the peer ipn_ip below so the adjacency stays
|
||||
# subnet-consistent (consumer: autoACI's fabric_ospf.py, which
|
||||
# reads ospfIf.id (falling back to ifId) + area + operSt).
|
||||
if_port = f"eth1/{49 + si}.4"
|
||||
if_port = f"eth1/{49 + si}.{49 + si}"
|
||||
if_dn = f"{ospf_base}/if-[{if_port}]"
|
||||
store.add(MO(
|
||||
"ospfIf",
|
||||
|
||||
Reference in New Issue
Block a user