Ethernet Ports

Table of contents

Introduction

This page describes settings related to Ethernet ports. Ethernet ports enable connectivity between units using LAN technology. By default all Ethernet ports on a WeOS unit are bridged and associated with VLAN 1. Thus, by default a WeOS unit acts as a manageable switch. It is possible to move ports to different VLANs. It is also possible let an Ethernet port become a standalone network interface, see VLAN and Interface configuration pages.

For details on port settings related to priority handling, see the Layer-2 QoS Configuration page.

Port Naming and Listing

Ethernet ports are named eth1, eth2, etc. The exception is products with M12 connectors, e.g., the Westermo Viper products, where Ethernet ports are named ethX1, ethX2, etc.

example:/#> show port
PORT             LINK     TYPE       SPEED  STATE           OWNER/VLAN         
eth1             Up     1000-T  1000M-Full  Forwarding      vlan U:1
eth2             Up     1000-T   100M-Full  Forwarding      vlan U:1
eth3             Down   1000-T  ----------  No-Link         vlan U:1
eth4             Down   1000-T  ----------  No-Link         vlan U:1
eth5             Down   1000-T  ----------  No-Link         vlan U:1
eth6             Down   1000-T  ----------  No-Link         vlan U:1
eth7             Down   1000-T  ----------  No-Link         vlan U:1
eth8             Down   1000-T  ----------  No-Link         vlan U:1
eth9             Down   No-SFP  ----------  No-Link         vlan U:1
eth10            Up     100-FX   100M-Full  Forwarding      vlan U:1
eth11            Up    1000-LX  1000M-Full  Forwarding      vlan U:1
eth12            Down   No-SFP  ----------  No-Link         vlan U:1
Speed formatted as, e.g. 100-Full denotes static speed-duplex links.
example:/#> 

To specify a range of ports in CLI, use double dots (eth1..eth3), and comma to form a list (eth1,eth5,eth9).

example:/config/#> vlan 2
example:/config/vlan-2/#> untagged eth1..eth3,eth5
Moving untagged port eth1 from vid 1 to vid 2.
Moving untagged port eth2 from vid 1 to vid 2.
Moving untagged port eth3 from vid 1 to vid 2.
Moving untagged port eth5 from vid 1 to vid 2.
example:/config/vlan-2/#> 

Types of Ethernet ports

Ethernet ports can be (fixed) copper ports or SFP ports. SFP ports can be used with Westermo SFP ports, fiber or copper SFPs.

Port speeds vary for the different port types and SFP types. For details and canonical reference, see the data sheet of your WeOS product.

  • Fixed Copper Ports: These ports are commonly referred to as Fast Ethernet (FE) or Gbit Ethernet copper ports.
    • 10/100: Ports supporting 10BASE-T and 100BASE-TX.
    • 10/100/1000: Ports supporting 10BASE-T, 100BASE-TX and 1000BASE-T.
  • SFP Ports:
    • 100/1000: Ports supporting Westermo ‘Gbit Fiber SFPs’, ‘Fast Ethernet Fiber SFPs’ and ‘Gbit Copper SFPs’.
    • 100/1000 (no PHY)1: Ports supporting Westermo ‘Gbit Fiber SFPs’, ‘Fast Ethernet Fiber SFPs’1 and ‘Gbit Copper SFPs’.
    • 1000/10000: Ports supporting Westermo ‘10 Gbit Fiber SFPs’, ‘Gbit Fiber SFPs’ and ‘Gbit Copper SFPs’.

SFPs are not hot pluggable, i.e., inserting a new type of SFP will need a reboot of the device.

Configuration

Configuration of network ports is done in the port context. An example of how to configure port eth1:

example:/#> configure
example:/config/#> port eth1
example:/config/port-eth1/#>

Configuring port speed/duplex settings

For examples, see the Port Speed/Duplex Howto.

There are two settings related to configuration of port speed and duplex mode. Auto-negotiation is enabled by default, and speed-duplex which will advertise all supported modes for the port type. The default settings are sufficient for almost all use cases.

example:/config/port-eth1/#> show auto-negotiate
Enabled
example:/config/port-eth1/#> show speed-duplex
Auto
example:/config/port-eth1/#>

