Repository navigation
Conversation
31eff8b to
ef8f6be
Compare
|
This seems convoluted - having to manually orchestrate ARP ignores such that neighbors cache the correct MAC is hideous I don’t think this is the right solution (it’s additional problems and complexity that comes from AI not understanding design intent) |
|
Agreed, and thanks for the pushback. The Once that lands I will cut this PR down to netlab's part only: the |
|
Looks like we're waiting for a containerlab PR. @roc-ops please let me know when this is ready to merge. |
ef8f6be to
b046b62
Compare
…ts ports
docker-sonic-vs builds lanemap.ini/port_config.ini from the ethN netdevs present
at boot, and syncd then creates a TAP named Ethernet<4n> for each port it maps a
veth to -- eth1 to Ethernet0, eth2 to Ethernet4, and so on, the contract
containerlab documents for the sonic-vs kind. The veth keeps its name; both
netdevs exist. The device declared no clab.interface.name, so containerlab
injected the veth as Ethernet0 itself: the lane map came out empty, syncd failed
to create every TAP (TUNSETIFF: name in use), and SONiC port state and admin
control were detached from the link. "show interfaces status" reported oper/admin
down on a port carrying a Full OSPF adjacency, and "config interface shutdown"
changed nothing.
Declare clab.interface.name eth{ifindex + 1} -- ifindex starts at 0 here and eth0
is management, the same offset crpd, csrx, vmx, vptx, vsrx and the two vjunos
devices already use.
With the port a syncd TAP rather than the raw veth, CONFIG_DB reaches the netdev
again: the MTU goes back through "config interface mtu" (measured on a 9000-byte
link -- netdev, CONFIG_DB and APPL_DB all agree, an 8972-byte DF ping crosses)
and the loop that mirrored CONFIG_DB INTERFACE rows onto the netdev with
"ip addr add" is gone, because intfmgrd programs routed-port addresses. portmgrd
still leaves every front-panel port admin-down at boot, so "config interface
startup" stays, now issued for the ports the lab uses and under the script's
set -e. The vxlan template loses "routed-port IPs" from the list of gaps it works
around for the same reason, and its live-proof note is qualified: that datapath
enslaves what is now a TAP, and it was measured before this change.
The vlan, lag and vxlan datapaths are otherwise out of scope: those features are
off on this device (vlan: False, lag: False, vxlan: false) and were not
re-measured.
Nothing here touches the wire veth. Left alone it answers ARP for the port's
address with its own MAC, which is containerlab's to fix because containerlab
creates it, and srl-labs/containerlab#3390 now does what SONiC's own virtual
switch harness does and marks it ARP-off and IPv6-off.
The transformation case pins the container name on the node interface and, by
covering the whole transformed topology, also pins that the node keeps its own
config_templates rather than inheriting FRR's bind mounts.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A containerlab SONiC node has two kernel interfaces per link: the wire veth that containerlab creates, which keeps its ethN name, and the port that syncd creates for it, four apart in the numbering. Only the port is configured and addressed. The second bullet is the part a user can act on: an older containerlab release leaves the veth answering ARP for the port's address, so say to use a recent one, and point at srl-labs/containerlab#3390, which marks the veth ARP-off and IPv6-off so only the port answers on the link. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
b046b62 to
96bac67
Compare
|
@ipspace this is reworked and ready for your review. srl-labs/containerlab#3390 is merged, so the Two things to flag before you merge:
One smaller thing: I dropped the release-note bullet. It was in |
Thank you.
No worries, I'll change the minimum containerlab release once the new one is out, and then merge this one.
The release notes (at least in a short format) are auto-generated before the release is shipped, so you don't have to worry about that, unless you want to have something special in the release notes, in which case you should always work on the file for the next release. |
docker-sonic-vsbuilds its front-panel port map from theethNnetdevs present when the container boots, andsyncdthen creates a TAP named after each port it maps a veth to (eth1toEthernet0,eth2toEthernet4, and so on). The veth keeps its name; both netdevs exist. Thesonicdevice declared noclab.interface.name, so containerlab named the link endpointEthernet0itself: the lane map came out empty,syncdcould not create a single TAP, and SONiC's port objects had no relationship to the links --show interfaces statusreported a port down while it carried a Full OSPF adjacency, andconfig interface shutdowndid nothing.This PR declares
clab.interface.name: eth{ifindex + 1}, the same thingeosandsrlinuxdo. With the port a real TAP again, CONFIG_DB reaches the kernel: the initial template goes back toconfig interface mtuand drops the loop that mirrored CONFIG_DB routed-port addresses onto the netdev by hand. The vlan, lag and vxlan datapaths are out of scope here: those features are off on this device and were not re-measured.What changed since the first version of this PR
@jbemmel was right that having netlab orchestrate
arp_ignoreon the wire veth was the wrong design. The wire belongs to containerlab, which creates it, and silencing it is now srl-labs/containerlab#3390 -- it does what SONiC's own virtual-switch harness does (sonic-swsstests/conftest.py,VirtualServer: "disable arp, so no neigh on physical interfaces") and marks eachethNARP-off and IPv6-off. That is merged. This PR is cut down to netlab's part: the endpoint naming, the removal of the workarounds the naming unblocks, the transformation test, and a caveat.Version requirement
The caveat names the containerlab requirement; the global minimum in
netsim/providers/clab.yml(0.75.0) is left alone. On an older containerlab the lab still comes up and forwards -- the wire simply answers ARP alongside the port, so a neighbour can cache the wire's MAC for the port's address. If you would rather have the minimum bumped, say so and I will add it once the containerlab release carrying #3390 is out; the release number is not known yet, which is why the caveat links the PR instead of a version.Verified
On this branch rebased on current
dev, with containerlab built frommainata958ab466(the commit that carries #3390):lanemap.ini=eth1:25,26,27,28,show interfaces statusshowsEthernet0oper up / admin up at the netlab MTU, and both IPv4 and IPv6 ping across the link at 0% loss.eth1isNOARPwithdisable_ipv6=1whilenet.ipv4.conf.eth1.arp_ignoreis0, and noarp_ignoreappears anywhere in the configuration netlab pushes.169.254.0.1-- resolves to the port's MAC2e:9e:9f:74:85:f9, not the wire'saa:c1:ab:d8:af:2e.arpingfor the port's address: 4 sent, 4 received, 0 extra replies.sonic-clab-ifnames; the transformation suite passes 303 (1 skipped) on this branch against 302 on cleandev.From the first round, on template paths this rework does not touch: MTU agrees across netdev, CONFIG_DB, APPL_DB and
show interfaces statuson a 9000-byte link with an 8972-byte DF ping crossing; cutting the far end of a link makes SONiC report that port oper down and restoring it brings it back; andtests/integration/device-module-test -d sonic -p clab initialpassed every case that deploys a SONiC node (the rest abort innetlab createon the device's own declared feature gaps, and04-mtuneeds a cEOS image I do not have). Happy to re-run that integration pass on request.One pre-existing issue is left alone on purpose:
initial/01-interfaceswarns that ashutdown: Trueinterface still pings on SONiC, because the vtysh block renders a bareno shutdownfor every interface.config interface shutdownworks now, so that is a separate one-line follow-up.🤖 Generated with Claude Code