SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Chapter 3
Transport Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Last Lecture

TCP Congestion Control
Today’s Lecture
Retransmission Timer in TCP
Chapter 4
Network Layer
TCP Congestion Control: Details
 Congestion Window
 Imposes a constraint on the rate at which a TCP sender can send
traffic into the network
 The amount of unacknowledged data at a sender may not exceed
the minimum of CongWin and RcvWindow
LastByteSent-LastByteAcked min{CongWin, RcvWindow}
 CongWin is dynamic, function of perceived network

congestion
 TCP takes arrival of ACKs as successful delivery


Increases Congestion Window

 Self Clocking
 TCP uses ACKs to trigger its increase in congestion window size
TCP Congestion Control Algorithm:
Additive Increase Multiplicative Decrease (AIMD)
 Additive Increase
 Increase CongWin by 1 MSS until loss detected
 Multiplicative Decrease
 Cut CongWin in half after loss
 CongWin is 20 Kbytes, cut it to half after loss
 Continue to drop but not allowed to drop below 1 MSS
congestion
window
24 Kbytes

16 Kbytes

8 Kbytes

time
TCP Slow Start
 AIMD can take a long time

Host A

Host B

RTT

to ramp up to full capacity
from scratch
 When connection begins,
CongWin = 1 MSS
 Increase rate exponentially
until first loss event:
 Double CongWin every
RTT
 Done by incrementing
CongWin for every ACK
received
 Summary: Initial rate is
slow but ramps up
exponentially fast

time
Refinement: Inferring Loss
3 Duplicate ACKs
Indicates

network capable of
delivering some segments.

 Timeout
Indicates

a “more alarming”
congestion scenario.
Refinement: Inferring Loss
 After timeout event

CongWin instead set to 1 MSS
 Window then grows exponentially (enters slow
start)
 Till it reaches one half of the value it had before
the timeout
 Window then grows linearly (congestion avoidance)
 Threshold Value


Determines the window size at which slow start will end

 After three duplicate ACKs:

CongWin is cut in half
 Window then grows linearly
 Fast Retransmit and Fast Recovery

Refinement: Inferring Loss
 TCP Tahoe


For either events
Cuts congestion window size to 1 MSS and
enters slow start

 TCP Reno

Uses Fast Retransmit and Fast Recovery for
three Dupicate ACKs.
 Same as Tahoe for Timeout events.

TCP Congestion Control
TCP Round Trip Time and Timeout
 Retransmission Timer larger than the RTT


How much larger? How would RTT be calculated?

 Sample RTT
 Sample RTT fluctuates from segment to segment


Congestion in routers and varying load on end systems

 TCP never computes a Sample RTT for retransmitted segments.
(Why?)

 EstimatedRTT
 TCP maintains an average of Sample RTT (RFC 2988)
EstimatedRTT = (1-

)*EstimatedRTT +

*SampleRTT

 The new value of Estimated RTT is a weighted combination of
the previous value of Estimated RTT plus new value of Sample
RTT.
TCP Round Trip Time and Timeout
 The recommended value of
becomes

is 0.125 in which case the formula

EstimatedRTT = 0.875*EstimatedRTT + 0.125*SampleRTT

RTT: gaia.cs.umass.edu to fantasia.eurecom.fr
350

RTT (milliseconds)

300

250

200

150

100
1

8

15

22

29

36

43

50

57

64

71

time (seconnds)
SampleRTT

Estimated RTT

78

85

92

99

106
Setting the Timeout Interval
• The timeout interval should be greater than or equal to
EstimatedRTT
• Not too large, delay to retransmit packet
• Desirable to set the timeout interval plus some “safety
margin.”
• Estimate of how much SampleRTT deviates from
EstimatedRTT

DevRTT = (1- )*DevRTT + *|SampleRTT-EstimatedRTT|
( = 0.25)

Then set timeout interval:
TimeoutInterval = EstimatedRTT + 4*DevRTT
For more details see RFC 2988
V. Jacobson, “Congestion Avoidance and Control”, in Proc. ACM SIGCOMM, pp. 314329, 1988.
TCP Connection Management
• How TCP connection is established?
– Three Way handshake?
• How TCP connection is closed?
– Four Way handshake?
Reading Assignment
TCP Connection Management

TCP server
lifecycle
TCP client
lifecycle

