Documente Academic
Documente Profesional
Documente Cultură
Review 2
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581
overwhelm receiver
door door
TCP TCP
send buffer receive buffer
segment
Review 3
TCP segment structure
32 bits
URG: urgent data counting
(generally not used) source port # dest port #
by bytes
sequence number of data
ACK: ACK #
valid acknowledgement number (not segments!)
head not
PSH: push data now len used
UA P R S F Receive window
(generally not used) # bytes
checksum Urg data pointer
rcvr willing
RST, SYN, FIN: to accept
Options (variable length)
connection estab
(setup, teardown
commands)
application
Internet data
checksum (variable length)
(as in UDP)
Review 4
TCP reliable data transfer
TCP creates rdt retransmissions are
service on top of IP’s triggered by:
unreliable service timeout events
pipelined segments three duplicate ACKs
(fast retransmission)
cumulative ACKs
TCP uses single
retransmission timer
Review 5
Outline
TCP
TCP congestion control
IP
Routing algorithms
Link address and ARP
MAC protocol
Link level switches
Review 6
TCP congestion control: bandwidth probing
“probing for bandwidth”: increase transmission rate
on receipt of ACK, until eventually loss occurs, then
decrease transmission rate
continue to increase on ACK, decrease on loss (since available
bandwidth is changing, depending on other connections in
network)
ACKs being received,
X loss, so decrease rate
so increase rate
X
X
X
sending rate
TCP’s
X “sawtooth”
behavior
time
cwnd
rate = bytes/sec
RTT
RTT
cwnd is dynamic, function of
perceived network congestion ACK(s)
Review 8
TCP: congestion avoidance
when cwnd > ssthresh AIMD
grow cwnd linearly
ACKs: increase cwnd
increase cwnd by 1
by 1 MSS per RTT:
MSS per RTT additive increase
approach possible
loss: cut cwnd in half
congestion slower (non-timeout-detected
than in slowstart loss ): multiplicative
implementation: cwnd decrease
= cwnd + MSS/cwnd
for each ACK received AIMD: Additive Increase
Multiplicative Decrease
Review 9
Summary: TCP Congestion Control
Review 10
Popular “flavors” of TCP
cwnd window size (in segments)
TCP Reno
ssthresh
ssthresh
TCP Tahoe
Transmission round
Review 11
Outline
TCP
TCP congestion control
IP
Routing algorithms
Link address and ARP
MAC protocol
Link level switches
Review 12
IP datagram format
IP protocol version
32 bits total datagram
number
length (bytes)
header length head. type of
ver length
(bytes) len service
for
“type” of data fragment fragmentation/
16-bit identifier flgs
offset reassembly
max number time to upper header
remaining hops live layer checksum
(decremented at
each router) 32 bit source IP address
Review 14
IP Fragmentation and Reassembly
length ID fragflag offset
=4000 =x =0 =0
Example
4000 byte
One large datagram becomes
datagram several smaller datagrams
MTU = 1500 bytes
length ID fragflag offset
=1500 =x =1 =0
1480 bytes in
data field length ID fragflag offset
=1500 =x =1 =185
offset =
1480/8 length ID fragflag offset
=1040 =x =0 =370
Review 15
IP Addressing: introduction
IP address: 32-bit 223.1.1.1
Review 16
Subnets
IP address: 223.1.1.1
Review 17
Subnets 223.1.1.0/24
223.1.2.0/24
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.3.0/24
Review 18
Outline
TCP
TCP congestion control
IP
Routing algorithms
Link address and ARP
MAC protocol
Link level switches
Review 19
A Link-State Routing Algorithm
Review 21
Distance vector algorithm
Basic idea:
From time-to-time, each node sends its own
distance vector estimate to neighbors
Asynchronous
When a node x receives new DV estimate from
neighbor, it updates its own DV using B-F equation:
Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N
Review 22
Distance Vector Algorithm
Iterative, asynchronous: Each node:
each local iteration caused
by:
local link cost change wait for (change in local link
DV update message from cost or msg from neighbor)
neighbor
Distributed:
recompute estimates
each node notifies
neighbors only when its DV
changes if DV to any dest has
neighbors then notify
changed, notify neighbors
their neighbors if
necessary
Review 23
Interconnected ASes
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
1d AS1 forwarding table
configured by both
intra- and inter-AS
Intra-AS Inter-AS routing algorithm
Routing Routing
algorithm algorithm intra-AS sets entries
for internal dests
Forwarding
table inter-AS & intra-As
sets entries for
external dests
Review 24
Inter-AS tasks AS1 must:
suppose router in AS1 1. learn which dests are
receives datagram reachable through
destined outside of AS2, which through
AS1: AS3
router should 2. propagate this
forward packet to reachability info to all
gateway router, but routers in AS1
which one? Job of inter-AS routing!
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b
1d AS1
Review 25
Outline
TCP
TCP congestion control
IP
Routing algorithms
Link address and ARP
MAC protocol
Link level switches
Review 26
MAC Addresses and ARP
32-bit IP address:
network-layer address
used to get datagram to destination IP subnet
Review 27
ARP: Address Resolution Protocol
0C-C4-11-6F-E3-98
137.196.7.88
Review 28
Outline
TCP
TCP congestion control
IP
Routing algorithms
RIP, OSPF and BGP
Link address and ARP
MAC protocol
Link level switches
Review 29
MAC Protocols: a taxonomy
Three broad classes:
Channel Partitioning
divide channel into smaller “pieces” (time slots,
frequency, code)
allocate piece to node for exclusive use
Random Access
channel not divided, allow collisions
“recover” from collisions
“Taking turns”
nodes take turns, but nodes with more to send can take
longer turns
Review 30
CSMA (Carrier Sense Multiple Access)
Review 31
CSMA/CD collision detection
Review 32
Outline
TCP
TCP congestion control
IP
Routing algorithms
RIP, OSPF and BGP
Link address and ARP
MAC protocol
Link level switches
Review 33
Switch
link-layer device: smarter than hubs, take
active role
store, forward Ethernet frames
examine incoming frame’s MAC address,
selectively forward frame to one-or-more
outgoing links when frame is to be forwarded on
segment, uses CSMA/CD to access segment
transparent
hosts are unaware of presence of switches
plug-and-play, self-learning
switches do not need to be configured
Review 34
Switch: self-learning Source: A
Dest: A’
A A A’
which interfaces
1 2
when frame received, 6 3
switch “learns” location of 4
5
sender: incoming LAN
segment C
records sender/location
pair in switch table B’
A’
A 1 60 Switch table
(initially empty)
Review 35
Switch: frame filtering/forwarding
When frame received: