Download WB_UDP-TCP

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Airborne Networking wikipedia , lookup

Network tap wikipedia , lookup

Computer network wikipedia , lookup

Deep packet inspection wikipedia , lookup

Net bias wikipedia , lookup

Zero-configuration networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

TCP congestion control wikipedia , lookup

Transcript
CS4550
Computer Networks II
TCP/UDP
Ref: Feit Chap 9
Tanenbaum Chap 6
1
Transport Layer Functions
* Provide end to end communication function
* Connect applications with the network layer
optional:
* Packet assembly, disassembly, sequencing
* end to end acknowledgment
* High level flow/ congestion control
* Error checking
Transport Layer Service function
Application,
session,
presentation layers
Transport
entity
Network
layer
Application
Port #
Transport
protocol
Transport
Id
Application,
session,
presentation layers
Transport
entity
Network
layer
Common Transport Interfaces
TCP - Transmission Control Protocol - 6
UDP-
User Datagram Protocol
NetBEUI -
Microsoft network
IPX/SPX -
Novell Internet Protocol
Appletalk-
Apple network protocol
DECnet -
Dec protocol stack
- 17
Address locations
TPDU Payload
Application port # (telnet = 23)
Protocol (TCP=6,UDP=17)
IP address ( 131.120.6.4 )
MAC address (8:0:20:74:4:79)
Common Port Numbers
TCP
UDP
FTP 20
DNS
53
telnet 23
Echo
7
SMTP 25
SNMP
161
http
80
ref: feit table 9.2
ref: feit table 9.1
User defined port numbers > 1024
see /etc/protocols for unix
\WINNT\system32\drivers\etc\protocols for NT
TCP Flow Control
Sliding Window
Receive Window
-number
Send window
-number of bytes which
can be sent
Byte sequence
numbers
-byte number of the first
byte in the transmitted
segment
Ack
of bytes which
can be received
-byte number of the next
byte expected
Three way handshake
How do the window sizes get initialized?
C
L
I
E
N
T
SYN
Seq # 1000
Window 8760
Max seg 1460
SYN
Seq # 3000
ACK #1001
Window 5840
Max seg 1460
ACK
Seq # 1001
Ack #3001
S
E
R
V
E
R
TCP Segment Header
Source port
Destination Port
Sequence Number
Acknowledgement Number
Hlen Reserved Flags
Window
Checksum
Urgent Pointer
Option(s)(0 0r more 32 bit words)
DATA(optional)
TCP Congestion Control
How big a segment of data can Sender send?
- receive window size
-congestion window size
- threshold
How often Sender send?
-Time out
- received ACK
MSS - maximum Segment size , default 536 or set
by option kind =2
Internet Congestion control
Slow start algorithm
1) set congestion window to MSS
2) Send the less of congestion window or receive window
3) if all ACK’d double congestion window and go to 2)
4) else if TO , see congestion algorithm
This algorithm doubles the unacknowledged burst size until the
receive window size is reached
Actually if individual segment ack’s are received in step 3 one
MSS is added to the congestion window. This doubles the burst.
Internet Congestion control
Internet congestion Algorithm
1) threshold = 1/2 MIN(congestion Window,receive window)
2) set congestion window to MSS
3) Send the less of congestion window or receive window
4) if all ACK’d double congestion window up to the
threshold add one MSS after threshold is reached
and go to 3)
5) else if TO , go to 1
Ref: tanenbaum fig 6-32, Feit fig 9.25
Time out and Network performance
* timout value is critical to network performance
*what happens if timeout to low
*what happens if timeout too high
* develop simple formula for average data rate
from a transmitting node
* rule of thumb
Retransmission Timeout = SRTT + 2 *SDEV
Time out Calculation
T = Retransmission Timeout = SRTT + 2 *SDEV
DEV = | SRTT - latest round trip time |
SRTT = (7/8 )* SRTT + (1/8)* latest round trip time
SDEV= (3/4)*SDEV + (1/4) *DEV
initialized to:
T= 3 sec SRTT = 0
SDEV = 1.5sec