Ethernet is a collection of network protocols that standardize how network devices connect and transmit data between one another.
Cabling
Copper
Standards
The Ethernet standards for copper cables are defined in IEEE 802.3:
Speed | Name | IEEE Standard | Informal Name | Maximum Length |
---|---|---|---|---|
10 Mpbs | Ethernet | 802.3i | 10BASE-T | 100 meters |
100 Mbps | Fast Ethernet | 802.3u | 100BASE-T | 100 meters |
1 Gbps | Gigabit Ethernet | 802.3ab | 1000BASE-T | 100 meters |
10 Gbps | 10 Gig Ethernet | 802.3an | 10GBASE-T | 100 meters |
The copper cables used in Ethernet cables are Unshielded Twisted Pair (UTP). There are four twisted pairs of wires in a copper Ethernet cable, but only 1000BASE-T and 10GBASE-T use all four pairs, whereas 10BASE-T and 100BASE-T use only two pairs.
10BASE-T and 100BASE-T
On a host or router, pins 1 and 2 transmit data to the switch, which receives the data on its pins 1 and 2. On the other hand, the switch transmits data on pins 3 and 6 and the host or router receives data on pins 3 and 6. Since data only flows one direction for each of these pairs, it enables full-duplex transmission of data.
This configuration is also known as straight-through, meaning the cable connects the same pin numbers together, e.g., pin 1 on the host connects to pin 1 on the switch. There are also crossover cables that will connect pin 1 to pin 3 and pin 2 to pin 6, which allows for connecting to host devices, two routers, or two switches together without collisions.
But, all of this is rendered pretty moot by Auto MDI-X, which allows devices to automatically detect which pins neighbor devices are transmitting on and adjust accordingly. So unless you are working with old networking hardware, crossover and straight-through are not concepts you need to worry about much.
1000BASE-T and 10GBASE-T
The faster Ethernet standards just use the other two pairs of wires, which are pins 4 and 5 and pins 7 and 8. These standards also differ in that each pair is bidirectional.
Fiber Optic
Fiber optic Ethernet connections make use of a Small Form-Factor Pluggable (SFP) Transceiver that can have a fiber optic cable plugged into it for Ethernet. Fiber optic cables have a glass core and facilitate the transmission of data with light. They have four layers, from inner to outer:
- The fiberglass core
- Cladding that reflects light
- A protective buffer
- The cable jacket
Fiber optic cables have two possible modes.
Fiber Optic Modes
Multimode Fiber
Multimode fiber optic cables have a wider core diameter, allowing multiple angles (modes) of light to enter the fiberglass core. It allows longer cables than UTP, but not as long as single mode.
Single-Mode Fiber
Single-mode fiber optic cables have a narrower core diameter, which allows light to enter only at a single angle. Single-mode allows even longer cables than multimode fiber and UTP. They are also more expensive.
Standards
The standards for fiber optic cables are also laid out in IEEE 802.3:
Informal Name | IEEE Standard | Speed | Cable Type | Max Length |
---|---|---|---|---|
1000BASE-LX | 802.3z | 1 Gbps | Multi/Single | 550 meters/5 kilometers |
10GBASE-SR | 802.3ae | 10 Gbps | Multi | 400 meters |
10GBASE-LR | 802.3ae | 10 Gbps | Single | 10 kilometers |
10GBASE-ER | 802.3ae | 10 Gbps | Single | 30 kilometers |
Protocol Details
Ethernet packets move through local area networks (LANs) encapsulated by a header and a trailer. Their combined size is 26 bytes.
Ethernet Header
The Ethernet header has five fields.
Preamble
The preamble is a 7-byte (56 bit) field of alternating bits (1010101010…). It’s purpose is to allow devices to synchronize their receiver clocks.
Start Frame Delimiter (SFD)
The start frame delimiter (SFD) is a single byte (8 bit) field that signals the end of the preamble and the beginning of the frame. It’s pattern is 10101011.
Destination
The destination is a 6-byte field that specifies the MAC address of the device receiving the frame.
Source
The source is a 6-byte field that specifies the MAC address of the device sending the frame.
Type
The type is a 2-byte (16 bit) field. It is used to express either the type of the packet or the length of the packet in bytes. If the value of the type (in decimal) is 1500 or less, it is expressing the length of the packet. If it is greater than 1536, it indicates the type of packet, which is typically IPv4 or IPv6. IPv4 is indicated by value 0x0800 (in hexadecimal, 2048 in decimal) and IPv6 is indicated by value 0x86DD (34,525 in decimal).
Ethernet Trailer
The Ethernet trailer has just one field: the Frame Check Sequence (FCS). It’s four bytes in length (32 bits) and is used to detect corrupted data using a cyclic redundancy check (CRC) algorithm on the received data.
Frame Types
An Ethernet frame is called unicast when it is addressed to a single target. It is called broadcast when it’s addressed to the broadcast MAC address FFFF.FFFF.FFFF. A broadcast frame is sent to every device on the network.
LAN Switching
When a device sends a packet to another device on the same LAN, the packet goes to the switch. The switch will check whether the source MAC address is in its MAC address table, and if it’s not, the MAC address gets added to the table along with the interface it’s connected to. This is known as a dynamic MAC address. On Cisco devices, dynamic MAC addresses are removed from the MAC address table after 5 minutes of inactivity.
MAC Address | Interface |
---|---|
ABCD.EF12.3456 | F0/1 |
6543.21FE.DCBA | F0/2 |
ACBD.3021.D32A | F0/3 |
Next, the switch will check whether the destination MAC address is in its MAC address table. If it’s not, the frame is called an unknown unicast frame and the frame is flooded to all devices on the network. If the destination MAC address is in the MAC address table, the frame is called a known unicast frame and is only sent to the correct device.
Once the correct device receives the packet, it’s processed normally up the OSI stack.