SlideShare a Scribd company logo
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Application Layer
Application Layer
PART VI
PART VI
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Position of application layer
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Application Layer Duties
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Chapters
Chapter 24 Client-Server Model
Chapter 25 Domain Name System
Chapter 26 SMTP and FTP
Chapter 27 HTTP and WWW
Chapter 28 Multimedia
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Chapter 24: OBJECTIVES
Client-Server
Model:
Socket Interface
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Client-Server Model
 Most common way by which a computer can ask for the
services of another computer.
 Relationship:
 The purpose of a network is to provide services to users.
 User at local site wants to receive a service from a computer at a
remote site.
 A computer runs a program to either request a service from another
computer or provide a service to another computer.
 Application programs running at two end computers and
communicating with each other. They are entities that communicate
with each other, not computers or users.
 Important queries:
 Should both applications be able to request services and provide
services, or should they just do one or the other?
 One solution is to have an application program  client.
 Machine request a service from another application program 
server.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
 Application program provide services only to one
specific application program installed somewhere in an
internet, or should it provide services for any application
program that requests this service?
 Server providing a service for any client, not a particular client.
 When should an application program be running – all
the time or just when there is a need for the service?
 Client program, which requests a service, should run only when
it is needed.
 Server program, which provides a service, should run all the time
because it does not know when its services will be needed.
 Should there be only one universal application program
that can provide any type of service a users wants? Or
should there be one application program for each type
of service?
 Application program is available for specific service.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Concurrency
 Concurrency in Clients
 Clients can be run on a machine either iteratively or
concurrently.
 Running iteratively: means running them one by one; one client
must start, run, and terminate before the machine can start
another client.
 Concurrent clients: Two or more clients can run at the same
time.
 Concurrency in Servers
 Iterative server: Can process only one request at a time; it
receives a request, processes it, and sends the response to the
requestor before it handles another request.
 Concurrent server: Can process many requests at a time; share
its time between many requests.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Client-Server Model
Client-Server Relationship
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.3 Connectionless iterative server
 It uses connectionless protocol: UDP.
 Server processes one request at a time.
 Server uses one single port [well-known port]
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.4 Connection-oriented Concurrent Server
 Uses connection-oriented Protocol: TCP
 Connection-oriented: request is a stream of bytes that can
arrive in several segments and the response can occupy
several segments.
 At first connection is established.
 Use one well-known port and many ephemeral ports
 Server issues passive-open at well-known port.
 Client initially approaches this port.
 After connection is made, server assigns a temporary port to free
the well-known port.
 Data transfer via ephemeral port.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Processes
 In UNIX, program is a code. The code defines all
the variables and actions to be performed on
those variables.
 Process is an instance of a program.
 When the operating system executes a program,
an instance of the program, a process, is created.
 Operating system can create several processes
from one program, which means several
instances of the same program are running at the
same time [concurrently].
 Memory is allocated for each process separately.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.5 Socket structure
Socket Interface
 Sockets
 Communication structure that we need in socket
programming is called socket.
 Socket acts as an endpoint.
 Two processes need a socket at each end to communicate
with each other.

Family: Protocol group [IPv6, IPv4, UNIX domain protocols,…]

Type: Type of socket [Stream, packet or raw socket]

Protocol: set to zero for TCP and UDP.

Local socket address: Local IP and port address

Remote socket address: Remote IP and port address
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.6 Socket types
 Stream socket: Connection-oriented protocol [TCP]; uses a
pair of stream sockets to connect one application program
to another across the Internet.
 Datagram socket: Connectionless protocol [UDP]; Uses a
pair of datagram sockets.
 Raw socket: For ICMP or OSPF that directly use the services
of IP.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Connectionless Iterative Server
 Server duties:

Create a socket

Bind: Asks OS to enter information in the socket
related to the server.

Repeat

Receive a request

Process

Send
 Client duties:

Create a socket. No need for binding as OS
normally fills in the information in the socket.

Repeat

Send

Receive

Destroy: The client has no more request, it will
ask operating system to destroy it.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.7 Socket interface for connectionless iterative server
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Connection-oriented Concurrent Server
 One buffer for each connection. Segments from clients
are stored in appropriate buffers and handled
concurrently by the server.
 Server duties:
 Create a socket
 Bind: Asks OS to enter information in the socket related to the server.
 Listen: Asks OS to be passive and listen to the client.
 Repeat

Create a child process

Create a new socket

Repeating: Read [byte-oriented], Process, Write

Destroy the temporary socket
 Client duties:
 Create a socket.
 Connect.
 Repeat: Write, Read
 Destroy
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004
Figure 24.8 Socket interface for connection-oriented concurrent server

More Related Content