•Reading Assignment
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Network layer
 Transport segment from







sending to receiving host
On sending side
encapsulates segments
into datagrams
On receiving side,
delivers segments to
transport layer
Network layer protocols
in routers
Router examines header
fields in all IP datagrams
passing through it

application
transport
network
data link
physical
network
data link
physical

network
data link
physical
network
data link
physical

network
data link
physical
network
data link
physical

network
network
data link
data link
physical
physical
network
data link
physical

network
data link
physical

network
data link
physical

network
data link
physical

application
transport
network
data link
physical
Two Key Network-Layer Functions
 Forwarding: Move packets from router’s input

to appropriate router’s output


Local action of transferring a packet

 Routing: Determine route taken by packets

from source to destination.




Network wide process that determines the end to
end paths
The algorithms that calculate these paths are
referred to as routing algorithms
Routing and Forwarding
routing algorithm

Forwarding Table
o Router Forwards a
packet by examining the
destination address of the
packet

local forwarding table
header value output link

o Routing Algorithm
value in arriving
determines the values
packet’s header
that are inserted in the
routers forwarding tables

0100
0101
0111
1001

0111

3
2
2
1

1
3 2
Network Layer
Host, router network layer functions:
Transport layer: TCP, UDP

Network
layer

IP protocol
•addressing conventions
•datagram format
•packet handling conventions

Routing protocols
•path selection
•RIP, OSPF, BGP

forwarding
table

ICMP protocol
•error reporting
•router “signaling”

Link layer
physical layer
IP Address
• An IP address is a 32-bit address.
• The IP addresses are unique.
• The address space of IPv4 is
232 or 4,294,967,296.(more than 4 billion)
• Represented in binary or decimal
CLASSFUL ADDRESSING
• IP addressing when started used the concept of
classes.
• This architecture is called classful addressing.
• Organizations can be of different sizes
• Require varying numbers of IP addresses on the Internet.

• A system was devised whereby the IP address space
would be divided into classes.
• Each class occupies some part of the whole
address space
• Some classes are for
• Large networks on the Internet
• Smaller organizations

•

Some classes are reserved for special purposes.
IP Address Classes
• There are five classes in the “classful” system, which are
given letters A through E.
• The first few bits in binary notation can immediately tell
us the class of the address
IP Address Classes
Netid and Hostid
•An IP address is divided into Netid and Hostid

•Network Identifier (Netid): Few bits starting from
the left-most bit are used to identify the network
where the host is located.
•Host Identifier (Hostid): The remainder of the bits
are used to identify the host on the network.
•These parts are of varying lengths depending on the
class of the address.
Netid and Hostid
Class A
• Class A is divided into 128 blocks (27)
– Each block having different Netid
• First block covers addresses from
– 0.0.0.0 to 0.255.255.255 (netid 0)
• Second block covers addresses from
– 1.0.0.0 to 1.255.255.255 (netid 1)
• The last block covers addresses from
– 127.0.0.0 to 127.255.255.255 (netid 127)
• Each block in this class contains 16,777,216 addresses
• Class A addresses were designed for large
organizations with large number of hosts attached to
their network

– 16,777,216 too large, millions of class A addresses are wasted
Class B
• Class B is divided into 16384 blocks (214)
– Each block having different netid
• First block covers addresses from
– 128.0.0.0 to 128.0.255.255 (netid 128.0)
• The last block covers addresses from
– 191.255.0.0 to 191.255.255.255 (netid 191.255)
• Each block in this class contains 65,536 addresses
• Class B addresses were designed for medium size
organizations with thousands of hosts attached to
their network
– 65,536 is also too large for medium size organizations, many
of class B addresses are wasted
Class C
• Class C is divided into 2097152 blocks (221)
– Each block having different netid
• First block covers addresses from
– 192.0.0.0 to 192.0.0.255 (netid 192.0.0)
• The last block covers addresses from
– 223.255.255.0 to 223.255.255.255 (netid
223.255.255)
• Each block in this class contains 256 addresses
• Class C addresses were designed for small
organizations
– 256 is small for most organizations
IP Address Classes
• Given the network address 17.0.0.0, find the
class, the netid, and the range of the
addresses?.
IP Address Classes
Solution
• The class is A because the first byte is between
0 and 127. The block has a netid of 17. The
addresses range from 17.0.0.0 to
17.255.255.255.
IP Address Classes
• Given the network address 220.34.76.0, find
the class, the block/netid, and the range of the
addresses?.
IP Address Classes
Solution
• The class is C because the first byte is between
192 and 223. The block has a netid of
220.34.76. The addresses range from
220.34.76.0 to 220.34.76.255
Issues with Classful Addressing
• Flexibility in Internal addressing:
– Thousands of hosts connected to one large network

