Ethernet Flashcards
Which layers does the Ethernet standard cover?
The Ethernet standard covers both the Physical and MAC sublayer (bottom two layers).
Why does an Ethernet Frame have a minimum data requirement?
A packet has a minimum size because the speed of light in the wire. A packet has to be sufficiently large that all hosts on the network can see it before they decide to transmit.
If very small packets are allows, hosts can transmit a whole packet and not spot a collision further down the wire.
How is an Ethernet frame matched up to its intended destination host?
Originally, Ethernet was shared, so every host sees every frame on the local network.
Every Ethernet card has a unique address built into it. The destination address in the frame is matched to this unique address so the host can recognise it.
Describe, in detail, the Ethernet Frame.
The Ethernet frame has the following fields:
A type field: indicates what kind of network layer follows (0800 for an IP packet). This allows the system to pass the data quickly to the relevant program in the next layer.
A 4 byte checksum (CRC): used to check for corruption in the frame and transmission. Packets are usually dropped and an error report is sent back.
The destination and source address field.
The data field is maximum 1500 bytes and minimum 46 bytes.
How is an Ethernet packet framed?
The link layer breaks up the Ethernet bit stream into discrete frames. It then computes a checksum for each frame and include it in the frame when it is transmitted.
There are four methods to frame an Ethernet packet:
1. Byte count
2. Flag bytes with byte stuffing
3. Flag bits with bit stuffing
4. Physical layer coding violations
What is the Byte Count Framing technique?
Byte count framing uses a field in the header of the first frame to specify how many bytes there will be. This helps the receiver keep track of all the frames - when each of them start and end.
However, the count can become corrupted by a transmission error and become desynchronised. If even one bit changes in the header field, the entire message has to be sent again.
Byte count is not used that much.
What is the Flag Bytes with Byte Stuffing technique?
A FLAG byte is used at the beginning and end of frames. This solves the problem of resynchronisation. If the receiver ever loses count during transmission, it can simply search for the FLAG byte it is looking for.
A special escape byte (ESC) is added before every flag byte in the user data. The receiver then finds these escape characters and removes them before passing it on. This technique is known as byte stuffing.
What is the Flag Bits with Bit Stuffing technique?
This method delimits a bit to get around the disadvantage of using 8-bit flag bytes.
The sender’s system adds a special character such as 0x7E or 011111110.
If 011111110 (0x7E) is present in the user data, whenever the sender’s data link layer encounters five consecutive 1s in the data, it automatically stuffs (adds) a 0 bit into the outgoing stream.
When the receiver encounters five consecutive 1s in the data, it will destuff (remove) the preceding 0. This is known as bit stuffing.
How does Ethernet avoid collisions?
Ethernet uses carrier sense multiple access to avoid collisions.
Before a host sends data, it listens to the Ethernet to see if anyone else is using it at the moment. If not, it sends the data. If yes, it must wait until the carrier is free.
How does Ethernet detect collisions? And what happens after?
Ethernet uses carrier sense multiple access with collision detection (CSMA/CD) to detect collisions. If the host is seeing a signal on the network that is not the same signal as it is putting, it means someone else is transmitting too.
If a collision is detected, each host stops transmitting and waits a small, random period of time. The host then retries with carrier sense.
The random wait means that another collision is less likely as the other host will send either later or earlier.
What is the correlation between the minimum size of an Ethernet frame and collision detection?
An Ethernet frame must be on the copper wire long enough that the hardware can detect a collision.
The speed of the signal in the wire is the problem. Hence, a minimum frame size is needed.
Describe how a network switch handles collisions.
A switch understands the link layer and can track where a destination host is. It only sends the signal out on the single output that has the destination host.
This requires the switch to read and understand the MAC address in the frames and to track the socket where each host is plugged in. This is extra complexity in the switch hardware but reduces the number of possible collisions.
CSMA/CD is still needed because a switch has a limited buffer. The switch then sends a jamming signal on an input and resend later.
Explain why a full duplex switch will never have any collisions?
A full duplex switch has an independent inward and outward traffic to each host. This gives twice the total bandwidth of a regular switch.
No collisions are possible between opposing traffic as inward and outward traffic runs over different twisted pairs.