PPT
Lecture 20- Client-Server Model.ppt
PPTX
Module 1 part 2.pptx with clear notes and explanation
PPTX
applicationa wcRFAHEWTRSSFGCARESTSRD.pptx
PDF
sockets SMTP Bmsce ppt information science and engineering
PDF
Lecture2
PDF
Chapter 25.pdfassssssssssssssvjvvdvdvvdv
PPT
unit 3 new syllabus very imp DCN PPT.ppt
PDF
CS6551 COMPUTER NETWORKS
Lecture 20- Client-Server Model.ppt
Module 1 part 2.pptx with clear notes and explanation
applicationa wcRFAHEWTRSSFGCARESTSRD.pptx
sockets SMTP Bmsce ppt information science and engineering
Lecture2
Chapter 25.pdfassssssssssssssvjvvdvdvvdv
unit 3 new syllabus very imp DCN PPT.ppt
CS6551 COMPUTER NETWORKS

Similar to slide24.ppt ,this my interface for my regular (20)

PPT
Client server
PDF
CS-324-6-3 (2).pdf
PDF
CS-324-6-3 (1).pdf
PPTX
Lecture 10 - The Client-Server Paradigm.pptx
PPT
Chapter2 Application
PPTX
Network Programming-Python-13-8-2023.pptx
PDF
Socket programming assignment
PPT
Application Layer and Socket Programming
PDF
CHAPTER 24.pdfhehbebbebebbebbeebbebbebeb
PPT
Chapter2_L2.ppt
PDF
Gu3112991305
DOCX
Final networks lab manual
PPT
Chapter 2
PPTX
TCP file upload server client example
PPT
Chapter2 l2 modified_um
PDF
Application layer jain
DOCX
Application programming interface sockets
PPT
Application Layer.pptand documents of co
PPT
Np unit1
Client server
CS-324-6-3 (2).pdf
CS-324-6-3 (1).pdf
Lecture 10 - The Client-Server Paradigm.pptx
Chapter2 Application
Network Programming-Python-13-8-2023.pptx
Socket programming assignment
Application Layer and Socket Programming
CHAPTER 24.pdfhehbebbebebbebbeebbebbebeb
Chapter2_L2.ppt
Gu3112991305
Final networks lab manual
Chapter 2
TCP file upload server client example
Chapter2 l2 modified_um
Application layer jain
Application programming interface sockets
Application Layer.pptand documents of co
Np unit1
Ad

More from Abodahab (11)

