2 LANs
2 LANs
04/12/24 Networks 1
• The Protocol Stack
– Local Area Networks very often use a broadcast
transmission technology. This affects the protocol stack
in two ways:
1. The Data Link Layer is fatter, as it has to solve the
problem of sharing the medium (cable or fiber) with
other computers in a fair and efficient manner.
2. The Network Layer is often absent or else it is extremely
small, as there is no routing of packets.
– Recall that each packet is received by every computer connected
to the network.
No Network Layer (or very thin)
Transport Layer
Data Link
Layer This is called the Medium Access
Layer – MAC Sublayer
Physical
Layer
04/12/24 Networks 2
• The Protocol Stack
– The Network Layer is concerned with routing packets
from one computer to another through an intermediate
network of hosts to the destination computer.
– In Local Area Networks, there is very often a shared
broadcast medium (copper wire or fiber optic cable).
Each computer in the network is connected to this cable.
– This implies that there is no routing to be done.
– The reason for this is as follows, because all computers
are connected to the same cable when a sending
computer sends a frame (message) it specifies the
destination computers address as part of the frame.
– Each computer connected to the shared cable receives the
frame but every computer except the destination will
discard the frame.
04/12/24 Networks 3
• Standard LAN Technologies
– The two standard LAN Technologies covered here are
called “Ethernet” and “Token Ring”.
– These are international standards from the IEEE that are
used most widely for Local Area Networking.
– Both approaches differ in their method of sharing the
medium (i.e. the cable), hence their Medium Access
Control Sub-layer is different.
802.1 describes the Data Link Layer interface
primitives
Data Link 802.X describes the three LAN standards for the MAC
Layer sublayer at the bottom of the Data Link Layer and the
Physical Layer:
802.3 CSMS/CD (Ethernet)
Physical 802.4 Token Bus
Layer
802.5 Token Ring
04/12/24 Networks 4
– 802.3 was backed by Xerox, 802.4 by General Motors
and 802.5 by IBM.
• IEEE 802.3 Ethernet LANs
– The MAC layer uses CSMA/CD (Carrier Sense Multiple
Access with Collision Detection) technology.
– When a computer wants to transmit a frame it:
• Listens for a frame on the cable, if busy, the computer waits for
a random time and attempts transmission again. This is known as
Carrier Sense.
• If the cable is quiet, the computer begins to transmit.
• Two computers could transmit at the same time. To prevent this
happening, the transmitting computer listens to what it is
sending.
• If what it hears is different to what it is sending, then a collision
has occurred. This is known as Collision Detection.
04/12/24 Networks 5
• IEEE 802.3 Ethernet LANs
– When a computer wants to receive a frame it:
• Listens to all frames traveling on the cable.
• If the frame address is the same as the computer’s address or the
same as the group address of the computers of which it is a
member, it copies the frame from the cable.
• Otherwise it just ignores the frame.
• Note: Ethernet LAN is a broadcast network. It is possible to
– Unicast a frame from one computer to any other computer
connected to the same cable.
– Broadcast a frame from one computer to all other computers
connected to the same cable.
– Multicast a frame from one computer to a subset of the computers
connected to the same cable.
04/12/24 Networks 6
• IEEE 802.3 Frame Format
Bytes 7 1 2 or 6 2 or 6 2 0 – 1500 0 – 46 4
Preamble Start of
Destination Source Length of
7 bytes Frame Data Pad Checksum
Address Address Data Field
10101010 Delimiter
04/12/24 Networks 7
• IEEE 802.3 Frame Format
– Each manufacturer of Ethernet Network cards assigns
each card it manufactures a unique 48 bit Ethernet
Address
– Destination Address:
• If all the bits are 1 in the destination address, the
message is received by all computers connected to the
cable (i.e. Broadcast).
• If the first bit is 1, then the rest of the bits indicate a
multicast group address that can target more than one
computer.
• If the first bit is 0, the rest of the bits make up a
normal address, which is unique to a single computer
connected to the LAN.
– Source Address is the Ethernet address of the sending
computer.
04/12/24 Networks 8
• IEEE 802.3 Frame Format
– Length field tells how many bytes are present in the data
field from a minimum of 0 to a maximum of 1500.
– A data field of 0 bytes is legal, it causes a problem.
– When a computer detects a collision, it stops transmitting
its frame which means that corrupted frames appear on
the cable.
– To make it easier to distinguish valid frames from
corrupted frames (due to collisions), 802.3 requires valid
frames to be at least 64 bytes long from destination to
checksum.
– If the data portion is less than 46 bytes, the pad field is
used to check out the frame to the minimum size of 64
bytes.
– The Checksum is used to detect if any data bits have
been corrupted during transmission.
04/12/24 Networks 9
• IEEE 802.3 Cabling Standards
– The following is a list of the commonly used cables in
802.3 LANs.
Cable Name Cable Type Transmission Max. length Max. No. of
Rate before repeater Computer
needed
10Base5 Thick 10Mbsec 500 metres 100 per
coaxial segment
10Base2 Thin coaxial 10Mbsec 200 metres 30 per
cable segment
04/12/24 Networks 10
• IEEE 802.3 Cabling Standards
– 10Base5
• Connections are made using vampire taps i.e. the connections is
made by forcing a pin into the coaxial cable.
• This results in a poor connection between the computer and the
coaxial cable.
– 10Base2
• Up until recently, this was the most popular 802.3 cable because
it was cheap and there was a good connection between the
computer and the coaxial cable.
– 10BaseT
• Currently most popular since it is easy to maintain but is more
expensive.
– 10BaseF
• Good for high speed connections between buildings.
04/12/24 Networks 11
10Base5 10Base2 10BaseT
04/12/24 Networks 12
• IEEE 802.3 Cabling Standards
– The Tranceivers in the diagrams of the previous slide are
responsible for carrier sense and collision detection. It
consists of analogue circuitry.
– The Controller creates the frames and checksums and
sends these to the transceiver.
– The Controller also validates incoming frames and
consists of digital circuitry.
04/12/24 Networks 13
• 802.5 Token Ring LANs
– A Token Ring LAN consists of a collection of ring
interfaces connected by point-to-point lines.
Ring
interface
Unidirectional
Ring – One Way
Computers
04/12/24 Networks 14
• IEEE 802.5 Token Ring LANs
– The MAC sub layer uses Token Ring Technology.
– In a Token Ring LAN, a special bit pattern called the
token circulates around the ring whenever all computers
are idle.
– When a computer wants to transmit:
• It waits for the token to arrive.
• When it arrives, it removes the token from the ring. There is only
one token so only one computer can transmit at any one time.
• The computer can now transmit its frame on its output link.
• This frame will now propagate around the ring until it arrives
back at the sender who removes the frame from the ring.
• The sender then regenerates the token and passes it to the next
computer (restarting the above steps).
04/12/24 Networks 15
• IEEE 802.5 Token Ring LANs
– A computer removing the token, eliminates the
possibility of collisions.
– Removal of the token is done by inverting a bit in the 3
byte token. Inverting this bit converts the token into the
first 3 bytes of a normal data frame.
04/12/24 Networks 16
• IEEE 802.5 Frame Format
Bytes 3 2 or 6 2 or 6 4 1 1
Start of Checksum
Destination Source End Frame
Frame Data – No Limit Same as
Address Address Delimiter Status
Delimiter 802.3
04/12/24 Networks 17
• Comparison of 802.3 ‘Ethernet’ and 802.5 ‘Token
Ring’
– Generally they have similar technology with similar
performance.
– 802.3 Ethernet – Advantages
• Widely used at present. People are experienced in
using this technology.
• Simple Protocol. New computers can be added with
having to bring the network down.
• Almost zero delay at low load, there is no need to
wait for a token, you can transmit when ready.
04/12/24 Networks 18
• Comparison of 802.3 ‘Ethernet’ and 802.5 ‘Token
Ring’
– 802.3 Ethernet – Disadvantages
• The electronics is more complicated for carrier sense
and collision detection.
• The smallest frame must hold 64 bytes, this means
there is a substantial overhead if you are only
transmitting a single character from your machine.
• Ethernet is non-deterministic system (possibility of
repeated collisions). This means that Ethernet is not
suitable for network applications that require
guaranteed delivery times.
• Poor performance at high loads as there can be lots of
collisions reducing the number of messages that are
successfully transmitted.
04/12/24 Networks 19
• Comparison of 802.3 ‘Ethernet’ and 802.5 ‘Token
Ring’
– 802.5 Token Ring – Advantages
• Token Ring uses point-to-point connections between
ring interfaces so that the electronic hardware can be
fully digital and simple. There is no need for collision
detection.
• Can use any medium twisted pair is cheap and easy to
install but could equally use fiber optic if available.
• Throughput excellent at high loads since there is no
possibility of collisions unlike 802.3.
04/12/24 Networks 20
• Comparison of 802.3 ‘Ethernet’ and 802.5 ‘Token
Ring’
– 802.5 Token Ring – Disadvantages
• Computers must wait for the token to arrive, therefore at load, a
computer is delayed before sending.
• Each token ring has a monitor computer, to look after the ring
(i.e. remove damaged frames, handle lost frames and lost
tokens). This introduces a critical point of failure. If the monitor
computer failed, the remaining computers would have to wait
until it is replaced before being able to continue.
04/12/24 Networks 21