Professional Documents
Culture Documents
TCP-UDP
TCP/UDP
OPM
TCP/UDP layering
Port1
App.
Transport
Port2
Port1
UDP
TCP
Demuxon
Portnumber
DemuxonIP
protocol
IP
Network
Port2
A co
connection
ect o need:
eed:
Source: (IP address, port No.) and Destination: (IP address, port No.)
Require one port (PHY connection) on host to allow multiple
connections, since each connection will have different (host, port) at other
end.
IP h d
IPheader:
0123
11
8901
4567
1111
2345
1111
6789
2222
0123
2222
4567
2233
8901
1:ICMP
6:TCP
17:UDP
OPM
16
Sourceport
31
UDPmessagelen
Checksum(optional)
Data
S
Source/destination
/d ti ti port:
t portt numbers
b identify
id tif sending
di & receiving
i i processes
(programs or applications)
Port number & IP address allow any application in any computer on Internet to be uniquely
identified
Used to multiplex and demultiplex datagrams to processes at a host device.
Ports can be static or dynamic
Static (< 1024 and some additional blocks, and registered port no.) assigned centrally, known as well
known ports
Dynamic (private port no., un registered, In range from 49152 to 65535)
UDP Message length: in bytes includes the UDP header and data
Checksum: of UDP header and Data (this field is optional)
Packet can arrive faster than the recipient can process them.
OPM
24
Destinationport
OPM
2/6/2015
Datagram Transport
Three steps to set up TCP connection between source and destination devices
1. Set up connection (Application program to program negotiation: virtual
connection setup)
2. Transfer data
3. Close connection (removing virtual connection, releasing port No.)
OPM
SourcePort(16)
Acknowledgementnumber(32)
Reserved(6)
HDR
Len(4)
U A
R C
G K
P
S
H
R S F
S Y I
T N N
WindowSize
(16)
UrgentPointer(16)
Checksum(16)
Options(0ormorewords)
OPM
10
OPM
OPM
11
OPM
12
2/6/2015
Reliable Streams
New technique of Ack to send next expected packet instead of sending Ack of
each received packet.
OPM
13
Timer
Send Packet 1
Start Timer
14
Time Expires
Timer
OPM
Retransmit Packet1
Start Timer
Receive Packet 1
Send AXK 1
Receive ACK 1
Cancel Timer
OPM
15
OPM
16
UDP UserDatagramProtocol
UDP
datagramoriented
unreliable,connectionless
simple
unicast andmulticast
usefulonlyforfewapplications,e.g.,
multimediaapplications
usedalotforservices
networkmanagement(SNMP),
routing(RIP),naming(DNS),etc.
TCP TransmissionControlProtocol
streamoriented
reliable,connectionoriented
complex
onlyunicast
usedformostInternetapplications:
web(http),email(smtp),file
transfer(ftp),terminal(telnet),
etc.
OPM
17