PDF
Basics of Bash Scripting OVUGUFYYGFCGHKJJJC
PPT
shostack-blackhat-991.ppt YUGUUYGYGUUYUHJ
PPT
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
PPT
ch11.pptKGYUTFYDRERLJIOUY7T867RVHOJIP09-IU08Y7GTFGYU890-I90UIYGUI
PDF
paper8.pdfiy87t6r5e5wsretdryfugihojp[][poipuoiyutyrtersweaserdtfyguhuijk
PDF
GANS-ppt.pdfHGVUIIOUJHUIJHGBUGBUJHIOPIJUHGV GHUIPUJHOGVGHUJI
PPTX
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
PPTX
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
PPT
Group3-Assignment3.ppJUY78T67R6DETSRWETDRYFUGHIJOPK[t
PPTX
Amber_iris_ppt.pptx kk
PPT
ch11.ppt kusrdsdagrfzgfdfgdfsdsfdsxgdhfjgh50s
Basics of Bash Scripting OVUGUFYYGFCGHKJJJC
shostack-blackhat-991.ppt YUGUUYGYGUUYUHJ
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
ch11.pptKGYUTFYDRERLJIOUY7T867RVHOJIP09-IU08Y7GTFGYU890-I90UIYGUI
paper8.pdfiy87t6r5e5wsretdryfugihojp[][poipuoiyutyrtersweaserdtfyguhuijk
GANS-ppt.pdfHGVUIIOUJHUIJHGBUGBUJHIOPIJUHGV GHUIPUJHOGVGHUJI
Day 1 - Lab 1 Reconnaissance Scanning with NMAP, Vulnerability Assessment wit...
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
Group3-Assignment3.ppJUY78T67R6DETSRWETDRYFUGHIJOPK[t
Amber_iris_ppt.pptx kk
ch11.ppt kusrdsdagrfzgfdfgdfsdsfdsxgdhfjgh50s
Ad

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Well-logging-methods_new................
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Construction Project Organization Group 2.pptx
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
web development for engineering and engineering
PPTX
Sustainable Sites - Green Building Construction
573137875-Attendance-Management-System-original
III.4.1.2_The_Space_Environment.p pdffdf
UNIT 4 Total Quality Management .pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Well-logging-methods_new................
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Fundamentals of safety and accident prevention -final (1).pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Model Code of Practice - Construction Work - 21102022 .pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
additive manufacturing of ss316l using mig welding
Construction Project Organization Group 2.pptx
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Safety Seminar civil to be ensured for safe working.
bas. eng. economics group 4 presentation 1.pptx
web development for engineering and engineering
Sustainable Sites - Green Building Construction

slide24.ppt ,this my interface for my regular

  • 1. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Application Layer Application Layer PART VI PART VI
  • 2. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Position of application layer
  • 3. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Application Layer Duties
  • 4. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Chapters Chapter 24 Client-Server Model Chapter 25 Domain Name System Chapter 26 SMTP and FTP Chapter 27 HTTP and WWW Chapter 28 Multimedia
  • 5. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Chapter 24: OBJECTIVES Client-Server Model: Socket Interface
  • 6. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Client-Server Model  Most common way by which a computer can ask for the services of another computer.  Relationship:  The purpose of a network is to provide services to users.  User at local site wants to receive a service from a computer at a remote site.  A computer runs a program to either request a service from another computer or provide a service to another computer.  Application programs running at two end computers and communicating with each other. They are entities that communicate with each other, not computers or users.  Important queries:  Should both applications be able to request services and provide services, or should they just do one or the other?  One solution is to have an application program  client.  Machine request a service from another application program  server.
  • 7. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004  Application program provide services only to one specific application program installed somewhere in an internet, or should it provide services for any application program that requests this service?  Server providing a service for any client, not a particular client.  When should an application program be running – all the time or just when there is a need for the service?  Client program, which requests a service, should run only when it is needed.  Server program, which provides a service, should run all the time because it does not know when its services will be needed.  Should there be only one universal application program that can provide any type of service a users wants? Or should there be one application program for each type of service?  Application program is available for specific service.
  • 8. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Concurrency  Concurrency in Clients  Clients can be run on a machine either iteratively or concurrently.  Running iteratively: means running them one by one; one client must start, run, and terminate before the machine can start another client.  Concurrent clients: Two or more clients can run at the same time.  Concurrency in Servers  Iterative server: Can process only one request at a time; it receives a request, processes it, and sends the response to the requestor before it handles another request.  Concurrent server: Can process many requests at a time; share its time between many requests.
  • 9. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Client-Server Model Client-Server Relationship
  • 10. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.3 Connectionless iterative server  It uses connectionless protocol: UDP.  Server processes one request at a time.  Server uses one single port [well-known port]
  • 11. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.4 Connection-oriented Concurrent Server  Uses connection-oriented Protocol: TCP  Connection-oriented: request is a stream of bytes that can arrive in several segments and the response can occupy several segments.  At first connection is established.  Use one well-known port and many ephemeral ports  Server issues passive-open at well-known port.  Client initially approaches this port.  After connection is made, server assigns a temporary port to free the well-known port.  Data transfer via ephemeral port.
  • 12. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Processes  In UNIX, program is a code. The code defines all the variables and actions to be performed on those variables.  Process is an instance of a program.  When the operating system executes a program, an instance of the program, a process, is created.  Operating system can create several processes from one program, which means several instances of the same program are running at the same time [concurrently].  Memory is allocated for each process separately.
  • 13. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.5 Socket structure Socket Interface  Sockets  Communication structure that we need in socket programming is called socket.  Socket acts as an endpoint.  Two processes need a socket at each end to communicate with each other.  Family: Protocol group [IPv6, IPv4, UNIX domain protocols,…]  Type: Type of socket [Stream, packet or raw socket]  Protocol: set to zero for TCP and UDP.  Local socket address: Local IP and port address  Remote socket address: Remote IP and port address
  • 14. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.6 Socket types  Stream socket: Connection-oriented protocol [TCP]; uses a pair of stream sockets to connect one application program to another across the Internet.  Datagram socket: Connectionless protocol [UDP]; Uses a pair of datagram sockets.  Raw socket: For ICMP or OSPF that directly use the services of IP.
  • 15. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Connectionless Iterative Server  Server duties:  Create a socket  Bind: Asks OS to enter information in the socket related to the server.  Repeat  Receive a request  Process  Send  Client duties:  Create a socket. No need for binding as OS normally fills in the information in the socket.  Repeat  Send  Receive  Destroy: The client has no more request, it will ask operating system to destroy it.
  • 16. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.7 Socket interface for connectionless iterative server
  • 17. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Connection-oriented Concurrent Server  One buffer for each connection. Segments from clients are stored in appropriate buffers and handled concurrently by the server.  Server duties:  Create a socket  Bind: Asks OS to enter information in the socket related to the server.  Listen: Asks OS to be passive and listen to the client.  Repeat  Create a child process  Create a new socket  Repeating: Read [byte-oriented], Process, Write  Destroy the temporary socket  Client duties:  Create a socket.  Connect.  Repeat: Write, Read  Destroy
  • 18. McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 Figure 24.8 Socket interface for connection-oriented concurrent server