Skip to main content

Ethernet Ports

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, fibre 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 Fibre SFPs', 'Fast Ethernet Fibre SFPs' and 'Gbit Copper SFPs'.
    • 100/1000 (no PHY)1: Ports supporting Westermo 'Gbit Fibre SFPs', 'Fast Ethernet Fibre SFPs'1 and 'Gbit Copper SFPs'.
    • 1000/10000: Ports supporting Westermo '10 Gbit Fibre SFPs', 'Gbit Fibre 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 Fibre 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 Fibre 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 fibre 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

Description

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.

Options

OptionDescription
no

Disable port

[no] auto-negotiate

Description

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.

Options

OptionDescription
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]>

Description

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

Options

OptionDescription
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>

Description

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

Options

OptionDescription
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|prefer[ip|tag]>

Description

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

Options

OptionDescription
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.

prefer

For 'prefer tag', use VLAN tag (PCP) priority for an incoming VLAN tagged IP packet. For untagged IP packet, use DSCP priority. For VLAN tagged non-IP packet, use VLAN tag priority.

For 'prefer ip', use IP (DSCP) priority for an incoming VLAN tagged IP packet or an untagged IP packet. For VLAN tagged non-IP packets, use VLAN tag priority.

Use priority mode 'port' if none of the above matches.

port

Use this port's priority value, see the [no] priority <0..7> setting above.

[no] mdix-mode <auto|mdi|mdix>

Description

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).

Options

OptionDescription
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

Description

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.

Options

OptionDescription
no

Sets the default-vid to 1 on the port.

VID

default-vid for the port <1-4094>

[no] description <STRING>

Description

Specify the ports description string.

Options

OptionDescription
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

Description

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

Options

OptionDescription
no

Set the port to no learning, i.e. hub mode.

[no] gbit-cu-master [auto]

Description

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

Options

OptionDescription
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]

Description

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

Options

OptionDescription
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. Note: This option adds 10ms to fastlink down and may thereby not be used in combination with FRNT.

rate-limit

Description

Enter context to configure rate-limit for ingress and egress. For supported products it is possible to configure storm-control from this configuration context.

health-monitor

Description

Enter context to configure link health-monitor. Through health-monitor context, it is possible to configure monitoring of link state-changes.

show

Description

Show the configuration summary for the port

show detailed [PORT[,PORT...]]

Description

Show detailed port information.

If PORT(s) is specified, detailed information for the specified port(s) is shown. If no PORT is specified, information for all ports is shown.

Availability

This command will only be present if the port context is accessed with more than one port in the current context's port range. If the context is accessed with a single port the regular show command will show detailed information for that port.

Selectable Ports

Can only show detailed information for ports that are part of the current context's port range.

Example

example:/config/port-eth1..eth4/#> show detailed
[...]
example:/config/port-eth1..eth4/#> show detailed eth1
[...]
example:/config/port-eth1..eth4/#> show detailed eth1,eth2
[...]

Options

OptionDescription
PORT

The name of a port, such as eth1.

Port Rate Limit

Configuration commands for rate-limit can be found in port rate-limit context found under the port configuration context.

note

Enabling rate-limit in your network may affect the performance of protocols and redundancy services dependent on the flow of management traffic, such as FRNT, MRP, RSTP, and other services. If management traffic connected to these services start getting rate-limited their performance can not be guaranteed.

In the rate-limit configuration context it is possible to configure storm control. For examples of how storm control can be configured and used, refer to the Storm Control Howto.

example:/#> config
example:/config/#> port eth1
example:/config/port-eth1/#> rate-limit
example:/config/port-eth1/rate-limit/#>

[no] ingress <bps|fps> <8..1000000>[k|M|G] [match <TYPE> [<TYPES>]]

Description

Specify the ports ingress traffic rate limit in bits-per-second (bps) or frames-per-second (fps). 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, broadcast, multicast, and/or unknown-unicast. Set values are rounded off to the nearest possible HW setting.

Examples:

  • ingress bps 64k match bc mc
  • ingress fps 8k

Options

OptionDescription
no

Disable ingress-rate-limit on the port

RATE

An integer rate value in the range: 8-1000000. Minimum for bps is 64k. Minimum for fps is 8k.

TYPE

Type of traffic. Can be one or more of: all, bc, mc, and u-uni.

[no] egress <64..1000000>[k|M|G]

Description

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.

Options

OptionDescription
no

Disable the egress-rate-limit on the port.

RATE

An integer rate value in the range: 64-1000000.

[no] storm-control [timeout <seconds>]

Description

When ingress rate limit threshold is reached, the port will be brought down and placed into an error state.

If a timeout is set, the function will clear the error state and bring the port up when the timer runs out. The timeout can be set between 5-300 seconds, and by default, no timeout is set.

If no timeout is set, port error state needs to be manually cleared by the user. This can either be done by using the port clear-error PORT or port up PORT commands.

