duplex mismatch

Duplex mismatch due to auto negotiation

When a device set to auto negotiation is connected to a device that is not using auto negotiation, the auto negotiation process fails. The auto negotiating end of the connection is still able to correctly detect the speed of the other end, but cannot correctly detect the duplex mode. For backwards compatibility with Ethernethubs, the standard requires the auto negotiating device to use half duplex in these conditions.Therefore, the auto negotiating end of the connection uses half duplex while the non-negotiating peer is locked at full duplex, and this is a duplex mismatch.

The Ethernet standards and major Ethernet equipment manufacturers recommend enabling auto negotiation. Nevertheless, network equipment allows auto negotiation to be disabled and on some networks, auto negotiation is disabled on all ports and a fixed modality of 100 Mbit/s and full duplex is used. That was often done by network administrators intentionally upon the introduction of auto negotiation,because of interoperability issues with the initial auto negotiation specification. The fixed mode of operation works well if both ends of a connection are locked to the same settings. However, maintaining such a network and guaranteeing consistency is difficult. Since auto negotiation is generally the manufacturer’s default setting it is almost certain that, in an environment where the policy is to have fixed port settings, someone will sooner or later leave a port set to use auto negotiation by mistake.

Effects of duplex mismatch

Communication is possible over a connection inspite of a duplex mismatch. Single packets are sent and acknowledged withoutproblems. As a result, a simple ping command fails to detect a duplex mismatch because single packetsand their resulting acknowledgments at 1-second intervals do not cause anyproblem on the network. A terminal session which sends data slowly (in veryshort bursts) can also communicate successfully. However, as soon as either endof the connection attempts to send any significant amount of data, the networksuddenly slows to very low speed. Since the network is otherwise working, thecause is not so readily apparent.

A duplex mismatch causes problems whenboth ends of the connection attempt to transfer data at the same time. Thishappens even if the channel is used (from a high-level or user's perspective)in one direction only, in case of large data transfers. Indeed, when a largedata transfer is sent over a TCP, data is sent in multiple packets, some of which will trigger anacknowledgment packet back to the sender. This results in packets being sent inboth directions at the same time.

In such conditions, the full-duplex endof the connection sends its packets while receiving other packets; this isexactly the point of a full-duplex connection. Meanwhile, the half-duplex endcannot accept the incoming data while it is sending – it will sense it asa collision. The half-duplex device ceases its current datatransmission, sends a jam signal instead and then retries later as per CSMA/CD. This results in the full-duplex side receiving anincomplete frame with CRC error or a runtframe. It does notdetect any collision since CSMA/CD is disabled on the full-duplex side. As aresult, when both devices are attempting to transmit at (nearly) the same time,the packet sent by the full-duplex end will be discarded and lost due to anassumed collision and the packet sent by the half duplex device will be delayedor lost due to a CRC error in the frame.[6]

The lost packets force the TCP protocolto perform error recovery, but the initial (streamlined) recovery attempts failbecause the retransmitted packets are lost in exactly the same way as theoriginal packets. Eventually, the TCP transmission window becomes full and theTCP protocol refuses to transmit any further data until thepreviously-transmitted data is acknowledged. This, in turn, will quiesce the new traffic over theconnection, leaving only the retransmissions and acknowledgments. Since theretransmission timer grows progressively longer between attempts, eventually aretransmission will occur when there is no reverse traffic on the connection,and the acknowledgment are finally received. This will restart the TCP traffic,which in turn immediately causes lost packets as streaming resumes.

The end result is a connection that isworking but performs extremely poorlybecause of the duplex mismatch. Symptoms of a duplex mismatch are connectionsthat seem to work fine with a ping command, but "lock up" easily with very lowthroughput on data transfers; the effective data transfer rate is likely to beasymmetrical, performing much worse in the half-duplex to full-duplex directionthan the other. In normal half-duplex operations late collisions donot occur. However, in a duplex mismatch the collisions seen on the half-duplexside of the link are often late collisions. The full-duplex side usually willregister frame check sequence errors, or runtframes.[7][8] Viewing these standard Ethernetstatistics can help diagnose the problem.

Contrary to what one might reasonably expect, both sides of a connection need to be identically configured for proper operation. In other words, setting one side to automatic (either speed or duplex or both) and setting the other to be fixed (either speed or duplex or both) will likely result in either a speed mismatch, a duplex mismatch or both. A duplex mismatch can be fixed by either enabling auto negotiation (if available and working) on both ends or by forcing the same settings on both ends (availability of a configuration interface permitting).If there is no option but to have a locked setting on one end and auto negotiation the other (for example, an old device with broken auto negotiation connected to an unmanaged switch) half duplex must be used. All modern LAN equipment comes with auto negotiation enabled and the various compatibility issues have been resolved. The best way to avoid duplex mismatches is to use auto negotiation and to replace any legacy equipment that does not use auto negotiation or does not auto negotiate correctly.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

简而言之,就是两个设备,一个使用Auto,一个非Auto,Auto端的设备可以匹配到对端设备的速度,但双工模式会匹配为HD,如果另一端是FD,就导致了duplex mismatch

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值