Hello,
I'd suggest using this configuration:
set dynamic-profiles auto-stacked-vlan interfaces demux0 unit "$junos-interface-unit" no-traps
set dynamic-profiles auto-stacked-vlan interfaces demux0 unit "$junos-interface-unit" vlan-tags outer "$junos-stacked-vlan-id"
set dynamic-profiles auto-stacked-vlan interfaces demux0 unit "$junos-interface-unit" vlan-tags inner "$junos-vlan-id"
set dynamic-profiles auto-stacked-vlan interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-interface-ifd-name"
set dynamic-profiles auto-stacked-vlan interfaces demux0 unit "$junos-interface-unit" family pppoe dynamic-profile prod-pppoe-base
set dynamic-profiles prod-pppoe-base routing-instances "$junos-routing-instance" interface "$junos-interface-name"
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" no-traps
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" ppp-options chap
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" ppp-options pap
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" pppoe-options underlying-interface "$junos-underlying-interface"
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" pppoe-options server
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" keepalives interval 30
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" family inet rpf-check
set dynamic-profiles prod-pppoe-base interfaces pp0 unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface"
set system dynamic-profile-options versioning
set system services subscriber-management enable
set system configuration-database max-db-size 314572800
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 flexible-vlan-tagging
set interfaces ge-0/0/0 auto-configure stacked-vlan-ranges dynamic-profile auto-stacked-vlan accept pppoe
set interfaces ge-0/0/0 auto-configure stacked-vlan-ranges dynamic-profile auto-stacked-vlan ranges any,any
set interfaces ge-0/0/0 auto-configure remove-when-no-subscribers
But you'll have to delete your dynamic profiles first, commit, and then apply (probably you'll have to reboot vMX afterwards).
Best regards,
Sergii
-------------------------------------------------------------------
Please accept the solution if your problem is resolved
-------------------------------------------------------------------