CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept
Each language got it’s own grammar, rules, regulations, and standards, and Ethernet is no exception. Understanding Ethernet LAN Standards will introduce to the most famous language used at the media level. In order to deal with Ethernet language, you have to understand and grasp its standards. Standards can be speed, cables length, cable pinouts, cable type, cable category, protocols, and frame size are all the building blocks of Ethernet communication.
It’s important to mention that technology and Ethernet language evolved based on communication needs, for instance, moving from Hub to Switch Technology, solved the colliding and broadcast storm situations that used to weaken communication performance when a Hub is used.
Table of Contents
The Ethernet Standards
Defined by the Institute of Electrical and Electronics Engineers (IEEE), the standard defines Cabling, Connections on the ends of the cables, data-link protocol that rules and control, and all the pieces that are required to create an Ethernet Frame. The Standards do not distinguish between Ethernet LAN and Ethernet as WAN connection.
Ethernet Physical Layer Standards
Nowadays, Ethernet is the de facto for Local Area Network (LAN) and Wide Area Network (WAN) to connect network devices together. In Ethernet Networks, all network devices such PCs, switches, and routers work together to deliver Ethernet frames from one device to another regardless if the Ethernet was used as LAN or WAN.
Ethernet uses the same encapsulation mechanism over all type of media cables using the Ethernet Data Link Layer Framing. Whether the IP Packets flow across the network using UTP Copper Cable, Fiber Optic, or over a Radiowave, and no matter what the speed is: Ethernet Data Link Header and Trailer use the same format to frame packets.
Logically Speaking: Ethernet Data-link Layer 2 Protocols focus on how to forward an Ethernet Frame from hop-to-hop using source to destination MAC addresses.
Physically Speaking: layer 1 standards focus on how to convert frames into bits over a cable.
Transmitting Data Using Twisted pairs
Almost all network devices at home or office use Unshielded Twisted Pair UTP cables. If you look inside an Unshielded Twisted Pair (UTP) wire, you will find that they are twisted together in parallel. The twisting is very important to cancel Electromagnetic Interference (EMI).
When electrical current passes over any wire, it creates EMI that interferes with the electrical signals in close by wires, including the inside wires that run in the same UTP cable. So, EMI between wire pairs in the same cable usually called crosstalk.
Twisting the wire pairs together, helps cancel out most of Crosstalk that surround the UTP cable when internal wires run beside each other, or run beside electrical equipment such electric motor (elevators).
The 10BASE-T and 100BASE-T standards require ONLY two pairs of wires one for each direction if Full-Duplex desired, while 1000BASE-T standard requires 4 pairs, two for each direction and the default is Full-Duplex. (Half-Duplex is not an Option with 1 Gig Ethernet)
Straight Through Cable pinouts
When talking about Cable pinouts, I would map the concept to 2 people talking on the phone. In order for you to hear the other person from your phone speaker, the mic of that person on the other end, should transmit that person voice, and the Speaker at your phone vibrate the voice out.
Meaning, you can’t expect a mic turns into speaker, or speaker turns into mic. Each device got its own job, mic transmit the voice, and the speaker receive the voice. Looking at 2 people talking to each other through a phone, you can imagine that the receiver and transmitter are in crossed over position for the conversation to happen. That is Transmitter (TX) and Receiver (RX).
As a rule, Ethernet PC’s NIC transmitter uses the pair connected to pins 1 and 2 to Listen or Receive, Switch’s interface port on the other hand, uses pin 3 and 6 to Listen and Receive. Consider the phone call again, you picked up the phone and start talking, your voice transmitter going through the microphone and the person who is listening to your voice on the other end receiving your voice through the speaker. The same concept happens between the PC’s NIC and the switch’s interface port.
a. PC’s NIC Talks or Transmits (TX) on pins 1 and 2 (mic), therefore, Listens or Receives (RX) on pins 3 and 6 (Speaker).
b. Switch’s interface port Talks or Transmits (TX) on pins 3 and 6 (mic), therefore, Listens or Receives (RX) on port 1 and 2 (Speaker).
With this in mind, PCs, Servers, Routers, and Printers will use 1 and 2 as mic to talk, hence, you need Straight through UTP Ethernet Cable to talk to a Switch device that listen at 3 and 6 as speaker.
Notice the pinouts above. White Orange to White Orange, Orange to Orange, White Green to White Green, and finally Green to Green.
Crossover Cable pinouts
A straight cable works correctly when any device wants to talk to a switch, however, when two like devices such PC to PC, Switch to Switch, Hub to Hub, and even PC to Router connect to an Ethernet link, they both transmit (Talk) on over the same pins 3 and 6. In that case, you need Crossover Cable in between for the communication happen.
Notice the pinouts above. White Orange to White Green, Orange to Green, White Green to White Orange, and finally Green to Orange.
Remember the following:
a. Devices Transmits on Pins 1 and 2 and Receive at 3 and 6 are:
- PCs, Servers
- Routers, Printers
- Wireless Access Points
- Basically anything other than a Switch or Hub
b. Devices Transmits on Pins 3 and 6 and Receive at 1 and 2 are:
- Hubs
- Switches
Determining the cable type to use
Straight through or Crossover Cable
- if 1 and 2 type device (PC) connect to 3 and 6 type device (Switch), requires Straight-Through Cable.
- If 1 and 2 type device (PC) connect to 1 and 2 type device (PC) requires Crossover cable.
Now reverse it:
- if 3 and 6 type device (Switch) connect to 1 and 2 type device (PC) requires Straight-Through Cable.
- if 3 and 6 type device (Switch) connected to 3 and 6 type device (Switch) requires Crossover Cable.
UTP Cabling for 1000BASE-T
Interestingly, the same standard above for 10BASE-T and 100BASE-T pinouts works correctly for 1000BASE-T cabling, except that 1000BASE-T uses the 4 pairs instead. Meaning, when you crimp the RJ-45 cable based on the color codes above either for Straight-Through or Crossover Cable, this pinouts configuration works correctly on 10, 100, and 1000BASE-T.
100BASE-T Straight-Through uses pin 1 to pin 1, pin 2 to pin 2, up through 8, just like in the earlier wiring of 10 and 100BASE-T, it uses all the wires inside the UTP cable. 1000BASE-T Crossover cable crosses the same two-wire pairs as the crossover similar to earlier 10 and 100BASE-T, the pair at pins 1 and 2 meet with pair 3 and 6.
In addition, another new pair added in case of 1000BASE-T that represents 4 and 5 to meet with 7 and 8 and crosses the pairs. It’s just another UTP cable using to complete 4 pairs instead of 2 pairs.
Forwarding Data inside an Ethernet Networks
Ethernet Protocol Standards rules control Ethernet regardless of the type of physical Ethernet link used such Copper or Fiber. Ethernet Protocols Control how Ethernet network devices such Hosts, Switches, and Routers forward Ethernet frames through an Ethernet Network based on MAC Addressing System.
Ethernet Data Link Protocol
The Ethernet Data Link protocol defines the Ethernet frame:
1. An Ethernet Header at the front
2. The Encapsulated Data in the middle; and
3. And an Ethernet Trailer at the end
The following figure shows Data Link Layer Encapsulating using Ethernet Frame.
Breaking down the Ethernet Header to 5 sections
IEEE 802.3 specification limits the data portion of the 802.3 frame to a minimum of 46 and a maximum of 1500 bytes. The Term Maximum Transmission Unit (MTU) defines the maximum Layer 3 packet that can be sent over a medium. Because IP packets reside inside the Data Portion of an Ethernet frame, 1500 bytes is the largest MTU allowed over an Ethernet, unless you use Jumbo Frame Network devices capable.
Hubs and Switches Overview
The use of modern switches allow the use of Full-Duplex logic, which is much faster and simpler than half-duplex logic used by Hubs.
Sending Ethernet with modern Switches using Full-Duplex vs. Hubs using Half-Duplex
In order to understand the difference between Hubs and switches, we need to go back little bit in time, to the beginning of the 1990’s! IEEE introduced 10BASE-T standard in 1990; 10BASE-T used a centralized cabling model similar to today’s ethernet LAN, meaning each device connecting to the LAN Hub using a UTP cable, using Category 3 back then (CAT3 UTP Cable). However, instead of a LAN switch, the early 10BASE-T networks used Hubs, because LAN switches had not yet been created.
LAN Hubs forward data using physical layer standards, and therefore considered to be Layer 1 devices. The downside of using LAN Hubs: if two or more devices transmitted a signal at the same instant, the electrical signal collides and becomes corrupted.
The worst part that a Hub repeats all received electrical signals, even if it receives multiple signals at the same. Being without switches in the market yet, and to prevent collisions due to using Hubs, the Ethernet nodes must use Half-Duplex logic based on Carrier Sense Multiple Access with Collision Detection (CSMA/CD) instead of Full-Duplex logic.
That means, a collision problem only occurs when two or more devices send at the same time and collide, Half-Duplex logic solved the problem by telling the nodes to sense the cable and check if someone else is sending, wait fraction of seconds before sending then send again.
Although most companies uses Switches these days and I doubt that you will ever see a Hub nowadays, but collision still can happen per port using switches! Yes, most common reasons are: Longer Cable then 100 Meter or Duplex Mismatch between the PC’s, Server’s, or Printer’s NIC and the switch’s Interface Port if 100Mb speed is being used. Duplex problem was eliminated by using 1Gb speed, taking advantage of 4 pairs inside the UTP cable which use Full-Duplex (CAT 5e and above).
That means, if the Duplex Auto-negotiation of one side (PC or Switch Port) failed to detect the duplex and speed settings at the other side (PC or Switch), then the port defaults to Half-Duplex! So you still need a very good understanding of Collision and how to prevent it. Upgrade to 1G Network.
Transparent Bridge
To solve Hubs drawbacks, especially the ONE Collision Domain situation, Engineers came up with a Transparent Bridge to divide a One Collision Domain to 2 Collisions Domains.
1. Bridges separated devices into groups called Collision Domains.
2. Bridges reduced the number of collisions that occurred in a Hub’s network, therefore, frames inside one collision domain will not collide with frames in another collision domain.
3. Bridges increased bandwidth by giving each collision domain its own separate bandwidth, with one sender at a time per collision domain.
Why hubs considered One Big Collision Domain (CD)? If we want to analyze an 8 ports Hub, we will find out that even though there are 8 ports it does not mean 8 separated collision domains (like Switches), Hubs are Layer 1 devices, they are dump devices (Just Repeaters) and have no intelligence what so ever about where the electrical signal going through them, or where it might be going in the LAN, or where should be forwarded.
So all they do as dump devices with the incoming signal from a specific port is: to Flood it out through the rest of the 8 ports (except the incoming port where the signal arrived) with no intelligence such Layer 2 Switches where it investigate each frame.
Meaning, if PC1 in the figure above wants to talk to the Web-Server, PC2 has to listen as well to the conversation – which is Unicast communication and not broadcast, but because hubs flood the signal to all ports (even Unicast), PC2 will for sure hear the conversation; creating unnecessary traffic, that is big time wasting bandwidth.
The Bridge, a predecessor to today’s Ethernet LAN switch, uses logic so that the frames in one Collision Domain do not collide with frames in the other Collision Domain. The bridge forwards frames between its two interfaces, and unlike a Hub, a bridge will buffer or queue the frame until the outgoing interface can send the frame.
As shown in the figure above, the 10BASE-T network on the left (CD1) has its own 10 Mbps to share, as does the network on the right (CD2). In this case, the total network bandwidth is doubled to 20 Mbps as compared with 10BASE-T One Big Collision Domain previous figure above.
Because of the Bridge, the devices on each side of the network (CD1 and CD2) can send to each other at 10 Mbps at the same time, created a Full-Duplex connection between CD1 and CD2 at the Bridge side.
Today’s Modern Bridge (LAN Switches)
If you replace a Hub with a LAN switch, a switch prevents collisions since it operates at the Data Link Layer, hence, considered as Layer 2 device. It looks at the data link layer Header and Trailer to decide by looking at the MAC address in order to determine frames destination.
Giving the switch a way to manage the frames through some kind of forwarding to the right port, and even if the switch needed to forward multi-frames to the same network device, the switch would send one frame and queue the other frames until the first frame was processed and finished. That is huge advancement compared to hubs!
Each switch’s port is a Collision Domain by itself. If only two devices connected to each other using Layer 2 intelligence (which means the signal will be addressed as Frame), they can use Full-Duplex. Switches use Full-Duplex on each link (One Pair to send and another Pair to receive).
Meaning, one way to Enter and another way to Exit, but the concept might be difficult to see. Full-Duplex means that a NIC or Switch port has no half-duplex restrictions such 1G speed.
LAN switches perform the same basic core as bridges, but at much faster speeds and with many enhanced hardware features using Application Specific Integrated Circuit (ASIC) for faster frame forwarding. That’s why is very hard to emulate a switch using GNS3, but you still can use the EtherSwitch model.
The following figure shows how a switch’s ports acted like an independent bridge by itself, created 4 Collision Domains and 4 Ethernet Segments.
Comparing Layer 1 Limitations vs. Layer 2 Functions
Layer 1 Limitation:
- Cannot communicate or collaborate with upper Layers.
- No Addressing Scheme to identify Network devices by Mac Addresses.
- Only recognize streams of bits – NO frames.
- Cannot determine the source of a transmission when multiple devices are transmitting.
Layer 2 Functions:
- The Ability to communicate and collaborate with upper Layers via the Sub-Layer of Data-Link Layer called “Logical Link Control”.
- Uses Frames to organize bits into groups.
- If Ethernet used, it uses the sub-layer of Data-Link Layer Called “Media Access Control” (MAC) to identify transmission source and destination.
Subject Related
By Wikipedia IEEE Group | Cisco Docs Ethernet | LanTronix Ethernet Tutorials | Router Ally Ethernet Guide | IEEE 802.3 | Cisco CCNA Simplified | Cisco CCNA in 60 Days | Networking for Dummies | CCNA R&S Certification Kit | Ethernet Definitive Guide
CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> Models, Protocols, and Standards Section
- Understanding TCP/IP and OSI Models
- Understanding Packet Flow Across the Network Part1
- Understanding Packet Flow Across the Network Part2
- Understanding Ethernet LAN Standards
- Understanding Ethernet MAC Addresses
- Understanding WAN Technologies
- Understanding Data Link Layer Encapsulation
- Understanding EoMPLS WAN Technology
- Understanding IP Routing Process Concept
- Understanding Web Browser DNS Lookup
- Understanding ARP Broadcast Message
- Understanding TCP and UDP Protocols
- Understanding TCP and UDP Multiplexing
- Understanding Application Layer Services
- Understanding Quality of Service Concept
Brooke McAvoy author says
It is nice to have such clear information on what type of cable to use. Sometimes, I mess it up when I am reversing it. I will have to write this down somewhere so that I don't end up messing myself up again. Thank you for the detailed article and for all of your applicable instructions!
Imad Daou author says
I am glad you found the information helpful. Thanks.