Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 60

Local Area Networks Overview

Engr. Awais Ahmed Khowaja


LAN (Local Area Networks)
• A LAN consists of
—Shared transmission medium
• now so valid today due to switched LANs
—set of hardware and software for the
interfacing devices
—regulations for orderly access to the medium
Why High Speed LANs?
• Office LANs used to provide basic
connectivity
—Connecting PCs and terminals to mainframes
and midrange systems that ran corporate
applications
—Traffic patterns were light
• Emphasis was on file transfer and electronic mail
• Speed and power of PCs has risen
—Graphics-intensive applications and GUIs
• Client/server computing is now dominant
architecture in business environment
• Computing over network
• Frequent transfer of large volumes of data 
LAN Protocol Architecture
• Corresponds to lower two layers of OSI
model
• IEEE 802 reference model
—Logical link control (LLC)
—Media access control (MAC)
—Physical
IEEE 802 Protocol Layers vs.
OSI Model
IEEE 802 Layers - Physical
• Signal encoding/decoding
• Preamble generation/removal
—for synchronization
• Bit transmission/reception
• Specification for transmission medium and
topology
802 Layers - Medium Access
Control & Logical Link Control
• OSI layer 2 (Data Link) is divided into two in 802
— Logical Link Control (LLC) layer
— Medium Access Control (MAC) layer
• MAC layer
— Assembly of data into frame with address and error
detection fields (for transmission)
— Disassembly of frame (on reception)
— Address recognition
— Error detection
— Govern access to transmission medium
• Not found in traditional layer 2 data link control
• LLC layer
— Interface to higher levels
— flow control
— Based on classical Data Link Control Protocols (so we
will cover later)
LAN Protocols in Context
Generic MAC & LLC Format
• Actual format differs from protocol to
protocol
• MAC layer receives data from LLC layer

• MAC layer detects errors and discards


frames
• LLC optionally retransmits unsuccessful
LAN Topologies
• Bus
• Ring
• Star
Bus Topology
• Stations attach to linear medium (bus)
— Via a tap - allows for transmission and reception
• Transmission propagates in medium in both directions
• Received by all other stations
• Terminator absorbs frames at end of medium
• Need to identify target station
• Each station has unique address
• Destination address included in frame header
• Need to regulate transmission
— To avoid collisions
• If two stations attempt to transmit at same time, signals will
overlap and become garbled
— To avoid continuous transmission from a single station. If one
station transmits continuously access blocked for others
• Solution: Transmit Data in small blocks – frames
Frame Transmission - Bus LAN
Ring Topology
• Repeaters joined by point-
to-point links in closed loop
—Receive data on one link and retransmit on
another
—Links unidirectional
—Stations attach to repeaters
• Data transmitted in frames
—Circulate past all stations
—Destination recognizes address and copies
frame
—Frame circulates back to source where it is
removed
• Medium access control determines when
Frame
Transmission
Ring LAN
Star Topology
• Each station connected
directly to central node
—using a full-duplex
(bi-directional) link

• Central node can broadcast (hub)


—Physical star, logically bus
—Only one station can transmit at a time
• Central node can act as frame switch
—retransmits only to destination
—today’s technology
Medium Access Control (MAC)
• In LANs data is broadcast
—there is a single medium shared by different
users
• We need MAC sublayer for
—orderly and efficient use of broadcast medium
• This is actually a “channel allocation”
problem
• Synchronous (static) solutions
—everyone knows when to transmit
• Asynchronous (dynamic) solution
—in response to immediate needs
—Two categories
• Round robin
Static Channel Allocation
• Frequency Division
Multiplexing (FDM)
• Channel is divided to carry
different signals at
different frequencies
• Efficient if there is a
constant (one for each
slot) amount of users with
heavy traffic
• Problematic is there are
less or more users
• Even if the amount of
users = # of channels,
utilization is still low since
typical network traffic is
not uniform and some
Static Channel Allocation
• Time Division
Multiplexing
• Each user is statically
allocated one time slot
— if a particular user
does not have
anything to send, it
waits and wastes the
channel for that
period
• Inefficient for the
cases discussed in
FDM
Dynamic Channel Allocation
Categories
• Round robin
—each station has a turn to transmit
• declines or transmits (to a certain limit)
• overhead of passing the turn in either case
—Performs well if many stations have data to
transmit for most of the time
• otherwise passing the turn would cause inefficiency
Dynamic Channel Allocation
Categories
• Contention
—All stations contend to transmit
—No control to determine whose turn is it
—Stations send data by taking risk of collision
(with others’ packets)
• however they understand collisions by listening to
the channel, so that they can retransmit
—There are several implementation methods
—In general, good for bursty traffic
• which is the typical traffic types for most networks
—Efficient under light or moderate load
—Performance is bad under heavy load
Ethernet (CSMA/CD)
• Carriers Sense Multiple Access with
Collision Detection
—is the underlying technology
• Xerox – Ethernet (1976) by Metcalfe
• IEEE 802.3 – standard (1983)