Options

OptionDescription
no

Disable storm-control for this port.

TIMEOUT

Timeout for port if storm-control is triggered, can be set to 5-300 seconds.

Health Monitor

Configuration commands for Health Monitor can be found in the health-monitor context under the port configuration context. Health Monitor offers the ability to monitor link state-changes. If the number of state-changes in a configured time window exceeds a configured threshold, Health Monitor places the port in Err-Disabled state. For examples of how to configure Health Monitor, refer to the Health Monitor Howto.

example:/#> config
example:/config/#> port eth1
example:/config/port-eth1/#> health-monitor
example:/config/port-eth1/health-monitor/#>

[no] state-changes threshold <THRESHOLD> window <WINDOW> [timeout <TIMEOUT>]

Description

Specify the threshold and window that should trigger a registration of Err-Disabled. An optional timeout may be given to automatically clear the error state.

If a timeout is set, the function will clear the error state when the timer runs out. The timeout can be set between 5-3600 minutes, and by default, no timeout is set.

If no timeout is set, port error state needs to be manually cleared by the user. This can either be done by using the port clear-error PORT or port up PORT commands.

Options

OptionDescription
no

Disable Health Monitor state-changes for the port(s).

THRESHOLD

An integer value in the range of 5-20.

WINDOW

An integer value in seconds, range is 30-3600.

TIMEOUT

An integer value in minutes, range is 5-3600.

For increased flexibility, Health Monitor provides a optional timeout parameter that enables it to automatically clear the error state. However, in some environments it may be preferable to keep the degraded port disabled until an operator has investigated the issue. This is done by configuring Health Monitor state-changes without a timeout.

Additionally the CLI offers the flexibility of configuring Health Monitor either on a single port or on a range of ports.

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 fibre port can contain a Digital Diagnostics Monitoring (DDM) section if supported.

[show] port [detail|up|down|clear-error] [PORTS]

Description

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
  • port clear-error eth2 Clear all errors registered on port eth2, sets operating state equal to 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
MDI/MDIX status: Invalid
Polarity status: UNKNOWN
Gbit-cu-master : auto
Fastlink       : Disabled
Flow Control   : Disabled
Prio mode      : tag
Prio           : 0
Ingress limit  : None
Egress limit   : None
Storm Control  : Disabled
Health Monitor : state-changes disabled
Shielded mode  : Unshielded
PHY power mode : Low power (CLASS B)
Bridge group   : Disabled

Error State: None (effective)

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.

Error states

Protection services such as Storm Control and Health Monitor, can place a port into an error state when they detect problematic network conditions. When a port enters an error state it is operatively disabled (shown as Err-Disabled in port status) and no traffic will be forwarded on the port.

note

Error states are not part of the device configuration. They only affect runtime (operative) state and are cleared automatically on reboot.

Viewing port error state

The show port command indicates error-disabled ports in the STATE column:

example:/#> show port
PORT             LINK     TYPE       SPEED  STATE           OWNER/VLAN         
eth1             Down      N/A  ----------  No-Link         vlan U:1
eth2             Down      N/A  ----------  No-Link         vlan U:1
eth3             Down   1000-T  ----------  Err-Disabled    vlan U:1
eth4             Up     1000-T  1000M-Full  Forwarding      vlan U:1
eth5             Up     1000-T  1000M-Full  Forwarding      vlan U:1
eth6             Up     1000-T  1000M-Full  Forwarding      vlan U:1
eth7             Down   1000-T  ----------  No-Link         vlan U:1
eth8             Down   1000-T  ----------  No-Link         vlan U:1
eth9             Down   1000-T  ----------  No-Link         vlan U:1
eth10            Down   1000-T  ----------  No-Link         vlan U:1

To see which service(s) caused the error state, use show port PORT on the specific port:

example:/#> show port eth3
eth3                                                                          
Link           : Down
Oper. status   : Disabled
Admin status   : Enabled
[...]

Error State: Err-Disabled (effective)
STATE             SERVICE          REASON                                     
Err-Disabled      Storm Control    Storm detected

Clearing port error states

There are several ways to clear error states and return a port to normal operation:

port clear-error <PORT>

Description

Clear all error states on the specified port.

port clear-error all

Description

Clear all error states on all ports.

port up <PORT>

Description

Force a port operatively up, which also clears any error states on that port.

example:/#> port clear-error eth3
example:/#>
note

Some services, such as Storm Control with a configured timeout, will automatically clear their error state after the timeout expires.

Interaction with other operations

The following operations will also clear port error states:

  • Provisioning — all error states are cleared for ports participating in provisioning when the provisioning service starts.
  • Configuration restore — using the copy command, import command, or backup restore clears all error states.

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.

Footnotes

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

  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 Fibre SFP - the system will ignore the setting as the FE Fibre standard prohibits auto-negotiation.

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