Download Lecture 14 - Personal Web Pages - University of North Carolina at

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Backpressure routing wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Peering wikipedia , lookup

RapidIO wikipedia , lookup

TCP congestion control wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Distributed firewall wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Internet protocol suite wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Net bias wikipedia , lookup

Serial digital interface wikipedia , lookup

Computer network wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Network tap wikipedia , lookup

Airborne Networking wikipedia , lookup

Deep packet inspection wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Packet switching wikipedia , lookup

IEEE 1355 wikipedia , lookup

Transcript
Lecture 14:
Midterm Review
ITCS 6166/8166 091
Spring 2007
Jamie Payton
Department of Computer Science
University of North Carolina at Charlotte
February 21, 2007
Slides adapted from:
Computer Networks: A Systems Approach (Peterson and Davis)
Computer Networking: A Top Down Approach Featuring the Internet (Kurose and Ross)
1
A hodge podge of topics
• General overview to put things in
perspective….
2
What’s the Internet?
A “nuts and bolts” view
• millions of connected
computing devices: hosts
= end systems
• running network apps
• communication links
router
server
workstation
mobile
local ISP
– fiber, copper, radio, satellite
– transmission rate =
bandwidth
regional ISP
• routers: forward packets
(chunks of data)
company
network
3
Network Structure
• network edge:
applications and hosts
• network core:
– routers
– network of networks
• access networks,
physical media:
communication links
4
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
5
The Network Edge
Connection-oriented Service
Goal: data transfer
TCP service [RFC 793]
between end systems
• reliable, in-order byte• handshaking: setup
stream data transfer
(prepare for) data transfer
– loss: acknowledgements and
retransmissions
ahead of time
– Hello, hello back human
• flow control:
protocol
– set up “state” in two
communicating hosts
• TCP - Transmission
Control Protocol
– Internet’s connectionoriented service
– sender won’t overwhelm
receiver
• congestion control:
– senders “slow down sending
rate” when network
congested
6
The Network Edge
Connectionless service
Goal: data transfer between
end systems
– same as before!
• UDP - User Datagram
Protocol [RFC 768]:
– connectionless
– unreliable data transfer
– no flow control
– no congestion control
App’s using TCP:
• HTTP (Web), FTP (file
transfer), Telnet (remote
login), SMTP (email)
App’s using UDP:
• streaming media,
teleconferencing, DNS,
Internet telephony
7
The Network Core
• mesh of interconnected
routers
• the fundamental question:
how is data transferred
through net?
– circuit switching:
dedicated circuit per call:
telephone net
– packet-switching: data
sent thru net in discrete
“chunks”
8
The Network Core
Circuit Switching
End-end resources
reserved for “call”
• link bandwidth,
switch capacity
• dedicated resources:
no sharing
• circuit-like
(guaranteed)
performance
• call setup required
9
The Network Core
Circuit Switching
network resources
(e.g., bandwidth)
divided into
“pieces”
• pieces allocated to
calls
• resource piece idle if
not used by owning
call (no sharing)
• dividing link
bandwidth into
“pieces”
– frequency division
– time division
10
Circuit Switching
FDM and TDM
Example:
FDM
4 users
frequency
time
TDM
frequency
time
11
The Network 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
• store and forward:
packets move one hop
at a time
– Node receives complete
packet before forwarding
12
Packet Switching
Statistical Multiplexing
100 Mb/s
Ethernet
A
B
statistical multiplexing
C
1.5 Mb/s
queue of packets
waiting for output
link
D
E
Sequence of A & B packets does not have fixed pattern,
shared on demand  statistical multiplexing.
TDM: each host gets same slot in revolving TDM frame
13
Packet-switching
Store-and-Forward
L
R
R
• Takes L/R seconds to
transmit (push out)
packet of L bits on to link
or R bps
• Entire packet must
arrive at router before it
can be transmitted on
next link: store and
forward
• delay = 3L/R (assuming
zero propagation delay)
R
Example:
• L = 7.5 Mbits
• R = 1.5 Mbps
• delay = 15 sec
14
Packet 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
N users
• circuit-switching:
1 Mbps link
– 10 users
• packet switching:
– with 35 users, probability >
10 active less than .0004
Q: how did we get value 0.0004?
See notes from lecture!
15
Packet switching versus circuit
switching
Is packet switching a “slam dunk winner?”
• Great for bursty data
– resource sharing
– simpler, no call setup
• Excessive congestion: packet delay and loss
– protocols needed for reliable data transfer,
congestion control
• Q: How to provide circuit-like behavior?
– bandwidth guarantees needed for audio/video apps
– still an unsolved problem (chapter 7)
16
Delays in Packet-Switched
Networks
• Transmission delay
– Sending of bits onto the wire
– Depends on link bandwidth
• Propagation delay
– Propagation of bits inside the wire
– Depends on medium
• Processing delay
– Handling of bits on receiving end
– Depends on processor and memory speed
• Queuing delay
– Wait time due to statistical multiplexing
– Depends on network load and scheduling algorithm
17
Understanding Packet Delay
• Transmission delay:
– R=link bandwidth
(bps)
– L=packet length
(bits)
– time to send bits into
link = L/R
transmission
A
propagation
B
nodal
processing
queueing
18
Understanding Packet Delay
• Propagation delay:
– d = length of physical link
– s = propagation speed in medium (~2x108
m/sec)
– propagation delay = d/s
Note: s and R are very
different quantities!
transmission
A
propagation
B
nodal
processing
queueing
19
Understanding Packet Delay
• Processing delay:
– B = Check bit errors
– O = Determine
output link
– Delay = b + o
transmission
A
propagation
B
nodal
processing
queueing
20
Understanding Packet Delay
• Complex topic
• Queuing delay:
– Time waiting at
output link for
transmission
– Depends on
congestion level of
router
transmission
A
B
nodal
processing
– Varies from packet to
packet!
• Must use statistical
measures to estimate
queuing delay
– Thousands of
research papers
written on queuing
propagation
delay
queueing
21
Overview of Queuing Delay
• R=link bandwidth
(bps)
• L=packet length (bits)
• a=average packet
arrival rate
traffic intensity = La/R
• La/R ~ 0: average queueing delay small
• La/R -> 1: delays become large
• La/R > 1: more “work” arriving than can
be serviced, average delay infinite!
22
Caravan analogy
100 km
ten-car
caravan
toll
booth
• Analogy
– Car ~ bit
– Caravan ~ packet
– Toll booth ~ host
100 km
toll
booth
• Q: How long until
caravan is lined up
before 2nd toll booth?
• 12 sec to take money
from each car
– Highway ~ connection
• Speed limit is 100 km/hr
23
Nodal Delay
d nodal  d proc  d queue  d trans  d prop
• dproc = processing delay
– typically a few microsecs or less
• dqueue = queuing delay
– depends on congestion
• dtrans = transmission delay
– = L/R, significant for low-speed links
• dprop = propagation delay
– a few microsecs to hundreds of msecs
24
Packet Loss
• Queue (aka buffer) has finite capacity
• When packet arrives to full queue, packet
is dropped (i.e., lost)
• Lost packet may be:
– Retransmitted by previous node
– Retransmitted by source end system
– Not retransmitted at all
• We’ll discuss techniques for dealing with lost
packets later in the semester
25
Network Protocol Layers
• Network functionality is organized
into layers
– Each layer implements a service
• Layer actions are encapsulated
• Each layer relies on services
provided by layer below
• Benefits of layered approach
– Modularity
• Simplifies maintenance, updating
– Explicit structure
• Allows identification, relationship of
system pieces
application
transport
network
link
physical
26
Internet Protocol Stack
• application: network applications
– FTP, SMTP, HTTP
– application-layer messages
• transport: data transfer
– TCP, UDP
– segments
application
transport
network
• network: routing data from source to destination
– IP, routing protocols
– datagrams
• link: data transfer between neighboring network
elements
link
physical
– PPP, Ethernet
– frames
• physical: bits “on the wire”
27
source
message
segment
M
Ht
M
datagram Hn Ht
M
frame Hl Hn Ht
M
Encapsulation
application
transport
network
link
physical
link
physical
switch
destination
M
Ht
M
Hn Ht
Hl Hn Ht
M
M
application
transport
network
link
physical
Hn Ht
Hl Hn Ht
M
M
network
link
physical
Hn Ht
M
router
28
Change Gears…
• Now we’ll talk about stuff at the application
layer
– See lecture slides for application layer!
29
Change Gears…
• Now we’ll talk about stuff at the transport
layer
– UDP
– TCP
• See lecture slides for TCP and congestion control!
30
Changing Gears…
• Now we’ll talk about stuff specifically at the
network layer
– IP addressing
– Forwarding and routing
31
IP Addressing: introduction
• IP address: 32-bit
identifier for host,
router interface
• interface: connection
between host/router
and physical link
223.1.1.1
223.1.2.1
223.1.1.2
223.1.1.4
223.1.1.3
223.1.2.9
223.1.3.27
223.1.2.2
– router’s typically have
223.1.3.2
223.1.3.1
multiple interfaces
– host typically has one
interface
– IP addresses associated
223.1.1.1 = 11011111 00000001 00000001 00000001
with each interface
223
1
1
1
32
Subnets
• IP address:
– subnet part (high
order bits)
– host part (low order
bits)
223.1.1.1
223.1.2.1
223.1.1.2
223.1.1.4
223.1.1.3
223.1.3.27
223.1.2.2
subnet
• What’s a subnet ?
– device interfaces
with same subnet
part of IP address
– can physically reach
each other without
intervening router
223.1.2.9
223.1.3.1
223.1.3.2
network consisting of 3 subnets
33
Subnets
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.
223.1.1.0/24
223.1.2.0/24
223.1.3.0/24
Subnet mask: /24
34
IP addressing: CIDR
CIDR: Classless InterDomain Routing
– subnet portion of address of arbitrary length
– address format: a.b.c.d/x, where x is # bits in
subnet portion of address
subnet
part
host
part
11001000 00010111 00010000 00000000
200.23.16.0/23
35
NAT: Network Address Translation
rest of
Internet
local network
(e.g., home network)
10.0.0/24
10.0.0.4
10.0.0.1
10.0.0.2
138.76.29.7
10.0.0.3
All datagrams leaving local
network have same single source
NAT IP address: 138.76.29.7,
different source port numbers
Datagrams with source or
destination in this network
have 10.0.0/24 address for
source, destination (as usual)
36
Network Layer Overview:
Forwarding and Routing
• Forwarding: move
packets from router’s
input to appropriate
router output
• Routing: determine
route taken by packets
from source to dest.
analogy:
• routing: process of
planning trip from
source to destination
• forwarding: process of
getting through single
interchange
– routing algorithms
37
Network Layer Overview:
Forwarding and Routing
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
value in arriving
packet’s header
0111
1
3 2
38
Forwarding table
Destination Address Range
Link Interface
11001000 00010111 00010000 00000000
through
11001000 00010111 00010111 11111111
0
11001000 00010111 00011000 00000000
through
11001000 00010111 00011000 11111111
1
11001000 00010111 00011001 00000000
through
11001000 00010111 00011111 11111111
2
otherwise
4 billion
possible entries
3
39
Longest prefix matching
Prefix Match
11001000 00010111 00010
11001000 00010111 00011000
11001000 00010111 00011
otherwise
Link Interface
0
1
2
3
Examples
DA: 11001000 00010111 00010110 10100001
Which interface?
DA: 11001000 00010111 00011000 10101010
Which interface?
40
Internet inter-AS routing: BGP
• BGP (Border Gateway Protocol): the de facto
standard
• BGP provides each AS a means to:
1. Obtain subnet reachability information from
neighboring ASs.
2. Propagate reachability information to all AS-internal
routers.
3. Determine “good” routes to subnets based on
reachability information and policy.
• allows subnet to advertise its existence to rest of
Internet: “I am here”
41
BGP basics
• Pairs of routers (BGP peers) exchange routing info
over semi-permanent TCP connections: BGP sessions
– BGP sessions need not correspond to physical links.
• When AS2 advertises a prefix to AS1, AS2 is
promising it will forward any datagrams destined to
that prefix towards the prefix.
– AS2 can aggregate prefixes in its advertisement
3c
3a
3b
AS3
1a
AS1
2a
1c
1d
1b
2c
AS2
2b
eBGP session
iBGP session
42
Distributing reachability info
• With eBGP session between 3a and 1c, AS3 sends prefix
reachability info to AS1.
• 1c can then use iBGP do distribute this new prefix reach info to
all routers in AS1
• 1b can then re-advertise new reachability info to AS2 over 1b-to2a eBGP session
• When router learns of new prefix, creates entry for prefix in its
forwarding table.
3c
3a
3b
AS3
1a
AS1
2a
1c
1d
1b
2c
AS2
2b
eBGP session
iBGP session
43
Path attributes & BGP routes
• When advertising a prefix, advert includes BGP
attributes.
– prefix + attributes = “route”
• Two important attributes:
– AS-PATH: contains ASs through which prefix advertisement has
passed: AS 67 AS 17
– NEXT-HOP: Indicates specific internal-AS router to next-hop AS.
(There may be multiple links from current AS to next-hop-AS.)
• When gateway router receives route advertisement,
uses import policy to accept/decline.
44
BGP route selection
• Router may learn about more than 1
route to some prefix. Router must select
route.
• Elimination rules:
1. Local preference value attribute: policy
decision
2. Shortest AS-PATH
3. Closest NEXT-HOP router: hot potato routing
4. Additional criteria
45
BGP messages
• BGP messages exchanged using TCP
• BGP messages:
– OPEN: opens TCP connection to peer and
authenticates sender
– UPDATE: advertises new path (or withdraws old)
– KEEPALIVE keeps connection alive in absence of
UPDATES; also ACKs OPEN request
– NOTIFICATION: reports errors in previous msg; also
used to close connection
46
BGP routing policy
legend:
B
W
provider
network
X
A
customer
network:
C
Y
Figure 4.5-BGPnew: a simple BGP scenario
• A,B,C are provider networks
• X,W,Y are customer (of provider networks)
• X is dual-homed: attached to two networks
– X does not want to route from B via X to C
– .. so X will not advertise to B a route to C
47
BGP routing policy (2)
legend:
B
W
provider
network
X
A
customer
network:
C
Y
Figure 4.5-BGPnew: a simple BGP scenario
• A advertises to B the path AW
• B advertises to X the path BAW
• Should B advertise to C the path BAW?
– No way! B gets no “revenue” for routing CBAW since neither W
nor C are B’s customers
– B wants to force C to route to w via A
– B wants to route only to/from its customers!
48
Why different Intra- and Inter-AS routing ?
Policy:
• Inter-AS: admin wants control over how its traffic routed,
who routes through its net.
• Intra-AS: single admin, so no policy decisions needed
Scale:
• hierarchical routing saves table size, reduced update
traffic
Performance:
• Intra-AS: can focus on performance
• Inter-AS: policy may dominate over performance
49
Summary
• Routing!!!
• Next time
– Midterm
• After break
– More routing!!!
50