Tweaking speed-duplex settings be done in two ways: either to disable auto-negotiation and use a fixed speed-duplex mode, or to control the advertisement mask.

  • Enable/disable auto-negotiation: Auto-negotiation is enabled by default, but can be enabled/disabled2 per port via the [no] auto-negotiate setting.
  • Advertisement mask: The second setting is used to control what speed/duplex mode(s) to offer during the auto-negotiation (fine-tuning the advertisement mask). The command is [no] speed-duplex <LIST>. The default is no speed-duplex (same as speed-duplex auto), which means that “all” applicable modes are advertised.

Applicable mode depends on the PHY/port type

On fixed FE copper ports, speed/duplex can be 10-half, 10-full, 100-half and 100-full. Thus, no speed-duplex means that these four modes will be advertised in the auto-negotiation. Any attempt to configure any other more mode (say speed-duplex 1000-full) will be rejected. Fixed Gbit copper ports support the same modes, but also 1000-half and 1000-full.

When configuring SFP ports, all modes of the internal SFP PHY apply. For example, if speed-duplex 100-full, 1000-full is configured, then only “1000-full” effectively applies if a Gbit Fiber SFP is inserted. If the system cannot apply the configured setting the port will not come up, e.g., if setting speed-duplex 1000-full and inserting a FE Fiber SFP. Again, using the default settings (auto-negotiation with all applicable speed-duplex modes enabled) will be sufficient in almost all use cases.

Configuring a fixed speed-duplex

To limit a port to use a specific speed-duplex mode you should configure the speed-duplex setting to that mode (e.g., 100-full). Optionally, you could also disable auto-negotiation.

Disabling auto-negotiation is preferred when the peer does not use auto-negotiation. However, keeping auto-negotiation enabled is generally recommended, as it improves interoperability with other auto-negotiating devices (§37.1.4.4 of 3).

example:/config/#> port eth1
example:/config/port-eth1/#> speed-duplex 100-full
example:/config/port-eth1/#> no auto-negotiate
example:/config/port-eth1/#>

Note

It is not strictly necessary to select a single speed-duplex mode. If auto-negotiation is disabled when the speed-duplex setting specifies multiple modes, the best applicable mode will be used as fixed mode. This is always the case for FE fiber SFPs, as auto-negotiation does not apply if enabled.

CLI Configuration Command Syntax

Configuration commands are available in the Port Configuration Context.

example:/#> config
example:/config/#> port eth1
example:/config/port-eth1/#> 
[no] enable

This setting controls if the port is enabled or disabled. If the port is disabled the network link will go down and no network activity is possible.

no
Disable port
[no] auto-negotiate

This setting controls the port’s ability to transmit auto-negotiate frames to a link partner. It is used in combination with speed-duplex when a single speed-duplex setting is given, this setting controls if static mode or auto-neg for a single setting is to be transmitted.

no

Disable auto-negotiation

No auto-negotiation will be performed

auto-negotiate
Use auto-negotiation to resolve speed and duplex
[no] speed-duplex <auto | SPEED_DUPLEX[,SPEED_DUPLEX]>

This setting controls the speed and duplex of the port or the advertisement mask if auto-negotiation is used.

auto
Default use all possible speed duplex combinations that is possible for this port.
SPEED_DUPLEX
Speed and duplex combination such as 100-half.
[no] priority <0..7>

This setting controls the port priority. See Layer-2 QoS for details. Default: 0

value
Priority value (0..7) according to 802.1p where 7 means the highest priority.
no
Reset port priority to default (0).
[no] priority-mode <tag|ip|port>

This setting configures the port’s priority mode. See Layer-2 QoS for details. Default: tag

no
Reset to this port’s priority mode to default (tag).
tag
Use the VLAN tag (PCP) priority value of incoming frame.
ip
Use the IP QoS/DSCP priority field of incoming packet.
port
Use this port’s priority value, see the [no] priority <0..7> setting above.
[no] ingress-rate-limit RATE [match <TYPE>[,<TYPE>,...]]

Specify the ports ingress traffic rate limit in kbps. It is possible to use ISO modifiers k/M/G, e.g., 256k or 10M as specifiers for kbps and Mbps. TYPE can be one or more of: all,bc,mc and u-uni. Set values are rounded off to the nearest possible HW setting.

no
Disable the ingress-rate-limit on the port.
RATE
An integer rate value in the range: 64-1000000.
TYPE
Type of traffic. Can be one or more of: all,bc,mc and u-uni.
[no] egress-rate-limit RATE

Specify the ports egress traffic rate limit in kbps. It is possible to use ISO modifiers k/M/G, e.g., 256k or 10M as specifiers for kbps and Mbps. Set values are rounded off to the nearest possible HW setting.