• Contention technique that has basis in


famous ALOHA network
ALOHA
• Packet Radio (applicable to any shared medium)
— initially proposed to interconnect Hawaiian Islands
• by Norman Abramson of Univ. of Hawaii (early 70s)
• When station has frame, it sends
— collisions may occur
• Station listens for max round trip time
• If no collision, fine. If collision, retransmit after a
random waiting time
• Max channel utilization is 18% - very bad
Slotted ALOHA
• Divide the time into discrete intervals (slots)
— equal to frame transmission time
— need central clock (or other sync mechanism)
— transmission begins at slot boundary
• Collided frames will do so totally or will not
collide
• Algorithm
— If a node has a packet to send, sends it at the beginning
of the next slot
— If collision occurred, retransmit at the next slot with a
probability p
• Why with a probability?
• Max channel utilization is 37%
— doubles Normal ALOHA, but still low
CSMA (Carrier Sense Multiple
Access)
• First listen for clear medium (carrier sense)
• If medium idle, transmit
• If busy, continuously check the channel until it is
idle and then transmit
• If collision occurs
— Wait random time and retransmit
• Collision probability depend on the propagation
delay
— Longer propagation delay, worse the utilization
• Collision occurs even if the propagation time is
zero.
— WHY?
• 1-persistent CSMA
• Better utilization than ALOHA
Nonpersistent CSMA
• Patient CSMA
• If channel idle, send
• If not, do not continuously seize the
channel
—instead wait a random period of time
• Better utilization, longer delay
p-Persistent CSMA
• Applies to slotted channels
• If channel is idle
—send with a probability p
—defer until the next slot with probability 1 – p
—repeat this algorithm until it sends or channel
becomes busy by another station
• if channel becomes busy in this way, then wait a
random period of time and repeat the same
algorithm
• If channel is initially busy, then check the
next slot
• larger p means smaller channel utilization
and smaller waiting time for the packets
CSMA/CD (IEEE 802.3 – Ethernet)
• With CSMA, collision occupies medium for
duration of transmission
—it is inefficient to complete the transmission of
a collided packet
• As in 1-persistent CSMA
—If medium idle, transmit
—If busy, listen for idle, then transmit
• Stations listen while transmitting
• If collision detected (due to high voltage
on bus), cease transmission and wait
random time then start again
— random waiting time is determined using
binary exponential backoff mechanism
CSMA/CD
Operation
Binary exponential back off
• random waiting period but consecutive collusions
increase the mean waiting time
— mean waiting time doubles in the first 10 retransmission
attempts
— after first collision, waits 0 or 1 slot time
— if collided again (second time), waits 0, 1, 2 or 3 slots
— if collided for the ith time, waits 0, 1, …, or 2i-1 slots
— the randomization interval is fixed to 0 … 1023 after
10th collision
— station tries a total of 16 times and then gives up if
cannot transmit
• low delay with small amount of waiting stations
• large delay with large amount of waiting stations
one slot time = max. round trip delay = 51.2 microsecs in 10 Mbps
Ethernet (see coming slides)
CSMA/CD - Details of Contention
• Sending station must make sure that
— all other stations are aware its transmission
and
— there is no collision on the channel
• so the sending station has to continue
transmission for a duration of the worst
case scenario in which understanding a
collision takes as long as the round trip
time
—this is closely related to the length of the cable
(bus) and the propagation speed
—for 2500 meters of coax cable (standard for 10
Mbps Ethernet), round trip time is approx 50
microseconds
Minimum Frame Size
• Previous discussion also has minimum
frame size implication
— at 10 Mbps: one bit takes 100 ns to be
transmitted
—In order to occupy the channel during 50
microsecs
• one frame at minimum should be 500 bits
• plus some safety margins and rounding, minimum
frame size is set to 512 bits (64 bytes) in IEEE 802.3
IEEE 802.3 Frame Format

