0% found this document useful (0 votes)
3 views

week10

The document provides an overview of the IEEE 802 protocol suite, focusing on Ethernet as a dominant wired LAN technology and its evolution in speed and topology. It explains the differences between hubs and switches, the structure of Ethernet frames, and the principles of Carrier Sense Multiple Access with Collision Detection (CSMA/CD). Additionally, it covers wireless networks, including the elements of WLANs and the 802.11 specifications.

Uploaded by

drakebobby152
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

week10

The document provides an overview of the IEEE 802 protocol suite, focusing on Ethernet as a dominant wired LAN technology and its evolution in speed and topology. It explains the differences between hubs and switches, the structure of Ethernet frames, and the principles of Carrier Sense Multiple Access with Collision Detection (CSMA/CD). Additionally, it covers wireless networks, including the elements of WLANs and the 802.11 specifications.

Uploaded by

drakebobby152
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Ethernet

IEEE 802 Protocol Suite


— A family of IEEE standards for body, personal, local area networks and
metropolitan area networks
— Specifies data link & physical layer
— 802.2 logical link control (LLC)
— 802.3 Ethernet
— 802.11 wireless local area networks (WLAN)
— 802.15 Wireless personal area networks (WPAN) – bluetooth, zigbee, body
area networks, etc.
Application

Transport
IEEE802.2 Logic Link Control (LLC)
Network
LLC 802.3 802.11 802.15
Data Link MAC Ethernet WLAN WPAN

Physical PHY
357
Ethernet
— “dominant” wired LAN technology:
— cheap ~$20 for 1Gbps cards, ~$100 for 10Gbps cards
— first widely used LAN technology
— Kept up with speed race: 10 Mbps – 400Gbps

Metcalfe’s Ethernet
sketch

358
Bus vs. Star topology
— Bus topology popular through mid 90s

host host host host

— Now star topology prevails


— Connection choices: hub or switch

hub or
switch

359
Hubs vs Switches
— Both connect segments of LANs
— Hubs are layer-1 devices that duplicate
the messages to other ports
— Computers connected by hubs are in
the same contention domain
— Switches are layer-2 devices that
forward the messages to the selected
port
— Computers connected by switches
are in the same broadcast domain
— Point-to-point link between a
computer and a switch
360
Ethernet Frame Structure
— Sending adapter encapsulates IP datagram (or other network
layer protocol packet) in Ethernet frame
8 6 6 2 4

— Preamble:
— 7 bytes with pattern 10101010 followed by 1 byte with pattern
10101011
— used to synchronize receiver, sender clock rates

361
Ethernet Frame Structure (more)
8 6 6 2 4

— Addresses: 6 bytes, frames are received by all adapters on a LAN


and dropped if address does not match
— Type: 2 bytes, indicates the types of the Ethernet frame
(Ethernet II, 802.2 LLC frame,…)
— CRC: 4 bytes, checked at receiver, if error is detected, the frame
is simply dropped
— Data payload: maximum 1500 bytes, minimum 46 bytes
— If data is less than 46 bytes, pad with zeros to 46 bytes
— (“Jumbo frame” up to 9000 bytes for 1G/10G/100G)

362
Unreliable, connectionless service
— Connectionless: No handshaking between sending and
receiving adapter.
— Unreliable: receiving adapter doesn’t send acks or nacks to
sending adapter
— stream of datagrams passed to network layer can have gaps
— gaps will be filled if app is using TCP
— otherwise, app will see the gaps

363
Medium Access Control in Ethernet
— Shared medium with bus or star topology with hubs
— Carrier Sensing Multiple Access with Collision Detection
(CSMA/CD)
— Half-duplex: nodes take turns in transmissions
— Point-to-point in star topology with switches
— Full duplex: can send and receive at the same time
— How to learn which port a device is connected?

364
CSMA (Carrier Sense Multiple Access)
— CSMA: listen before transmit
— If channel sensed idle: transmit entire frame
— If channel sensed busy, defer transmission

— don’t interrupt others!

— Does this eliminate all collisions?


