Detecting Duplex Mismatch on Ethernet

Document Sample
Detecting Duplex Mismatch on Ethernet Powered By Docstoc
					Detecting Duplex Mismatch on Ethernet
    Stanislav Shalunov shalunov@internet2.edu
      Richard Carlson rcarlson@internet2.edu
         PAM 2005, Boston, 2005-03-31
                      Talk overview
• What is Ethernet duplex mismatch?
• How do we know it ever occurs?
• Half- and full-duplex Ethernet
• Auto-configuration
• Duplex mismatch
• Model of duplex mismatch
• Manifestation with Poisson streams (prediction)
• Manifestation with Poisson streams (experiment)
• What happens with TCP?
• Network Diagnostic Tool (NDT)
• TCP with duplex mismatch on LAN (experiment)
• Ideas about detection in NDT with Web100 variables
                                                       1
      What is Ethernet duplex mismatch?
• On Ethernet, each device has a duplex (full or half) setting
• The setting exists for up to 1-Gb/s Ethernet, but (finally!)
  not for 10 Gb/s
• When two devices on the ends of a physical link disagree
  about duplex, a duplex mismatch occurs




                                                         2
        How do we know it ever occurs?
• Described in a few industry white papers
• Easily recreated in the lab
• Regularly encountered by engineers troubleshooting perfor-
  mance problems
• Goes away when both sides are set to use the same duplex
  setting
• The cure also causes the disease (more on this later)




                                                          3
                 Half-duplex Ethernet
• Can work on broadcast media (not used anymore)
• Historic default (relic?)
• Mandatory to support
• When two devices try to transmit at the same time, a collision
  event is said to occur
• Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
  protocol resolves collisions
• Late collision is such a collision that occurs after the first
  64 octets (512 octets for 1 Gb/s) are sent – behavior poorly
  defined


                                                          4
                Full-duplex Ethernet
• Made possible by point-to-point media (e.g., 10BASE-T for
  10 Mb/s)
• Requires switching
• Each side sends with no blocking on anything
• Receiving is independent of sending
• Performs better than half-duplex
• The preferred modern mode




                                                      5
                 Auto-configuration
• Before starting to operate, devices attempt to auto-configure
  with out-of-band signals
• Normal Link Pulses (NLPs) are sent by old hardware (half-
  duplex only)
• Fast Link Pulse (FLP) burst encodes Link Code Word (LCW)
  that conveys supported mode
• Each side computes commonly supported modes, and chooses
  the best of common modes
• In addition, auto-sense protocol not using FLP bursts can
  be used to detect speed (and media type), but only supports
  half-duplex

                                                        6
                  Duplex mismatch
• Protocol is complex
• Operation mode is never communicated explicitly
• Duplex mismatch can happen for a variety of reasons
  1. One card is hard-coded to use full duplex
  2. Two cards are hard-coded to use different duplex modes
  3. Auto-negotiation fails (problem can be sporadic)




                                                        7
              Model of duplex mismatch
full → half Can cause loss, but no extra delay. Loss occurs iff
    the frame starts arriving at the half side while it’s sending.
half → full Can cause loss and extra delay. Loss can occur if
   1. Collision occurs too late for resending
   2. Buffer overruns (the full side keeps sending); sufficient
      condition: sum of load in both directions exceeds link
      capacity
   3. Excessive collisions



                                                            8
Manifestation with Poisson streams (prediction)
 • Poisson streams are easy to analyze (good for validation)
 • Analysis is further simplified if both rates are small
 • pF = cc
         H


 • pH = cc max 0, 1 − cξ
         H
                      m
 • Experiments conducted (using “thrulay -u”) to validate




                                                           9
                         Poisson streams (experiment)
                12
                                                       predicted
                                                          c_F=1
                                                          c_F=2
                                                          c_F=3
                10                                        c_F=4
                                                          c_F=5
                                                          c_F=6
                                                          c_F=7
                                                          c_F=8
                                                          c_F=9
                 8
