controlplane: open source controller/agent#1
Merged
Conversation
26b0f96 to
3ecd967
Compare
nikw9944
approved these changes
Feb 20, 2025
3ecd967 to
c5c4b0e
Compare
packethog
added a commit
that referenced
this pull request
Jun 11, 2025
### Summary When a client is subscribed to a multicast group and either shuts down doublezerod or disconnects their tunnel, the upstream DoubleZero device was continuing to replicate multicast traffic towards the user for up to 210s due to mroute state not being purged. This was because we were setting the same holdtime on PIM join and prune messages which dictates how long an upstream router should maintain join or prune state: [RFC7761, section 4.9.5](https://datatracker.ietf.org/doc/rfc7761/): ``` Holdtime The amount of time a receiver MUST keep the Join/Prune state alive, in seconds. If the Holdtime is set to '0xffff', the receiver of this message SHOULD hold the state until canceled by the appropriate canceling Join/Prune message, or timed out according to local policy. This may be used with dial-on- demand links, to avoid keeping the link up with periodic Join/Prune messages. ``` This PR lowers the holdtime for join messages to 120s and prune messages to 5s. ### Testing Create tunnel and verify PIM join is sent w/ 2m holdtime: ``` ubuntu@chi-dn-bm2:~$ doublezero connect multicast subscriber mg01 --device chi-dn-dzd1 DoubleZero Service Provisioning 🔗 Start Provisioning User... Public IP: 137.174.145.145 (If you want to specify a particular address, use the argument --client-ip x.x.x.x) 🔍 Provisioning User for IP: 137.174.145.145 Creating an account for the IP: 137.174.145.145 The Device has been selected: chi-dn-dzd1 User activated with dz_ip: 137.174.145.145 User activated with dz_ip: 137.174.145.145 Provisioning: status: ok / Connected ubuntu@chi-dn-bm2:~$ sudo tcpdump -i any -v pim ... 18:04:23.321277 doublezero1 Out IP (tos 0x0, ttl 1, id 12482, offset 0, flags [none], proto PIM (103), length 54) chi-dn-bm2 > pim-routers.mcast.net: PIMv2, length 34 Join / Prune, cksum 0x82ef (correct), upstream-neighbor: 169.254.0.2 1 group(s), holdtime: 2m group #1: 233.84.178.0, joined sources: 1, pruned sources: 0 joined source #1: 10.0.0.0(SWR) ``` Verify mroute state is created on the dzd: ``` chi-dn-dzd1#show ip mroute PIM Bidirectional Mode Multicast Routing Table RPF route: U - From unicast routing table M - From multicast routing table PIM Sparse Mode Multicast Routing Table Flags: E - Entry forwarding on the RPT, J - Joining to the SPT R - RPT bit is set, S - SPT bit is set, L - Source is attached W - Wildcard entry, X - External component interest I - SG Include Join alert rcvd, P - Programmed in hardware H - Joining SPT due to policy, D - Joining SPT due to protocol Z - Entry marked for deletion, C - Learned from a DR via a register A - Learned via Anycast RP Router, M - Learned via MSDP N - May notify MSDP, K - Keepalive timer not running T - Switching Incoming Interface, B - Learned via Border Router V - Source is reachable via Evpn Tenant Domain F - Learned via MVPN RPF route: U - From unicast routing table M - From multicast routing table 233.84.178.0 0.0.0.0, 0:00:37, RP 10.0.0.0, flags: W Incoming interface: Register Outgoing interface list: Tunnel501 ``` Disconnect from group and verify PIM prune is sent w/ 5s holdtime: ``` ubuntu@chi-dn-bm2:~$ doublezero disconnect multicast DoubleZero Service Provisioning 🔍 Decommissioning User Public IP: 137.174.145.145 (If you want to specify a particular address, use the argument --client-ip x.x.x.x) | deleting user account... 🔍 Deleting User Account for: 9HKbT49idxD27K2KsH7f9zZHmTS78ANYPhAG6rLtBXnn 🔍 User Account deleted / 🔍 Deprovisioning Complete ubuntu@chi-dn-bm2:~$ sudo tcpdump -i any -v pim ... 18:04:39.134883 doublezero1 Out IP (tos 0x0, ttl 1, id 17108, offset 0, flags [none], proto PIM (103), length 54) chi-dn-bm2 > pim-routers.mcast.net: PIMv2, length 34 Join / Prune, cksum 0x8362 (correct), upstream-neighbor: 169.254.0.2 1 group(s), holdtime: 5s group #1: 233.84.178.0, joined sources: 0, pruned sources: 1 pruned source #1: 10.0.0.0(SWR) ``` Verify mroute state is immediately purged: ``` chi-dn-dzd1#show ip mroute PIM Bidirectional Mode Multicast Routing Table RPF route: U - From unicast routing table M - From multicast routing table PIM Sparse Mode Multicast Routing Table Flags: E - Entry forwarding on the RPT, J - Joining to the SPT R - RPT bit is set, S - SPT bit is set, L - Source is attached W - Wildcard entry, X - External component interest I - SG Include Join alert rcvd, P - Programmed in hardware H - Joining SPT due to policy, D - Joining SPT due to protocol Z - Entry marked for deletion, C - Learned from a DR via a register A - Learned via Anycast RP Router, M - Learned via MSDP N - May notify MSDP, K - Keepalive timer not running T - Switching Incoming Interface, B - Learned via Border Router V - Source is reachable via Evpn Tenant Domain F - Learned via MVPN RPF route: U - From unicast routing table M - From multicast routing table chi-dn-dzd1# ```
This was referenced Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.