Advanced Computer Network by Prof Dayanand Ambawade
Advanced Computer Network by Prof Dayanand Ambawade
Renato Lo Cigno
[email protected] - Tel: 2026
Csaba Kiraly (helps with projects & Seminars)
• Reharsal of basics
– Internet and TCP/IP
– THE network? or YetAnother network
– IP
– UDP/TCP
– IP TV
• VoD/Broadcast/Live
• Traditional approach
• P2P systems
- Internet
- IP
- UDP/TCP
Acknowledment:
The following slides are based on the slides developed by
J.Kurose and K.Ross to accompany their book “Computer Networks:
A Top Down Approach Featuring the Internet” by Wiley edts.
Internet
Goals: Overview:
• recall principles • network layer services
behind network layer • routing principle: path
services: selection
– routing (path
• IP
selection)
– dealing with scale • Internet routing
– how a router works protocols reliable
transfer
– intra-domain
• instantiation and
– inter-domain
implementation in
the Internet • what’s inside a router?
• preservation of inter-packet or
timing (no jitter)?
• loss-free delivery?
• in-order delivery?
• congestion feedback to
? datagram?
sender?
application
6. Receive data application
transport 5. Data flow begins
network 4. Call connected 3. Accept call transport
data link 1. Initiate call 2. incoming call network
data link
physical
physical
application
application
transport
transport
network
data link 1. Send data 2. Receive data network
data link
physical
physical
Routing protocol
Goal: determine “good” path 5
(sequence of routers) thru 3
network from source to dest. B C 5
2
A 2 1 F
3
Graph abstraction for 1 2
routing algorithms: D E
1
• graph nodes are
routers • “good” path:
• graph edges are – typically means minimum
physical links cost path
– link cost: delay, $ cost, – other def’s possible
or congestion level
1 Initialization:
2 N = {A}
3 for all nodes v
4 if v adjacent to A
5 then D(v) = c(A,v)
6 else D(v) = infty
7
8 Loop
9 find w not in N such that D(w) is a minimum
10 add w to N
11 update D(v) for all v adjacent to w and not in N:
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N
B 3 C
2 5
A 2 1 F
3
1 2
D E
1
1 A A A A
1+e 2+e 0 0 2+e 2+e 0
D 0 0 B D B D B D 1+e 1 B
1+e 1 0 0
0 e 0 0 1 1+e 0 e
1
C C C C
1
e
… recompute … recompute … recompute
initially
routing
[email protected] Advanced Networking – Introduction 21
Distance Vector Routing Algorithm
iterative:
Distance Table data structure
• continues until no
nodes exchange info. • each node has its own
• self-terminating: no • row for each possible destination
“signal” to stop • column for each directly-
attached neighbor to node
asynchronous:
• example: in node X, for dest. Y
• nodes need not
via neighbor Z:
exchange info/iterate
in lock step!
distributed: distance from X to
X = Y, via Z as next hop
• each node
D (Y,Z)
communicates only with Z
directly-attached = c(X,Z) + minw{D (Y,w)}
neighbors
destination
E D
D (C,D) = c(E,D) + minw {D (C,w)}
= 2+2 = 4 C 6 9 4
E D
D (A,D) = c(E,D) + minw {D (A,w)}
D 4 11 2
= 2+3 = 5 loop!
E B
D (A,B) = c(E,B) + minw{D (A,w)}
= 8+6 = 14
loop!
[email protected] Advanced Networking – Introduction 23
Distance table gives routing table
A 1 14 5 A A,1
B 7 8 5
destination
B D,5
destination
C 6 9 4 C D,4
D 4 11 2 D D,4
At all nodes, X:
1 Initialization:
2 for all adjacent nodes v:
3 D X(*,v) = infty /* the * operator means "for all rows" */
X
4 D (v,v) = c(X,v)
5 for all destinations, y
X
6 send min D (y,w) to each neighbor /* w over all X's neighbors */
w
Y
2 7
X Z
1
Y
2 7
X Z X Z
1 D (Y,Z) = c(X,Z) + minw{D (Y,w)}
= 7+1 = 8
X Y
D (Z,Y) = c(X,Y) + minw {D (Z,w)}
= 2+1 = 3
algorithm
terminates
“good
news
travels
fast”
algorithm
continues
on!
Link layer
physical layer
Router Components
[email protected] Advanced Networking – Introduction 37
Input Ports
System Bus
Goals: Overview:
• Recall principles behind • transport layer services
transport layer services: • multiplexing/demultiplexing
– multiplexing/demultiplex • connectionless transport: UDP
ing
• principles of reliable data
– reliable data transfer
transfer
– flow control
• connection-oriented transport:
– congestion control
TCP
• instantiation and
– reliable transfer
implementation in the
– flow control
Internet
– connection management
lo
physical
• transport protocols run in
gi
data link
ca
physical
end systems (primarily)
l
network
en
data link
d-
physical network
en
transport vs network layer data link
d
physical
tr
services:
an
network
sp
data link
• network layer: data transfer
or
physical
t
between end systems
application
• transport layer: data transport
network
transfer between processes data link
physical
lo
physical
– congestion
gi
data link
ca
physical
l
– flow control network
en
data link
d-
– connection setup physical network
en
data link
d
physical
tr
• unreliable (“best-effort”),
an
network
sp
unordered unicast or data link
or
physical
t
multicast delivery: UDP
• services not available: application
transport
network
– real-time data link
physical
– bandwidth guarantees
– reliable multicast
multiplexing/demultiplexing:
other header fields
• based on sender, receiver port
numbers, IP addresses
– source, dest port #s in
each segment application
data
– recall: well-known port
(message)
numbers for specific
applications
TCP/UDP segment format
source port:23
dest. port: x
Source IP: C Source IP: C
Dest IP: B Dest IP: B
source port: y source port: x
port use: simple telnet app dest. port: 80 dest. port: 80
Source IP: A
Dest IP: B WWW
WWW client source port: x server B
host A dest. port: 80
port use: WWW server
send receive
side side
We’ll:
• incrementally develop sender, receiver sides of
reliable data transfer protocol (rdt)
• consider only unidirectional data transfer
– but control info will flow on both directions!
• use finite state machines (FSM) to specify
sender, receiver
event causing state transition
actions taken on state transition
state: when in this
“state” next state state state
1 event
uniquely determined 2
by next event actions
Assumption: underlying
channel can lose packets
Approach: sender waits
(data or ACKs)
“reasonable” amount of
– checksum, seq. #, ACKs,
retransmissions will be of
time for ACK
help, but not enough • retransmits if no ACK
received in this time
Q: how to deal with loss?
• if pkt (or ACK) just delayed
– sender waits until certain (not lost):
data or ACK lost, then
– retransmission will be
retransmits
duplicate, but use of seq.
– yuck: drawbacks? #’s already handles this
– receiver must specify seq
# of pkt being ACKed
• requires countdown timer
8kb/pkt
Ttransmit = = 8 microsec
10**9 b/sec
fraction of time 8 microsec
Utilization = U = sender busy sending = = 0.00015
30.016 msec
– 1KB pkt every 30 msec -> 33kB/sec thruput over 1 Gbps link
– network protocol limits use of physical resources!
?
No packets
outstanding
[email protected] Advanced Networking – Introduction 69
Go-Back-N Receiver