Professional Documents
Culture Documents
Lecture 9 - Datalink-Physical Layer
Lecture 9 - Datalink-Physical Layer
HEDSPI Project
Hanoi University of Technology
by
Ngo Hong Son
1
Overview
Last weeks : Datalink layer
Datalink layer services
Multiple access control
Ethernet LAN, ARP and addressing
Today: More about LAN and physical layer
More about LAN: Bridge and Switch, WLAN
Physical layer issues
Physical media: copper, twisted pair, fiber, wireless
2
Hub, Switch, Bridge
3
LAN interconnected devices
Hub, bridge and switch
Have multiple ports
Hub: a physical layer repeater
Just receives electrical signal from one port and
forward to all others
Do not have data-link layer services
Bridges and switches
Smarter than hub
Can store and forward Ethernet frame
4
Switch A
5
Source: A
Dest: A’
Build address table: self-learning
A A’ A
switch learns which
C’ B
hosts can be reached
through which interfaces 1 2
when frame received, 6 3
switch “learns” location of 5 4
sender: incoming LAN
segment C
records sender/location B’
pair in switch table A’
6
Switch: frame filtering/forwarding
When frame received:
example Dest: A’
A A A’
C’ B
frame destination 1 2
unknown: flood A6A’ 3
5 4
destination A
location known: A’ A
C
selective send
B’ A’
8
Switch and router
Store and forward
Switch: datalink layer
Router: network layer
10
802.11 LAN Overview
Base station = access
Internet point (AP) and wireless
hosts
Infrastructure mode
hub, switch Basic Service Set (BSS)
or router wireless hosts
AP
access point (AP): base
BSS 1 station
AP
Ad hoc mode: hosts only
BSS 2 11
Various standards
802.11b 802.11g
2.4-5 GHz unlicensed 2.4-5 GHz range
spectrum up to 54 Mbps
up to 11 Mbps 802.11n: multiple
802.11a antennae
2.4-5 GHz range
5-6 GHz range
up to 200 Mbps
up to 54 Mbps
12
802.11: Channels, association
Spectrum is divided into 11 channels at different
frequencies
AP admin chooses frequency for AP
13
Passive/active scanning
BBS 1 BBS 2 BBS 1 BBS 2
AP 1 AP 2 AP 1 1 AP 2
1 1 2 2
2 3
3 4
H1 H1
A B C
C
A’s signal C’s signal
B strength strength
A
space 15
IEEE 802.11 MAC Protocol: CSMA/CA
802.11 sender
1 if sense channel idle for DIFS then sender receiver
transmit entire frame (no CD)
2 if sense channel busy then DIFS
RTS(A) RTS(B)
reservation collision
RTS(A)
CTS(A) CTS(A)
DATA (A)
defer
time
ACK(A) ACK(A)
18
802.11 frame: addressing
2 2 6 6 6 2 6 0 - 2312 4
frame address address address seq address
duration payload CRC
control 1 2 3 control 4
19
802.11 frame: addressing
Internet
H1 R1 router
AP
802.3 frame
802.11 frame
20
802.11 frame: more
frame seq #
duration of reserved
(for reliable ARQ)
transmission time (RTS/CTS)
2 2 6 6 6 2 6 0 - 2312 4
frame address address address seq address
duration payload CRC
control 1 2 3 control 4
2 2 4 1 1 1 1 1 1 1 1
Protocol To From More Power More
Type Subtype Retry WEP Rsvd
version AP AP frag mgt data
frame type
(RTS, CTS, ACK, data)
21
Summary LAN
Ethernet LAN
Interconnecting LAN: Hub, switch, bridge
WLAN
22
Physical layer
23
Overview
Transmission problem
Put the bit stream from sender host to physical
media
Receive bit stream from physical media to
receiver host
Some issues
Physical media
Modulation
Encoding
…
24
From Signals to Packets
Analog Signal
“Digital” Signal
Bit Stream 0 0 1 0 1 1 1 0 0 0 1
0100010101011100101010101011101110000001111010101110101010101101011010111001
Packets
Header/Body Header/Body Header/Body
Packet
Transmission Sender Receiver
25
Physical media
Guided media
Twisted Pair
Coaxial Cable
Fiber Optics
Wireless
Radio Transmission
Microwave Transmission
Infrared and Millimeter Waves
Lightwave Transmission
26
Twisted Pair
28
Fiber Optics
29
Fiber Cables
31
802.15: personal area network
802.15: evolved from
Bluetooth specification
P
2.4-2.5 GHz radio band S
up to 721 kbps P
radius of
M
coverage
less than 10 m diameter
P
master/slaves: S P
S
S Slave device
P Parked device (inactive)
32
Encoding
Use two discrete signals, high and low, to encode 0
and 1.
Transmission is synchronous, i.e., a clock is used to
sample the signal.
In general, the duration of one bit is equal to one or two
clock ticks
Receiver’s clock must be synchronized with the sender’s
clock
Encoding can be done one bit at a time or in blocks
of, e.g., 4 or 8 bits.
33
Non-Return to Zero (NRZ)
0 1 0 0 0 1 1 0 1
.85
V 0
-.85
.85
V 0
-.85
.85
V 0
-.85
.1s
37
Next week: Security
Virus, mal-ware, security hole and DoS
Password cracking
Sniffing, phishing and information protection
Firewall, Anti-virus
Encryption
38
Acknowledgement
This course materials contains charts and texts
provided:
Some materials from the textbook “Computer Network, a
top down approach” J.F Kurose and K.W. Ross
Some materials from the textbook “Computer Network”, A.
Tanenbaum
39