"vlan-id-range" can only support L2 encapsulation
Customer may configured vlan-id-range with L3 IFL interface.
Refer below example:set interfaces xe-0/2/0 flexible-vlan-taggingset interfaces xe-0/2/0 encapsulation flexible-ethernet-servicesset interfaces xe-0/2/0 unit 100 vlan-id-range 100-200set interfaces xe-0/2/0 unit 100 family inet address 192.168.0.1/24
The commit check will pass and logical interface can be created normally.
user@mx# run show interfaces xe-0/2/0.100
Logical interface xe-0/2/0.100 (Index 334) (SNMP ifIndex 577)
Flags: Up SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.100-200 ] Encapsulation: ENET2
Input packets : 411764
Output packets: 19
Protocol inet, MTU: 1500
Max nh cache: 75000, New hold nh limit: 75000, Curr nh cnt: 0, Curr new hold cnt: 0, NH drop cnt: 0
Flags: Sendbcast-pkt-to-re
Addresses, Flags: Is-Default Is-Preferred Is-Primary
Destination: 192.168.0/24, Local: 192.168.0.1, Broadcast: 192.168.0.255
Protocol multiservice, MTU: Unlimited
But only first vlan can sent out arp reply, for above example, only vlan 100 sends out arp reply.
"vlan-id-range" is used for L2(ccc/vpls/bridge) encapsulation.
For subscribers with different vlan and share same gateway, solution should be packet trigger service.We need to create vlan and set vlan-id for each logical interface.Example for "vlan 100" and "vlan 101" as below:set interfaces xe-0/2/0 flexible-vlan-taggingset interfaces xe-0/2/0 unit 100 demux inet address sourceset interfaces xe-0/2/0 unit 100 demux inet auto-configure address-ranges dynamic-profile static network 192.168.0.0/24 range r1 low 192.168.0.2/32set interfaces xe-0/2/0 unit 100 demux inet auto-configure address-ranges dynamic-profile static network 192.168.0.0/24 range r1 high 192.168.0.200/32set interfaces xe-0/2/0 unit 100 vlan-id 100set interfaces xe-0/2/0 unit 100 family inet unnumbered-address lo0set interfaces xe-0/2/0 unit 100 family inet unnumbered-address preferred-source-address 192.168.0.1set interfaces xe-0/2/0 unit 101 demux inet address sourceset interfaces xe-0/2/0 unit 101 demux inet auto-configure address-ranges dynamic-profile static network 192.168.0.0/24 range r1 low 192.168.0.2/32set interfaces xe-0/2/0 unit 101 demux inet auto-configure address-ranges dynamic-profile static network 192.168.0.0/24 range r1 high 192.168.0.200/32set interfaces xe-0/2/0 unit 101 vlan-id 101set interfaces xe-0/2/0 unit 101 family inet unnumbered-address lo0.0set interfaces xe-0/2/0 unit 101 family inet unnumbered-address preferred-source-address 192.168.0.1set interfaces lo0 unit 0 family inet address 192.168.0.1/32 preferredset dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" no-trapsset dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" proxy-arp restrictedset dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-underlying-interface"set dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" family inet mac-validate strictset dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" family inet demux-source $junos-subscriber-ip-addressset dynamic-profiles static interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address lo0.0Once subscriber with static configured address sent packet to mx, the dyn-ip subscriber will be created.
user@mx# run show subscribersInterface IP Address/VLAN ID User Name LS:RIdemux0.3221225487 192.168.0.2 default:defaultdemux0.3221225488 192.168.0.3 default:defaultuser@mx# run show subscribers extensiveType: DYN-IPIP Address: 192.168.0.2Logical System: defaultRouting Instance: defaultInterface: demux0.3221225487Interface type: DynamicUnderlying Interface: xe-0/2/0.100Dynamic Profile Name: staticMAC Address: 00:10:94:00:00:02State: ActiveSession ID: 20PFE Flow ID: 66VLAN Id: 100Login Time: 2024-02-28 17:01:32 CSTType: DYN-IPIP Address: 192.168.0.3Logical System: defaultRouting Instance: defaultInterface: demux0.3221225488Interface type: DynamicUnderlying Interface: xe-0/2/0.101Dynamic Profile Name: staticMAC Address: 00:10:94:00:00:03State: ActiveSession ID: 21PFE Flow ID: 68VLAN Id: 101Login Time: 2024-02-28 17:01:33 CSTuser@mx# run show route 192.168.0.2inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both192.168.0.2/32 *[Access-internal/12] 00:13:32 Private unicastuser@mx# run show route 192.168.0.3inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both192.168.0.3/32 *[Access-internal/12] 00:13:35 Private unicast