Good day, need help, the my config, not works firewal for dhcp users, for PPPoE users works fine. (Juniper MX80)
set dynamic-profiles svc-global-inet variables SPEED_IN default-value 100m
set dynamic-profiles svc-global-inet variables SPEED_OUT default-value 100m
set dynamic-profiles svc-global-inet variables POLICER_IN uid
set dynamic-profiles svc-global-inet variables POLICER_OUT uid
set dynamic-profiles svc-global-inet interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet filter input "$SPEED_IN"
set dynamic-profiles svc-global-inet interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet filter input precedence 50
set dynamic-profiles svc-global-inet interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet filter output "$SPEED_OUT"
set dynamic-profiles svc-global-inet interfaces "$junos-interface-ifd-name" unit "$junos-interface-unit" family inet filter output precedence 50
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_IN" interface-specific
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_IN" term default then policer "$POLICER_IN"
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_IN" term default then service-accounting
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_IN" term default then accept
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_OUT" interface-specific
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_OUT" term default then policer "$POLICER_OUT"
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_OUT" term default then service-accounting
set dynamic-profiles svc-global-inet firewall family inet filter "$SPEED_OUT" term default then accept
set dynamic-profiles svc-global-inet firewall policer "$POLICER_IN" filter-specific
set dynamic-profiles svc-global-inet firewall policer "$POLICER_IN" logical-interface-policer
set dynamic-profiles svc-global-inet firewall policer "$POLICER_IN" if-exceeding bandwidth-limit "$SPEED_IN"
set dynamic-profiles svc-global-inet firewall policer "$POLICER_IN" if-exceeding burst-size-limit 512k
set dynamic-profiles svc-global-inet firewall policer "$POLICER_IN" then discard
set dynamic-profiles svc-global-inet firewall policer "$POLICER_OUT" filter-specific
set dynamic-profiles svc-global-inet firewall policer "$POLICER_OUT" logical-interface-policer
set dynamic-profiles svc-global-inet firewall policer "$POLICER_OUT" if-exceeding bandwidth-limit "$SPEED_OUT"
set dynamic-profiles svc-global-inet firewall policer "$POLICER_OUT" if-exceeding burst-size-limit 512k
set dynamic-profiles svc-global-inet firewall policer "$POLICER_OUT" then discard
set dynamic-profiles CLIENTS-IPoE interfaces demux0 unit "$junos-interface-unit" proxy-arp
set dynamic-profiles CLIENTS-IPoE interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-underlying-interface"
set dynamic-profiles CLIENTS-IPoE interfaces demux0 unit "$junos-interface-unit" family inet demux-source $junos-subscriber-ip-address
set dynamic-profiles CLIENTS-IPoE interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address lo0.0
set dynamic-profiles VLAN-IPoE interfaces demux0 unit "$junos-interface-unit" demux-source inet
set dynamic-profiles VLAN-IPoE interfaces demux0 unit "$junos-interface-unit" proxy-arp
set dynamic-profiles VLAN-IPoE interfaces demux0 unit "$junos-interface-unit" vlan-id "$junos-vlan-id"
set dynamic-profiles VLAN-IPoE interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-underlying-interface"
set dynamic-profiles VLAN-IPoE interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address lo0.0
For PPPoE user this works fine
dolp@RGW# run show subscribers extensive user-name user2383
Type: PPPoE
User Name: client2383
IP Address: 92.*.*.*
IP Netmask: 255.255.255.0
Primary DNS Address: 8.8.8.8
Secondary DNS Address: 8.8.4.4
Logical System: default
Routing Instance: default
Interface: pp0.1073966950
Interface type: Dynamic
Underlying Interface: demux0.1073931766
Dynamic Profile Name: ppp-profile
Dynamic Profile Version: 1
MAC Address: d4:ca:6d:60:77:cf
State: Active
Radius Accounting ID: 38987970
Session ID: 38987970
VLAN Id: 3242
Login Time: 2018-03-15 04:21:44 GMT-3
Service Sessions: 1
IP Address Pool: Static-POOL1
Service Session ID: 38990501
Service Session Name: svc-global-inet
Service Session Version: 2
State: Active
Family: inet
IPv4 Input Filter Name: 10m-pp0.1073966950-in
IPv4 Output Filter Name: 10m-pp0.1073966950-out
Here we have 10 mbit/sec on user interface (PPPoE)
For dhcp users it not works
Type: DHCP
User Name: OPT82NOIP.000403E60001.000678542E12C3A1
IP Address: 92.*.*.*
IP Netmask: 255.255.254.0
Primary DNS Address: 8.8.8.8
Secondary DNS Address: 8.8.4.4
Logical System: default
Routing Instance: default
Interface: demux0.1073914899
Interface type: Dynamic
Underlying Interface: xe-0/0/1.1073757248
Dynamic Profile Name: CLIENTS-IPoE
Dynamic Profile Version: 1
MAC Address: 18:a6:f7:e9:9d:db
State: Active
Radius Accounting ID: 39032423
Session ID: 39032423
VLAN Id: 998
Agent Circuit ID: len 6
00 04 03 e6 00 01
Agent Remote ID: len 8
00 06 78 54 2e 12 c3 a1
Login Time: 2018-03-16 14:14:00 GMT-3
Service Sessions: 1
DHCP Options: len 84
35 01 01 39 02 04 00 3d 07 01 18 a6 f7 e9 9d db 0c 11 54 4c
2d 57 52 38 34 31 4e 5f 57 52 38 34 31 4e 44 3c 08 4d 53 46
54 20 35 2e 30 32 04 5c 26 7c 15 37 0b 01 03 06 0f 21 2b 2c
2e 2f 79 f9 52 12 01 06 00 04 03 e6 00 01 02 08 00 06 78 54
2e 12 c3 a1
IP Address Pool: Static-POOL2
Service Session ID: 39032424
Service Session Name: svc-global-inet
Service Session Version: 2
State: Active
Family: inet
IPv4 Input Filter Name: 10m-xe-0/0/1.1073914899-in
IPv4 Output Filter Name: 10m-xe-0/0/1.1073914899-out
Not wrks filter on user interface xe-0/0/1.1073914899
I understand that I can use another dynamic profile for dhcp, but unfortunately I need use the same dynamic profile for PPPoE and DHCP users. Need help.
Thanks.