Title: Introduction to Networking and Wireless Networks Professor Jim Kurose Department of Computer Science
1Introduction to Networking and Wireless
NetworksProfessor Jim KuroseDepartment of
Computer ScienceUniversity of Massachusettshttp
//www.cs.umass.edu/kuroseBrian Donovan, Tim
Ireland, Adam Nyzio
- UPRM, January 23, 24, 2006
- Class website http//gaia.cs.umass.edu/uprm
2What is this course about?
- quick introduction to principles of networking,
Internet, particularly wireless (802.11)
networking - learn practice of computer networking day two
in the field - assume no previous background in networking
- questions/comments lots, hopefully
- Computer Networking A Top Down
- Approach Featuring the Internet,
- J. Kurose K. Ross
- Addison Wesley, 3rd ed., 2004
3Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
4A top-down approach
- end-system applications, end-end transport
- network core routing, hooking nets together
- link-level protocols, e.g., Ethernet, 802.11
5Part 1 Networking Overview
- Our goal
- get feel and terminology
- more depth, detail later in course
- approach
- use Internet as example
- Overview
- whats the Internet
- whats a protocol?
- network edge
- network core
- access net, physical media
- Internet/ISP structure
- performance loss, delay
- protocol layers, service model
6What is the Internet?
- Collection of end-systems
- running networked applications,
- inter-connected together by routers and links,
controlled by network protocols
Collection of end-systems running networked
applications, inter-connected together by
routers and links, controlled by network protocols
7What is the Internet end systems
not just computers
Internet phones
Web-enabled toaster weather report
local ISP
regional ISP
IP picture frame http//www.ceiva.com/
Blackberry
company network
worlds smallest web server Photo courtesy U. Mass
radar!
8What is the Internet routers, links
Routers forward packets (chunks of data)
local ISP
- Links physical transport
- wide variety of media, speeds
regional ISP
Optical fiber (10Gbps)
company network
Point-point wireless (10-54 Mpbs)
Cable (1-5Mbps)
9Whats a protocol?
- a human protocol and a computer network protocol
Hi
TCP connection request
Hi
10Whats a protocol?
- human protocols
- whats the time?
- I have a question
- introductions
- specific msgs sent
- specific actions taken when msgs received, or
other events
- network protocols
- machines rather than humans
- all communication activity in Internet governed
by protocols
protocols define format, order of msgs sent and
received among network entities, and actions
taken on msg transmission, receipt
Question Other human protocols (Ill tell you
networking equivalent)
11Whats the Internet nuts and bolts view
- protocols control sending, receiving of msgs
- e.g., TCP, IP, HTTP, FTP, 802.11
- Internet network of networks
- loosely hierarchical
- public Internet versus private intranet
- Internet standards
- RFC Request for comments
- IETF Internet Engineering Task Force
router
workstation
server
mobile
local ISP
regional ISP
company network
12So this course will be about
protocols running in applications, end
systems, routers, links (think software control)
- applications, end system
- routers
- links
with a special emphasis on 802.11 wireless
networks, with an eye towards UPRM CASA student
radar testbed
13The network edge
- end systems (hosts)
- run application programs
- e.g. Web, email
- at edge of network
- client/server model
- client host requests, receives service from
always-on server - e.g. Web browser/server email client/server
- peer-peer model
- minimal (or no) use of dedicated servers
- e.g. Skype, BitTorrent, KaZaA
14Network Core Packet Switching
- each end-end data stream divided into packets
- user A, B packets share network resources
- each packet uses full link bandwidth
- resources used as needed
- resource contention
- aggregate resource demand can exceed amount
available - congestion packets queue, wait for link use
15Packet Switching Statistical Multiplexing
100 Mb/s Ethernet
C
A
statistical multiplexing
1.5 Mb/s
B
queue of packets waiting for output link
- statistical multiplexing
- sharing of bandwidth on demand
- no fixed allocation of bandwidth to users
16Packet switching versus circuit switching
- Packet switching allows more users to use network!
- 1 Mb/s link
- each user
- 100 kb/s when active
- active 10 of time
- circuit-switching
- 10 users
- packet switching
- with 35 users, probability gt 10 active less than
.0004
N users
1 Mbps link
Q how did we get value 0.0004?
17Access networks and physical media
- Q How to connect end systems to edge router?
- residential access nets
- institutional access networks (school, company)
- mobile access networks
- Keep in mind
- bandwidth (bits per second) of access network?
- shared or dedicated?
18Company access local area networks
- company/univ local area network (LAN) connects
end system to edge router - Ethernet
- shared or dedicated link connects end system and
router - 10 Mbs, 100Mbps, Gigabit Ethernet
19Wireless access networks
- shared wireless access network connects end
system to router - via base station aka access point
- wireless LANs
- 802.11b/g (WiFi) 11 or 54 Mbps
- wider-area wireless access
- provided by telco operator
- 3G 384 kbps
- Will it happen??
- GPRS in Europe/US
20Internet structure network of networks
- roughly hierarchical
- at center tier-1 ISPs (e.g., MCI, Sprint,
ATT, Cable and Wireless), national/international
coverage - treat each other as equals
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
21Tier-1 ISP e.g., Sprint
Sprint US backbone network
22Internet structure network of networks
- Tier-2 ISPs smaller (often regional) ISPs
- connect to one or more tier-1 ISPs, possibly
other tier-2 ISPs - customer of tier-1 provider (pay!)
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
23Internet structure network of networks
- Tier-3 ISPs and local ISPs
- last hop (access) network (closest to end
systems)
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
24Internet structure network of networks
- a packet passes through many networks!
My dad Why isnt my Internet working?
Tier 1 ISP
Tier 1 ISP
Tier 1 ISP
25How do loss and delay occur?
- packets queue in router buffers
- packet arrival rate to link exceeds output link
capacity - packets queue, wait for turn
A
B
26Four sources of packet delay
- packets queue in router buffers
- packet arrival rate to link exceeds output link
capacity - packets queue, wait for turn
27Queueing delay (revisited)
- Rlink bandwidth (bps)
- Lpacket length (bits)
- aaverage packet arrival rate
La (bit/sec arriving)
traffic intensity
R (bit/sec transmitting)
- La/R 0 average queueing delay small
- La/R -gt 1 delays become large
- La/R gt 1 more work arriving than can be
serviced, average delay infinite!
28Real Internet delays and routes
- What do real Internet delay loss look like?
- Traceroute program provides delay measurement
from source to router along end-end Internet path
towards destination. For all i - sends three packets that will reach router i on
path towards destination - router i will return packets to sender
- sender times interval between transmission and
reply.
3 probes
3 probes
3 probes
29Real Internet delays and routes
traceroute gaia.cs.umass.edu to www.eurecom.fr
Three delay measurements from gaia.cs.umass.edu
to cs-gw.cs.umass.edu
1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms 2
border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145)
1 ms 1 ms 2 ms 3 cht-vbns.gw.umass.edu
(128.119.3.130) 6 ms 5 ms 5 ms 4
jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16
ms 11 ms 13 ms 5 jn1-so7-0-0-0.wae.vbns.net
(204.147.136.136) 21 ms 18 ms 18 ms 6
abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22
ms 18 ms 22 ms 7 nycm-wash.abilene.ucaid.edu
(198.32.8.46) 22 ms 22 ms 22 ms 8
62.40.103.253 (62.40.103.253) 104 ms 109 ms 106
ms 9 de2-1.de1.de.geant.net (62.40.96.129) 109
ms 102 ms 104 ms 10 de.fr1.fr.geant.net
(62.40.96.50) 113 ms 121 ms 114 ms 11
renater-gw.fr1.fr.geant.net (62.40.103.54) 112
ms 114 ms 112 ms 12 nio-n2.cssi.renater.fr
(193.51.206.13) 111 ms 114 ms 116 ms 13
nice.cssi.renater.fr (195.220.98.102) 123 ms
125 ms 124 ms 14 r3t2-nice.cssi.renater.fr
(195.220.98.110) 126 ms 126 ms 124 ms 15
eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135
ms 128 ms 133 ms 16 194.214.211.25
(194.214.211.25) 126 ms 128 ms 126 ms 17
18 19 fantasia.eurecom.fr
(193.55.113.142) 132 ms 128 ms 136 ms
trans-oceanic link
means no response (probe lost, router not
replying)
30Quick live measurement
- Lets trace route and delays to gaia.cs.umass.edu
from UPRM - MS-DOS tracert program
- pingplotter freeware (www.pingplotter.com)
- anywhere else to trace (maybe someplace far away)?
31Protocol Layers
- Networks are complex hosts, routers, links of
various media, applications, protocols, hardware,
software - How to organize structure (architecture) of
network, or our discussion of networks?
- Layering protocols in layer N implements a
service (provided to layer N1), using service
provided by layer N - e.g. layer 4 (TCP) provide reliable end-end data
transfer over layer 3 service (IP) providing
lossy end-end data transfer
32Internet protocol stack
- application supporting network applications
- FTP, SMTP, HTTP
- transport process-process data transfer
- TCP, UDP
- network routing of datagrams from source to
destination - IP, routing protocols
- link data transfer between neighboring network
elements - PPP, Ethernet, 802.11
- physical bits on the wire
33Encapsulation
source
message
application transport network link physical
segment
datagram
frame
switch
destination
application transport network link physical
router
34Encapsulation
source
message
application transport network link physical
segment
datagram
frame
switch
destination
application transport network link physical
router
35Introduction Summary
- Covered lots of material!
- Internet overview
- whats a protocol?
- network edge, core, access network
- packet-switching
- Internet/ISP structure
- performance loss, delay
- layering and service models
- You now have
- context, overview, feel of networking
- more depth, detail to follow!
36Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
371.2 Application, transport layers
- Application Layer
- Principles of network applications
- HTTP (the webs protocol)
- Transport Layer
- Multiplexing
- Reliable data transfer
- Congestion control
- UDP
- TCP
38What transport service does an app need?
- Data loss
- some apps (e.g., audio) can tolerate some loss
- other apps (e.g., file transfer, telnet) require
100 reliable data transfer
- Bandwidth
- some apps (e.g., multimedia) require minimum
amount of bandwidth to be effective - other apps (elastic apps) make use of whatever
bandwidth they get
- Timing
- some apps (e.g., Internet telephony, interactive
games) require low delay to be effective
39Internet transport protocols services
- UDP service
- unreliable data transfer between sending and
receiving process - does not provide connection setup, reliability,
flow control, congestion control, timing, or
bandwidth guarantee - Q why bother? Why is there a UDP?
- TCP service
- connection-oriented setup required between
client and server processes - reliable transport between sending and receiving
process - flow control sender wont overwhelm receiver
- congestion control throttle sender when network
overloaded - does not provide timing, minimum bandwidth
guarantees
40Internet apps application, transport protocols
Application layer protocol SMTP RFC
2821 Telnet RFC 854 HTTP RFC 2616 FTP RFC
959 proprietary (e.g. RealNetworks) proprietary (
e.g., Vonage,Dialpad)
Underlying transport protocol TCP TCP TCP TCP TCP
or UDP typically UDP
Application e-mail remote terminal access Web
file transfer streaming multimedia Internet
telephony
41Client-server architecture
- server
- always-on host
- permanent IP address
- clients
- initiate communication with server
- may be intermittently connected
- may have dynamic IP addresses
- do not communicate directly with each other
42Processes communicating
- Process program running within a host.
- processes in different hosts communicate by
exchanging messages process - sends/receives messages to/from its socket
- socket analogous to door
- sending process shoves message out door, relies
on transport layer to deliver to receiver-side
socket
43Addressing processes
- to send to end-system host device has
unique32-bit IP address - to send to socket on end-system port number
- network services has well-known port numbers
- HTTP server 80
- Mail server 25
- to send HTTP message to gaia.cs.umass.edu web
server - IP address 128.119.245.12
- Port number 80
44App-layer protocol defines
- Public-domain protocols
- defined in RFCs
- allows for interoperability
- e.g., HTTP, SMTP
- Proprietary protocols
- e.g., Skype
- types of messages exchanged,
- e.g., request, response
- message syntax
- what fields in messages how fields are
delineated - message semantics
- meaning of information in fields
- rules for when and how processes send respond
to messages
45The Web and HTTP
- Goal see application level protocol in action
- HTTP hypertext transfer protocol
- HTTP has client/server model
- client browser that requests, receives,
displays Web objects - server Web server sends objects in response to
requests - HTTP 1.0 RFC 1945
- HTTP 1.1 RFC 2068
HTTP request
PC running Explorer
HTTP response
HTTP request
HTTP response
Mac running Firefox
46HTTP overview
- Uses TCP
- client initiates TCP connection (creates socket)
to server, port 80 - server accepts TCP connection from client
- HTTP messages (GET, RESPONSE) exchanged between
browser (HTTP client) and Web server (HTTP
server) - TCP connection closed
- Two important HTTP message types
- GET request (client-to-server)
- RESPONSE (server to client)
- very simple!
47HTTP request message
- HTTP GET message
- ASCII (human-readable format)
request line (GET, POST, HEAD commands)
GET /somedir/page.html HTTP/1.1 Host
www.someschool.edu User-agent
Mozilla/4.0 Connection close Accept-languagefr
(extra carriage return, line feed)
header lines
Carriage return, line feed indicates end of
message
48HTTP response message
status line (protocol status code status phrase)
HTTP/1.1 200 OK Connection close Date Thu, 06
Aug 1998 120015 GMT Server Apache/1.3.0
(Unix) Last-Modified Mon, 22 Jun 1998 ...
Content-Length 6821 Content-Type text/html
data data data data data ...
header lines
data, e.g., requested HTML file
49HTTP response status codes
In first line in server-gtclient response
message. A few sample codes
- 200 OK
- request succeeded, requested object later in this
message - 301 Moved Permanently
- requested object moved, new location specified
later in this message (Location) - 400 Bad Request
- request message not understood by server
- 404 Not Found
- requested document not found on this server
- 505 HTTP Version Not Supported
50Observing HTTP in action
- Ethereal packet-sniffer (www.ethereal.com)
- captures, records link-layer frames being
sent/received - recall HTTP encapsulated inside TCP inside IP
inside Ethernet - use tomorrow to capture/analyze 802.11 wireless
51Ethereal Screen Shot
52Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
531.3 Internet transport-layer protocols
- reliable, in-order delivery (TCP)
- congestion control
- flow control
- connection setup
- unreliable, unordered delivery UDP
- no-frills extension of best-effort IP
- services not available
- delay guarantees
- bandwidth guarantees
54Multiplexing/demultiplexing
delivering received segments to correct socket
gathering data from multiple sockets, enveloping
data with header (later used for demultiplexing)
process
socket
application
P4
application
application
P1
P2
P3
P1
transport
transport
transport
network
network
network
link
link
link
physical
physical
physical
host 3
host 2
host 1
55How demultiplexing works
- host receives IP datagrams
- each datagram has source IP address, destination
IP address - each datagram carries 1 transport-layer segment
- each segment has source, destination port number
- host uses IP addresses port numbers to direct
segment to appropriate socket
32 bits
source port
dest port
other header fields
application data (message)
TCP/UDP segment format
56Error Control detecting errors
- Goal detect errors (e.g., flipped bits) in
transmitted segment
- Sender
- treat segment contents as sequence of 16-bit
integers - Internet checksum addition (1s complement sum)
of segment contents - sender puts checksum value into checksum field
- Receiver
- compute checksum of received segment
- check if computed checksum equals checksum field
value - NO - error detected
- YES - no error detected. But maybe errors
nonetheless? More later .
57UDP segment format simple!
32 bits
source port
dest port
Internet checksum
Length, in bytes of UDP segment, including header
checksum
length
- UDP services
- demultiplexing
- error detection
- nothing else!
Application data (message)
UDP segment format
58Reliable Communication
- Q how do humans communicate reliably?
59Mechanisms for reliable data transfer
- error detection capabilities (checksum)
- retransmit is packet lost or assumed lost
- timer at sender to recover from lost message
- sequence numbers to detect lost or duplicated
messages - acknowledgement message receiver lets sender
know what was received
60Reliable data transfer scenarios
61Reliable data transfer scenarios
62Performance of stop-and-wait
- works, but performance stinks
- example 1 Gbps link, 15 ms e-e prop. delay, 1KB
packet
L (packet length in bits)
8kb/pkt
T
8 microsec
transmit
R (transmission rate, bps)
109 b/sec
63Pipelining increased utilization
sender
receiver
first packet bit transmitted, t 0
last bit transmitted, t L / R
first packet bit arrives
RTT
last packet bit arrives, send ACK
last bit of 2nd packet arrives, send ACK
last bit of 3rd packet arrives, send ACK
ACK arrives, send next packet, t RTT L / R
Increase utilization by a factor of 3!
64TCP Transport Control Protocol
- Internets reliable data transfer protocol
- sequence numbers
- receiver-to-sender ACKs
- ACK(x) cumulative Ive received all segments up
through seq. x - timers estimate round trip, set timer
- pipelining allow up to N un-ACKed segments
- increase N slowly until loss detected
(congestion) - when loss occurs N N/2
65TCP probes for available bandwidth
- increasing N until loss occurs, then decreasing N
- like children, finding their parents limits
66TCP segment structure
URG urgent data (generally not used)
counting by bytes of data (not segments!)
ACK ACK valid
PSH push data now (generally not used)
bytes rcvr willing to accept
RST, SYN, FIN connection estab (setup,
teardown commands)
Internet checksum (as in UDP)
67Lets look at TCP in action
68Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
691.4 Network Layer
- Overview
- forwarding and routing
- Whats inside a router
- the Internet Protocol
- addressing
- IP datagram format
- ICMP
- routing (path selection) not covered
70Network layer
- transport segment from sending to receiving host
- on sending side encapsulates segments into
datagrams - on rcving side, delivers segments to transport
layer - network layer protocols in every host, router
- Router examines header fields in all IP datagrams
passing through it
71Two Key Network-Layer Functions
- analogy
- routing process of planning trip from source to
dest - forwarding process of getting through single
interchange
- forwarding move packets from routers input to
appropriate router output - routing determine route taken by packets from
source to dest. - routing algorithms
72Interplay between routing and forwarding
routing algorithm
local forwarding table
header value
output link
0100 0101 0111 1001
3 2 2 1
Forwarding value in arriving packets header (in
case of Internet, destination IP address),
determines outgoing interface
1
0111
2
3
73Router Architecture Overview
- Two key router functions
- run routing algorithms/protocol (RIP, OSPF, BGP)
- forwarding datagrams from incoming to outgoing
link
74Input Port Functions
Data link layer e.g., Ethernet
Physical layer bit-level reception
Output Port functions
- Buffering when datagrams arrive faster than
transmission rate - Scheduling discipline chooses among queued
datagrams for transmission
75The Internet Network layer
- Host, router network layer functions
Transport layer TCP, UDP
Network layer
Link layer
physical layer
76IP datagram format
- how much overhead with TCP?
- 20 bytes of TCP
- 20 bytes of IP
- 40 bytes app layer overhead
77IP Addressing introduction
223.1.1.1
- IP address 32-bit identifier for host, router
interface - interface connection between host/router and
physical link - routers typically have multiple interfaces
- host typically has one interface
- IP addresses associated with each interface
223.1.2.9
223.1.1.4
223.1.1.3
223.1.1.1 11011111 00000001 00000001 00000001
223
1
1
1
78Subnets
223.1.1.1
- IP address
- subnet part (high order bits)
- host part (low order bits)
- Whats a subnet ?
- device interfaces with same subnet part of IP
address - can physically reach each other without
intervening router
223.1.2.1
223.1.1.2
223.1.2.9
223.1.1.4
223.1.2.2
223.1.1.3
223.1.3.27
subnet
223.1.3.2
223.1.3.1
network consisting of 3 subnets
79Subnets
- Recipe
- To determine the subnets, detach each interface
from its host or router, creating islands of
isolated networks. Each isolated network is
called a subnet.
Subnet mask /24
80Subnets
223.1.1.2
223.1.1.1
223.1.1.4
223.1.1.3
223.1.7.0
223.1.9.2
223.1.9.1
223.1.7.1
223.1.8.0
223.1.8.1
223.1.2.6
223.1.3.27
223.1.2.1
223.1.2.2
223.1.3.2
223.1.3.1
81IP addresses how to get one?
- Q How does host get IP address?
- hard-coded by system admin in a file
- Wintel control-panel-gtnetwork-gtconfiguration-gttcp
/ip-gtproperties - UNIX /etc/rc.config
- DHCP Dynamic Host Configuration Protocol
dynamically get address from as server - plug-and-play
- (more in next chapter)
82ICMP Internet Control Message Protocol
- used by hosts routers to communicate
network-level information - error reporting unreachable host, network, port,
protocol - echo request/reply (used by ping)
- network-layer above IP
- ICMP msgs carried in IP datagrams
- ICMP message type, code plus first 8 bytes of IP
datagram causing error
Type Code description 0 0 echo
reply (ping) 3 0 dest. network
unreachable 3 1 dest host
unreachable 3 2 dest protocol
unreachable 3 3 dest port
unreachable 3 6 dest network
unknown 3 7 dest host unknown 4
0 source quench (congestion
control - not used) 8 0
echo request (ping) 9 0 route
advertisement 10 0 router
discovery 11 0 TTL expired 12 0
bad IP header
83Traceroute and ICMP
- Source sends series of UDP segments to dest
- First has TTL 1
- Second has TTL2, etc.
- Unlikely port number
- When nth datagram arrives to nth router
- Router discards datagram
- And sends to source an ICMP message (type 11,
code 0) - Message includes name of router IP address
- When ICMP message arrives, source calculates RTT
- Traceroute does this 3 times
- Stopping criterion
- UDP segment eventually arrives at destination
host - Destination returns ICMP host unreachable
packet (type 3, code 3) - When source gets this ICMP, stops.
84Routing Algorithms finding paths
Graph G (N,E) N set of routers u, v, w,
x, y, z E set of links (u,v), (u,x),
(v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z)
Question Whats the least-cost path between u
and z ?
Routing algorithm algorithm that finds
least-cost path
85Two types of Routing Algorithms
- Link State
- net topology, link costs known to all nodes
- accomplished via link state broadcast
- all nodes have same info
- computes least cost paths from one node
(source) to all other nodes - gives forwarding table for that node
- iterative after k iterations, know least cost
path to k dest.s
- Distance Vector
- distributed node only communicate with
neighboring nodes - Each node estimates distance to every other node
based on info supplied by neighbors - informs neighbor if estimated distance decreases
- algorithm converges to shortest path answer
86Internet Hierarchical Routing
- Routing among AS inter-AS routing
- networks (ASs) are nodes in routing graph
- BGP Border Gateway Protocol
- Internets inter-As routing protocols
- glue that binds Internet together
- aggregate routers into regions, autonomous
systems (AS) - routers in same AS run same routing protocol
- intra-AS routing protocol
- routers in different AS can run different
intra-AS routing protocol - Internet protocols OSPF,
- IS-IS
87Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
881.5 The Data Link Layer
- Overview
- sharing a broadcast channel multiple access
- link layer addressing
- Ethernet
- 802.11
data-link layer has responsibility of
transferring datagram from one node to adjacent
node over a link
89Link Layer Services
- framing, link access
- encapsulate datagram into frame, adding header,
trailer - channel access if shared medium
- MAC addresses identifies source, dest
- different from IP address!
- reliable delivery between adjacent nodes
- we learned how to do this already (transport
layer)! - seldom used on low bit error link (fiber, twisted
pair) - wireless links higher error rates
90Multiple Access Links and Protocols
- Two types of links
- point-to-point
- PPP for dial-up access
- broadcast (shared wire or medium)
- Old-fashioned Ethernet
- upstream HFC
- 802.11 wireless LAN
91Multiple Access protocols
- single shared broadcast channel
- two or more simultaneous transmissions by nodes
interference - collision if node receives two or more signals at
the same time
- Multiple access protocol
- distributed algorithm that determines how nodes
share channel, i.e., determine when node can
transmit - communication about channel sharing must use
channel itself! - no out-of-band channel for coordination
92Q how do humans solve multiple access problem?
93MAC Protocols a taxonomy
- Three broad classes
- Channel Partitioning
- divide channel into smaller pieces (time slots,
frequency, code) - allocate piece to node for exclusive use
- Taking turns
- Nodes take turns, but nodes with more to send can
take longer turns - Random Access
- channel not divided, allow collisions
- recover from collisions
94Channel Partitioning MAC protocols TDMA
- TDMA time division multiple access
- access to channel in "rounds"
- each station gets fixed length slot (length pkt
trans time) in each round - unused slots go idle
- example 6-station LAN, 1,3,4 have pkt, slots
2,5,6 idle - TDM (Time Division Multiplexing) channel divided
into N time slots, one per user inefficient with
low duty cycle users and at light load. - FDM (Frequency Division Multiplexing) frequency
subdivided.
95Taking Turns MAC protocols
- Polling
- master node invites slave nodes to transmit in
turn - concerns
- polling overhead
- latency
- single point of failure (master)
- Token passing
- control token passed from one node to next
sequentially. - token message
- concerns
- token overhead
- latency
- single point of failure (token)
-
96Random Access Protocols
- When node has packet to send
- transmit at full channel data rate R.
- no a priori coordination among nodes
- two or more transmitting nodes ? collision,
- random access MAC protocol specifies
- how to detect collisions
- how to recover from collisions (e.g., via delayed
retransmissions) - Examples of random access MAC protocols
- slotted ALOHA
- ALOHA
- CSMA, CSMA/CD, CSMA/CA
97CSMA (Carrier Sense Multiple Access)
- CSMA listen before transmit
- If channel sensed idle transmit entire frame
- If channel sensed busy, defer transmission
- human analogy dont interrupt others!
- CSMA/CD (CD collision detection)
- colliding transmissions detected and aborted,
reducing channel wastage
Collisions can still occur!
98MAC Addresses
- 32-bit IP address
- network-layer address
- used to get datagram to destination IP subnet
- MAC (or LAN or physical or Ethernet) address
- used to get frame from one interface to another
physically-connected interface (same network) - 48 bit MAC address (for most LANs) burned in the
adapter ROM
99ARP Address Resolution Protocol
- ARP protocol
- node A broadcasts request who knows Bs MAC
protocol - B replies to A with its MAC address
137.196.7.78
A
1A-2F-BB-76-09-AD
137.196.7.23
137.196.7.14
LAN
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
137.196.7.88
B
100Ethernet
- dominant wired LAN technology
- cheap 20 for 100Mbs!
- first widely used LAN technology
- kept up with speed race 10 Mbps 10 Gbps
- Uses CSMA/CD binary backoff
Metcalfes Ethernet sketch
101Ethernet Frame Structure
- Sending adapter encapsulates IP datagram (or
other network layer protocol packet) in Ethernet
frame
102Overview
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
1031.6 Elements of a wireless network
1041.6 Elements of a wireless network
1051.6 Elements of a wireless network
- wireless link
- typically used to connect mobile(s) to base
station - also used as backbone link
- multiple access protocol coordinates link access
- various data rates, transmission distance
106Characteristics of selected wireless link
standards
54 Mbps
802.11a,g
5-11 Mbps
.11 p-to-p link
802.11b
1 Mbps
802.15
3G
384 Kbps
UMTS/WCDMA, CDMA2000
2G
56 Kbps
IS-95 CDMA, GSM
107Elements of a wireless network
108Elements of a wireless network
- Ad hoc mode
- no base stations
- nodes can only transmit to other nodes within
link coverage - nodes organize themselves into a network route
among themselves
tomorrow, we will be running our wireless nodes
in ad hoc mode.
109Wireless Link Characteristics
- Differences from wired link
- decreased signal strength radio signal
attenuates as it propagates through matter (path
loss) - interference from other sources standard
wireless network frequencies (e.g., 2.4 GHz)
shared by other devices (e.g., phone) devices
(motors) interfere as well - multipath propagation radio signal reflects off
objects ground, arriving ad destination at
slightly different times - . make communication across (even a point to
point) wireless link much more difficult
110Wireless network characteristics
- Multiple wireless senders and receivers create
additional problems (beyond multiple access)
- Hidden terminal 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
- Signal fading
- B, A hear each other
- B, C hear each other
- A, C can not hear each other interferring at B
111IEEE 802.11 Wireless LAN
- 802.11b
- 2.4-5 GHz unlicensed radio spectrum
- up to 11 Mbps
- direct sequence spread spectrum (DSSS) in
physical layer - all hosts use same chipping code
- widely deployed, using base stations
- 802.11a
- 5-6 GHz range
- up to 54 Mbps
- 802.11g
- 2.4-5 GHz range
- up to 54 Mbps
- All use CSMA/CA for multiple access
- All have base-station and ad-hoc network versions
112802.11 Channels, association
- 802.11b 2.4GHz-2.485GHz spectrum divided into 11
channels at different frequencies - AP admin chooses frequency for AP
- interference possible channel can be same as
that chosen by neighboring AP! - host must associate with an AP
- scans channels, listening for beacon frames
containing APs name (SSID) and MAC address - selects AP to associate with
- may perform authentication
- may run DHCP to get IP address in APs subnet
(well hard-code our IP addresses tomorrow)
113IEEE 802.11 MAC Protocol CSMA/CA
- 802.11 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 - 802.11 receiver
- - if frame received OK
- return ACK after SIFS (ACK needed due to
hidden terminal problem)
sender
receiver
114Avoiding collisions (more)
- idea allow sender to reserve channel rather
than random access of data frames avoid
collisions of long data frames - sender first transmits small request-to-send
(RTS) packets to BS using CSMA - RTSs may still collide with each other (but
theyre short) - BS broadcasts clear-to-send CTS in response to
RTS - RTS heard by all nodes
- sender transmits data frame
- other stations defer transmissions
Avoid data frame collisions completely using
small reservation packets!
115Collision Avoidance RTS-CTS exchange
A
B
AP
time
116802.11 frame addressing
Address 4 used only in ad hoc mode
Address 1 MAC address of wireless host or AP to
receive this frame
Address 3 MAC address of router interface to
which AP is attached
Address 2 MAC address of wireless host or AP
transmitting this frame
117802.11 frame addressing
H1
R1
118802.11 frame more
frame seq (for reliable ARQ)
duration of reserved transmission time (RTS/CTS)
frame type (RTS, CTS, ACK, data)
119Our Whirlwind tour is over!
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
120Our Whirlwind tour is over!
- Part 1 Whirlwind Introduction to Networking
(Monday) - 900 1015 networking overview
- 1045 1200 application, transport, network
layers - 200 300 intro to link layer
- 300 400 link layer, 802.11 networks
- Part 2 In the field (Tuesday)
- 900 930 meet, discuss plans, divide into
teams - 930 1200 short distance 802.11 experiments,
measurements - 200 ? long-distance 802.11 experiments,
measurements
121- we are always looking for great
- graduate students!
- consider graduate school at UMass
- intellectually exciting
- terrific faculty
- collaborative, cross-disciplinary
- well, but not quite as warm
- and sunny as here ?
www.cs.umass.edu
www.ecs.umass.edu
122DAY TWO
- Goals
- get out in the field, set up a single-link
(one-hop) wireless network using directional
antennas - transfer radar data over connection
- measure, record traffic for later analysis
- measure, observe variations in performance
- antenna aiming/positioning
- 802.11 parameters timeout
- link distance
123Equipment setup
2.4 GHz 24 dBi High Performance Reflector Grid
Wireless LAN Antenna (8 degree beam width)
N-male to N-male cable
pigtail
Proxim Orinoco 8470-FC 802.11b/g PC Card
Linux laptop driver for Atheros chipset
http//www.madwifi.org/
124Software well be using
- tcpdump (like Ethereal) packet capture
- iperf sends packets as fast as possible from
client to server over udp or tcp socket - madwifi-tools (www.madwifi.org)
- Linux kernel driver for Atheros Wireless LAN
chipsets (well use this) - athctrl d set specific distance in meters for
link optimization (e.g. ACK timeout), - athctrl i ath0 -d 15000
ath0 interface
receiver distance lt 15,000m
125Software well be using
- Wireless tools (iwconfig)
- display wireless link information
- Link Quality
- Signal Level
- Noise Level
- set wireless link parameters, e.g., speed,
address, name - iwconfig ath0 mode Ad-Hoc
- iwconfig ath0 date 54M
- iwconfig ath0 txpower 30mW
- iwconfig ath0 address 192.168.1.1
126Configuring the wireless interfaces
Configuration of etc/network/interfaces Wireles
s interface auto ath0 iface ath0 inet
static address 192.168.1.1 netmask
255.255.255.0 wireless_mode Ad-Hoc wireless_essid
CS496 channel 1 rate 54M (must set
manually) Ethernet interface auto eth0 iface
eth0 inet static address 192.168.1.101 netmask
255.255.255.0
127Address configuration
MAC 0020A657B3C3 IP 192.168.1.1
MAC 0020A657B3CB IP 192.168.1.2
128Experiments 7 data sets (at each node)
- Align antennas, set timers, note signal strength,
begin tcpdump, begin iperf transfer - UDP throughput over 5 minutes
- TCP throughput over 5 minutes
- turn each antenna 10 degrees (or until signal
strength creasing by factor of 2) - repeat above
- afternoon experiments repeat a) and b) also set
ACK timer short (100m propagation) and repeat a) - analyze gathered data later (will be posted on
www site http//gaia.cs.umass.edu/uprm