Hi Beeelzebub,
Thanks for sharing the config. This config doesn't commit post Junos 16.1 too. And it doesn't commit whichever unit (0 or otherwise) combines "inet+ethernet-switching", irrespective of whether we have a single unit or multiple units on the interface. Please see sample commit check below.
We can mix the interface families on the same interface but on different units to get different logical/sub-interfaces. And mixing families on different logical interfaces should achieve the purpose.
The interface wouldn't route and switch on the same logical interface. What's the idea of combining inet/ethernet-switching on the same unit? And on which code did that commit work earlier? If it's just that it was working earlier and commit doesn't go through now, then at best, the commit would have been allowed in error. If you know the old Junos version, we can easily validate that.
**************************************************
{master:0}[edit]
root@R4# show | compare
[edit interfaces]
+ xe-0/0/7 {
+ flexible-vlan-tagging;
+ encapsulation flexible-ethernet-services;
+ unit 0 {
+ vlan-id 10;
+ family inet;
+ family ethernet-switching {
+ interface-mode trunk;
+ vlan {
+ members vlan-8;
+ }
+ }
+ }
+ unit 20 {
+ vlan-id 20;
+ family inet {
+ address 192.168.10.11/31;
+ }
+ }
+ }
{master:0}[edit]
root@R4# commit check
[edit interfaces xe-0/0/7 unit 0 family]
'ethernet-switching'
Family ethernet-switching and rest of the families are mutually exclusive
[edit protocols]
'bgp'
warning: requires 'bgp' license
[edit protocols]
'isis'
warning: requires 'isis' license
error: configuration check-out failed: (statements constraint check failed)
{master:0}[edit]
root@R4# show interfaces xe-0/0/7 | display set
set interfaces xe-0/0/7 flexible-vlan-tagging
set interfaces xe-0/0/7 encapsulation flexible-ethernet-services
set interfaces xe-0/0/7 unit 0 vlan-id 10
set interfaces xe-0/0/7 unit 0 family inet
set interfaces xe-0/0/7 unit 0 family ethernet-switching interface-mode trunk
set interfaces xe-0/0/7 unit 0 family ethernet-switching vlan members vlan-8
set interfaces xe-0/0/7 unit 20 vlan-id 20
set interfaces xe-0/0/7 unit 20 family inet address 192.168.10.11/31
{master:0}[edit]
root@R4# delete interfaces xe-0/0/7 unit 0 family inet
{master:0}[edit]
root@R4# commit check
[edit protocols]
'bgp'
warning: requires 'bgp' license
[edit protocols]
'isis'
warning: requires 'isis' license
configuration check succeeds
{master:0}[edit]
root@R4# set interfaces xe-0/0/7 unit 20 family ethernet-switching
{master:0}[edit]
root@R4# show | compare
[edit interfaces]
+ xe-0/0/7 {
+ flexible-vlan-tagging;
+ encapsulation flexible-ethernet-services;
+ unit 0 {
+ vlan-id 10;
+ family ethernet-switching {
+ interface-mode trunk;
+ vlan {
+ members vlan-8;
+ }
+ }
+ }
+ unit 20 {
+ vlan-id 20;
+ family inet {
+ address 192.168.10.11/31;
+ }
+ family ethernet-switching;
+ }
+ }
{master:0}[edit]
root@R4# commit check
[edit interfaces xe-0/0/7 unit 20 family]
'ethernet-switching'
Family ethernet-switching and rest of the families are mutually exclusive
[edit protocols]
'bgp'
warning: requires 'bgp' license
[edit protocols]
'isis'
warning: requires 'isis' license
error: configuration check-out failed: (statements constraint check failed)
{master:0}[edit]
root@R4# delete interfaces xe-0/0/7 unit 20
{master:0}[edit]
root@R4# set interfaces xe-0/0/7 unit 0 family inet
{master:0}[edit]
root@R4# show | compare
[edit interfaces]
+ xe-0/0/7 {
+ flexible-vlan-tagging;
+ encapsulation flexible-ethernet-services;
+ unit 0 {
+ vlan-id 10;
+ family inet;
+ family ethernet-switching {
+ interface-mode trunk;
+ vlan {
+ members vlan-8;
+ }
+ }
+ }
+ }
{master:0}[edit]
root@R4# commit check
[edit interfaces xe-0/0/7 unit 0 family]
'ethernet-switching'
Family ethernet-switching and rest of the families are mutually exclusive
[edit protocols]
'bgp'
warning: requires 'bgp' license
[edit protocols]
'isis'
warning: requires 'isis' license
error: configuration check-out failed: (statements constraint check failed)
{master:0}[edit]
root@R4# run show version
fpc0:
--------------------------------------------------------------------------
Hostname: R4
Model: qfx5100-48s-6q
Junos: 18.3R1.9
**************************************************
Hope this helps.
Regards,
-r.
--------------------------------------------------
If this solves your problem, please mark this post as "Accepted Solution."
Kudos are always appreciated
.