This article explains the difference of behavior in executing 'commit check' after the same interface configuration changes between L2NG switches and Legacy switches.
'commit check'
On L2NG switches (EX4300, EX4600, EX9200 and QFX series), 'commit check' will allow an interface to be a member of a non-existing vLAN using vlan-id. This is a valid configuration:
{master:0}[edit] root# show | compare [edit interfaces] + xe-0/0/0 { + unit 0 { + family ethernet-switching { + vlan { + members 10; + } + } + } + } {master:0}[edit] root# commit check configuration check succeeds
{master:0}[edit] root# show | compare [edit interfaces] + xe-0/0/11 { + unit 0 { + family ethernet-switching { + vlan { + members TEST; + } + } + } + } {master:0}[edit] root# commit check error: In routing-instance default-switch vlan TEST configured under interface xe-0/0/11.0 does not exist error: configuration check-out failed
On L2NG switches, the behavior above is expected. The vlan-id is allowed on an interface as a pre-provision to introduce flexibility. The actual vLAN gets programmed after the vLAN is configured.
This behavior is different on Legacy EX switches (EX2200, EX3300, EX4200, EX4500, EX4550, EX6200, EX8200) where commit check will generate an error when configuring an interface to be a member of a non existing vLAN.