Fast Ethernet Duplex Mismatch

Fast Ethernet (the 100Mb/s version of Ethernet) can operate in two modes: half-duplex and full-duplex. In full-duplex mode, both sides can send simultaneously. In half-duplex mode, only one network interface card at a time can send.

Some older (or cheaper) network interface cards (NICs) support only half-duplex mode; most modern cards from a brand-name manufacturer support both half-duplex and full-duplex modes. Each NIC can either have duplex mode hard-coded by the host computer's operating system, or have no preset mode. If a NIC is configured to use a certain mode, it will use it without regard for the other side of the connection. If a NIC does not have a hard-set mode, it will attempt to engage in auto-duplex negotiations with the other side. The process attempts to establish a common duplex of communication, with preference to full duplex if both sides support it; on a connection that is not fully switched, full-duplex communication makes no sense, so the auto-negotiation process attempts to discover if more than one other NIC is present and uses half-duplex mode if it senses more than one other NIC. This process works fairly well for modern cards, but for old cards it used to have success rate of 52% (anecdotally), in other words, the results were essentially random.

If the two sides of a switched Fast Ethernet connection disagree on the duplex mode they use (i.e., one is using full-duplex mode and the other is using half-duplex mode), a duplex mismatch is said to occur.

A Fast Ethernet duplex mismatch can happen in one of the following ways (not meant to be an exhaustive list of causes):

  1. One card is hard-coded to use full-duplex (often the switch side but it might be the host side, if you or your system administrator set it that way) and the other is set to auto-configure: the full-duplex side will not participate in negotiation and the auto-negotiating side will assume half-duplex mode to be conservative;
  2. Both cards are set to auto-configure, but one or both of them is old or cheap and handles auto-configuration poorly (the odds also happened to work against you during this boot cycle); note that in this case, the problem will occur in roughly 50% of cases and rebooting (or resetting the interface by bringing it down and up again on) either end will clear the problem with about 50% probability;
  3. The two cards are hard-coded to use different duplex modes;
  4. One card is hard-coded to use full-duplex mode and the other side only supports half-duplex mode;
  5. Both cards are relatively new and use brand-name chipsets from different manufacturers that do not inter-operate particularly well and you are unlucky this boot cycle.

The symptoms seen by the hosts will be the same regardless of the cause.

When duplex mismatch happens, a peculiar breakdown in communication occurs; an attempt to analyze it will be made here (the analysis is tentative). Denote the NIC that thinks that the connection is in full-duplex mode F and the NIC that thinks that the connection is in half-duplex mode H. F sends data whenever it has any and can receive data at any time; H does not receive bits while sending. Thus, frames going from H to F will sometimes be lost if there are frames going in the opposite direction. Frames going from H to F should not suffer. Assume that TCP data flow is essentially unidirectional. Denote the NIC on whose side the sender is located S, and the NIC on which the receiver is located R. A stream of MTU-sized frames will go from S to R and a stream (with typically half as many frames per second) of small frames containing packets that are TCP ACKs will go from R to S. ACKs are cumulative: if an ACK is lost and subsequent ACK is delivered, the same information is conveyed (and the effect of missed increment of TCP congestion window is mild). Consider two cases:

  1. S=F, R=H: Data frames go from F to H, and can be lost whenever H is transmitting a frame containing an ACK packet. About 39 bytes are transmitted from H to F for every 1514 bytes in the opposite direction and the probability of missed bits in any given packet sent from F to H could be as much as 2-3%. This will have ruinous effect on TCP throughput: with RTT=70ms, no more than roughly 100kb/s can be transmitted. With low WAN jitter, significant correlation between times of arrival of frames going in the opposite directions can be present; it can make throughput larger or smaller. However, it will usually not exceed 1Mb/s for transcontinental links.
  2. S=H, R=F: Data frames go from H to F and are normally not lost. A large percentage of frames from F to H containing ACKs will, however, be lost. If a link is fully used from H to F, almost all ACKs would be lost, and congestion window would stop increasing. Occasional losses in the data stream would make one reduce congestion window. Moreover, with many ACKs lost, fast retransmit is unlikely to happen, so the connection is likely to go into a timeout and then slow start. When link is only moderately used, significant percentage of ACKs get through, so TCP is sufficiently aggressive to sustain the rate. Overall, while TCP performance suffers badly, the effect is not nearly as catastrophic and pronounced than in the first case. (In this case, a window-size-limited TCP connection would do best if window is chosen to so that throughput is limited by, e.g., 30Mb/s. It is, of course, easier and better to fix the duplex mismatch.)

A duplex mismatch can be detected by two means:

  1. TCP throughput is asymmetrical (perhaps an order of magnitude more in one direction than in the other);
  2. Interface error counters (CRC errors and the like) or TCP `discarded for bad checksum' (viewable with `netstat -s') counters increase while data are sent (note that no particular value of these counters is `bad'; only increase is meaningful).

Do not take preventive action with respect to duplex mismatch: If you don't have it, leave the configuration of duplex as it was before (you might experiment with it to see if duplex mismatch is indeed the problem; if it isn't return everything to the state it was before you started).

To correct a duplex mismatch problem, you should set both NICs to auto-negotiate, if both cards are relatively new brand-name cards. If the cards are very old, or cheap no-name cards, or if you ascertain that auto-negotiation fails, hard-code both to the same duplex mode; if both cards support full duplex, use it; if you cannot use full duplex and hard-code both to half duplex, do not expect more than perhaps 20Mb/s with TCP.

 


Client List
Partners
Press Releases
Client Comments
Past Projects
Information Request


Net Health Check
Net Performance Review
Vulnerability Assessment
Banking I/T Assessment
NetSentry Monitoring
Frame Relay Analysis
VoIP Readiness
Custom Services
NetDocs Documentation
On-Site Training


NetLogger
NetSpector
Technical Reference






 

 


About NPI | Contact Us | Services | Tools | Site Map | Reseller Programs
Professional Ethics | Privacy
Copyright 1993-2006 Network Partners, Inc. All rights reserved