CCNA 1 and 2 Companion Guide, Revised (Cisco Networking Academy Program) part 31 docx

10 257 0
CCNA 1 and 2 Companion Guide, Revised (Cisco Networking Academy Program) part 31 docx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Ethernet Operation 269 Figure 5-10 CSMA/CD Networking devices are capable of detecting when a collision has occurred because the amplitude of the signal on the networking media increases (CD = collision detect). When a collision occurs, each device that is transmitting continues to transmit data for a short time, to ensure that all devices see the collision. When all devices on the net- work have seen that a collision has occurred, each transmitting device invokes an algo- rithm, known as a backoff algorithm. When all transmitting devices on the network have backed off for a certain period of time (random and, therefore, different for each device), any device can attempt to gain access to the networking media once again. When data transmission resumes on the network, the devices that were involved in the collision do not have priority to transmit data. Figure 5-11 summarizes the CSMA/CD process. 1102.book Page 269 Tuesday, May 20, 2003 2:53 PM 270 Chapter 5: Ethernet Fundamentals Figure 5-11 CSMA/CD Process Ethernet is a broadcast transmission technology. This means that all devices on a net- work can see all frames that pass along the networking medium. However, not all the devices on the network will process the data. Only the device whose MAC address matches the destination MAC address carried by the frame copies the frame into its buffer. Ethernet is not concerned with Layer 3 network addresses such as IP or IPX. If the MAC addresses match, the frame is copied and passed up to Layer 3 to check the destination IP or IPX address for a match. 1102.book Page 270 Tuesday, May 20, 2003 2:53 PM Ethernet Operation 271 After a device has verified the destination MAC and IP addresses carried by the data, it checks the data packet for errors. If the device detects errors, the data packet is dis- carded. The destination device does not notify the source device, regardless of whether the packet arrived successfully. Ethernet is a connectionless network architecture and is referred to as a best-effort delivery system. Simplex, Half-Duplex, and Full-Duplex Operation The data channels over which a signal is sent can operate in one of three ways: simplex, half duplex, or full duplex. The distinction among these is in the way the signal can travel. Simplex transmission, as its name implies, is simple. It is also called unidirectional because the signal travels in only one direction, just like traffic flows on a one-way street. Television or radio transmission is an example of simplex communication, as illustrated in Figure 5-12. Figure 5-12 Simplex Transmission Half-duplex transmission is an improvement over simplex transmission; the traffic can travel in both directions. Half-duplex transmission enables signals to travel in either direction, but not in both directions simultaneously, as illustrated in Figure 5-13. Half- duplex Ethernet, defined in the original 802.3 Ethernet, uses only one wire, with a dig- ital signal running in both directions on the wire. It allows data transmission in only on direction at a time between a sending station and a receiving station. It also uses the CSMA/CD protocol to help prevent collisions and retransmit if a collision does occur. Figure 5-13 Half-Duplex Transmission Television Set Simplex: Signal Flows in One Direction Only TV Company 1102.book Page 271 Tuesday, May 20, 2003 2:53 PM 272 Chapter 5: Ethernet Fundamentals Full-duplex transmission, as illustrated in Figure 5-14, operates like a two-way, two- lane street. Traffic can travel in both directions at the same time. Ethernet full-duplex operation is made possible using switch technology, which is covered in greater depth in Chapter 6. Full-duplex switched networking technology increases performance because data can be sent and received at the same time. Full-duplex Ethernet uses two pairs of wires, which allow simultaneous data transmission between a sending station and a receiving station. Virtually no collisions occur in full-duplex Ethernet because switching technology creates a two-station point-to-point virtual circuit, or “microseg- ments,” when two devices need to communicate. Full-duplex Ethernet is supposed to offer 100 percent efficiency in both directions. This means that you can get 20 Mbps with a 10-Mbps Ethernet running in full-duplex operation. A 100-Mbps switch poten- tially can offer 200 Mbps to a station in full-duplex mode. Figure 5-14 Full-Duplex Transmission Ethernet Timing Ethernet was designed to operate on a bus structure, which is a technical way to say that every station always hears all messages at almost the exact same time. The official designation is CSMA/CD. CSMA/CD can be interpreted simplistically to mean that when two stations realize that they are talking at the same time, they are supposed to stop and wait a polite amount of time before trying again. The basic rules and specifications for proper operation of Ethernet are not particularly complicated, although some of the faster physical layer implementations are becoming so. Despite the basic simplicity, when a problem occurs in Ethernet, it is often quite difficult to isolate the source of the problem. Because of the common bus architecture of Ethernet (which can be described as a distributed single point of failure), the scope of the problem is usually all stations within the collision domain that are attached to the segment. When repeaters are used, this can include stations up to four segments away. According to the rules, any station on an Ethernet network that wants to transmit a message first listens to ensure that no other station currently is transmitting. If the cable is quiet, the station begins transmitting immediately. But because the electrical signal takes a small amount of time to travel down the cable (called propagation delay), and each subsequent repeater encountered introduces a small amount of latency in for- warding the frame from one port to the next, it is possible for more than one station to begin transmitting at or near the same time. A collision then results. 1102.book Page 272 Tuesday, May 20, 2003 2:53 PM Ethernet Operation 273 If the attached station is operating in full duplex, the station can send and receive simultaneously, and collisions should not be present. Full-duplex operation also changes the timing considerations and eliminates the concept of slot time. Full-duplex operation allows for larger network architecture designs because the timing restriction for collision detection is removed. In half-duplex operation, assuming that a collision does not occur, the sending station transmits 64 bits of timing synchronization information that often is known collectively as the preamble. The contents are as follows: ■ Destination and source MAC addressing information ■ Certain other header information ■ The actual data payload ■ A checksum (FCS) used to ensure that the message was not corrupted along the way Stations receiving the frame recalculate the FCS to determine whether the incoming message is valid, and hand good messages to the next higher layer in the protocol stack. For 10-Mbps Ethernet and slower versions, which are asynchronous, each receiving station uses the eight octets of timing information to synchronize its receive circuit to the incoming data but then discard it. The 100 Mbps higher-speed implementations of Ethernet are synchronous, so the timing information is not actually required at all. However, for compatibility reasons, the preamble and SFD are present. All information following the SFD at the end of the timing information is passed to the next higher layer. A new checksum is calculated and compared with the checksum found at the end of the received frame. If the frame is intact, it then must be interpreted according to the rules for whichever protocol is indicated by the Length/Type field or the LLC-layer protocol indicated by the first few octets of the data. A notable number of changes to the basic structure of Ethernet were included in the 1998 and 2000 versions of the standard. One significant change was that two-octet addresses explicitly were excluded, although they were included in all previous versions. When used for Length, the maximum value for the 802.3 Length/Type field clearly was specified as 1536 (600 hex), where it previously was assumed to match the maximum MTU data size of 1500 (5DC hex). For all speeds of Ethernet transmission at or below 1000 Mbps, the standard describes how a transmission can be no smaller than slot time. Slot time for 10 and 100 Mbps Ethernet is 512 bit-times (64 octets). Slot time for 1000 Mbps Ethernet is 4096 bit-times (512 octets, including the extension). Slot time is not defined for 10 Gbps Ethernet because it does not permit half-duplex operation. Slot time is just longer than the longest 1102.book Page 273 Tuesday, May 20, 2003 2:53 PM 274 Chapter 5: Ethernet Fundamentals possible round-trip delay time when maximum cable lengths are used on the largest legal network architecture and all hardware propagation delay times are at the legal maximum; the 32-bit jam signal is used when collisions are detected. In other words, slot time is just longer than the time it theoretically can take to go from one extreme end of the largest legal Ethernet collision domain to the other extreme end, collide with another transmission at the last possible instant, and then have the collision frag- ments return to the sending station and be detected. For the system to work, the first station must learn about the collision before it finishes sending the smallest legal frame size. To allow 1000 Mbps Ethernet to operate in half duplex, the Extension field was added when sending small frames, purely to keep the transmitter busy long enough for a collision fragment to make it back. This field is present only on 1000 Mbps half- duplex links, and it allows minimum-size 64-octet frames to be stretched long enough to meet slot-time requirements. Extension bits are discarded by the receiving station. To examine the issue briefly, consider the following: On a 10 Mbps Ethernet, 1 bit at the MAC sublayer requires 100 nanoseconds (ns) to transmit. At 100 Mbps, that same bit requires 10 ns to transmit, and at 1000 Mbps, it takes only 1 ns. Table 5-4 summa- rizes the bit-time of different types of Ethernet. As a rough estimate, 8 inches (20.3 cm) per nanosecond often is used for calculating propagation delay down a UTP cable. For 100m of UTP, this means that it takes just under 5 bit-times for a 10BASE-T signal to travel the length of a 100m cable (about 4.92 bit-times). Simply moving the decimal point over results in 49.2 bit-times at 100 Mbps, and 492 bit-times at 1000 Mbps. For CSMA/CD Ethernet to operate, the sending station must become aware of a colli- sion before it has completed transmission of a minimum-size frame. At 100 Mbps, the system timing is barely capable of accommodating 100m cables. At 1000 Mbps, special (very inefficient) adjustments were required because nearly an entire minimum-size frame has been transmitted before the first bit reaches the end of the first 100 meters of UTP cable. It is easy to see why half duplex was not permitted in 10-Gb Ethernet. Table 5-4 Bit-Time Ethernet Speed Bit-Time 10 Mbps 100 nanosecond 100 Mbps 10 nanosecond 1000 Mbps = 1 Gbps 1 nanosecond 10,000 Mbps = 10 Gbps .1 nanosecond 1102.book Page 274 Tuesday, May 20, 2003 2:53 PM Ethernet Operation 275 Interframe Spacing and Backoff Table 5-5 shows the minimum spacing between two noncolliding packets, also called the interframe spacing, from the last bit of the FCS field of the first frame to the first bit of the preamble of the second frame. After a frame has been sent, all stations on a 10-Mbps Ethernet are required to wait a minimum of 96 bit-times (9.6 microseconds) before any station legally can transmit the next frame. On faster versions of Ethernet, the spacing remains the same: 96 bit- times. However, the time required for that interval grows correspondingly shorter, as shown in Table 5-6. This interval alternately is referred to as the interframe spacing, the interframe gap, and the interpacket gap, and it is intended to allow slow stations time to process the previous frame and prepare for the next frame. However, a repeater is expected to regenerate the full 64 bits of timing information (preamble and SFD) at the start of any frame, despite the potential loss of some of the beginning preamble bits to slow synchronization. Thus, because of this forced reintro- duction of timing bits, some minor reduction of the interframe gap is not only possible, but expected. Some Ethernet chip sets are sensitive to a shortening of the interframe Table 5-5 Interframe Spacing Speed Interframe Spacing Time Required 10 Mbps 96 bit-times 9.6 µsec 100 Mbps 96 bit-times 0.96 µsec 1 Gbps 96 bit-times 0.096 µsec 10 Gbps 96 bit-times 0.0096 µsec Table 5-6 Slot Time Parameter Speed Slot Time* *Slot time applies only to half-duplex Ethernet links Time Interval 10 Mbps 512 bit-times 51.2 µsec 100 Mbps 512 bit-times 5.12 µsec 1 Gbps 4096 bit-times 4.096 µsec 10 Gbps Not applicable — 1102.book Page 275 Tuesday, May 20, 2003 2:53 PM 276 Chapter 5: Ethernet Fundamentals spacing and begin failing to see frames as the gap is reduced. With the increase in pro- cessing power at the desktop, it would be very easy for a personal computer to saturate an Ethernet segment with traffic and to begin transmitting again before the interframe spacing delay time is satisfied. Over the years, some vendors deliberately have violated the interframe gap a little to improve throughput testing results in competitive product comparisons. For the most part, this cheating on the interframe spacing has not caused problems, but it has the potential to do so. After a collision occurs and all stations allow the cable to become idle (each waits the full interframe spacing), the stations that collided must wait an additional—and poten- tially progressively longer—period of time before attempting to retransmit the collided frame. The waiting period intentionally is designed to be semi-random so that two sta- tions do not delay for the same amount of time before retransmitting; otherwise, the result would be more collisions. This is accomplished in part by expanding the interval from which the random retransmission time is selected on each retransmission attempt. The waiting period is measured in increments of the parameter slot time. Retransmission is controlled by this formula: 0 = r < 2k Here, r is some random number of slot times and k is the number of backoff attempts (up to a maximum of 10 for the backoff value). Backoff time is defined as follows: r * slot time The total maximum number of retransmission attempts is 16, although the backoff value remains at 10 for the last few attempts. The formula specifies the minimum wait- ing period for a retransmission attempt. It is quite acceptable, though not necessarily desirable, for a station to introduce extra delays that will degrade its own throughput. As an example, after the fifth consecutive collision without being able to transmit the current 10BASE-T frame, the waiting time would be a random delay interval between 0 and 32 slot times (0 = r < 25). Restated, the delay would be a random number of 51.2 microsecond time units, ranging from an immediate retry attempt up to 1638.4 microseconds later. If the MAC sublayer still cannot send the frame after 16 attempts, it gives up and generates an error to the next layer up. Such an occurrence is fairly rare and happens only under extremely heavy network loads or when a physical problem exists on the network. In a special situation, the MAC sublayer experiences much more frequent failures to send a frame despite the 16 attempts, usually found on switched links. This is called 1102.book Page 276 Tuesday, May 20, 2003 2:53 PM Ethernet Operation 277 the capture effect or the packet starvation effect. When two devices (switches, stations, or both) connect in half-duplex operation and each is attempting to send a large block of traffic, a collision will certainly occur. Whichever station “wins” the first retransmission has a progressively greater chance to transmit with each subsequent collision. Assume that a second collision has taken place. The first station, which was capable of trans- mitting its first frame, again selects its random delay between 0 and 1 time intervals, while the second station now selects from 0, 1, 2, and 3 time intervals. It is highly likely that the first station will again select a shorter delay time and be capable of transmit- ting. The first station will probably win the retransmission for 16 consecutive attempts by the second station. The second station then will give up and discard that frame. It also will record an excessive collisions error. This type of error usually is revealed using the Simple Network Management Protocol (SNMP) to query a switch port, and it often is found even where only a single device is attached to the affected port. Because Ethernet is inherently bursty, this might be reported on ports with relatively low average utilization. Error Handling The most common (and usually benign) error condition on an Ethernet is the collision. Collisions are the mechanism for resolving contention for network access. A few colli- sions provide a smooth, simple, low-overhead way for network nodes to arbitrate con- tention for the network resource. When the network cannot operate properly because of various problems, collisions can become a significant impediment to useful network operation. Collisions are possible only on half-duplex segments. Collisions waste time in two ways: First, network bandwidth loss is equal to the initial transmission and the collision jam signal. This is called consumption delay, and it affects all network nodes. Consumption delay significantly can reduce network throughput. Following each successful or failed transmission attempt is an enforced idle time (backoff period) for all stations, called the interframe spacing (or interframe gap), that further impacts throughput. The second type of delay is a result of this collision back- off algorithm. Backoff delays are not usually significant. The considerable majority of collisions occur very early in the frame, often before the SFD. Collisions occurring before the SFD usually are not reported to the higher layers, as if the collision did not occur. As soon as a collision is detected, the sending station(s) transmit a 32-bit jam signal that will enforce the collision. This is done so that any data being transmitted thoroughly is corrupted and all stations have a chance to detect the collision. In Figure 5-15, two stations are listening to ensure that the cable is idle and then trans- mit. The 802.3 standard provides worst-case limits on how long each component in the system can delay a signal. The maximum allowed round-trip delay for a 10-Mbps 1102.book Page 277 Tuesday, May 20, 2003 2:53 PM 278 Chapter 5: Ethernet Fundamentals collision domain is 512 bit-times, a value that determines the minimum frame size. Station 1 is the first station transmitting, so that station sends the most data before a collision is detected. Station 2 is capable of sending only a few bits before the collision is detected. Figure 5-15 Routine Error Handling in a 10-Mbps Collision Domain Examine Figure 5-15 closely. Station 1 can transmit a significant percentage of the frame before the signal even reaches the last cable segment. Station 2 does not receive the first bit of the transmission before beginning its own transmission. Station 2 can send only several bits before the NIC senses the collision. Station 2 immediately trun- cates the current transmission and substitutes the 32-bit jam signal in its place. Then Station 2 ceases all transmissions. During the collision and jam event that Station 2 is experiencing, the collision fragments work their way back through the repeated collision domain toward Station 1. Station 2 completes transmission of the 32-bit jam signal and becomes silent before the collision can propagate back to Station 1. Station 1, still unaware of the collision, continues to transmit. When the collision fragments finally Repeater Repeater Repeater Repeater Station 1 Station 2 Time Station 2 Detects Collision Station 1 Detects Collision Preamble… FCS Discarded JAM Idel JAM Idle Preamble… FCS Discarded Station 1 Station 2 1102.book Page 278 Tuesday, May 20, 2003 2:53 PM . Interval 10 Mbps 5 12 bit-times 51. 2 µsec 10 0 Mbps 5 12 bit-times 5 . 12 µsec 1 Gbps 4096 bit-times 4.096 µsec 10 Gbps Not applicable — 11 02. book Page 27 5 Tuesday, May 20 , 20 03 2: 53 PM 27 6 Chapter. nanosecond 10 00 Mbps = 1 Gbps 1 nanosecond 10 ,000 Mbps = 10 Gbps .1 nanosecond 11 02. book Page 27 4 Tuesday, May 20 , 20 03 2: 53 PM Ethernet Operation 27 5 Interframe Spacing and Backoff Table 5-5. priority to transmit data. Figure 5 -11 summarizes the CSMA/CD process. 11 02. book Page 26 9 Tuesday, May 20 , 20 03 2: 53 PM 27 0 Chapter 5: Ethernet Fundamentals Figure 5 -11 CSMA/CD Process Ethernet is

Ngày đăng: 04/07/2014, 18:20