• Inefficient Use of Address Space:
– Wastage of limited IP address space.

• Router Table Entries:
– Increase in router table entries.

Example:
• Hosts needed by organization are 5000
• Hosts in B 65,536 and in C 256
– Organization with 5,000 hosts is in a dilemma
– It can only choose to either waste 90% of a Class B address
or use 20 different Class C networks.
– Replacing with 20 C networks will increase entries in routers
Subnetting
• To better meet the administrative and technical
requirements of larger organizations, the “classful”
IP addressing system was enhanced through a
technique known as subnet addressing or subnetting.
• A three-level hierarchy is created: networks, which
contain subnets, each of which then has a number of
hosts.
Subnetting
• Subnetting adds an additional level to the hierarchy
of structures used in IP addressing.
• IP addresses must be broken into three elements
instead of two.
• Network ID is unchanged
• The host ID into a subnet ID and host ID.
• These subnet ID bits are used to identify each
subnet within the network.
• Splitting the host ID into subnet ID and host ID, we
reduce the size of the host ID portion of the address
• Class A networks have 24 bits to split between the
subnet ID and host ID: class B networks have 16, and
class C networks only 8.
IPv4 Datagram Format
IP protocol version
number
header length
(bytes)
“type” of data
max number
remaining hops
(decremented at
each router)

upper layer protocol
to deliver payload to

Type of Service field is now
called Differentiated
Service? See RFC 2474
Home Assignment

type of
ver head.
len service

length
fragment
16-bit identifier flgs
offset
time to
header
protocol
live
checksum

total datagram
length (bytes)

for
fragmentation/
reassembly

32 bit source IP address
32 bit destination IP address
Options (if any)

data
(variable length,
a TCP
or UDP segment)

IPV5? Does it exists?

e.g. timestamp,
record route
taken etc
Find other use?
IP Fragmentation & Reassembly
 Network links have MTU

(Maximum Transmission Unit)
– Maximum length of data that
can be encapsulated in a
frame.
o Different link between
sender and destination
• Use different MTUs
 Large IP datagram is divided
(“fragmented”)
o One datagram becomes
several datagrams
o Referred as Fragments
o “Reassembled” only at final
destination
o IP header bits used to
identify, order related
fragments

fragmentation:
in: one large datagram
out: 3 smaller datagrams

reassembly
IP Fragmentation & Reassembly
 Identification Number, Flag and Offset fields in the datagram

header

 Identification Number
o
o

Sending Host stamps the datagram with an identification number
Destination receives datagram
o Examines the identification number

 Flag Bit
o
o

All fragments set to 1
Last fragment set to 0

 Offset Field
o

Use to specify where fragment fits in the within the original IP
datagram
IP Fragmentation & Reassembly
Example
 Datagram of 4000 bytes
o 20 bytes of IP header, 3980 bytes of payload
o MTU is 1500 bytes
Fragment
Bytes
ID
Offset
0 (beginning)

Flag

1st Fragment

1480 bytes

777

1 (there is more)

2nd Fragment

1480 bytes

777

185

1 (there is more)

3rd Fragment

1020 bytes

777

370

0 (Last )

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Transport layer
Transport layerTransport layer
Transport layer
 
the transport layer
the transport layerthe transport layer
the transport layer
 
Transport Layer Description By Varun Tiwari
Transport Layer Description By Varun TiwariTransport Layer Description By Varun Tiwari
Transport Layer Description By Varun Tiwari
 
transport layer
transport layertransport layer
transport layer
 
Transport layer services (cn)
Transport layer services (cn)Transport layer services (cn)
Transport layer services (cn)
 
Lec 12(Transport Layer)
Lec 12(Transport Layer)Lec 12(Transport Layer)
Lec 12(Transport Layer)
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
The Transport Layer
The Transport LayerThe Transport Layer
The Transport Layer
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
transport layer
transport layer transport layer
transport layer
 
