Because of the forwarding functionality, so we need to store the entire packet forwarding
Goad: move packets through routers from source to destination
datagram network:
destination address in packet determines next hop
routes may change during session
analogy: driving, asking directions
virtual circuit network:
each packet carries tag (virtual circuit ID), tag determines next hop
fixed path determined at call setup time, remains fixed thru call
routers maintain per-call state
Packet switching vs. Circuit switching
Packet switching allows more users to use network!
1Mb/s link
each user:
100kb/s when "active"
active 10% of time
circuit-switching:
10 users
packet switching:
with 35 users, probability > 10 active at same time is less than 0.0004
Is packet switching a "slam duck 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 probide circui-like behavior?
bandwidth guarantees needed for audio/video apps
still an unsolved problem (chapter 9)
chapter 14
Four sources of packet delay
nodal processing
check bit errors
determine output link
queueing
time waiting at output link for transmission
depends on congestion level of router
Transmission delay): (傳輸延遲
R = link bandwidth (bps)
L = packet length (bits)
time to send bots into link = L/R
Propagation delay: (物理傳播延遲)
d = length of physical link
s = propagation speed in medium (~)
propagation delay = d/s
Nodal delay
= processing delay
typically a few microsecs or less
= queuing delay
depends on congestion
= transmission delay
= L/R, significant for low-speed links
= propagation delay
a few microsecs to hundreds of msecs
Queueing 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!
Packet loss
queue (aka buffer) preceding link in buffer jas finite capacity
packet arribing to full queue dropped (aka lost)
lost packet may be retransmitted by previous node, by source end system, or not at all
Throughput
throughput: rate (bits/time unit) at which bits transferred between sender/receiver
chapter 35
TCP: Overview
point-to-point:
one sender, one receiver
reliable, in-order byte stream:
no "message boundaries"
pipelined:
TCP congestion and flow control set window size
full duplex data:
bi-directional data flow in same connection
MSS: maximum segment size
connection-oriented:
handshaking (exchange of control msgs) inits sender, receiver state before data exchange
flow controlled:
sender will not overwhelm receiver
TCP segment structure
head len: header length, UDP has the hole file length A,ACK: 當A flag on,代表acknowledgement number有效,傳送者想要確定這些byte有收到
connection managment
表示封包有被做connection management R,RST: reset connection,重設連接 S,SYN: setup connections,設定連接 F,FIN: tear down a connection,解除連接
P,PSH: push data now, 馬上回推資料 (不太用) U,URG: urgent data,緊急資料 (也不太用)
其實也有在用的bits,在not used裡面
not really for rdt, not for connection E、C bit: 工程師預留做condition controll的
Urg data pointer: 當URG flag on,會從Urg data pointer這邊去指向要尋找的資料 receive window: window size for flow controll,要變慢receive window數字會變小,要變快receive window數字就會變大