Port Role Configuration with the J-Web Interface (with CLI References)
When you configure Gigabit Ethernet interface properties with the J-Web interface (Configure > Interfaces) you can optionally select pre-configured port roles for those interfaces. When you select a role from the Port Role field and apply it to a port, the J-Web interface modifies the switch configuration using CLI commands. Table 1 lists the CLI commands applied for each port role.
![]() |
Note: If there is an existing port role configuration, it is cleared before the new port role configuration is applied. |
Table 1: Port Role Configuration Summary
Configuration Description |
CLI Commands |
---|---|
Default Port Role |
|
Set the port role to Default. |
set interfaces interfaceapply-macro
juniper-port-profile Default |
Set port family to ethernet-switching. Set port mode to access. |
set interfaces interface unit
0 family ethernet-switching port-mode access |
Enable RSTP if redundant trunk groups are not configured. |
delete protocols rstp interface interface disable |
Disable RSTP if redundant trunk groups are configured. |
set protocols rstp interface interface disable |
Desktop Port Role |
|
Set the port role to desktop. |
set interfaces interface apply-macro
juniper-port-profile Desktop |
Set VLAN if new VLAN is specified. |
set vlans <vlan name> vlan-id <vlan-id>
|
Set port family to ethernet-switching. Set Port Mode to Access. |
set interfaces interface unit
0 family ethernet-switching port-mode access |
Set VLAN if new VLAN is specified. |
set interfaces interface unit
0 family ethernet-switching vlan members vlan-members |
Set port security parameters. |
set ethernet-switching-options secure-access-port
vlan MacTest arp-inspection |
Set RSTP protocol with edge option. |
set protocols rstp interface interface edge |
RSTP protocol is disabled if redundant trunk groups are configured. |
set protocols rstp interface interface disable |
Desktop and Phone Port Role |
|
Set the port role to desktop and phone. |
set interfaces interfaceapply-macro
juniper-port-profile Desktop and Phone |
Set data VLAN if new VLAN is specified. Set voice VLAN if new voice VLAN is specified. |
set vlans vlan-namevlan-id vlan id |
Set port family to ethernet-switching. Set Port Mode to access. |
set interfaces interfaceunit
0 family ethernet-switching port-mode access |
Set data VLAN on port stanza. |
set interfaces interface unit
0 family ethernet-switching vlan members vlan-members |
Set port security parameters. |
set ethernet-switching-options secure-access-port
vlan MacTest arp-inspection |
Set VOIP VLAN. |
set ethernet-switching-options voip interface interface.0
vlan vlan vlan name
|
Set class of service parameters SCHEDULER_MAP=juniper-port-profile-map IEEE_CLASSIFIER=juniper-ieee-classifier DSCP_CLASSIFIER=juniper-dscp-classifier |
set class-of-service interfaces interfacescheduler-map juniper-port-profile-map set class-of-service interfaces interface unit 0 classifiers ieee-802.1 juniper_ieee_classifier set class-of-service interfaces interfaceunit 0 classifiers dscp juniper-dscp-classifier |
Set CoS Configuration |
Refer Table 2 for details. |
Wireless Access Point Port Role |
|
Set the port role to wireless access point. |
set interfaces interface apply-macro
juniper-port-profile Wireless Access Point |
Set VLAN on VLANs stanza. |
set vlans vlan namevlan-id vlan-id |
Set port family to ethernet-ewitching Set port mode to Access. |
set interfaces interface unit
0 family ethernet-switching port-mode access |
Set VLAN on port stanza. |
set interfaces interface unit
0 family ethernet-switching vlan members vlan-members |
Set RSTP protocol with edge option. |
set protocols rstp interface interface edge |
RSTP protocol is disabled if redundant trunk groups are configured. |
set protocols rstp interface interface disable |
Routed Uplink Port Role |
|
Set the port role to Routed Uplink. |
set interfaces interface apply-macro
juniper-port-profile Routed Uplink |
Set port family to inet. Set IP address on the port. |
set interfaces interfaceunit
0 family inet address ipaddress
|
Set class-of-service parameters SCHEDULER_MAP=juniper-port-profile-map IEEE_CLASSIFIER=juniper-ieee-classifier DSCP_CLASSIFIER=juniper-dscp-classifier |
set class-of-service interfaces interfacescheduler-map juniper-port-profile-map set class-of-service interfaces interface unit 0 classifiers ieee-802.1 juniper_ieee_classifier set class-of-service interfaces interfaceunit 0 classifiers dscp juniper-dscp-classifier |
Set CoS configuration |
Refer Table 2 for details. |
Layer 2 Uplink Port Role |
|
Set the port role to Layer 2 Uplink. |
set interfaces interface apply-macro
juniper-port-profile Layer2 Uplink |
Set port family to ethernet-switching Set port mode to trunk. |
set interfaces interface unit
0 family ethernet-switching port-mode trunk |
Set Native VLAN name. |
set interfaces interface unit
0 family ethernet-switching native-vlan-id vlan-name |
Set the port as part of all valid VLANs; ā€¯valid" refers to all VLANs except native VLAN and voice VLANs. |
set interfaces interface unit
0 family ethernet-switching vlan members vlan-members |
Set port security parameter. |
set ethernet-switching-options secure-access-port
dhcp-trusted |
Set RSTP protocol with point-to-point option. |
set protocols rstp interface interface mode point-to-point |
Disable RSTP if redundant trunk groups are configured. |
set protocols rstp interface interface disable |
Set class-of-service parameters. SCHEDULER_MAP=juniper-port-profile-map IEEE_CLASSIFIER=juniper_ieee_classifier DSCP_CLASSIFIER=juniper_dscp_classifier |
set class-of-service interfaces interfacescheduler-map juniper-port-profile-map set class-of-service interfaces interface unit 0 classifiers ieee-802.1 juniper_ieee_classifier set class-of-service interfaces interfaceunit 0 classifiers dscp juniper-dscp-classifier |
Set CoS configuration |
Refer to Table 2 for details. |
Table 2 lists the CLI commands for the recommended CoS settings that are committed when the CoS configuration is set.
Table 2: Recommended CoS Settings for Port Roles