The DHCPv4 and DHCPv6 relay agents count the requests and replies they forward and the messages they drop #114
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
lantea-one/ninlil#114
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A node that relays DHCP has no local scopes or leases, so without relay counts its DHCP charts would be empty. The relay agents forward in a few places:
Dhcpv4RelayAgentsends a request upstream (src/dotnet/src/Ninlil.Dhcp.Server.Relay/Dhcpv4RelayAgent.cs:205-315, hop check at:222) and a reply down to the client (:397-446);Dhcpv6RelayAgentsends a RELAY-FORW (src/dotnet/src/Ninlil.Dhcp.Server.Relay/Dhcpv6RelayAgent.cs:269-331) and relays a RELAY-REPL down (:349-460, discards at:357and:392).What changes
Dhcpv4RelayAgentandDhcpv6RelayAgenttakeIDhcpMessageCounters(#113) as an optional constructor parameter (null = no counting). They record:RequestForwardedafter a request was sent upstream;ReplyForwardedafter a reply was sent toward the client;Droppedat every point that discards a message (hop limit, unknown or untrusted sender, no upstream, a malformed relay message), once per message.ServiceCollectionDhcpv4RelayExtensionandServiceCollectionDhcpv6RelayExtension:TryAddSingleton<IDhcpMessageCounters, DhcpMessageCounters>().Acceptance
src/dotnet/tests/Ninlil.Dhcp.Server.Relay.Tests: one DISCOVER relayed upstream and its OFFER relayed down drain tov4 RequestForwarded = 1,v4 ReplyForwarded = 1.v4 Dropped = 1and nothing forwarded; a DHCPv6 RELAY-REPL over the hop limit drains tov6 Dropped = 1.IDhcpMessageCountersinstance (src/dotnet/tests/Ninlil.Web.Tests, second host throughfactory.CreateSecondHost, free ports).dotnet test src/dotnet/tests/Ninlil.Dhcp.Server.Relay.Testsandsrc/dotnet/tests/Ninlil.Web.Testspass. No schema, API or option change.Source
Owner decision 2026-10-31, round 2 (R2-DHCP-RELAY): "separate relay series (requests/replies forwarded, v4 and v6)".