Speed/Duplex

Summary

This chapter concerns port speed and duplex settings on Ethernet ports. The default settings aim to automatically bring up ports with the best speed and duplex modes. Thus, as a user you typically do not need to do anything.

In this chapter you will learn:

  • how you can configure ports to use speed/duplex auto-negotiation or a fixed speed/duplex mode
  • how you can tune the auto-negotiation advertisement mask
  • about differences in speed/duplex characteristics on fixed copper ports and SFP ports

Introduction

Ethernet ports on WeOS products can either be fixed copper ports (Gbit or Fast Ethernet(FE)), or SFP ports.

Gbit copper ports are capable of operating at 10, 100 and 1000 Mbit/s speeds, and in half and full duplex mode. Similarly, FE copper ports can operate at 10 or 100 Mbit/s, and in half and full duplex. Although static configuring is possible, the speed/duplex mode is typically auto-negotiated between the peers of a link (1 and 2).

The SFP ports can be used fiber SFPs, while support for copper SFPs is pending. When using Fiber SFPs, the speed depends on the used SFP type, either 1000 Mbit/s (Gbit fiber SFP) or 100 Mbit/s (FE fiber SFP). Only full duplex is used. Auto-negotiation of duplex-mode (and flow control) is possible when using Gbit fiber SFPs(2), but not on FE fiber SFPs.

Configuring port speed/duplex settings in WeOS

There are two settings related to configuration of port speed and duplex mode.

  • Enable/disable auto-negotiation: Auto-negotiation is enabled by default, but can be enabled/disabled per port via the “[no] auto-negotiation” 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.

The “speed-duplex” setting also affects what specific speed/duplex mode to use in case auto-negotiation is disabled (“no auto-negotiation”).

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 (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. Currently the WeOS 5 products have SFPs with internal Gbit PHYs (10/100/1000 and half/full duplex), but in the future there will also be SFP ports capable of 10 Gbit/s speeds. The speed/duplex modes configured for an SFP port are then evaluated when detecting the type of SFP inserted; only the valid modes are applied. For example, if “speed duplex 100-full, 1000-full” is configured, then only “1000-full” effectively applies if a Gbit Fiber SFP is inserted.

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

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.

Typical scenarios

Default settings aim for plug and play

The default settings for speed-duplex aims for plug and play. The examples below describe the behaviour when connecting two WeOS 5.x units, but likely they also apply when connecting a WeOS 5.x unit with some other unit.

Fixed copper ports

Auto-negotiation will result in 1000-full when connecting two Gbit copper ports, 100-full when connecting two FE ports or a Gbit with an FE port.

Fiber SFPs

Auto-negotiation will result in 1000-full when connecting two Gbit Fiber SFPs. When connecting two FE Fiber SFPs, the link will operate in 100-full (without auto-negotiation). If a Gbit and a FE Fiber SFP are connected, the link will not come up.

There are many different types of Gbit and Fiber SFP technologies (multi-mode, single mode, BiDi, etc.), thus it is not only the speed which need to match.

Configuring auto-negotiation advertisement

Auto-configuration enables the peers to agree on the best common speed/duplex mode. Assume the peer is using auto-negotiation, and you wish to limit the speed to 10 Mbit/s. Then you could set “speed-duplex 10-full” or “speed-duplex 10-half, 10-full”. The link will come up in 10-full if the peer supports that mode.

When both peers use auto-negotiation, but have no common mode, the link will not come up.

Trouble-shooting

Only one peer using auto-negotiation

If one side has auto-negotiation enabled while the peer has not, the link is likely to come up with the right speed, but wrong duplex mode.

Consider the case when A-side uses auto-negotiation, and B is set to 100-full: The result will be that A sets its port to 100-half (it can determine the speed, but not the mode, see §28.2.3.1 of 1).). B sets link to 100-full. When reading the RMON counters, A is likely to report lots of ‘late collision’ errors, while B is likely so report ‘rx checksum’ errors.

Mismatching fixed configurations

If A and B both disable auto-configuration, they must set the same speed-duplex mode. If the speeds do not match, the link will not come up. If the speed matches, but not the duplex mode (e.g., 100-full and 100-half), the link will come up but the same kind of error as described in the previous section.

SNMP support

SNMP support for speed-duplex is pending in WeOS 5.x. The applicable standard MIB is RFC4836 MAU-MIB (ifMauTable and ifMauAutoNegTable)

References


  1. IEEE 802.3-2012 Clause 28: “Physical Layer link signalling for Auto-Negotiation on twisted pair” 

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