congestion control (tcp) Flashcards
what is congestion control
- ensure the routers and links dont get overwhelmed with too much data
- provide fair amount of resources to each user
2 types of congestion control
1) reservation based:
- end host asks network for capacity
- routers along flow path get allocated resources
- resource is not availible ->flow is rejected
2) feedback based:
- end host does not ask for capacity and just starts sending
- gets feedback from network and adjusts send rate
what is congestion window
- to avoid congestion
- increases slowly
- decreases fast
how to calc the effective window
eff win = (max win - (last byte sent - last byte acked))
basicly the max window minus the amount of data in flight
AMID
- algo to inc dec the congestion window
- inc win by 1 for each RTT
- divide win by 2 when timeout occures or packet is lost
how to tell if a packet is lost
supose packet is lost, and receiver gets the next packet. it still expects the lost one so it sends another ACK for it. once the sender gets 3 dup acks it re transmits the packet
or if the sender waits too long for an ack it will resend the packet.