Unit 4 - Network Layer
Unit 4 - Network LayerUnit 4 - Network Layer
Unit 4 - Network Layer
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Transport layer
Transport layer Transport layer
Transport layer
 
Chapter4 Network
Chapter4 NetworkChapter4 Network
Chapter4 Network
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
Transport Layer Part 1
Transport Layer Part 1Transport Layer Part 1
Transport Layer Part 1
 
transport layer protocols
transport layer protocolstransport layer protocols
transport layer protocols
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 

Ähnlich wie Week9 lec1

6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networkingSreenatha Reddy K R
 
Free CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfFree CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfNetworkershome
 
IP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxIP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxgamerchan1
 
Lecture 3 network layer
Lecture 3 network layerLecture 3 network layer
Lecture 3 network layerRonoh Kennedy
 
Chapter2ccna
Chapter2ccnaChapter2ccna
Chapter2ccnarobertoxe
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork LayerZahouAmel1
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slidesadam_merritt
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategyMustafa Salam
 

Ähnlich wie Week9 lec1 (20)

15 3
15 315 3
15 3
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
 
Internetworking
InternetworkingInternetworking
Internetworking
 
Computer network
Computer networkComputer network
Computer network
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
Network.pptx
Network.pptxNetwork.pptx
Network.pptx
 
Free CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfFree CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdf
 
gofortution
gofortutiongofortution
gofortution
 
IP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxIP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptx
 
Cn ipv4 addressing
Cn ipv4 addressingCn ipv4 addressing
Cn ipv4 addressing
 
chapter 4.pptx
chapter 4.pptxchapter 4.pptx
chapter 4.pptx
 
Lecture 3 network layer
Lecture 3 network layerLecture 3 network layer
Lecture 3 network layer
 
Chapter2ccna
Chapter2ccnaChapter2ccna
Chapter2ccna
 
Chapter2ccna
Chapter2ccnaChapter2ccna
Chapter2ccna
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
 
Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slides
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategy
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Networking basics
Networking basicsNetworking basics
Networking basics
 

Mehr von syedhaiderraza (20)

Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
 
Week14 lec2
Week14 lec2Week14 lec2
Week14 lec2
 
Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
 
Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
 
Week2 lec3-bscs1
Week2 lec3-bscs1Week2 lec3-bscs1
Week2 lec3-bscs1
 

