Skip to content

mgre: inject overlay multicast once per mapped peer - #18

Merged
bebopagogo merged 24 commits into
USNavalResearchLaboratory:masterfrom
Jafaral:mixed-mgre
Aug 31, 2026
Merged

mgre: inject overlay multicast once per mapped peer#18
bebopagogo merged 24 commits into
USNavalResearchLaboratory:masterfrom
Jafaral:mixed-mgre

Conversation

@Jafaral

@Jafaral Jafaral commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Wildcard-remote mGRE has no single kernel dest for overlay multicast. nrlsmf now injects once per mapped unicast peer. map <iface>,<local>,<peer> pins dests; map …,dynamic learns them from ip neigh (static NBMA / NHRP). 0.0.0.0 stays the kernel wildcard, not a send dest. Collect-md GRE needs explicit unicast maps (dynamic does not apply). GRE receive sets an Ethernet multicast dest so CF onto a host LAN works.

depends on USNavalResearchLaboratory/protolib#54

@Jafaral
Jafaral force-pushed the mixed-mgre branch 7 times, most recently from 8a838cd to 8399561 Compare August 27, 2026 06:40
Jafaral added 10 commits August 27, 2026 12:46
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
… a LAN

GRE receive builds a placeholder Ethernet header with a null dest.
ProtoCap::Forward() only rewrites the source MAC, so classic flooding
onto a host LAN sent 00:00:00:00:00:00 and receivers never joined the
frame. Map the overlay IP dest to 01:00:5e:... / 33:33:... before
forwarding, not only on the nrlsmf device/vif path.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
A wildcard-remote mGRE interface has no single kernel dest, so one
sendto fails with EINVAL. Multiple map commands already stored peers
in InterfaceInfoTable; use those remotes as send destinations.

Also store InterfaceInfo.remote_addr and look up [remote][local] so
the table actually holds the mapped remotes.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Keep 0.0.0.0 as the kernel wildcard remote. map <iface>,<local>,dynamic
dumps and watches neigh, filling the same InterfaceInfoTable used for
overlay multicast inject. Explicit map remotes stay pinned.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Point at protolib 5c17232. External/metadata GRE has no header_ops, so
PF_PACKET inject cannot install lwtunnel metadata. LinuxCap now builds
the GRE header and sends IPPROTO_GRE to the mapped unicast remote;
ordinary GRE/mGRE is unchanged.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Finish the 1hop_smf topology rename to h0/h1/r0 with per-mode tests.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Chain static NBMA, NHRP, multicast-underlay, P2P, and collect-md GRE
and verify overlay multicast from ha to ha2/hb2/hc2/hf.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Map a multicast remote as an overlay-mcast inject dest. Capture
GRE-in-mcast on the underlay iface when the GRE device remote is
unicast or wildcard; multicast-underlay mGRE still uses the kernel
tunnel.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Wildcard mGRE with ujoin on r0-r2, unicast maps to r3/r4, and a check
that overlay mcast injects to the group plus the unicast-only peers.
Layer overlay GRE ifaces so receive is not masked by re-inject.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Record how wildcard-remote mGRE and metadata GRE get inject dests,
including mixed unicast/mcast remotes, GRE-in-mcast receive on
wildcard mGRE, and NHRP hub-and-spoke overlay multicast.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
@Jafaral
Jafaral force-pushed the mixed-mgre branch 2 times, most recently from 3e99719 to f95481f Compare August 30, 2026 00:44
Jafaral added 11 commits August 29, 2026 20:05
Expose a human CLI as nrlsmf --cli -c "show <command> [modifiers]".
Repeat -c/--cmd to send more than one command. json is always last.
Commands include version, statistics, interface, interface grouping,
and groups. Legacy one-shot verbs remain for compatibility.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Exercise show version, statistics, and interface grouping, and wait
for h1's default route before iperf so FRR NHT delay does not fail
the sender step.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Track whether GRE mappings came from map or the kernel. show tunnel
lists underlay Local/Remote plus overlay IP. show tunnel neighbors
lists each peer's Neighbor IP (overlay) and Remote (underlay) with
Flags: C for configured plus NUD letters when the kernel has an entry.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Use --cli show ... json for 1-hop and GRE/mGRE suites, including
tunnel mappings and neighbors (explicit map, dynamic, NHRP, P2P,
multicast-underlay, and external GRE).

List kernel-learned GRE remotes in show tunnel neighbors so P2P and
multicast-underlay devices appear (NOARP, no overlay Neighbor IP).

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Join 224.0.0.55 on GRE when elastic is enabled, map ACKs to this
node's tunnel local/overlay, and send each ACK to one GRE remote.
Use the per-packet GRE source so mGRE neighbors are distinct.

Also allow show groups details/memberships so oif and ACK relays
are visible, and start FRR IGMP polling when with-frr is sent at
runtime.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
RateStat on each flow and oif so show groups can report recv/sent
pps. Details lists sources and downstream instead of a flat row.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Last-hop membership is IsManaged() plus the iface group list, not
show groups memberships. Expose that as show igmp groups and M on
show interface.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
A new (S,G) defaults to LIMIT. Copy FORWARD onto the host oif when
a MANAGED or STATIC *,G membership is already present so the first
packets are not rate-limited.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
After CF overlay-mcast, enable with-frr and elastic overlay at
runtime on the same eth1,gre1 processes. Keep h1 at 8 pps; idle
hosts at most 1 pps. Enable pimd IGMP on the host LANs.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Describe the elastic show commands and include sample output.
Note that pps uses a 5 second tumbling window.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
After CF overlay-mcast, enable with-frr and elastic overlay at
runtime. Keep a multicast-underlay neighbor (h1) then a unicast-only
neighbor (h3) at 8 pps; other last hops at most 1 pps. Enable pimd
IGMP on the host LANs.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
@bebopagogo
bebopagogo merged commit de835ba into USNavalResearchLaboratory:master Aug 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants