Mapping OpenConfig VLAN Commands to Junos Configuration
See OpenConfig Data Model Version topic to understand the data models supported version and its Junos OS release for Juniper Networks EX Series and QFX Series.
The following tables show the mapping of OpenConfig VLAN commands with the relevant configuration in Junos:
- Table 1: Top-level Group VLAN Configuration
- Table 2: VLAN Membership Configuration
- Table 3: MAC Table Configuration
- Table 4: Ethernet Interfaces Configuration
- Table 5: Aggregation Interfaces Configuration
- Table 6: Routed VLAN Interfaes Configuration
- Table 7: VLAN Tagged IFL Configuration
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
VLAN Name and ID |
openconfig-network-instance:network-instances { network-instance <routing-instance-name>; config { type L2VSI; } openconfig-vlan:vlans { vlan { config { name <name>; } vlan-id <id>; } } } Or: openconfig-network-instance:network-instances { network-instance <routing-instance-name>; config { type DEFAULT-INSTANCE; } openconfig-vlan:vlans { vlan { config { name <name>; } vlan-id <id>; } } } |
vlans { vlan-name; vlan-id <id>; } Or: routing-instances { <instance-name>; instance-type virtual-switch; vlans { vlan-name; vlan-id <id>; } } Or: bridge-domains { <name>; vlan-id <id>; } Or: routing-instances { <instance-name>; instance-type virtual-switch; bridge-domains { <name>; vlan-id <id>; } } |
VLAN Admin State |
openconfig-network-instance:network-instances { network-instance <routing-instance-name>; openconfig-vlan:vlans { vlan { config { status <activate | deactivate>; } } } } |
deactivate/activate { vlans <name>; } Or: deactivate/activate { routing-instances { <instance-name>; vlans <name>; } } Or: deactivate/activate { routing-instances { <instance-name>; bridge-domains <name>; } } Or: deactivate/activate { bridge-domains <name>; } |
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
Command path prefix: /oc-if:interfaces/oc-if:interface/oc-eth:ethernet/switched-vlan |
||
Interface Mode |
|
|
Native VLAN |
|
|
Trunk VLANs |
|
|
Access VLAN |
|
|
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
MAC aging time |
openconfig-network-instance:network-instances { network-instance <instance-name>; config { type L2VSI; } openconfig-fdb:fdb { config { mac-aging-time <time>; } } } Or: openconfig-network-instance:network-instances { network-instance <instance-name>; config { type DEFAULT_INSTANCE; } openconfig-fdb:fdb { config { mac-aging-time <time>; } } } |
routing-instances { <instance-name>; switch-options { mac-table-aging-time { <time>; } } } Or: switch-options { mac-table-aging-time <time>; } Note:
The |
MAC learning |
openconfig-network-instance:network-instances { network-instance <instance-name>; config { type L2VSI; } openconfig-fdb:fdb { config { mac-learning <true | false>; } } } Or: openconfig-network-instance:network-instances { network-instance <instance-name>; config { type DEFAULT_INSTANCE; } openconfig-fdb:fdb { config { mac-learning <true | false>; } } } |
routing-instances { <instance-name>; switch-options { no-mac-learning; } } Or: switch-options { no-mac-learning; } |
Maximum entries |
openconfig-network-instance:network-instances { network-instance <instance-name>; config { type L2VSI; } openconfig-fdb:fdb { config { maximum-entries <limit>; } } } Or: openconfig-network-instance:network-instances { network-instance <instance-name>; config { type DEFAULT_INSTANCE; } openconfig-fdb:fdb { config { maximum-entries <limit>; } } } |
routing-instances { <instance-name>; switch-options { mac-table-size <limit>; } } Or: switch-options { mac-table-size <limit>; } |
MAC pinning |
openconfig-network-instance:network-instances { network-instance <instance-name>; config { type L2VSI; } openconfig-interface:interfaces { interface <name> { config { mac-pinning <true | false>; } } } } Or: openconfig-network-instance:network-instances { network-instance <instance-name>; config { type DEFAULT_INSTANCE; } openconfig-interface:interfaces { interface <name> { config { mac-pinning <true | false>; } } } } |
routing-instances { <instance-name> ; switch-options { interface <name> { mac-pinning; } } } Or: switch-options { interface <name> { mac-pinning } } |
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
Interface Mode |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-ethernet:ethernet { openconfig-vlan:switched-vlan { config { interface-mode <access | trunk>; } } } } |
interfaces { <name>; unit 0; family ethernet-switching; interface-mode <access | trunk>; } |
Native VLAN |
openconfig-interfaces: interfaces { interface <name>; openconfig-if-ethernet:ethernet { openconfig-vlan:switched-vlan { config { native-vlan <id>; } } } } |
interfaces { <name>; native-vlan-id <id>; } |
Access VLAN |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-ethernet:ethernet { openconfig-vlan:switched-vlan { config { access-vlan <id>; } } } } |
interfaces { <name>; unit 0; family ethernet-switching; vlan { members <id>; } } |
Trunk VLAN |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-ethernet:ethernet { openconfig-vlan:switched-vlan { config { trunk-vlan <id>; } } } } |
interfaces { <name>; unit <unit-no>; family bridge; vlan-id { <id>; } } |
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
Interface Mode |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-aggregate:aggregation { openconfig-vlan:switched-vlan { config { interface-mode <trunk | access>; } } } } |
interfaces { <name>; unit <unit-no>; family <ethernet-switching | bridge>; interface-mode <access | trunk>; } |
Native VLAN |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-aggregate:aggregation { openconfig-vlan:switched-vlan { config { native-vlan <id>; } } } } |
interfaces { <name>; native-vlan-id <id>; } |
Access VLAN |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-aggregate:aggregation { openconfig-vlan:switched-vlan { config { access-vlan <id>; } } } } |
interfaces { <name>; unit 0; family ethernet-switching; vlan { members <id>; } } |
Trunk VLAN |
openconfig-interfaces:interfaces { interface <name>; openconfig-if-aggregate:aggregation { openconfig-vlan:switched-vlan { config { trunk-vlan <id> ; } } } } |
interfaces { <name>; unit <unit-no>; family <bridge>; vlan-id { <id>; } } |
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
Command path prefix: /oc-if:interfaces/oc-if:interface/routed-vlan |
||
VLAN |
|
Note:
To create IRB IFL, configure IPv4/IPv6 under routed VLAN hierarchy. |
Command Name |
OpenConfig Command Path |
Junos Configuration |
---|---|---|
Command path prefix: /ocif:interfaces/ocif:interface/ocif:subinterfaces/ocif:subinterface/vlan |
||
VLAN ID |
|
|