p_F, per cent




                 6




                 4




                 2




                 0
                     0       2     4           6   8               10
                                       c_H, Mb/s

                                                                        10
Poisson streams (experiment), continued
                9
                                                c_F=1
                                                c_F=2
                                                c_F=3
                8                               c_F=4
                                                c_F=5
                                                c_F=6
                7                               c_F=7
                                                c_F=8
                                                c_F=9
                6
p_H, per cent




                5


                4


                3


                2


                1


                0
                    0   2   4           6   8           10
                                c_H, Mb/s

                                                             11
              What happens with TCP?
• The case of TCP is considerably more complex
• Throughput is asymmetric
• Depends on delay
• For small delay, one direction isn’t too horrible (but still worse
  than even half duplex); the other direction is severely crippled
• For larger delays, both directions suffer to a greater extent




                                                              12
           NDT Background
• Web100-enhanced server handles testing
  and diagnostic services
• Java-based and command line clients allows
  testing from any client (local or remote)
• Performance and configuration faults
  reported back to client
• Drill-down functions provide more details and
                                             13


  error-reporting capabilities
            Test environment
•Receiver is put is various states
  –Switch = full & Host = full or half
  –Switch = half & Host = full or half


   NDT                                       NDT
                                 100 Mbps
            100 Mbps    Switch
    Clt                                      Srv
            Mismatch               Full
                                  Duplex             14

 Receiver                                   Source
      TCP Operation on LAN
• Observed behavior depends on direction
  of TCP flow and direction of mismatch
  – Data and ACK packets delivered
  – Data packets lost and ACKs delayed
  – ACKs packets lost and Data delayed
• Losing ACKs has bigger effect than losing
  Data packets
• Web100 details are only available when 15
  NDT server is source and client is sink
Four Cases of Duplex Setting
 FD-FD           FD-HD




 HD-FD          HD-HD
                               16
     Duplex Mismatch
Switch is Full & Host is Half




                                17
     Duplex Mismatch
Switch is Half & Host is Full




                                18
 Tentative Mismatch Detection
• Half to Full mismatch detection
  – Large number of timeouts causes long idle
    time (RTO x timeout value)
  – Connection spends majority of the time in
    CwndLimited state
  – Asymmetric throughput
     • opposite direction is greater
                                                19
 Tentative Mismatch Detection
• Full to Half mismatch detection
  – Large percentage of duplicate ACKs
  – Connection spends majority of the time in
    CwndLimited state
  – Asymmetric throughput
     • opposite direction is less

                                                20
• Supplemental slides follow




                               21
     TCP Mismatch Detection
• Observed behavior depends on direction
  of TCP flow and direction of mismatch
• Both behaviors should be detected to
  confirm mismatch condition exists

• Web100 details are only available when
  NDT server is source and client is sink   22
          Duplex Mismatch
     Switch is Full & Host is Half
• Connection is limited by CWND collapse
  – Data packet is lost when collision occurs
  – Single data packet lost in 5 RTT periods
  – Large number of duplicate ACKs sent by
    client
  – Large jump in sequence space as
    retransmitted packet fills in hole
                                                23
          Duplex Mismatch
     Switch is Half & Host is Full
• Connection is RTO limited
  – ACK packets are lost when collision occurs
  – Sender reaches window limit and pauses for
    ACK
  – Loss of ACKs causes sender to pause for
    RTO period
  – Duplicate ACKs cause additional collisions
                                               24
  – Extraneous retransmission generates ACK
    which starts another burst of packets
Normal Full Duplex Operation




                           25
Normal Half Duplex Operation




                           26
     Duplex Mismatch
Switch is Half & Host is Full




                                27

				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:151
posted:2/3/2011
language:English
pages:28
Description: Full duplex is used between the microprocessor and peripheral devices to send and receive lines separate line method, you can make the data in both directions at the same time transfer operation. Means to send data to receive data at the same time, both simultaneously, as we usually call it, like, talk at the same time be able to hear each other's voices. General support for the current full-duplex card.