no
Disable the egress-rate-limit on the port.
RATE
An integer rate value in the range: 64-1000000.
[no] mdix-mode <auto|mdi|mdix>

Specify the ports MDI/MDIX crossover settings. By default, the port is able to sense the which pin to use to get link, auto MDI/MDIX (Media Dependent Interface/crossover).

no
Sets the default auto MDI/MDIX mode on the port.
auto
See no above
mdi
Fixed MDI/MDIX setting, use the tx pair for transmit.
mdix
Fixed MDI/MDIX setting, use the tx pair to receive.
[no] default-vid VID

Specify the fallback default VID for the untagged frames on the port. This only applies if the port is not associated untagged with any VLAN.

no
Sets the default-vid to 1 on the port.
VID
default-vid for the port <1-4094>
[no] description <STRING>

Specify the ports description string.

no
Disable the ports description string.
STRING
Free form description of this port, with a maximum length of 32 characters, The string can be up to 32 characters long and any combination of printable ASCII characters in range [32-126]
[no] learning

Set learning (switch/hub) mode, default enabled.

no
Set the port to no learning, i.e. hub mode.
[no] gbit-cu-master [auto]

This setting enables manual configuration of the master/follower for the clock sync on Gbit Ethernet. Default is auto.

gbit-cu-master auto
This sets the master/follower for the clock sync on Gbit Ethernet to automatic mode. This is the default.
gbit-cu-master
This sets the master/follower for the clock sync on Gbit Ethernet to manual master mode.
no gbit-cu-master
This sets the master/follower for the clock sync on Gbit Ethernet to manual follower mode.
[no] fastlink [1000-t-up]

This settings enables the fastlink functionality if it’s supported on the port. Fastlink minimizes the time for the port to detect link loss on Gbit ports.

no
Disable fastlink.
1000-t-up
Enables fastlink up for Gbit copper Ethernet. This may only be set in combination with speed-duplex 1000-full, master/follower manual config and manual mdi/mdix config. This adds 10ms to fastlink down and may thereby not be used in combination with FRNT.
show
Show the configuration summary for the port

Port Status

In order to verify a ports setting the show command can be used in admin-exec context. Note that this output can differ for different port types. For example, an SFP fiber port can contain a Digital Diagnostics Monitoring (DDM) section if supported.

[show] port [detail|up|down] [PORTS]

Manage or show port status.

This command can be used to display the status of all physical ports, or manage runtime (operative) state of one or more ports for debugging.

Examples:

  • show port Displays a brief overview of port status
  • show port detail Displays a more detailed view
  • show port eth2 Displays detailed status for port Ethernet port 2
  • port up eth2 Force port eth2 operatively up
  • port down eth2 Force port eth2 down, regardless of admin state
Host-1:/#> show port eth7
eth7                                                                          
Link           : Up
Oper. status   : Enabled
Admin status   : Enabled
Description    : eth7
Type           : 1000-T
State          : Forwarding
Alarm          : N/A
VLAN           : U:1
MAC            : 00:07:7c:53:df:87
Autoneg        : Disabled
Speed          : 100M
Duplex         : Full
MDI/MDIX       : Auto
Gbit-cu-master : N/A
Fastlink       : Disabled
Flow Control   : Disabled
Prio mode      : tag
Prio           : 0
Ingress limit  : 0 match all
Egress limit   : 0 kbps
Shielded mode  : Unshielded
PHY power mode : Low power (CLASS B)

This shows that the port is a Gigabit copper port (1000-T) and that it is enabled and has a link. It is only running at 100 Mbit/s speed and it is not using auto-negotiation. This is also indicated by the underline under the speed and duplex entries.

SNMP support

The IF-MIB can be used to view and manage Ethernet port status. Ethernet ports are represented in IF-MIB as ifType ethernetCsmacd(6). The MAU-MIB can be used to view and manage port speed-duplex settings.

See release zip for details on MIB conformance.


  1. Some products with 100/1000 SFP ports need a special type of Westermo 100 Mbit/s Fiber SFP to operate at 100 Mbit. See the data sheet of your Westermo product. 

  2. More precisely, the system will use the configured [no] auto-negotiate setting if applicable. In particular, it is OK to enable auto-negotiation in an SFP port with a FE Fiber SFP - the system will ignore the setting as the FE Fiber standard prohibits auto-negotiation. 

  3. IEEE 802.3-2012 Clause 37: “Auto-Negotiation function, type 1000BASE-X”