>= >=

Preamble is alternating 0’s and 1’s (for clock synchronization)


SFD is 10101011
FCS excludes Preamble and SFD
Addresses are uniquely assigned by IEEE to manufacturers.
Why unique?
10Mbps Medium Options
• 10 Base2
— Thick coax - obsolete
• 10Base5
— Thin coax
— Bus topology
— 500meters max segment length
• max 5 segments connected via repeaters  max. 2500
meters
— 100 max stations per segment
• 10BaseT
— most commonly used one (see next slide)
• 10BaseF
— Optical fiber
— star topology or point to point
— too expensive for 10 Mbps
10BASE-T
• Unshielded twisted pair (UTP) medium
— regular telephone wiring
• Point to point using cross-cables
• Star-shaped topology
— Stations connected to central hub or switch (multiport
repeater)
— Two twisted pairs (transmit and receive)
— Hub accepts input on any one line and repeats it on all
other lines
• Physical star, logical bus
• collisions are possible
• Link limited to 100 m
• Multiple levels of hubs can be cascaded
An Example Two-Level Star
Topology
Interconnection Elements in
LANs
• Bridges
• Hubs
• Switches
Bridges
• Need to expand beyond single LAN
• Interconnection to other LANs and WANs
• Use Bridge or Router
• Bridge is simpler
—Connects similar LANs
—Identical protocols for physical and link layers
—Minimal processing
• Router more general purpose
—Interconnect various LANs and WANs
Functions of a Bridge
• Read all frames transmitted on one LAN
and accept those addressed to any station
on the other LAN
• Using MAC protocol for second LAN,
retransmit each frame
• Do the same the other way round
Bridge Operation Example
Bridge Design Aspects
• No modification to content or format of frame
• No additional header
• Exact bitwise copy of frame from one LAN to
another
— that is why two LANs must be identical
• Enough buffering to meet peak demand
• Routing and addressing intelligence
— Must know the addresses on each LAN to be able to tell
which frames to pass
— May be more than one bridge to reach the destination
• May connect more than two LANs
• Bridging is transparent to stations
— Appears to all stations on multiple LANs as if they are on
one single LAN
Bridge Protocol Architecture
• IEEE 802.1D
• operates at MAC level
—Station address is at this level
—Bridge does not need LLC layer
Shared Medium Hub
• Central hub
• Hub retransmits incoming signal to all
outgoing lines
• Only one station can transmit at a time
• With a 10Mbps LAN, total capacity is
10Mbps
Layer 2 Switches
• Central repeater acts as switch
• Incoming frame switches to appropriate
outgoing line
—Unused lines can be used to switch other
traffic
—More than one station transmitting at a time
—Each device has dedicated capacity equal to
the LAN capacity, if the switch has sufficient
capacity for all
Layer 2 Switch Benefits
• No change to software or hardware of
devices
• Attachment is not logically different from
the attached device point of view
Types of Layer 2 Switch
• Store and forward switch
—Accept input, buffer it briefly, then output
• Cut through switch
—Take advantage of the destination address
being at the start of the frame
—Begin repeating incoming frame onto output
line as soon as address recognized
—May propagate some bad frames
• WHY?
Layer 2 Switch vs. Bridge
• A layer 2 switch may function as a multiport
bridge
— i.e. a bridge functionality also exists in layer 2 switches
• Some differences
— Bridge only analyzes and forwards one frame at a time
— Switch has multiple parallel data paths
• Can handle multiple frames at a time
— Bridge uses store-and-forward operation
— Switch also has cut-through operation
• Bridges are not common nowadays
— New installations typically include layer 2 switches with
bridge functionality rather than bridges
Problems with Layer 2
Switches (1)
• As number of devices in LANs grows, layer 2
switches show some limitations
— Broadcast overload
• In LANs some protocols (e.g. ARP) work in broadcast
manner
— Lack of multiple links
• Set of devices and LANs connected by layer 2
switches share common MAC broadcast address
— If any device issues broadcast frame, that frame is
delivered to all devices attached to network connected
by layer 2 switches and/or bridges
— In large network, broadcast frames can create a
significant overhead
Problems with Layer 2
Switches (2) and Solution
• Current standards for bridge protocols
dictate no closed loops
—Only one path is allowed between any two
devices
• Limits both performance and reliability.
• Solution: break up network into
subnetworks connected by routers (that
operate at IP layer)
—MAC broadcast frame limited to devices and
switches contained in single subnetwork
—IP-based routers employ sophisticated routing
algorithms
• Allow use of multiple paths between subnetworks
going through different routers
Problems with Routers and
Layer 3 Switches
• Routers are designed to be implemented at the
gateway and only process packets to/from outer
networks
— outside traffic is less than the internal traffic
• High-speed LANs and high-performance layer 2 switches
pump millions of packets per second
— the same router may create a performance bottleneck
in the heart of a LAN
• Solution: layer 3 switches
— Implement packet-forwarding logic of router in
hardware
• faster
• Two categories
— Packet by packet
— Flow based
Layer 3 Switch Categories
• Packet by packet
—Operates in same way as traditional router
—but much faster
• Flow-based layer 3 switch tries to enhance
performance by identifying flows of IP
packets that have same source and
destination
—Done by observing ongoing traffic or using a
special flow label in packet header (IPv6)
—Once flow is identified, predefined route can
be established to speed-up the forwarding
process
Typical Large LAN Organization
• Thousands to tens of thousands of devices
• Desktop systems links 10 Mbps to 100 Mbps
— Into layer 2 switch
• Wireless LAN connectivity available for mobile
users
• Layer 3 switches at local network's core
— Form local backbone
— Interconnected at 1 Gbps
— Connect to layer 2 switches at 1 Gbps
• Servers connect directly to layer 2 or layer 3
switches at 1 Gbps
• Lower-cost router provides WAN connection
• Circles in diagram identify separate LAN
subnetworks
— MAC broadcast frame limited to a single subnetwork
Typical Local Network
Configuration
100Mbps (Fast Ethernet)
• 100BaseT4
— to use voice grade cat 3 cables
— 3 pairs in each direction with 33.3 Mbps on each using a
ternary signalling scheme (8B6T = 8 bits map to 6 trits)
• total 4 pairs (2 of them bidirectional)
— Can be used with cat 5 cables (but waste of resources)
• 100Base-X
— Unidirectional data rate of 100 Mbps
— Uses two links (one for transmit, one for receive)
— Two types: 100Base-TX and 100Base-FX
• 100Base-TX
— STP or cat 5 UTP only (one pair in each direction)
— at 125 Mhz with special encoding that has 20% overhead
• 4 bits are encoded using 5-bit time
• 100Base-FX
— Optical fiber (one at each direction)
— Similar encoding
Fast Ethernet - Details
• Same message format as 10 Mbps
Ethernet
• Star-wire topology
—requires switches for full-duplex
communication to achieve 200 Mbps effective
transmission rate
—In fact, shared medium no longer exists
• no collisions, thus CSMA/CD algorithm no longer
needed
• but stations can continue CSMA/CD and same
message format is used for backward compatibility
reasons
Gigabit Ethernet
• Strategy same as Fast Ethernet
—New medium and transmission specification
—Retains CSMA/CD protocol and frame format
—Compatible with 100BASE-T and 10BASE-T
• Why gigabit Ethernet?
— 10/100 Mbps load from end users creates
increased traffic on backbones
• so gigabit Ethernet is meaningful for backbones
Example Gigabit Ethernet
Configuration
Gigabit Ethernet – Physical
• 1000Base-SX
—Short wavelength, multimode fiber
• 1000Base-LX
—Long wavelength, Multi or single mode fiber
• 1000Base-CX
—A special STP (<25m)
• one for each direction
• 1000Base-T
—4 pairs, cat 5 UTP (bidirectional)
Gigabit Ethernet Medium
Options (Log Scale)
10Gbps Ethernet
• Why?
— same reasons: increase in traffic, multimedia
communications. etc.
• Primarily for high-speed, local backbone
interconnection between large-capacity switches
• Allows construction of (MANs) and WANs
— Connect geographically dispersed LANs
• Variety of standard optical interfaces
(wavelengths and link distances) specified for 10
Gb Ethernet
— 300 m to 40 kms
— full duplex
10-Gbps Ethernet Data Rate and
Distance Options (Log Scale)

You might also like