2.1.6 Routing, Ethernet and Collision Management
A switch moves frames within a local network, while a router moves packets between networks. Ethernet defines how devices communicate across many wired LANs. Earlier shared Ethernet networks could suffer collisions, so they used CSMA/CD to manage access to the transmission medium.
This section first follows a packet through a router and then compares shared Ethernet with modern switched Ethernet.
By the end of this section, you should be able to:
- describe the role of a router in connecting networks;
- explain how a router uses a destination IP address and routing information;
- distinguish the roles of a router and a switch;
- describe Ethernet as a wired LAN technology;
- explain why collisions occur on a shared transmission medium;
- describe the sequence used by CSMA/CD;
- explain how switched full-duplex Ethernet avoids collisions.
The role of a router
A router connects different networks and forwards packets between them. A home router may connect a private LAN to an Internet service provider, while an organisation may use routers to connect departments, buildings or remote sites.
What makes a router different?
- It has interfaces connected to two or more networks.
- It makes forwarding decisions using network-layer addresses, especially IP addresses.
- It uses a routing table to identify a suitable next step towards the destination network.
- It separates one network from another rather than treating all connected devices as one LAN.
Common mistake
A router does not normally deliver every packet directly to its final destination. It often sends the packet to the next router on the route.
How a router forwards a packet
A student computer on one LAN requests a page from a server on another network:
- The computer recognises that the destination is outside its own local network.
- It sends the packet towards its default gateway, which is a router interface.
- The router reads the packet's destination IP address.
- The router compares the destination with entries in its routing table.
- It selects an outgoing interface or next-hop router.
- The packet is forwarded towards the destination network.
- Other routers may repeat the process until the packet reaches the final network.
Default gateway: the router interface to which a host sends packets destined for another network.
| Destination | Router decision |
|---|---|
| A device on the same LAN | No router is required; the frame can be delivered within the LAN. |
| A server on another school subnetwork | Forward through the interface leading to that internal network. |
| An Internet destination | Forward towards the organisation's upstream or Internet-facing router. |
| No more specific route is known | Use a default route, when one has been configured. |
Exam tip
Use the sequence: read destination IP → consult routing table → choose next hop or interface → forward packet.
Switch and router: different responsibilities
| Comparison | Switch | Router |
|---|---|---|
| Main purpose | Connect devices within a LAN | Connect different networks |
| Data unit considered | Frame | Packet |
| Address mainly used | MAC address | IP address |
| Stored forwarding information | MAC address table | Routing table |
| Typical decision | Which switch port leads to the destination device? | Which interface or next hop leads towards the destination network? |
Common mistake
Both devices forward data, but they do so at different levels. A switch forwards frames inside a LAN; a router forwards packets between networks.
Ethernet foundations
Ethernet is a family of technologies used mainly for wired local area networks. Wired Ethernet is standardised under IEEE 802.3.
IEEE 802.3: the standards family associated with wired Ethernet.
The important contrast here is between:
- shared Ethernet, where several devices compete for one transmission medium;
- switched Ethernet, where each device normally has a dedicated link to a switch.
Common mistake
Ethernet is not another name for the Internet. Ethernet is commonly used inside LANs; the Internet connects many different networks using a wider set of technologies.
Why collisions occur
Because all devices share one medium, two devices may find it free and begin transmitting almost simultaneously. Their signals then overlap and the frames cannot be interpreted correctly.
Why listening first is not enough
Signals take a small amount of time to travel. Device A may start transmitting before Device B's signal has reached it, while Device B may do the same before A's signal arrives.
Common mistake
A collision is not a packet being delivered to the wrong computer. It is corruption produced when simultaneous signals overlap on a shared medium.
CSMA/CD
Shared half-duplex Ethernet used Carrier Sense Multiple Access with Collision Detection to coordinate access and recover after collisions.
Multiple access: several devices share the same medium.
Collision detection: monitor the medium while transmitting to identify interference.
- Listen: check whether another transmission is present.
- Wait if busy: do not transmit while the medium is in use.
- Transmit if free: begin sending the frame.
- Monitor: continue checking for evidence of a collision.
- Stop after collision: abandon the corrupted transmission.
- Signal the collision: ensure other devices recognise that the attempt failed.
- Back off: wait for a randomly selected period.
- Retry: listen again and make another attempt.
The random delay matters because identical fixed delays could cause both devices to retransmit together and collide repeatedly.
Exam tip
listen → transmit when free → detect → stop → random backoff → retry
How modern switched Ethernet avoids collisions
In a modern Ethernet LAN, each device usually has its own link to a switch. The link can operate in full-duplex mode.
- Devices do not compete for one shared cable.
- Each device communicates through a dedicated switch link.
- Full-duplex operation removes the shared half-duplex collision condition.
- The switch forwards frames to the relevant output port.
- If an output is temporarily busy, the switch can queue the frame in a buffer.
Full-duplex: communication in both directions at the same time.
| Feature | Shared Ethernet | Switched Ethernet |
|---|---|---|
| Access to medium | Multiple devices share it | Each device has a dedicated switch link |
| Duplex mode | Half-duplex | Normally full-duplex |
| Collision possibility | Possible | Not expected on the dedicated link |
| CSMA/CD | Used to manage access and recover | Not needed |
| Traffic handling | Signal available across the shared medium | Switch directs frames and may buffer them |
Common mistake
Switched Ethernet is not collision-free merely because it is faster. Collisions are avoided because the shared half-duplex medium has been replaced by dedicated full-duplex links.
Interactive: Ethernet Explorer
Use the existing widget to compare one transmission with two simultaneous transmissions. First select shared legacy Ethernet, then repeat the demonstration using switched Ethernet.
Practice
Routing
- Describe the role of a router in a network.
- Explain how a router decides where to forward a packet.
- Explain the purpose of a default gateway.
- Compare the forwarding decisions made by a switch and a router.
- Trace a packet from a school computer to a server on another network.
Ethernet and collisions
- Explain why collisions can occur on shared Ethernet.
- Explain why carrier sensing cannot guarantee that no collision occurs.
- Describe the CSMA/CD process in the correct order.
- Explain the purpose of the random backoff.
- Explain why modern switched Ethernet does not require CSMA/CD.
Review
| Concept | Core idea |
|---|---|
| Router | Forwards packets between networks using destination IP addresses and routing information. |
| Routing table | Helps select an outgoing interface or next hop. |
| Ethernet | A family of wired LAN technologies associated with IEEE 802.3. |
| Collision | Overlapping transmissions corrupt signals on a shared medium. |
| CSMA/CD | Listen, transmit, detect, stop, back off randomly and retry. |
| Switched Ethernet | Dedicated full-duplex links avoid the collision condition. |