— No, CSMA just reduces collision

365
Collision in CSMA

— CSMA reduces but does not


eliminate collisions

366
CSMA/CD

Packet?
No

Sense clear Detect


Send
Carrier Collision

Yes
Discard
Packet Jam channel
b=CalcBackoff();
attempts < 16
wait(b);
attempts++;
attempts == 16

367
Collision in CSMA/CD

— B and D can tell that collision


occurred.
— Jamming signal: inform all other
stations that they shouldn’t transmit

368
Limits on CSMA/CD Network
latency d B
A

— Latency depends on physical length of link


— Time to propagate a packet from one end to the other
— Suppose A sends a packet at time t
— And B sees an idle line at a time just before t+d
— … so B happily starts transmitting a packet
— B detects a collision, and sends jamming signal
— But A can’t see collision until t+2d

369 — Implication on minimum frame size


Switched Ethernet
— Switches are link layer device
— stores and forwards Ethernet frames
— examines frame header and selectively forwards frame based on
MAC dest address
— transparent
— hosts are unaware of presence of switches
— plug-and-play, self-learning
— switches do not need to be configured

370
Forwarding switch
1
2 3

switch
switch switch

• How do determine onto which LAN segment to forward frame?


• Looks like a routing problem...

371
Self learning
— A switch has a switch table
— entry in switch table:
— (MAC Address, Interface, TTL)
— stale entries in table dropped (TTL can be 60 min)
— switch learns which hosts can be reached through which
interfaces
— when frame received, switch “learns” location of sender:
incoming LAN segment
— records sender/location pair in switch table

372
Filtering/Forwarding
When switch receives a frame:

index switch table using MAC dest address


if entry found for destination
then{
if dest on segment from which frame arrived
then drop the frame
else forward the frame on interface indicated
}
else flood forward on all but the interface
on which the frame arrived

373
Switch example
— Suppose C sends frame to D
switch address interface
1 A 1
2 3
B 1
E 2
hub hub hub G 3
A
I
D F
B C G H
E

Switch receives frame from from C


notes in switch table that C is on interface 1
because D is not in table, switch forwards frame into interfaces 2 and 3
frame received by D
374
Switch example
— Suppose C sends frame to D
address interface
switch
1 A 1
2 3
B 1
E 2
hub hub hub G 3
A
I C 1
D F
B C G H
E

Switch receives frame from from C


notes in switch table that C is on interface 1
because D is not in table, switch forwards frame into interfaces 2 and 3
frame received by D
375
Switch example
— Suppose D replies back with frame to C.
address interface
switch
1 A 1
2 3
B 1
E 2
hub hub hub G 3
A
I C 1
D F
B C G H
E

Switch receives frame from from D


notes in the switch table that D is on interface 2
because C is in table, switch forwards frame only to interface 1
frame received by C
376
Switch example
— Suppose D replies back with frame to C.
address interface
switch
1 A 1
2 3
B 1
E 2
hub hub hub G 3
A
I C 1
D 2
D F
B C G H
E

Switch receives frame from from D


notes in the switch table that D is on interface 2
because C is in table, switch forwards frame only to interface 1
frame received by C
377
Switch: traffic isolation
— switch installation breaks subnet into LAN segments
— switch filters packets:
— same-LAN-segment frames not usually forwarded onto other
LAN segments
— segments become separate collision domains

switch

collision
domain

hub
hub hub

378 collision domain collision domain


Institutional network
mail server
to external
network
router web server

switch
IP subnet

switch
switch switch

379
Summary: Comparison of Hubs,
Switches & Routers
5 5
4 4
3 3 3
2 2 2 2
1 1 1 1 1
host hub switch router host
hubs routers switches

traffic no yes yes


isolation
plug & play yes no* yes

optimal no yes no
routing
cut yes no yes*
through 5-380
WLANs
Elements of a wireless network
wireless hosts
l laptop, smartphone, tablet
l run applications
l may be stationary (non-
mobile) or mobile
network
l wireless does not always
infrastructure
mean mobility

