1 elen602 lecture 2 review of last lecture layering
TRANSCRIPT
![Page 1: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/1.jpg)
1
ELEN602 Lecture 2
• Review of Last Lecture
• Layering
![Page 2: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/2.jpg)
2
Communication Networks
• Many forms of communication networks around
– Postal mail, telephone, Internet etc.
• Generic steps involved in communication
– Addressing, name-to-address translation, transport, routing, delivery
• Forms of delivery
– Reliable, in-order
– Unreliable, no acknowledgement
![Page 3: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/3.jpg)
3
The user clicks on a link to indicate which document is to be retrieved.
The browser must determine the address that contains the document. It does this by sending a query to its local name server.
Once the address is known the browser establishes a connection to the specified machine, usually a TCP connection. In order for the connection to be successful, the specified machine must be ready to accept TCP connections.
The browser runs a client version of HTTP, which issues a request specifying both the name of the document and the possible document formats it can handle.
The machine that contains the requested document runs a server version of HTTP. It reacts to the HTTP request by sending an HTTP response which contains the desired document in the appropriate format.
The TCP connection is then closed and the user may view the document.
1.
2.
3.
4.
5.
6.
Steps in Web Surfing
![Page 4: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/4.jpg)
4
HTTPserver
HTTPclient
Request
Response
Application level View
![Page 5: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/5.jpg)
5
Steps in HTTP Transfer
• User selects document• Networking software locates the remote machine address &
establishes a 2-way connection• HTTP client sends request for document (GET )• HTTP daemon on remote machine interprets the GET message • Remote HTTP daemon sends the result of GET operation
– Result code, Description of the information, requested file• Remote HTTP daemon disconnects the connection• HTTP client displays the HTML content in the browser.
![Page 6: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/6.jpg)
6
Domain Name Service
• DNS servers help resolve name-to-address translation
– Given a name such as ee.tamu.edu, find its IP address
• IP addresses = telephone numbers in phone network
• Machines (computers/network elements) know each other by IP addresses
• IP addresses are 32bits in IPv4.
• DNS protocol allows name-to-IP address resolution
– Similar to phone directory assistance (411 or 555-1212)
![Page 7: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/7.jpg)
7
DNS Example (cont’d)
• QNAME = ee.tamu.edu, QCLASS = IN QTYPE = A
• QNAME = ee.tamu.edu QCLASS = IN QTYPE = A
– IN A 165.91.241.199
• The application will now use 165.91.241.199 whenever it needs to contact ee.tamu.edu
![Page 8: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/8.jpg)
8
HTTPserver
HTTPclient
TCP TCP
GET 80, #
#, 80 STATUS
Port 80
Ephemeral
Port #
A more detailed view - Transport protocol
![Page 9: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/9.jpg)
9
Email and SMTP
• Web transfers use HTTP, email uses SMTP (Simple Mail Transfer Protocol) - Application level protocols
• Sender - Local SMTP Server -- Remote SMTP Server - Receiver
• SMTP uses Port 25, HTTP uses port 80
• POP (Post Office Protocol) may be used if receiver not on all the time.
![Page 10: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/10.jpg)
10
• Sender establishes TCP Connection to SMTP server
• Sends HELO message -identifying itself to SMTP server
• Client sends sender’s email address
• SMTP server acknowledges with 250 if successful
• Client sends receiver’s email address
• SMTRP server acknowledges with 250
• Client sends a DATA message - requesting permission to send email message
• SMTP server sends OK-to-send message
• Client transfers the email message
• SMTP server returns ack with a message ID
• Client indicates that the transfer is complete.
• SMTP confirms the receipt of End-of-transfer message
![Page 11: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/11.jpg)
11
nentity
n-PDUs
nentity
Abstract View
![Page 12: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/12.jpg)
12
n+1entity
n-SAP
n+1entity
n-SAP
n entity n entity
n-SDU
n-SDU
n-SDU
H
H n-SDU
n-PDU
Layering in General
![Page 13: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/13.jpg)
13
n-SDU
n-PDU n-PDU n-PDU
n-SDU
n-PDU n-PDU n-PDU
Segmentation Reassembly
n-PDU
n-SDU
n-PDU
Blocking Unblocking
n-SDUn-SDUn-SDUn-SDUn-SDU
(a)
(b)
Data Units at different layers
![Page 14: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/14.jpg)
14
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
NetworkLayer
Electrical and/or Optical Signals
Application A Application B
Data LinkLayer
PhysicalLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
Communication Network
OSI Seven-layer Model
![Page 15: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/15.jpg)
15
C
PS
PS
C
PSPS
C
C
C
PS = packet switch
C = computer
Packet-Switched Network
![Page 16: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/16.jpg)
16
G
G
G
G
G
net 1
net 2
net 3
net 4
net 5
G = gateway/router
G
An Internetwork
![Page 17: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/17.jpg)
17
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
ApplicationLayer
PresentationLayer
SessionLayer
TransportLayer
NetworkLayer
Data LinkLayer
PhysicalLayer
Application A Application Bdata
data
data
data
data
data
data
ah
ph
sh
th
nh
dh
bits
dt
Headers and Trailers
![Page 18: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/18.jpg)
18
ApplicationLayer
TransportLayer
InternetLayer
NetworkInterface
ApplicationLayer
TransportLayer
InternetLayer
NetworkInterface
(a) (b)
TCP/IP Network Architecture
![Page 19: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/19.jpg)
19
Application
Transport
Internet
Network Interface
Application
Transport
Internet
Network Interface
Internet
Network Interface
Network 1 Network 2
Machine A Machine B
Router/Gateway
IP Layer and Network Interface Layer
![Page 20: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/20.jpg)
20
HTTP SMTP RTP
TCP UDP
IP
Network
Interface 1
Network
Interface 3
Network
Interface 2
DNS
IP Hour-Glass Protocol Graph
![Page 21: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/21.jpg)
21
Net Interface
IP
TCP
HTTP
Net Interface
IP
Net Interface
IP
TCP
HTTP
Ethernet PPP
Router
router
(1,1)
s
(1,2)
w
(2,1)
(1,3) r
(2,2)
PPP
Ethernet
(a)
(b)
Server PC
![Page 22: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/22.jpg)
22
IP Header
Header containssource and destination physical addresses; network protocol type
Frame Check Sequence
Ethernet Header
IP Datagram on an Ethernet
![Page 23: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/23.jpg)
23
HTTP Request
TCP Header
Header contains source and destination port numbers
Header contains source and destination IP addresses; transport protocol type
IP Header
Header contains source and destination physical addresses; network protocol type
Frame Check Sequence
Ethernet Header
![Page 24: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/24.jpg)
24
Application 1
Socket
socket interface
user
kernel
Application 2
user
kernel
Underlying communication
Protocols
Underlying communication
Protocols
Communications network
Socket
socket interface
![Page 25: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/25.jpg)
25
socket()
bind()
listen()
read()
close()
socket()
connect()
read()
write()
close()
blocks until server receivesa connect request from client
data
data
Server
Clientaccept()
write()
connect negotiation
![Page 26: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/26.jpg)
26
socket()
bind()
sendto()
close()
socket()
bind()
recvfrom()
sendto()
close()
blocks until serverreceives data from client data
data
Server
Client
recvfrom()
![Page 27: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/27.jpg)
27
User Interface
User PI
User DTP
PI = Protocol interpreter
DTP = Data transfer process
User FTP
Server PI
Server DTP
Server FTP
Control
Connection
Data
Connection
![Page 28: 1 ELEN602 Lecture 2 Review of Last Lecture Layering](https://reader036.vdocuments.us/reader036/viewer/2022062516/56649e4a5503460f94b3d983/html5/thumbnails/28.jpg)
28
C:\WINDOWS>ping nal.toronto.edu
Pinging nal.toronto.edu [128.100.244.3] with 32 bytes of data:
Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243Reply from 128.100.244.3: bytes=32 time=118ms TTL=243
C:\WINDOWS>