Transcript Slide 1
Net-Centric Computing Division
Department of Computer Science
Bogor Agricultural University
KOM 312
KOMUNIKASI DATA
DAN JARINGAN KOMPUTER
Packet Switching Network
Sri Wahjuni
my_juni04(at)ipb.ac.id
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Shortest Path Routing
QoS in Network Layer
2
Department of Computer Science -IPB
REVIEW
OSI Reference Model
TCP/IP Architecture
swj/11
3
Department of Computer Science -IPB
TWO VIEWS OF NETWORKS
External view: what services provided to transport layer
by a network (i.e. network layer)
Need connection setup or not
What QoSs are provided
Services should be independent from underlying
networks so that transport layer can run over any
networks as long as the networks provide the services
Internal view:
physical topology,
datagram message transfer or virtual circuit
information transfer,
addressing and routing, congestion control.
4
swj/11
Department of Computer Science -IPB
COMPARISONS OF TWO VIEWS BY EXAMPLES
Broadcast networks and packet-switched networks
From external view, both networks provides transfer
of information between users, not too much different
But from internal view, very different:
A broadcast network (such as LANs) is small,
addressing is simple, frame transferred in one hop
so no routing is needed
In a packet-switching network, addressing must
accommodate large-scale networks and routing is
necessary.
swj/11
5
Department of Computer Science -IPB
PACKET SWITCHING
swj/11
Transfer of information as payload in data packets
Packets undergo random delays & possible loss
Different applications impose differing requirements
on the transfer of information
Department of Computer Science -IPB
6
NETWORK SERVICE
swj/11
Network layer can offer a variety of services to transport layer
Connection-oriented service or connectionless service
Best-effort or delay/loss guarantees
Department of Computer Science -IPB
7
NETWORK-LAYER FUNCTIONS
8
Department of Computer Science -IPB
swj/11
Essential
Routing: mechanisms for determining the set of best
paths for routing packets requires the collaboration of
network elements
Forwarding: transfer of packets from NE inputs to
outputs
Priority & Scheduling: determining order of packet
transmission in each NE
Optional: congestion control, segmentation &
reassembly, security
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Shortest Path Routing
QoS in Network Layer
9
Department of Computer Science -IPB
ACCESS MULTIPLEXER
swj/11
10
Department of Computer Science -IPB
LOCAL AREA NETWORK
swj/11
LAN 1
Bridge
LAN 2
11
Department of Computer Science -IPB
INTRADOMAIN AND INTERDOMAIN
swj/11
12
Department of Computer Science -IPB
KEY ROLE OF ROUTING
swj/11
How to get packet from here to there?
Decentralized nature of Internet makes routing a
major challenge
Interior gateway protocols (IGPs) are used to
determine routes within a domain
Exterior gateway protocols (EGPs) are used to
determine routes across domains
Routes must be consistent & produce stable flows
Scalability required to accommodate growth
Hierarchical structure of IP addresses essential to
keeping size of routing tables manageable
13
Department of Computer Science -IPB
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Shortest Path Routing
QoS in Network Layer
14
Department of Computer Science -IPB
MESSAGE SWITCHING
swj/11
15
Department of Computer Science -IPB
MESSAGE SWITCHING DELAY
Source
t
t
Switch 2
swj/11
Switch 1
T
t
t
Destination
Delay
Minimum Delay = 3 + 3T,
: propagation delay (umumnya panjang hop/kecepatan cahaya)
T: message transmission time
16
Department of Computer Science -IPB
DATAGRAM PACKET SWITCHING
Department of Computer Science -IPB
swj/11
Messages broken into
smaller units (packets)
Source & destination
addresses in packet header
Connectionless, packets
routed independently
Packet may arrive out of
order
Pipelining of packets across
network can reduce delay,
increase throughput
Lower delay that message
switching, suitable for
interactive traffic
17
DATAGRAM PACKET SWITCHING DELAY
Assume three packets corresponding to one message
traverse same path
T
swj/11
τ
Minimum
Delay = 3τ + 5(T/3) (single path assumed)
Additional queuing delays possible at each link
Packet pipelining enables message to arrive sooner
18
Department of Computer Science -IPB
DELAY FOR K-PACKET MESSAGE OVER L HOPS
Source
t
1
2
3
1
2
3
t
1
2
3 hops
3
t
L hops
3 + 2(T/3) first bit received
L + (L-1)P first bit received
3 + 3(T/3) first bit released
L + LP first bit released
3 + 5 (T/3) last bit released
Department of Computer Science -IPB
swj/11
t
L + LP + (k-1)P last bit released
where T = k P ; P disebut delay transmisi
19
DATAGRAM VS MESSAGE SWITCHING
Delay in message switching : L + L(kP)
Delay in packet switching (k packets): L + LP +
(k-1)P
Additional delay in message switching : P(k-1)(L1)
swj/11
20
Department of Computer Science -IPB
ROUTING TABLES IN CONNECTIONLESS
PACKET SWITCHING
Department of Computer Science -IPB
swj/11
Route determined by table
lookup
Routing decision involves
finding next hop in route
to given destination
Routing table has an entry
for each destination
specifying output port that
leads to next hop
Size of table becomes
impractical for very large
number of destinations
21
EXAMPLE: INTERNET ROUTING
Internet protocol uses datagram packet switching
across networks
Hosts have two-part IP address:
Networks are treated as data links
swj/11
Network address + Host address
Routers do table lookup on network address
This reduces size of routing table
22
Department of Computer Science -IPB
VIRTUAL-CIRCUIT PACKET SWITCHING
swj/11
Network-layer connection-oriented
service
Call set-up phase sets ups pointers
in fixed path along network
All packets for a connection follow
the same path
Abbreviated header identifies
connection on each link
Packets queue for transmission
Variable bit rates possible,
negotiated during call set-up
Delays variable, cannot be less
than circuit switching
23
Department of Computer Science -IPB
CONNECTION SETUP
Department of Computer Science -IPB
swj/11
Signaling messages propagate as route is selected
Signaling messages identify connection and setup
tables in switches
Typically a connection is identified by a local tag,
Virtual Circuit Identifier (VCI)
Each switch only needs to know how to relate an
incoming tag in one input to an outgoing tag in the
corresponding output
Once tables are setup, packets can flow along path
24
CONNECTION SETUP DELAY
swj/11
Connection setup delay is incurred before any packet
can be transferred
Delay is acceptable for sustained transfer of large
number of packets
This delay may be unacceptably high if only a few
packets are being transferred
25
Department of Computer Science -IPB
VC IMPLEMENTATION
A VC consists of:
1.
3.
swj/11
2.
Path from source to destination
VC numbers, one number for each link along path
Entries in forwarding tables in routers along path
Packet belonging to VC carries a VC number.
VC number must be changed on each link.
New VC number comes from forwarding table
26
Department of Computer Science -IPB
VC FORWARDING TABLE
swj/11
Each input port of packet
switch has a forwarding
table
Lookup entry for VCI of
incoming packet
Determine output port (next
hop) and insert VCI for
next link
Very high speeds are
possible
Table can also include
priority or other information
about how packet should
be treated
27
Department of Computer Science -IPB
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Routing algorithm
Routing tables
Hierarchical routing
Flooding and Deflection Routing
Shortest
Path Routing
QoS in Network Layer
Department of Computer Science -IPB
28
ROUTING ALGORITHM REQUIREMENTS
Responsiveness to changes
Topology or bandwidth changes, congestion
Rapid convergence of routers to consistent set of routes
Freedom from persistent loops
Optimality
Resource utilization, path length
Robustness
swj/11
Continues working under high load, congestion, faults,
equipment failures, incorrect implementations
Simplicity
Efficient software implementation, reasonable processing
29
load
Department of Computer Science -IPB
ROUTING ALGORITHM CLASSIFICATION
Centralized vs Distributed Routing
Centralized Routing
All routes determined by a central node
All state information sent to central node
Problems adapting to frequent topology changes
Does not scale
swj/11
Distributed Routing
Routes determined by routers using distributed algorithm
State information exchanged by routers
Adapts to topology and other changes
Better scalability
30
Department of Computer Science -IPB
ROUTING ALGORITHM CLASSIFICATION -2
Set up manually, do not change; requires administration
Works when traffic predictable & network is simple
Used to override some routes set by dynamic algorithm
Used to provide default router
swj/11
Static vs Dynamic Routing
Static Routing
Dynamic Routing
Adapt to changes in network conditions
Automated
Calculates routes based on received updated network
state information
Department of Computer Science -IPB
31
ROUTING TABLES IN DATAGRAM
swj/11
32
Department of Computer Science -IPB
ROUTING TABLE IN VIRTUAL-CIRCUIT
swj/11
• Route determined during connection setup
• Tables in switches implement forwarding that realizes
33
selected route
Department of Computer Science -IPB
ROUTING TABLES IN VC - CONT
swj/11
34
Department of Computer Science -IPB
NON-HIERARCHICAL ADDRESSES AND
ROUTING
swj/11
No relationship between addresses & routing
proximity
Routing tables require 16 entries each
Department of Computer Science -IPB
35
HIERARCHICAL ADDRESSES AND
ROUTING
swj/11
Prefix indicates network where host is attached
Routing tables require 4 entries each
Department of Computer Science -IPB
36
FLOODING
Send a packet to all nodes in a network
No routing tables available
Need to broadcast packet to all nodes (e.g. to
propagate link state information)
swj/11
Approach
Send packet on all ports except one where it arrived
Exponential growth in packet transmissions
37
Department of Computer Science -IPB
swj/11
Flooding is initiated from Node 1: Hop 1 transmissions
Department of Computer Science -IPB
38
swj/11
39
Flooding is initiated from Node 1: Hop 2 transmissions
Department of Computer Science -IPB
swj/11
Flooding is initiated from Node 1: Hop 3 transmissions
Department of Computer Science -IPB
40
LIMITED FLOODING
Time-to-Live field in each packet limits number
of hops to certain diameter
Each switch adds its ID before flooding; discards
repeats
Source puts sequence number in each packet;
switches records source address and sequence
number and discards repeats
swj/11
41
Department of Computer Science -IPB
DEFLECTION ROUTING
Network nodes forward packets to preferred port
If preferred port busy, deflect packet to another
port
Works well with regular topologies
swj/11
Manhattan street network
Rectangular array of nodes
Nodes designated (i,j)
Rows alternate as one-way streets
Columns alternate as one-way avenues
Bufferless operation is possible
Proposed for optical packet networks
All-optical buffering currently not viable
Department of Computer Science -IPB
42
EXAMPLE: NODE (0,2)→(1,0)
swj/11
Tunnel from last column
to first column or vice
versa
43
Department of Computer Science -IPB
EXAMPLE: BUSY NODE
swj/11
44
Department of Computer Science -IPB
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Shortest Path Routing
QoS in Network Layer
45
Department of Computer Science -IPB
SHORTEST PATHS & ROUTING
Many possible paths connect any given source and
to any given destination
Routing involves the selection of the path to be used
to accomplish a given transfer
Typically it is possible to attach a cost or distance to
a link connecting two nodes
Routing can then be posed as a shortest path
problem
swj/11
46
Department of Computer Science -IPB
ROUTING METRICS
swj/11
Means for measuring desirability of a path
Path Length = sum of costs or distances
Possible metrics
Hop count: rough measure of resources used
Delay: sum of delays along path; complex & dynamic
Bandwidth: “available capacity” in a path
Load: Link & router utilization along path (congestion)
Cost: $$$
47
Department of Computer Science -IPB
SHORTEST PATH APPROACHES
Department of Computer Science -IPB
swj/11
Distance Vector Protocols
Neighbors exchange list of distances to destinations
Best next-hop determined for each destination
Ford-Fulkerson (distributed) shortest path
algorithm
Link State Protocols
Link state information flooded to all routers
Routers have complete topology information
Shortest path (& hence next hop) calculated
Dijkstra (centralized) shortest path algorithm
48
DISTANCE VECTOR ALGORITHM
Iterative, asynchronous:
swj/11
each local iteration caused by:
local link cost change
DV update message from
neighbor
Each node:
wait for (change in local link
cost of msg from neighbor)
Distributed:
each node notifies neighbors
only when its DV changes
neighbors then notify their
neighbors if necessary
recompute estimates
if DV to any dest has
changed, notify neighbors
49
Department of Computer Science -IPB
BELLMAN-FORD ALGORITHM
Now consider parallel computations for all destinations d
Initialization
Send Step
Send new distance vector to immediate neighbors across local link
Receive Step
swj/11
Each node has 1 row for each destination d
Distance of node d to itself is zero: Dd(d)=0
Distance of other node j to d is infinite: Dj(d)= ∝ , for j ≠ d
Next node nj = -1 since not yet defined
For each destination d, find the next hop that gives the minimum
distance to d,
Minj { Cij+ Dj(d) }
Replace old (nj, Di(d)) by new (nj*, Dj*(d)) if new next node or
distance found
Go to send step
Department of Computer Science -IPB
50
BELLMAN-FORD ALGORITHM(3)
swj/11
Table entry
@ node 1
for dest Node 6
Table entry
@ node 3
for dest Node 6
51
Department of Computer Science -IPB
BELLMAN-FORD ALGORITHM(4)
swj/11
52
Department of Computer Science -IPB
BELLMAN-FORD ALGORITHM(5)
swj/11
53
Department of Computer Science -IPB
BELLMAN-FORD ALGORITHM(6)
swj/11
54
Department of Computer Science -IPB
SHORTEST PATH TREE TO NODE 6
swj/11
55
Department of Computer Science -IPB
COMPARISON OF LS AND DV ALGORITHMS
Message complexity
LS:
DV:
exchange between neighbors only
convergence time varies
Speed of Convergence
LS:
O(n2) algorithm requires O(nE)
msgs
may have oscillations
DV: convergence time varies
may be routing loops
count-to-infinity problem
Department of Computer Science -IPB
router malfunctions?
LS:
node can advertise
incorrect link cost
each node computes only
its own table
swj/11
with n nodes, E links, O(nE) msgs
sent
Robustness: what happens if
DV:
DV node can advertise
incorrect path cost
each node’s table used by
others
error propagate thru
network
59
EXAMPLE: INTRADOMAIN ROUTING
Also known as Interior Gateway Protocols (IGP)
Most common Intra-AS routing protocols:
RIP: Routing Information Protocol
OSPF: Open Shortest Path First
IGRP: Interior Gateway Routing Protocol (Cisco
proprietary)
swj/11
60
Department of Computer Science -IPB
RIP ( ROUTING INFORMATION PROTOCOL)
Distance vector algorithm
Distance metric: # of hops (max = 15 hops)
Distance vectors: exchanged among neighbors every
30 sec via Response Message (also called
advertisement)
Each advertisement: list of up to 25 destination nets
within AS
swj/11
61
Department of Computer Science -IPB
RIP: EXAMPLE
z
w
y
D
B
swj/11
A
x
C
Destination Network
Next Router
Num. of hops to dest.
w
y
z
x
A
B
B
--
2
2
7
1
….
….
....
Routing table in D
Department of Computer Science -IPB
62
RIP: EXAMPLE
Advertisement
from A to D
Next hops
- - C 4
… ...
w
z
x
A
swj/11
Dest
w
x
z
….
y
D
B
C
Destination Network
Next Router
Num. of hops to dest.
w
y
z
x
A
B
BA
--
2
2
75
1
….
….
....
Routing
table in D
Department of Computer Science
-IPB
63
RIP: LINK FAILURE AND RECOVERY
If no advertisement heard after 180 sec --> neighbor/link
declared dead
routes via neighbor invalidated
new advertisements sent to neighbors
neighbors in turn send out new advertisements (if tables
changed)
link failure info quickly propagates to entire net
poison reverse used to prevent ping-pong loops (infinite
distance = 16 hops)
swj/11
64
Department of Computer Science -IPB
OSPF (OPEN SHORTEST PATH FIRST)
“open”: publicly available
Uses Link State algorithm
LS packet dissemination
Topology map at each node
Route computation using Dijkstra’s algorithm
swj/11
OSPF advertisement carries one entry per neighbor
router
Advertisements disseminated to entire AS (via
flooding)
65
Department of Computer Science -IPB
INTERDOMAIN ROUTING:
BGP (Border Gateway Protocol): the de facto
standard
Path vector protocol instead of distance vector
swj/11
BGP
66
Department of Computer Science -IPB
AGENDA
Network-layer
swj/11
Functions
Packet Network Topology
Network Service Model
Routing Principles
Shortest Path Routing
QoS in Network Layer
67
Department of Computer Science -IPB
QOS PARAMETER
End-to-end delay :
Jitter
Variability in the packet delays
swj/11
sum of individual delays experienced at each system
Packet loss
Sum of packet discarded by he queue system
68
Department of Computer Science -IPB
QOS REQUIREMENTS
swj/11
69
Department of Computer Science -IPB
QUEUEING SYSTEM
swj/11
Queue scheduling :
- FIFO
- Priority (discard priority, HOL priority)
70
Department of Computer Science -IPB
(A) FIFO AND (B) FIFO W/ DISCARD PRIORITY
swj/11
71
Department of Computer Science -IPB
HEAD OF LINE (HOL) PRIORITY
swj/11
High priority queue serviced until empty
High priority queue has lower waiting time
Department of Computer Science -IPB
72
FAIR QUEUEING
Each flow has its own logical queue: prevents hogging;
allows differential loss probabilities
C bits/sec allocated equally among non-empty queues
transmission rate = C / n(t), where n(t)=# non-empty queues
swj/11
Idealized system assumes fluid flow from queues
Implementation requires approximation: simulate fluid
system; sort packets according to completion time in
ideal system
73
Department of Computer Science -IPB
RANDOM EARLY DETECTION (RED)
swj/11
Background :
Packets produced by TCP will reduce input rate in
response to network congestion
Early drop: discard packets before buffers are full
Random drop causes some sources to reduce rate
before others, causing gradual reduction in aggregate
input rate
74
Department of Computer Science -IPB
RED ALGORITHM
swj/11
Algorithm:
Maintain running average of queue length
If Qavg < minthreshold, do nothing
If Qavg > maxthreshold, drop packet
If in between, drop packet according to probability
Flows that send more packets are more likely to have
packets dropped
75
Department of Computer Science -IPB
QOS PROVISIONING
Open-loop control : does not rely on feedback
information to react to congestion
swj/11
Admission Control : common for virtual-circuit
Policing (Leaky Bucket algorithm)
Traffic Shaping
Closed-loop control : maximize link utilization
while preventing buffer overflows due to
congestion
Congestion control (in TCP)
76
Department of Computer Science -IPB
ADMISSION CONTROL
Flows negotiate contract
with network
Specify requirements:
swj/11
Peak, Avg., Min bit rate
Maximum burst size
Delay, Loss requirement
o Network computes resources needed
o“Effective” bandwidth
o If flow accepted, network allocates resources to
ensure QoS delivered as long as source conforms to
contract
Department of Computer Science -IPB
77
POLICING
Network monitors traffic flows continuously to
ensure they meet their traffic contract
When a packet violates the contract, network can
discard or tag the packet giving it lower priority
If congestion occurs, tagged packets are discarded
first
Leaky Bucket Algorithm is the most commonly used
policing mechanism
swj/11
Bucket has specified leak rate for average contracted
rate
Bucket has specified depth to accommodate variations in
arrival rate
Arriving packet is conforming if it does not result in
overflow
Department of Computer Science -IPB
78
LEAKY BUCKET PRINCIPLES
swj/11
Let X = bucket content at last conforming packet
arrival
Let ta – last conforming packet arrival time =
depletion in bucket
Department of Computer Science -IPB
79
LEAKY BUCKET ALGORITHM
swj/11
80
Department of Computer Science -IPB
LEAKY BUCKET EXAMPLE
swj/11
81
Department of Computer Science -IPB
TRAFFIC SHAPING
swj/11
Networks police the incoming traffic flow (ingress)
Traffic shaping is used to ensure that a packet
stream conforms to specific parameters (engress)
Networks can shape their traffic prior to passing it
to another network
Department of Computer Science -IPB
82
LEAKY BUCKET TRAFFIC SHAPER
swj/11
Buffer incoming packets
Play out periodically to conform to parameters
Surges in arrivals are buffered & smoothed out
Possible packet loss due to buffer overflow
Too restrictive, since conforming traffic does not need
to be completely smooth
83
Department of Computer Science -IPB
TOKEN BUCKET TRAFFIC SHAPER
swj/11
Token rate regulates transfer of packets
If sufficient tokens available, packets enter network
without delay
K determines how much burstiness allowed into the
network
Department of Computer Science -IPB
84
TOKEN BUCKET SHAPING EFFECT
swj/11
The token bucket constrains the traffic from a
source to be limited to b + r t bits in an interval of
length t
Department of Computer Science -IPB
85
REFERENCES
Garcia A.L., Widjaja A. 2004. Networks
Communication : Fundamental Concepts and Key
Architectures 2nd ed. – Chapter 7. McGraw-Hill
Companies, Inc.
Kurose J.F., Ross K.W. 2003. Computer
Networking : A Top-Down Approach Featuring Internet
2nd ed. – Chapter 4. Pearson Education.
swj/11
86
Department of Computer Science -IPB