382
Elements of a wireless network
base station
l typically connected to
wired network
l relay - responsible for
sending packets
network between wired
infrastructure
network and wireless
host(s) in its “area”
l e.g., cell towers
802.11 access points

383
Elements of a wireless network
wireless link
l typically used to connect
mobile(s) to base station
l also used as backbone
link
network l multiple access protocol
infrastructure coordinates link access
l various data rates,
transmission distance

384
Elements of a wireless network
infrastructure mode
l base station connects
mobiles into wired
network
l handoff: mobile changes
base station providing
network connection into wired
infrastructure network

385
Elements of a wireless network
Ad hoc mode
l no base stations
l nodes can only transmit
to other nodes within link
coverage
l nodes organize
themselves into a
network: route among
themselves

386
802.11 LAN architecture
l wireless host communicates with base
station
Internet l base station = access point (AP)
l Basic Service Set (BSS) (aka “cell”)
l in infrastructure mode contains
router wireless hosts and access point
(AP): base station
AP hub, switch l ad hoc mode: hosts only (IBSS)
l Distribution system (DS)
BSS 1 l Connects multiple APs
AP l Extended service set (ESS)
l Two or more basic service sets
interconnected by DS

ESS
387 BSS 2
IEEE 802.11 Specs

388
From wikipedia
389
5GHz (802.11a/h/j/n/ac)

Channel Width Valid Channel Numbers


36, 40, 44, 48, 52, 56, 60, 64, 100, 104,
108, 112, 116,
20 MHz
120, 124, 128, 132, 136, 140, 144, 149,
153, 161, 165, 169
38, 46, 54, 62, 102, 110, 118, 126, 134,
40 MHz
142, 151, 159
80 MHz 42, 58, 106, 122, 138, 155
160 MHz 50, 114

390
802.11 frame: addressing # in bytes

2 2 6 6 6 2 6 0 - 2304 4
frame address address address seq address
duration payload CRC
control 1 2 3 control 4

Address 4: used only


Address 1: MAC address in ad hoc mode
of wireless host or AP Address 3: MAC address
to receive this frame of router interface to
Address 2: MAC address which AP is attached
of wireless host or AP
transmitting this frame

391
802.11 frame: addressing

Internet
H1 R1 router

R1 MAC addr H1 MAC addr


dest. address source address

802.3 frame

AP MAC addr H1 MAC addr R1 MAC addr


address 1 address 2 address 3

802.11 frame
392
802.11 frame: more
duration of reserved
frame seq #
transmission time (RTS/CTS)
(for reliable ARQ)
2 2 6 6 6 2 6 0 - 2304 4
frame address address address seq address
duration payload CRC
control 1 2 3 control 4
Mac Header in bytes

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

in bits

frame type
(RTS, CTS, ACK, data)
393
Frame Types
— Management frame
— Beacon
— (De)association request/respond
— Announcement traffic indication message
— Authentication/Deauthentication
— Control frame
— Poll frame & poll response frame
— RTS
— CTS
— ACK
— Power save (PS-poll)
— Data frame
— Limitation on payload size
— Can be extended to 7395 (with multiple fragments)

394
Association
— host: must associate with an AP
— scans channels, listening for beacon frames containing service
set identifier and AP’s MAC address
— SSID is 32 octets long
— One SSID per network (BSS or IBSS)
— selects AP to associate with; initiates association protocol
— may perform authentication
— will typically then run DHCP to get IP address in AP’s subnet

395
BBS 1
802.11: Association
BBS 2

BBS 1 BBS 2 1
2 2 AP 2
AP 1
3
4

1 1 H1
AP 1 AP 2
2
3
active scanning:
H1 (1) Probe Request frame broadcast
from H1
passive scanning: (2) Probe Response frames sent
(1) beacon frames sent from APs from APs
(2) association Request frame sent: H1 to
(3) Association Request frame sent:
selected AP
H1 to selected AP
(3) association Response frame sent from
(4) Association Response frame sent
selected AP to H1 from selected AP to H1

396

You might also like