Description

On an MX304 acting as a BNG for IPoE subscribers, issuing clear dhcp relay binding all does not immediately remove the subscriber sessions. Instead, the sessions persist in show subscribers output for ~5 minutes before eventually clearing. This behavior was observed with a dynamic profile that referenced $junos-underlying-interface-unit for demux unit binding. Updating the dynamic profile to use $junos-interface-unit (and explicitly binding the interface to the routing-instance) provides unique demux units per subscriber/VLAN and allows immediate cleanup of the IPoE sessions.

Symptoms

After running:

clear dhcp relay binding all


IPoE sessions remain visible for several minutes:

> show subscribers
Interface            IP Address/VLAN ID        User Name         LS:RI
demux0.3221225662    216.110.110.150           test              default:default
demux0.3221225664    216.110.110.160           test              default:default

Repeated refreshes show no immediate change; sessions clear only after ~5 minutes.

Targeted clear on a specific binding may also exhibit delay when demux units are shared or not uniquely tied to the subscriber interface unit.

Solution

Update the IPoE dynamic profile to use $junos-interface-unit for the demux interface unit and bind the subscriber interface to the routing instance. This ensures a unique demux per subscriber/VLAN and enables immediate cleanup when DHCP relay bindings are cleared.


Before (problematic dynamic profile)



set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" demux-options underlying-interface "$junos-underlying-interface"

set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" family inet mac-validate strict

set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" family inet demux-source $junos-subscriber-ip-address

set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" family inet filter input "$junos-input-filter"

set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" family inet filter output "$junos-output-filter"

set dynamic-profiles DHCP-IPOE-PROFILE interfaces demux0 unit "$junos-underlying-interface-unit" family inet unnumbered-address "$junos-loopback-interface"



After (recommended dynamic profile)


set dynamic-profiles DHCP-IPOE-PROFILE-PS routing-instances "$junos-routing-instance" interface "$junos-interface-name"

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-underlying-interface"

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" family inet mac-validate strict

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" family inet demux-source $junos-subscriber-ip-address

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" family inet filter input "$junos-input-filter"

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" family inet filter output "$junos-output-filter"

set dynamic-profiles DHCP-IPOE-PROFILE-PS interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface"



Verification


  1. Reconnect/renew an IPoE client to instantiate new sessions.
  2. Confirm subscribers are present:
show subscribers

Clear DHCP relay bindings (all or targeted):

clear dhcp relay binding all

or

clear dhcp relay binding <assigned-IP>


Re-check subscribers, sessions should be removed immediately:

show subscribers


Modification History

2026-02-22 : Article Created