Introduction
Ethernet is the most successful LAN (local area Networking) technology in the last 30 years.
1. First widely used LAN technology (a widely used LAN technology)
2. Kept up and speed race:10 mbps–100 Gbps
3. connectionless: No handshaking between sending and receiving NICs (network Interface card, network card)
No connection is established.
4. unreliable: receiving NIC doesn ' t send ACKs or nacks to sending NIC
Not reliable.
Ack:acknowledgement, that is, the confirmation character, in the data communication, the receiving station sends a transmission class control character to the transmitter. Indicates that the sent data has been acknowledged to be received correctly.
Nack:nacknowledge, the data transmission is not correct, need to be re-transmitted.
5. Ethernet ' s MAC protocol: Carrier sense Multiple Access with Collision Detection (CSMA/CD, carrier-monitored multi-access with collision detection)
Ethernet topologies 1. Bus topology
Bus topology popular through mid 90s.
The bus is the data link in a bus network. The bus can only be transmit data in one direction, and if any network segment are severed, all network transmission ceases.
A host on a bus network is called a station or workstation. In a bus network, every station receives all network traffic (traffic), and the traffic generated by each station have equal Tran Smission priority. Each network segment is, therefore, a collision domain. In order for nodes to transmit on the same cable simultaneously (simultaneous), they use a media access control technology such as carrier Sense Multiple Access (CSMA) or a bus master. (quoted from Wikipedia)
collision domain: In Ethernet, this CSMA/CD network is a conflict domain if two computers on a CSMA/CD network conflict when they communicate simultaneously.
All nodes on same collision domain (can collide with each other) 2. Ethernet (10BASE5)
An Ethernet segment are implemented on a coaxial cable of.
Hosts Connect to a Ethernet segment by tapping into it.
A transceiver (a small device directly attached to the tap) detects when the line was idle and drives signal when The host is transmitting. (transceiver can either accept the signal or send a signal)
The transceiver also receives incoming signal.
The transceiver is connected to an Ethernet adaptor (NIC) which is plugged into the host. But today most is built in to the computers. (Most of the NIC is now built-in, such as a power pen)
The protocol is implemented on the adaptor. (Refers to CSMA/CD this protocol is implemented in the chip inside the NIC)
1. Cable signaling (Manchester Encoding)
Each bit has a transition
Allows clocks in sending and receiving nodes to synchronize
The reason to use Manchester Encoding is to synchronize the clock. The receiver uses the special code containing the synchronous signal to extract the synchronization signal from the signal itself to lock its clock pulse frequency to achieve the synchronization purpose.
Manchester Encoding the clock and data in the data flow, in the transmission of code information, but also the clock synchronization signal to each other, there is a jump in each encoding, there is no DC component, so it has self-synchronization capability and good anti-jamming performance. But each bit's transition is tuned to two levels.
2. Repeaters
Multiple Ethernet segments can be joined together by repeaters. Multiple network segments can be connected by repeaters.
A repeater is a device that forwards digital signals. 10BASE5 Ethernet A network segment of 500 meters, digital signal transmission after 500 meters will weaken a lot, repeater can play a role in amplifying the signal.
No more than four repeaters is positioned between any pair of hosts. (An Ethernet have a total reach of only2500 m.
Example two network segments are connected via repeater:
Example of a connection for 5 network segments:
3. Ethernet (10BASE2)
Ethernet's second generation technology
Instead of using Coax cable, an Ethernet can is constructed from a thinner cable known as 10BASE2 (the original is 10Base 5)
means the network operates at Ten Mbps
Base means the cable is used in a baseband system
2 means a given segment can be no longer than M
The 10BASE2 uses a finer cable.
4. Ethernet (10BaseT)
New Technologies in Ethernet
Another cable technology is 10BaseT
T stands for twisted pair (using twisted pair)
Limited to + m in length
With 10BaseT, the common configuration was to has several point-to-point segments coming out of a multiway Repeater, called Hub
Before using 10BASE5 or 10BASE2 technology, we usually put the cable directly on the ground, so that as long as a network segment accidentally disconnected, then all the network is paralyzed. In order to manage the line, we can use a hub to manage the twisted pair in 10BaseT technology.
Note that using the Hub is still the way to broadcast. Whenever a computer sends a signal, all computers will receive it.
5. Star topology
Compared to Bus topology, today we are in the prevailing Star topology.
Active Switch in center
Each "spoke" runs a (separate) Ethernet protocol (nodes does not collide with each other)
Note: Each port of switch is equivalent to a network card, and each computer is connected to a switch, which is point-to-point, that is, the network card is connected to the network card, so each segment is equivalent to only two computers. Each port of switch can handle the content, it can choose to filter out or selectively transfer to a certain machine, and the Hub, like Repeater, can only transmit the signal, but not the ability to process the content.
When using the Hub, it uses a broadcast mechanism, a time can only have one computer to send messages (if both computers send messages, then the signal will interfere with each other), and when using switch, you can send multiple computers simultaneously message, because the switch port is equivalent to a network card, you can handle the content of the message alone.
Summary, now for Ethernet (10BaseT):
(a) The common network configuration is like "star" with many point-to-point segments
(b) Hub is used to connect the point-to-point segments.
(c) Switch can also is used to connect the point-to-point segments.
Ethernet Frame Format
1. Frame format
Preamble (64bits): Allows the receiver to synchronize with the signal (sequence of alternating 0s and 1s).
Source and Destination MAC Addresses (48bits each).
Packet type (16bits): acts as Demux key to identify the higher level protocol.
Data (up to bytes)
Minimally a frame must contain at least bytes of data.
Frame must is long enough to detect collision.
FCS:CRC (32bit)
Preamble: (101010...1010) for synchronization
Sfd:start Frame Delimiter (10101011)
Da:destination MAC Address
Sa:source MAC Address
Packet type (16bits): acts as Demux key to identify the higher level protocol.
Llc-frame:up to bytes
pad:padding when Llc-frame < bytes
Fcs:frame Check Sequence (CRC-32)
Mac-frame size--from DA to FCS
Min bytes to distinguish from collision
Max 1518 bytes to prevent dominating bandwidth
2. Ethernet Addresses
1. Each of the hosts on the Ethernet (in fact, every Ethernet host in the world) has a unique Ethernet Address.
2. The address belongs to the adaptor, not the host.
It is the usually burnt into ROM.
3. Ethernet addresses is typically printed in a human readable format
As a sequence of six numbers separated by colons. (6 bytes separated by colons)
Each number corresponds to 1 byte of the 6 byte address and are given by a pair of hexadecimal digits, one for EAC H of the 4-bit nibbles in the byte (each byte in 16 binary notation)
leading 0s is dropped.
For example, 8:0:2b:e4:b1:2 is
00001000 00000000 00101011 11100100 10110001 00000010
4. To ensure this every adaptor gets a unique address, each manufacturer of Ethernet devices is allocated a different
Prefix that must is prepended to the address on every adaptor they build
AMD has been assigned the 24bit prefix 8:0:20
5. Each frame transmitted on a Ethernet is received by every adaptor connected to that Ethernet. (actually transmitting on Ethernet Each frame can be connected to the network card received, but we only receive the sent to ourselves, and filter out not to send to their own)
6. Each adaptor recognizes those frames addressed to it address and passes only those frames on to the host. (Every NIC only received its own F Rame, and drop off a frame that is not sent to you)
7. In addition to unicast address (unicast), an Ethernet address consisting of all 1s is treated as a broadcast a Ddress. (Separate from unicast, if the Destination MAC Address 48 bit all 1, then this is a broadcsst)
All adaptors pass frames addressed to the broadcast address up to the host.
8. Similarly, an address, the have the first bit set to 1 and not the broadcast address is called a multicast addres S. (first digit is 1, remaining 47 bits as long as not all 1, is a MULTICST address)
A given host can program it adaptor to accept some set of multicast addresses. (We can set a specific group for the NIC)
9. To summarize, a Ethernet adaptor receives all frames and accepts
Frames addressed to its own address
Frames addressed to the broadcast address
Frames addressed to a multicast address if it had been instructed
Ethernet MAC Protocol--CSMA/CD 1. Background
Any signal placed on the Ethernet to a host is broadcast over the entire network
Signal is propagated in both directions.
Repeaters forward the signal on all outgoing segments. (Note that Repeater only restores the signal to a more beautiful appearance and does not process the signal.)
Terminators attached to the end of each segment absorb the signal.
2. CSMA (Carrier sense Multiple access) carrier-listening multi-access
Csma:listen before transmit
If Channel sensed idle:transmit entire frame
If Channel sensed busy, defer transmission
The flaw is, in the sence result is idle the premise to send the frame, and even if midway collision, also must have to transmit the frame, the serious waste resources.
3. CSMA Collisions
1. Collisions can still occur (there is still the possibility of collision, because the transfer of frame also takes time, maybe just the state is idle)
Propagation delay (propagation takes time, so there is a delay) means-nodes may not hear each other's transmission
2. Collision:
Entire packet transmission time wasted
As we have just mentioned, CSMA this protocal will still send the entire frame after encountering collision, so it will be a serious waste of resources.
You can see this one, the vertical axis represents the time:
4. CSMA/CD (collision Detection) carrier-Monitored multiple access with collision detection
CSMA/CD: Carrier sensing, deferral as in CSMA
Collisions detected within short time detects if the channel has collision on a shorter timeframe
Colliding transmissions aborted, reducing channel wastage if the signal transmission occurs collision, the transmission will be interrupted immediately, reducing unnecessary waste of resources
1. Collision Detection
Measure signal Strengths, compare transmitted, received signals
2. Carrier sense multiple Access with Collision Detection (CSMA/CD).
A set of nodes send and receive frames over a shared link.
Carrier sense means this all nodes can distinguish between an idle and a busy link.
Collision detection means that a node listens as it transmits and can therefore detect when a frame it is transmi Tting have collided with a frame transmitted by another node. (a node can be monitored while in transmit, so when the node is transmitting a frame with another node being The node can be detect when collision occurs on the transferred frame)
3. When the adaptor have a frame to send and the line is idle, it transmits the frame immediately.
4. When the adaptor have a frame to send and the line are busy, it waits for the line to go idle and then transmits Immediately.
5. The Ethernet is said to being 1-persistent protocol because an adaptor with a frame to send transmits with Probab Ility 1 Whenever a busy line goes idle. (as long as the channel is idle, adaptor must transmit frame)
6. Since There is no centralized control it was possible for the other (or more) adaptors to begin transmitting at the S Ame Time,
Either because both found the line to be idle,
Or, both had been waiting for a busy line to become idle.
When this happens, the both (or more) frames is said to being collide on the network.
7. Since Ethernet supports collision detection, each sender was able to determine that a collision was in progress. (Ethernet Support for collision detection, so each sender transmit frame is able to determine if collision has occurred)
8. At the moment an adaptor detects, it frame is colliding with another, it first makes sure to transmit a 32-bit Jamming sequence and then stops transmission. (If the NIC detects collision, it sends a 32-bit jamming sequence to make the signal more chaotic, ensuring that every A network card can be determined that the frame has a collision, is to be discarded)
Thus, a transmitter would minimally send $ bits in the case of collision
(64-bit preamble + 32-bit jamming sequence)
Ps:preamble is 7 bytes + 1 byte SDF start frame delimiter = 8 bytes.
One-to-that-an adaptor would send only called a runt frame over small frames) is if the both hosts are Clos eto every other. (obviously only if the two NICs are very close, the collision can be detected immediately, only 96 bits are sent at this time)
In case the both hosts are farther apart, they would has had to transmit longer, and thus send more bits, before detecting The collision. (When the two NICs are very far apart, the signal will be transmitted relatively longer before the collision is detected, thus sending more bits)
5. Collision window Collision Windows or collision windows
1. The worst case scenario happens when the both hosts is at opposite endsof the Ethernet.
For example, adding adapter A and Adapter B, respectively, at both ends of the network, when B sends the frame to the gate A, a happens to also send a frame, when the signal occurs collision, and when B detects collision, the signal is actually The distance between two A and B has been gone.
2. To know for sure that the frame it just sent did not collide with another frame, the transmitter could need to send as M Any as. (If you want to know if the frame being sent is collision to another frame on the network, you must send at least 512 bits to know the result)
Why See the following example:
Consider that a maximally configured Ethernet was 2500 m long, and there may are up to four repeaters between any of the hosts, The round trip delay had been determined to be 51.2μs. For 10Mbps Ethernet (such as 10BASE5), what's the minimum length of a frame in order to detect all possible coll Isions?
ANSWER:1 * 107 bit/s * 51.2 * 10-6 s = bit
Every Ethernet frame must is at least (+ bytes) long. (therefore, the minimum length of a frame cannot be less than the collision bit, and if it is less than 512 bits, we will not be able to tell if the frame has been associated with another frame.) We have to make sure that every frame is sent, knowing whether it has collision. In other words, if a frame is less than the length of the collision, we do not know which frame has collided with it if there is a subsequent one.
bytes of header + bytes of data + 4 bytes of CRC
Tip:frames shorter than bytes would be treated as "collided" Frames and would be dropped directly.
6. Phase Summary
Each packet has a length of at least 10Mbps, which is the transmission time?? To 51.2us. The network furthest ends the signal back time is 51.2us (Collision window). In other words, when a Node (actually a Adapter) is transmitted to the bits, his signal has reached (or is) the farthest end, after which all other Nodes (actually Adapter) are no longer transmitted (carrier sense = busy). Collision (possibly different distances) that occurred prior to this time will be transmitted to sender before sender is sent to detect. If a Node is routed to collision, it means that the packet does not occur collision, because when it is sent to the bits, his signal is full of the network.
Each computer's network ports (port Adapter) have multiple wires, one of which is used to send data to the network (such as the 10BASE5 coaxial cable), one is received, and the other is used to monitor the message.
Monitoring is the signal for the network segment (10BASE5 coaxial cable signal). For Sender, the signal that transmit out is immediately returned by the monitor line. If there is no collision, it will be listen to send out the signal, if the occurrence of collision, the signal will overlap or offset each other, resulting in chaotic signals, can not be identified.
7. Exponential Backoff algorithm exponential regression (back) algorithm
1. Once an adaptor have detected a collision, and stopped its transmission, it waits a certain amount of time and tries Again.
2. Each time the adaptor tries to transmit but fails, it doubles the amount of time it waits before trying again.
3. This strategy of doubling the delay interval between each retransmission attempt is known as exponential backoff.
The adaptor first delays either 0 or 51.2μs, selected at random.
If This effort fails, it then waits 0, 51.2, 102.4, 153.6
μs (selected randomly) before trying again;
This was K * 51.2 for k = 0, 1, 2, 3
After the third collision, it waits K * 51.2 for k = 0 ... 23–1 (again selected at random).
In general, the algorithm randomly selects a k between 0 and 2n–1 and waits for K * 51.2μs, where n is the num ber of collisions experienced so far.
8. Summary
1. CSMA/CD Protocol
Carrier Sense before transmission
Carrier Sense while transmission
Collision:two or more stations transmitting simultaneously
Backoff:random Delay after collision
Deference:defers transmission If channel is sensed busy
Collision Window (Slot time): Round-trip propagation delay time plus some carrier sense time. In the IEEE 802.3, this value was defined to be 51.2 us.
2. CSMA/CD Collision Handling
Collision Signal is generated by physical layer.
Jam Signal (Collision Enforcement): To make sure, all stations involved in the collision would detect Collisio N. A pattern of + bits.
Collision Backoff and retransmission method (truncated Binary exponential backoffalgorithm, Beba):
N:number of collisions experienced (n <= 16)
K:min (n,10)--truncation
R:random delay Time (unit:slot time), 0 <= R < 2k
Slot time = 51.2 US
Disadvantage of Beba:
Last-in-first-out effect: Stations with no or few collisions would has a better chance to transmit before station s that has waited longer.
IEEE 802.3 Ethernet