Kürzlich hochgeladen

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Kürzlich hochgeladen (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

Week9 lec1

  • 1. Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 3. Today’s Lecture Retransmission Timer in TCP Chapter 4 Network Layer
  • 4. TCP Congestion Control: Details  Congestion Window  Imposes a constraint on the rate at which a TCP sender can send traffic into the network  The amount of unacknowledged data at a sender may not exceed the minimum of CongWin and RcvWindow LastByteSent-LastByteAcked min{CongWin, RcvWindow}  CongWin is dynamic, function of perceived network congestion  TCP takes arrival of ACKs as successful delivery  Increases Congestion Window  Self Clocking  TCP uses ACKs to trigger its increase in congestion window size
  • 5. TCP Congestion Control Algorithm: Additive Increase Multiplicative Decrease (AIMD)  Additive Increase  Increase CongWin by 1 MSS until loss detected  Multiplicative Decrease  Cut CongWin in half after loss  CongWin is 20 Kbytes, cut it to half after loss  Continue to drop but not allowed to drop below 1 MSS congestion window 24 Kbytes 16 Kbytes 8 Kbytes time
  • 6. TCP Slow Start  AIMD can take a long time Host A Host B RTT to ramp up to full capacity from scratch  When connection begins, CongWin = 1 MSS  Increase rate exponentially until first loss event:  Double CongWin every RTT  Done by incrementing CongWin for every ACK received  Summary: Initial rate is slow but ramps up exponentially fast time
  • 7. Refinement: Inferring Loss 3 Duplicate ACKs Indicates network capable of delivering some segments.  Timeout Indicates a “more alarming” congestion scenario.
  • 8. Refinement: Inferring Loss  After timeout event CongWin instead set to 1 MSS  Window then grows exponentially (enters slow start)  Till it reaches one half of the value it had before the timeout  Window then grows linearly (congestion avoidance)  Threshold Value  Determines the window size at which slow start will end  After three duplicate ACKs: CongWin is cut in half  Window then grows linearly  Fast Retransmit and Fast Recovery 
  • 9. Refinement: Inferring Loss  TCP Tahoe  For either events Cuts congestion window size to 1 MSS and enters slow start  TCP Reno Uses Fast Retransmit and Fast Recovery for three Dupicate ACKs.  Same as Tahoe for Timeout events. 
  • 11. TCP Round Trip Time and Timeout  Retransmission Timer larger than the RTT  How much larger? How would RTT be calculated?  Sample RTT  Sample RTT fluctuates from segment to segment  Congestion in routers and varying load on end systems  TCP never computes a Sample RTT for retransmitted segments. (Why?)  EstimatedRTT  TCP maintains an average of Sample RTT (RFC 2988) EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT  The new value of Estimated RTT is a weighted combination of the previous value of Estimated RTT plus new value of Sample RTT.
  • 12. TCP Round Trip Time and Timeout  The recommended value of becomes is 0.125 in which case the formula EstimatedRTT = 0.875*EstimatedRTT + 0.125*SampleRTT RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 350 RTT (milliseconds) 300 250 200 150 100 1 8 15 22 29 36 43 50 57 64 71 time (seconnds) SampleRTT Estimated RTT 78 85 92 99 106
  • 13. Setting the Timeout Interval • The timeout interval should be greater than or equal to EstimatedRTT • Not too large, delay to retransmit packet • Desirable to set the timeout interval plus some “safety margin.” • Estimate of how much SampleRTT deviates from EstimatedRTT DevRTT = (1- )*DevRTT + *|SampleRTT-EstimatedRTT| ( = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT For more details see RFC 2988 V. Jacobson, “Congestion Avoidance and Control”, in Proc. ACM SIGCOMM, pp. 314329, 1988.
  • 14. TCP Connection Management • How TCP connection is established? – Three Way handshake? • How TCP connection is closed? – Four Way handshake? Reading Assignment
  • 15. TCP Connection Management TCP server lifecycle TCP client lifecycle •Reading Assignment
  • 16. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 17. Network layer  Transport segment from     sending to receiving host On sending side encapsulates segments into datagrams On receiving side, delivers segments to transport layer Network layer protocols in routers Router examines header fields in all IP datagrams passing through it application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network network data link data link physical physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical
  • 18. Two Key Network-Layer Functions  Forwarding: Move packets from router’s input to appropriate router’s output  Local action of transferring a packet  Routing: Determine route taken by packets from source to destination.   Network wide process that determines the end to end paths The algorithms that calculate these paths are referred to as routing algorithms
  • 19. Routing and Forwarding routing algorithm Forwarding Table o Router Forwards a packet by examining the destination address of the packet local forwarding table header value output link o Routing Algorithm value in arriving determines the values packet’s header that are inserted in the routers forwarding tables 0100 0101 0111 1001 0111 3 2 2 1 1 3 2
  • 20. Network Layer Host, router network layer functions: Transport layer: TCP, UDP Network layer IP protocol •addressing conventions •datagram format •packet handling conventions Routing protocols •path selection •RIP, OSPF, BGP forwarding table ICMP protocol •error reporting •router “signaling” Link layer physical layer
  • 21. IP Address • An IP address is a 32-bit address. • The IP addresses are unique. • The address space of IPv4 is 232 or 4,294,967,296.(more than 4 billion) • Represented in binary or decimal
  • 22. CLASSFUL ADDRESSING • IP addressing when started used the concept of classes. • This architecture is called classful addressing. • Organizations can be of different sizes • Require varying numbers of IP addresses on the Internet. • A system was devised whereby the IP address space would be divided into classes. • Each class occupies some part of the whole address space • Some classes are for • Large networks on the Internet • Smaller organizations • Some classes are reserved for special purposes.
  • 23. IP Address Classes • There are five classes in the “classful” system, which are given letters A through E. • The first few bits in binary notation can immediately tell us the class of the address
  • 25. Netid and Hostid •An IP address is divided into Netid and Hostid •Network Identifier (Netid): Few bits starting from the left-most bit are used to identify the network where the host is located. •Host Identifier (Hostid): The remainder of the bits are used to identify the host on the network. •These parts are of varying lengths depending on the class of the address.
  • 27. Class A • Class A is divided into 128 blocks (27) – Each block having different Netid • First block covers addresses from – 0.0.0.0 to 0.255.255.255 (netid 0) • Second block covers addresses from – 1.0.0.0 to 1.255.255.255 (netid 1) • The last block covers addresses from – 127.0.0.0 to 127.255.255.255 (netid 127) • Each block in this class contains 16,777,216 addresses • Class A addresses were designed for large organizations with large number of hosts attached to their network – 16,777,216 too large, millions of class A addresses are wasted
  • 28. Class B • Class B is divided into 16384 blocks (214) – Each block having different netid • First block covers addresses from – 128.0.0.0 to 128.0.255.255 (netid 128.0) • The last block covers addresses from – 191.255.0.0 to 191.255.255.255 (netid 191.255) • Each block in this class contains 65,536 addresses • Class B addresses were designed for medium size organizations with thousands of hosts attached to their network – 65,536 is also too large for medium size organizations, many of class B addresses are wasted
  • 29. Class C • Class C is divided into 2097152 blocks (221) – Each block having different netid • First block covers addresses from – 192.0.0.0 to 192.0.0.255 (netid 192.0.0) • The last block covers addresses from – 223.255.255.0 to 223.255.255.255 (netid 223.255.255) • Each block in this class contains 256 addresses • Class C addresses were designed for small organizations – 256 is small for most organizations
  • 30. IP Address Classes • Given the network address 17.0.0.0, find the class, the netid, and the range of the addresses?.
  • 31. IP Address Classes Solution • The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
  • 32. IP Address Classes • Given the network address 220.34.76.0, find the class, the block/netid, and the range of the addresses?.
  • 33. IP Address Classes Solution • The class is C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255
  • 34. Issues with Classful Addressing • Flexibility in Internal addressing: – Thousands of hosts connected to one large network • Inefficient Use of Address Space: – Wastage of limited IP address space. • Router Table Entries: – Increase in router table entries. Example: • Hosts needed by organization are 5000 • Hosts in B 65,536 and in C 256 – Organization with 5,000 hosts is in a dilemma – It can only choose to either waste 90% of a Class B address or use 20 different Class C networks. – Replacing with 20 C networks will increase entries in routers
  • 35. Subnetting • To better meet the administrative and technical requirements of larger organizations, the “classful” IP addressing system was enhanced through a technique known as subnet addressing or subnetting. • A three-level hierarchy is created: networks, which contain subnets, each of which then has a number of hosts.
  • 36. Subnetting • Subnetting adds an additional level to the hierarchy of structures used in IP addressing. • IP addresses must be broken into three elements instead of two. • Network ID is unchanged • The host ID into a subnet ID and host ID. • These subnet ID bits are used to identify each subnet within the network. • Splitting the host ID into subnet ID and host ID, we reduce the size of the host ID portion of the address • Class A networks have 24 bits to split between the subnet ID and host ID: class B networks have 16, and class C networks only 8.
  • 37. IPv4 Datagram Format IP protocol version number header length (bytes) “type” of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to Type of Service field is now called Differentiated Service? See RFC 2474 Home Assignment type of ver head. len service length fragment 16-bit identifier flgs offset time to header protocol live checksum total datagram length (bytes) for fragmentation/ reassembly 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, a TCP or UDP segment) IPV5? Does it exists? e.g. timestamp, record route taken etc Find other use?
  • 38. IP Fragmentation & Reassembly  Network links have MTU (Maximum Transmission Unit) – Maximum length of data that can be encapsulated in a frame. o Different link between sender and destination • Use different MTUs  Large IP datagram is divided (“fragmented”) o One datagram becomes several datagrams o Referred as Fragments o “Reassembled” only at final destination o IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly
  • 39. IP Fragmentation & Reassembly  Identification Number, Flag and Offset fields in the datagram header  Identification Number o o Sending Host stamps the datagram with an identification number Destination receives datagram o Examines the identification number  Flag Bit o o All fragments set to 1 Last fragment set to 0  Offset Field o Use to specify where fragment fits in the within the original IP datagram
  • 40. IP Fragmentation & Reassembly Example  Datagram of 4000 bytes o 20 bytes of IP header, 3980 bytes of payload o MTU is 1500 bytes Fragment Bytes ID Offset 0 (beginning) Flag 1st Fragment 1480 bytes 777 1 (there is more) 2nd Fragment 1480 bytes 777 185 1 (there is more) 3rd Fragment 1020 bytes 777 370 0 (Last )