Documente Academic
Documente Profesional
Documente Cultură
1 2
6.
The TCP connection is then closed and the user may view
the document.
3 4
Steps in HTTP Transfer Domain Name Service
TCP TCP
#, 80 STATUS
7 8
• Sender establishes TCP Connection to SMTP server
• Sends HELO message -identifying itself to SMTP server
Email and SMTP • Client sends sender’s email address
• SMTP server acknowledges with 250 if successful
• Web transfers use HTTP, email uses SMTP (Simple Mail • Client sends receiver’s email address
Transfer Protocol) - Application level protocols • SMTRP server acknowledges with 250
• Sender - Local SMTP Server -- Remote SMTP Server - • Client sends a DATA message - requesting permission to
Receiver send email message
• SMTP uses Port 25, HTTP uses port 80 • SMTP server sends OK-to-send message
• POP (Post Office Protocol) may be used if receiver not on • Client transfers the email message
all the time. • SMTP server returns ack with a message ID
• Client indicates that the transfer is complete.
• SMTP confirms the receipt of End-of-transfer message
9 10
n+1 n+1
entity entity
n-PDUs
n-SDU n-SDU
n n n-SAP n-SAP
entity entity
n-SDU H
n entity n entity
H n-SDU
n-PDU
11 12
OSI Seven-layer Model
Data Units at different layers Application A Application B
Transport Transport
(b) Blocking Unblocking Layer Communication Network Layer
C PS = packet switch
PS C = computer net 3
C G
PS
PS net 1
G
PS
G
C G
net 5
C C
net 2 G net 4 G
G = gateway/router
15 16
Headers and Trailers TCP/IP Network Architecture
Application A Application B
data Application
Layer Application
Application Application Layer
Layer data ah Layer
Transport
Transport
Presentation Presentation Layer
Layer
Layer data ph Layer
Internet
Session Session Internet
data sh Layer
Layer Layer Layer
Transport Transport
Layer
data th Layer Network Network
Interface Interface
Network Network
Layer data nh Layer
(a) (b)
Data Link Data Link
Layer dt data dh Layer
Physical Physical
Layer bits Layer
17 18
IP
Network 1 Network 2
19 20
(a) (1,1) IP Datagram on an Ethernet
(2,1)
router (2,2)
s (1,3) r PPP
IP
Ethernet w Header
(1,2)
(b) Header contains
source and destination Frame
Ethernet Check
physical addresses; Header
Server HTTP PC Sequence
HTTP network protocol type
TCP Router TCP
IP IP IP
Net Interface Net Interface Net Interface
Ethernet PPP
21 22
socket socket
HTTP Request Application 1 Application 2
interface interface
user user
kernel kernel
Header contains source and
TCP
destination port numbers Socket Socket
Header
Underlying Underlying
Header contains source and
communication communication
destination IP addresses; IP Protocols Protocols
transport protocol type
Header
Communications
network
Header contains source
and destination physical Frame
Ethernet Check
addresses; network
protocol type Header Sequence
23 24
Server
socket() Server
socket()
bind() Client
socket()
listen()
bind()
Client
accept() bind()
socket()
recvfrom()
blocks until server receives
a connect request from client connect negotiation connect() blocks until server
data sendto()
receives data from client
data write()
read()
sendto() data
write() data
read() recvfrom()
close() close()
close()
close()
25 26
User
Interface
C:\WINDOWS>ping nal.toronto.edu
Control
Server PI User PI Pinging nal.toronto.edu [128.100.244.3] with 32 bytes of data:
Connection
Reply from 128.100.244.3: bytes=32 time=118ms TTL=243
Reply from 128.100.244.3: bytes=32 time=118ms TTL=243
Reply from 128.100.244.3: bytes=32 time=118ms TTL=243
Reply from 128.100.244.3: bytes=32 time=118ms TTL=243
Server Data User DTP C:\WINDOWS>
DTP Connection
PI = Protocol interpreter
DTP = Data transfer process
27 28