Chapter 1. Introduction to Data Communications
Networks, Security, and Privacy
158.235
A/Prof Julian Jang-Jaccard
Massey University
Physical Layer
Reading: Chapter 3 in the prescribed textbook
Physical Layer
• Layer 1 in the Internet model
• Focus on transmission over
circuits
• Types of Circuits
– Physical circuits connect
devices & include wires
– Logical circuits refer to the
transmission characteristics of
the circuit
– Physical and logical circuits may
be the same or different. For
example, in multiplexing, one
physical wire may carry several
logical circuits.
Internet Model
Application
Transport
Network
Data Link
Physical
Outline
• Media
• Digital Transmission of Digital Data
• Analog Transmission of Digital Data
• Digital Transmission of Analog Data
Media
• Physical matter that carries (the voice or data)
transmission
• Guided media:
• Transmission flows along a physical guide
• e.g. twisted pair, coaxial cable and fiber optic cable
• Wireless media (radiated media)
• the transmission flows through the air or space
• e.g. Examples radio such as microwave and satellite
Guided Media
• Twisted-pair (TP) cable
– Insulated pairs of wires bundled together
– Wires twisted to reduce electromagnetic interference
– Some times use additional shielding (STP)
– Commonly used for telephones, LANs
– Characteristics
• Price – inexpensive
• Distance – typically up to 100m
• Use – Telephones, LANs
Guided Media
• Coaxial cable
– Has a single copper core, plus
outer insulation, shielding, and
inner insulation
– Less prone to interference
– Characteristics
• Price – inexpensive (but
more costly than TP)
• Distance – up to 2 km (1.2
miles)
• Use: Cable TV / Internet
Guided Media
• Fiber optic cable
– Optical core made of glass or
plastic
– Data transmitted using light from
lasers or LEDs
– Resistant to interference and
corrosion
– Extremely fast data rates
– Characteristics
• Price: Expensive
• Distance: 500m – 100km
• Use: Trunk line / Backbone,
long distance circuits (e.g.,
undersea cables)
Guided Media
• Fiber optics
– Multimode (about 50 micron core)
– Graded index multimode
– Single mode (about 5 micron core)
Wireless Media
• Radio
– Wireless transmission of electrical waves through
air
– Each device on network has a radio transceiver
operating at a specific frequency range
– Enables mobile network communication
– Characteristics
• Distance: depends on frequency and power
• Use: Wireless LANs, cellular and cordless
phones, baby monitors
Wireless Media
• Microwave
– High-frequency radio
communication
– Requires line of sight which may
require large antennas and towers
– Affected by weather
– Characteristics
• Distance: ~60 km (due to
curvature of earth
• Use: Trunk line / Backbone, long
distance
• Satellite
– Special form of microwave
communication
– Long distance leads to
propagation delays
Factors Used in Media Selection
• Type of network
– LAN, WAN, or Backbone
• Cost
– Always changing; depends on the distance
• Transmission distance
– Short: up to 300 m; medium: up to 500 m
• Security
– Wireless media is less secure
• Error rates
– Wireless media has the highest error rate (interference)
• Transmission speeds
– Constantly improving; Fiber has the highest
Media Summary
Outline
• Media
• Digital Transmission of Digital Data
• Analog Transmission of Digital Data
• Digital Transmission of Analog Data
Types of Data Transmitted
• Analog data
– Produced by telephones
– Sound waves, which vary continuously over time,
analogous to one’s voice
– Can take on any value in a wide range of
possibilities
• Digital data
– Produced by computers, in binary form
– Information is represented as code in a series of
ones and zeros
– All digital data is either on or off, 0 or 1
Types of Transmission
• Analog-Analog transmissions
– Analog data transmitted in analog form
– Examples of analog data being sent using analog transmissions
are broadcast TV and radio
• Digital-Digital transmissions
– Computer networks send digital data using digital transmissions
• Analog Digital Transmissions
– Modem (modulator/demodulator): used when digital data is sent
as an analog transmission
– Codec (coder/decoder): used when analog data is sent via digital
transmission
Data Type vs. Transmission Type
Analog
Transmission
Digital
Transmission
Analog
Data
AM and FM Radio,
Broadcast TV
Pulse code
modulation.
MP3, CDs, iPOD,
VoIP
Digital Data Modems – sending
email from your
house using
telephone line
Data transmitted as
ASCII/EBCDIC over
Ethernet LANs,
printer
• Coding scheme needed to
ensure sender and receiver
understand messages (e.g.,
ASCII, Unicode, etc.)
• A character is represented by a
group of bits
Digital Data-Digital Transmission
Digital Transmission of Digital Data
• Sender and receiver must agree upon:
– Set of symbols
• How bits are encoded as voltages or light
pulses
• e.g., +5V might be encodes as a “1”
– Symbol rate
• How many symbols are sent per second
• e.g., with a symbol sent at every clock cycle. 64
kilohertz (kHz) = 64,000 symbols/sec
Digital Transmission of Digital Data
• Five types of signaling techniques
1. Unipolar – voltage is 0 or positive representing
binary bits (in some circuits, 0 and negative
voltage could be used)
Digital Transmission of Digital Data
• Five types of signaling techniques
2. Bipolar NRZ – voltage is positive or negative,
but not zero
• Fewer errors than unipolar because signals
are more distinct
Digital Transmission of Digital Data
• Five types of signaling techniques
3. Bipolar RZ – voltage is positive or negative,
returning to zero between each bit
• Fewer synchronization errors than bipolar
NRZ
Digital Transmission of Digital Data
• Five types of signaling techniques
4. Bipolar AMI – voltage is 0, positive, or negative,
returns to zero between each bit, and alternates
between positive and negative voltage
Digital Transmission of Digital Data
• Five types of signaling techniques
5. Manchester – voltage is positive or negative and
bits are indicated by a mid-bit transition
Ethernet uses it – less susceptible to bit errors to
going unnoticed
Outline
• Media
• Digital Transmission of Digital Data
• Analog Transmission of Digital Data
• Digital Transmission of Analog Data
Analog Transmission of Digital Data
• Telephone system built for analog data
– Electrical signals mimic sound waves (i.e., voice)
– Analog transmissions take on range of values (vs.
discrete values of digital transmissions)
– Need a modem (modulator/demodulator) to
convert from analog to digital and vice versa
Analog Transmission of Digital Data
• Three characteristics of waves
1. Amplitude: height of wave (decibels)
2. Frequency: waves per second (hertz)
• Wavelength is the inverse of frequency
3. Phase: wave direction (degrees) or the point
at which the wave begins
Analog Transmission of Digital Data
• Carrier wave is basic wave transmitted
through a circuit
• Modulation is the modification of a carrier
wave’s fundamental characteristics in order to
encode information
• Three ways to modulate a carrier wave:
1. Amplitude Modulation (AM) or Amplitude Shift Keying (ASK)
2. Frequency Modulation (FM) or Frequency Shift Keying (FSK)
3. Phase Modulation (PM) or Phase Shift Keying (PSK)
Analog Transmission of Digital Data
• Amplitude
Modulation
• Frequency
Modulation
• Phase
Modulation
Analog Transmission of Digital Data
• Symbol: One or more modifications to a carrier
wave used to encode data
• Can send 1 bit by defining two different symbols
(e.g., amplitudes, frequencies, etc.)
• Can send multiple bits by defining more than two
symbols
– Need more complicated information coding schemes
– 1 bit of information 2 symbols
– 2 bits of information 4 symbols
– 3 bits of information 8 symbols
– n bits of information 2
n
symbols
Analog Transmission of Digital Data
• Two-bit Amplitude Modulation
– With 4 levels of amplitude defined as symbols, 2
bits can be transmitted per symbol
Analog Transmission of Digital Data
• Data rate (or bit rate) is the number of bits
transmitted per second
• Symbol rate: number of symbols transmitted per
second
Data rate = symbol rate × (# bits/symbol)
• Example
Symbol rate = 16,000 symbols/sec
#bits/symbol = 4 bits/symbol
Data rate = 16,000 symbols/sec × 4 bits/symbol
= 64,000 bits/sec = 64Kbps
Outline
• Circuits and Data Flow
• Multiplexing
• Media
• Digital Transmission of Digital Data
• Analog Transmission of Digital Data
• Digital Transmission of Analog Data
Digital Transmission of Analog Data
• Codecs (COde, DECode) is a device or software
that converts an analog signal (e.g., voice) into
digital form and the reverse
• Pulse-Code Modulation (PCM) converts analog
to digital by:
1. Sampling the analog signal at regular intervals
2. Measuring the amplitude of each sample
3. Encoding (quantizing) the amplitude as binary data
• Quantizing Error is the difference between the
original analog signal and the approximated,
digital signal
PAM – Measuring Signal
• Sample analog waveform across time and measure
amplitude of signal
• In this example, quantize the samples using only 8 pulse
amplitudes or levels for simplicity
• Our 8 levels or amplitudes can be depicted digitally by using
0’s and 1’s in a 3-bit code, yielding 2
3
possible amplitudes
PAM – Encoding and Sampling
000 – PAM Level 1
001 – PAM Level 2
010 – PAM Level 3
011 – PAM Level 4
100 – PAM Level 5
101 – PAM Level 6
110 – PAM Level 7
111 – PAM Level 8
• For digitizing a voice signal, it is typically 8,000 samples per second
and 8 bits per sample
• 8,000 samples x 8 bits per sample 64,000 bps transmission rate
needed
• 8,000 samples then transmitted as a serial stream of 0s and 1s
111 110 011 …… ………… 111 …..
Minimize Quantizing Errors
• Increase number of amplitude levels
– Difference between levels minimized smoother signal
– Requires more bits to represent levels more data to
transmit
– Adequate human voice: 7 bits 128 levels
– Music: at least 16 bits 65,536 levels
• Sample more frequently
– Will reduce the length of each step smoother signal
– Adequate Voice signal: twice the highest possible frequency
(4Khz x 2 = 8000 samples / second)
– RealNetworks: 48,000 samples / second
Digital Transmission of Analog Data
Wired and Wireless
Local Area Networks
Reading: Chapter 6 in the prescribed textbook
Why Use a LAN?
Information sharing
Improved decision making
May reduce data duplication and inconsistency
Resource sharing
Devices such as printers can be shared by many
clients
Software sharing
Some software can be purchased on a per-seat
basis and resides on server
Reduces costs, simplifies maintenance and
upgrades
Device Management
Software updates and configuration are easier
LAN Components
1. Clients
2. Servers
3. Network interface cards
(NICs)
4. Network cables
5. Hubs / switches / access
points
6. Software
LAN Components
1. Clients
– Devices on the network that request information from
servers
2. Servers
– Devices on the network that deliver information or
provide services to clients
3. Network interface cards (NIC)
– Also called network cards and network adapters
– Operate at layers 1 and 2
– Commonly built into motherboards
– Ethernet NICs contain unique MAC address
LAN Components
4. Network Cables
Name Type
Maximum
Data Rate Used by
Category 3 UTP 10 Mbps 10BASE-T
Category 5 UTP/STP 100 Mbps 100BASE-T
Category 5e UTP/STP 1 Gbps 1000BASE-T
Category 6/6a UTP/STP 10Gbps 10GBASE-T
OM1 (62.5/125 µm) Fiber 1-10 Gbps* 1000BASE-SX
OM3 (50/125 µm) Fiber 10-100 Gbps* 10GBASE-SR
* Speed depends on circuit length
LAN Components
5. Hubs and switches
Link cables from different devices, sometimes
more than one type of cabling
Act as repeaters, reconstructing and
strengthening incoming signals
LAN Components
5. Access points (APs) use radio waves to
connect wireless clients to the wired network
(instead of connecting using hubs/switches)
– Many APs use power over Ethernet (PoE) for
electricity
– No external power is needed
– Power flows over unused twisted pair wires
– Also used by some IP cameras and phones
LAN Components
LAN Components
6. Software
– Network Operating System (NOS)
• Runs on devices and manage networking functions
• E.g., Novel NetWare, Microsoft Windows Server,
Linux
• E.g., Cisco IOS or JUNOS on routers
– Clients devices typically have network software
components included with OS installation
• E.g., TCP/IP included in Windows, OS X, and Linux
• Allows clients to view and access available network
resources
– Provides directory services about LAN resources
– Network profiles specify resources that devices and
users can access
WIRED ETHERNET
Wired Ethernet
• Used by almost all LANs today
• Originally developed by a consortium of
Digital Equipment Corp., Intel and Xerox
• Standardized as IEEE 802.3
• Layer 2 protocol, but physical layer must
meet protocol requirements
Topology
Topology: Basic geographic layout of a
network
Types
Logical: How the network works conceptually
Physical: How the network is physically installed
Hub-based (Shared) Ethernet
Hub-based Ethernet
Also called shared or traditional Ethernet
Logical bus topology means that all devices
receive every frame as if they were connected to
the same circuit
The hub is a multiport repeater
Hub-based (Shared) Ethernet
Hub-based Ethernet uses physical star
topology
A
B
C
D
E
Message
for C
Messag
e for C
Messag
e for C
Messag
e for C
Messag
e for C
Message
for C
Swtich-based Ethernet
Logical star topology means that only the
destination receives the frame
– Switch reads destination address of the frame and
only sends it to the interface (physical port)
connected to a circuit
– Uses forwarding tables (also called MAC or CAM
tables), which are similar to routing tables
– Breaks up the collision domain
Physical star topology
Switch-based Ethernet
Switch-based Ethernet
A
B
C
D
E
Message
for C
Message
for C
Switch Operation
Switches learn which MAC address is
associated with an interface (physical port)
by reading the source address on a frame
When a new frame is received, the switch
reads the destination MAC address
Looks up destination address in the
forwarding table
– If found, forwards frame to the corresponding
interface
– If not found, broadcasts frame to all devices (like
a hub)
Forwarding table
Switch-based Ethernet
Switch Forwarding Table
A
B
C D
1 2
3 4
00-22-69-13-EA-3E 00-22-69-13-EA-3A
00-22-69-13-EA-01
00-22-69-13-EA-6C
MAC Port
00-22-69-13-EA-3E 1
00-22-69-13-EA-3A 2
00-22-69-13-EA-01 3
00-22-69-13-EA-6C 4
Learning Switch Operation
• Switch starts by working like a simple hub
– With an empty forwarding table
• It gradually fills its forwarding
table by learning about the
nodes
– Reads the source MAC address of the incoming frame
and records it to the corresponding port number
– Reads the destination MAC address. If not in the Table
then it broadcasts the frame to all ports
– Waits for the destination computers to respond, and
repeats the first step
Media Access Control (MAC)
• Uses a contention-based protocol called
CSMA/CD (Carrier Sense Multiple Access /
Collision Detect)
• Frames can be sent by two computers on
the same network at the same time
• They will collide and destroy each other
• Can be termed as “ordered chaos”
• Tolerates, rather than avoids, collisions
CSMA/CD
• Carrier Sense (CS):
– A computer listens to the bus to determine if another
computer is transmitting before sending anything
– Transmit when no other computer is transmitting
• Multiple Access (MA):
– All computers have access to the network medium
• Collision Detect (CD):
– Declared when any signal other than its own detected
• Normally occurs before the transmission of 512th bits
– If a collision is detected
• To avoid a collision, both wait a random amount of
time and then resend message
WIRELESS ETHERNET
Wireless Ethernet
• Commonly called Wi-Fi
• A family of standards developed by IEEE
formally called 802.11
• Uses radio frequencies to transmit signals
through the air (instead of cables)
• Wi-Fi has many benefits
– Provides network connections where cabling is
impossible or undesirable
– Allows device and user mobility
– Potentially more economical than wired networks
Wireless Ethernet
• Components
– Access points (APs)
• Antenna type
– Omnidirectional
– Directional
• Association with AP
– Active vs. passive scanning
– Wireless NICs
• Topology
Physical star
Logical bus
Association with AP
AP 2 AP 1
H1
BBS 2 BBS 1
1
2
3
1
passive scanning:
(1) beacon frames sent from APs
(2) association Request frame sent:
H1 to selected AP
(3) association Response frame sent
from selected AP to H1
AP 2
AP 1
H1
BBS 2 BBS 1
1
2 2
3
4
active scanning:
(1)Probe Request frame
broadcast from H1
(2)Probe Response frames sent
from APs
(3)Association Request frame
sent: H1 to selected AP
(4)Association Response frame
sent from selected AP to H1
WLAN Media Access Control
• Uses CSMA/CA
– CA collision avoidance (before collision happens)
– A station waits until another station is finished
transmitting plus an additional random period (i.e. back-
off timer) before sending anything
• collisions harder to detect on wireless Ethernet
(‘over the air’), so more effort is put into avoidance
• Contrast with CSMA/CD
– detect collision, stop transmission, wait, and re-transmit
– after collision
MAC Techniques
• May use two MAC techniques simultaneously
– Distributed Coordination Function (DCF)
• Also called “Physical Carrier Sense Method”
– Point Coordination Function (PCF)
• Also called “Virtual Carrier Sense Method”
• Optional: (can be set as “always”, “never”, or “just
for certain frame sizes”)
Distributed Coordination Function
• Relies on the ability of computers to physically listen before
they transmit
– When a node wants to send a message:
• First listens to make sure that the transmitting node has
finished, then
• Waits a period of time longer
• Each frame is sent using stop-and-wait ARQ
– By waiting, the listening node can detect that the sending node has
finished
• ACK/NAK sent a short time after a frame is received, (hence,
ensuring no collision occurring) shorter than the wait time
required for other nodes to start transmitting
• DCF Suffers from the hidden node problem
Sender
1 if sense channel idle for DIFS then
transmit entire frame (no CD)
2 if sense channel busy then
start random backoff time
timer counts down while channel idle
transmit when timer expires
if no ACK, increase random backoff interval,
repeat 2
Receiver
– if frame received OK
return ACK after SIFS (ACK needed due to
hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
Distributed Coordination Function
Hidden Node Problem
A
B
C
Hidden terminal/node problem
B, A hear each other
B, C hear each other
A, C can not hear each other
means A, C unaware of their
interference at B
A B C
A’s signal
strength
space
C’s signal
strength
Signal attenuation:
B, A hear each other
B, C hear each other
A, C can not hear each other
interfering at B
Point Coordination Function
• Hidden Node problem
– Two computers can not detect each other’s signals
• A computer is near the transmission limits of the AP
at one end and another computer is near the
transmission limits at the other end of the AP’s range
• Cannot sense each other’s transmission signals
– DCF method will not work
• Solution: PCF
– First send a Request To Send (RTS) signal to the AP
• Request to reserve the circuit and duration
– AP responds with a Clear To Send (CTS) signal,
• Also indicates duration that the channel is reserved
– Computer wishing to send begins transmitting
Point Coordination Function
AP
A B
time
DATA (A)
defer
802.11 Frame
Address 2: source MAC address
Address 1: AP
to receive this frame
Address 3: dest. MAC
address
Address 4: used only
in ad hoc mode
Addres
s 1
(6
bytes)
FCS
(6 bytes)
Frame
Control
(2 bytes)
Addres
s 2
(6
bytes)
Sequen
ce
Control
(2
bytes)
Data
(46-2312
bytes)
Duratio
n / ID
(2
bytes)
Addres
s 3
(6
bytes)
Addres
s 4
(6
bytes)
Address 2: source MAC
address
• Includes four address fields
Two addresses have the same meaning as in
wired Ethernet, the others are used
communicating with APs and other devices
Frequency Ranges
• WiFi devices transmit and receive within frequency ranges
– These frequency ranges are divided into “channels”
• Frequency ranges
– 2.4 GHz range
• 2.412-2.462 Ghz
• 3 non-overlapping channels
– 5 GHz range
• 5.180-5.320 and 5.745-5.825 Ghz
• 12 non-overlapping channels
• Larger frequency range → higher potential bandwidth
• Higher frequency → greater attenuation (i.e., shorter range)
• Overlapping channels should be minimized
Types of Wi-Fi
Type
Date
Published
Max Tx
Speed
Frequency
(Ghz)
Official Status
802.11a 1999 54 Mbps 5, 3.7 Obsolete
(Superseded)
802.11b 1999 11 Mbps 2.4 Obsolete
(Superseded)
802.11g 2003 54 Mbps 2.4 Obsolete
(Superseded)
802.11n 2009 600 Mbps 2.4/5 Obsolete
(Superseded)*
802.11ac 2013 6.77 Gbps 2.4,5 Current
802.11ad 2012 ~7 Gbps 2.4, 5 Current
802.11ax Est. 2019 ? 2.4, 5 In-Progress
*Still widely used in 2014
END