1 of 44

WEEK XII

THE CLIENT SERVER RELATIONSHIP

2 of 44

Introduction

  • Client/Server Network - In client-server network relationships, certain computers act as servers and others act as clients.
  • A Client-Server network is one on which all available network resources such as files, directories, applications and shared devices, are centrally managed and hosted and then are accessed by the client.
  • Client server networks are defined by the presence of servers on a network that provide security and administration of the network.

3 of 44

CLIENT SERVER INTERACTION

  • Client server interaction is about communication between client and

server on the internet.

  • Clients and servers exchange messages in a request response

messaging pattern.

  • The client sends a request, and the server returns a response.
  • This exchange of messages is an example of inter-process

communication.

Fig.: Client-Server interaction

4 of 44

  • Client–server model of computing is a distributed application structure that partitions tasks or workloads between service providers, called servers, and service requesters, called clients.
  • Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system.
  • A server machine is a host that is running one or more server programs which share its resources with clients.
  • A client does not share any of its resources, but requests a server’s content or service function.
  • Thus, Clients initiate communication sessions with servers which await or listen for incoming requests.

5 of 44

URI – UNIFORM RESOURCE IDENTIFIER

 

  • A Uniform Resource Identifier (URI) is a generic term for the names of all resources connected to the World Wide Web.
  • URIs enable the protocols over the internet to conduct the interactions between and among resources.
  • URIs take the form of strings of characters that server as identifiers: names and addresses to connected devices and other resources.
  • The most common form URI is the Uniform Resource Locator (URL) — a web address — which unambiguously describes and locates a public website or other web-connected resource.

6 of 44

URN – UNIFORM RESOURCE NAME

 

  • A Uniform Resource Name is a Uniform Resource.
  • URNs are globally unique persistent identifiers assigned within defined namespaces so they will be available for a long period of time, even after the resource which they identify ceases to exist or becomes unavailable.
  • With a Uniform Resource Name, various items or resources can be given a unique name.
  • This is especially of interest on the internet, as there are different people and applications encounter each other – and in doing so make exchanges related to specific objects.

7 of 44

URL – UNIFORM RESOURCE LOCATOR

 

  • URL is also known as an internet address or web address.
  • A URL - Uniform Resource Locator is a URI and standardized naming convention for addressing documents accessible over the Internet and Intranet.
  • The URL makes it possible for a computer to locate and open a web page on a different computer on the Internet.

TCP/IP LAYER 4 PROTOCOLS

 

  • The OSI transport layer (Layer 4) defines several functions, the most important of which are error recovery and flow control.
  • In the same way the TCP/IP transport layer protocols also implement these same types of features.
  • Both the OSI model and the TCP/IP model call this layer the transport layer.

8 of 44

Fig.: Protocol Stacks and Protocols

  • But when referring to the TCP/IP model, the layer name and number are based on OSI, so any TCP/IP transport layer protocols are considered Layer 4 protocols.
  • Layer 4 is the Transport layer. The transport layer creates virtual Transfer Control Protocol (TCP) or User Datagram Protocol (UDP) connections between network hosts.
  • This layer sends and receives data to and from the applications running on its host.
  • The Transport layer assigns port numbers to the processes running in applications on the host and adds a TCP or UDP header to the messages received from the applications detailing the source and destination port numbers.

9 of 44

TCP AND UDP

  • It is a transport layer protocol that facilitates the transmission of packets from source to destination.
  • It is a connection-oriented protocol that means it establishes the connection prior to the communication that occurs between the computing devices in a network.
  • The main functionality of the TCP is to take the data from the application layer.
  • Then it divides the data into a several packets, provides numbering to these packets, and finally transmits these packets to the destination.
  • The TCP, on the other side, will reassemble the packets and transmits them to the application layer.
  • As TCP is a connection-oriented protocol, so the connection will remain established until the communication is not completed between the sender and the receiver.
  • TCP is then responsible for transporting and routing data through the network architecture and ensuring it gets delivered to the destination application or device that IP has defined.

10 of 44

Fig.: Connection Oriented Protocol

UDP

  • Its working is similar to the TCP as it is also used for sending and receiving the message.
  • The main difference is that UDP is a connectionless protocol.
  • Here, connectionless means that no connection establishes prior to communication.
  • It also does not guarantee the delivery of data packets.
  • It does not even care whether the data has been received on the receiver's end or not, so it is also known as the "fire-and-forget" protocol.
  • It is also known as the "fire-and-forget" protocol as it sends the data and does not care whether the data is received or not.
  • UDP is faster than TCP as it does not provide the assurance for the delivery of the packets.

11 of 44

Fig.: Steps for delivery of packets in TCP and UDP

12 of 44

MULTIPLEXING USING TCP PORT NUMBERS

  • Multiplexing by TCP and UDP involves the process of how a computer thinks when receiving data.
  • The computer might be running many applications, such as a web browser, an e-mail package, or an FTP client.
  • TCP and UDP multiplexing enables the receiving computer to know which application to give the data to.

• A TCP connection is specified by a 4-tuple – source IP address, source port, destination IP address, destination port

• TCP allows multiplexing of multiple connections between end systems to support multiple applications simultaneously

• Arriving segment directed according to connection 4-tuple

13 of 44

POPULAR TCP/IP APPLICATIONS

 

1. Bootstrap Protocol - Bootstrap Protocol - BOOTP provides a dynamic method for associating workstations with servers. It also provides a dynamic method for assigning workstation Internet Protocol (IP) addresses and initial program load - IPL sources.

2.Connecting to the Internet - To connect to IBM I operating system to an Internet service provider - ISP or configure operating system as a Web data server or application server, one can use the Internet Setup wizard to connect to the network.

3.Dynamic Host Configuration Protocol - Dynamic Host Configuration Protocol - DHCP is a TCP/IP standard that uses a central server to manage IP addresses and other configuration details for an entire network.

14 of 44

4. IBM Tivoli Directory Server for i (LDAP) - IBM Tivoli Directory Server for i is a function of IBM i that provides a Lightweight Directory Access Protocol (LDAP) server. LDAP runs over Transmission Control Protocol/Internet Protocol - TCP/IP and is popular as a directory service for both Internet and non-Internet applications.

5. Domain Name System - Domain Name System - DNS is a distributed database system for managing host names and their associated Internet Protocol - IP addresses.

6. E-mail: Use this information to plan for, configure, use, manage, and troubleshoot e-mail on system.

7. File Transfer Protocol - One can set up IBM i platform to send, receive, and share files across networks by using File Transfer Protocol - FTP. Users can also rename, add, and delete files across a network using FTP. Before setting up a system to transfer files, there must be TCP/IP configured and started on that system.

15 of 44

8. IP filtering and network address translation - IP filtering and network address translation NAT act like a firewall to protect internal network from intruders.

9. IBM i NetServer - IBM® i Support for Windows Network Neighborhood IBM i NetServer is an IBM i function that enables Windows 2000, Windows XP, Windows Server 2003, and Windows Vista clients to access IBM i shared directory paths and shared output queues.

10. INETD - Use this information to plan for, configure INETD on the system.

11. OMPROUTED RIP and RIPng support - Routing Information Protocol - RIP is the simplest routing protocol for exchanging routing information within an autonomous system. Routing Information Protocol next generation RIPng is the latest version of RIP for networks that are based on Internet Protocol version 6 - IPv6. Both protocols are supported by the OMPRPUTED server.

16 of 44

12. Open Shortest Path First support - IBM i support includes the Open Shortest Path First OSPF protocol. OSPF is a link-state, hierarchical Interior Gateway Protocol IGP for network routing.

13. IBM HTTP Server for I - IBM HTTP Server for i can be used to establish a Web presence and to work with Web applications. The IBM Web Administration for interface is also included to help you configure and manage your Web applications.

14. Quality of service - The IBM i quality of service QoS solution enables the policies to request network priority and bandwidth for TCP/IP applications throughout the network.

15.Remote Access Services - PPP connections - Point-to-Point Protocol - PPP is an Internet standard for transmitting data over serial lines.

17 of 44

18 of 44

CONNECTION ESTABLISHMENT AND TERMINATION

 

  • TCP Connection is also called a 3-way handshake; Handshake refers to the process to establish connection between the client and server.
  • Handshake is defined as the process to establish a communication link.
  • To transmit a packet, TCP needs a three way handshake before it starts sending data.
  • The reliable communication in TCP is termed as PAR - Positive Acknowledgement Re-transmission.
  • When a sender sends the data to the receiver, it requires a positive acknowledgement from the receiver confirming the arrival of data.
  • If the acknowledgement has not reached the sender, it needs to resend that data.
  • The positive acknowledgement from the receiver establishes a successful connection.

19 of 44

  • Here, the server is the sender and client is the receiver.
  • The diagram below in fig. shows 3 steps for successful connection.
  • A 3-way handshake is commonly known as SYN-SYN-ACK and requires both the client and server response to exchange the data.
  • SYN means synchronize Sequence Number and ACK means acknowledgment.
  • Each step is a type of handshake between the sender and the receiver.

Fig.: A successful TCP Connection

20 of 44

USER DATAGRAM PROTOCOL

 

  • User Datagram Protocol - UDP is a Transport Layer protocol.
  • UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite.
  • UDP is an unreliable and connectionless protocol.
  • So, there is no need to establish a connection prior to data transfer.
  • The UDP helps to establish low-latency and loss-tolerating connections establish over the network.
  • The UDP enables process to process communication.
  • UDP permits packets to be dropped instead of processing delayed packets.
  • There is no error checking in UDP, so it also saves bandwidth.
  • User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.

21 of 44

Fig.: UDP Header

PORT NUMBERS

 

  • A port number is a way to identify a specific process to which an internet or other network message is to be forwarded when it arrives at a server.
  • All network-connected devices come equipped with standardized ports that have an assigned number.

22 of 44

Fig.: Port used for FTP

23 of 44

TCP AND UDP

 

  • The transmission control protocol - TCP is defined as a connection-oriented communication protocol that allows computing devices and applications to send data via a network and verify its delivery, forming one of the crucial pillars of the global internet.
  • User datagram protocol - UDP is a message-oriented communication protocol that allows computing devices and applications to send data via a network without verifying its delivery, which is best suited to real-time communication and broadcast systems.

Fig.: Message transmission function at TCP and UDP

24 of 44

Fig.: Key differences between TCP and UDP for organizations.

  • TCP is connection-oriented while UDP is connectionless
  • TCP leverages more error-checking mechanisms than UDP
  • TCP sends data in a particular sequence, whereas there is no fixed order for UDP protocol
  • UDP is faster and more efficient than TCP
  • Unlike UDP, TCP cannot be used for multicast or broadcast services
  • TCP is more reliable than UDP

25 of 44

Comparison of some features of TCP and UDP

Features

TCP

UDP

Nature of connectivity

TCP is connection-oriented.

USP is a message-oriented and connectionless protocol.

Error checking

It uses timeout, checksum, and acknowledgment to prevent and correct errors. 

It uses only checksum to avoid errors and cannot correct errors.

Order of data transmission

TCP data packets have a sequencing number in the header to maintain the order of transmission.

UDP data packets arrive in no fixed order, and incorrect sequencing cannot be detected or corrected.

Speed and efficiency

It has a longer latency time and consumes more resources.

It starts the connection faster, delivers data at lower latency, and consumes fewer resources.

26 of 44

Features

TCP

UDP

Multicast and broadcast

It is ideal for point-to-point transmission only, with confirmation of receipt.

It is suitable for broadcasting data packets to an entire group of endpoints, regardless of whether they listen.

Flow control

It utilizes flow control information to calibrate the pace of data transmission, to avoid overwhelming the recipient.

It does not use flow control and sends data at a rate suitable for the originating server.

Congestion control

It implements congestion avoidance algorithms to prevent data packets from getting lost in a congested network.

It cannot control network congestion and drops packets if too much traffic is on the pathway.

27 of 44

Features

TCP

UDP

Reliability

TCP’s most significant advantage is that it is highly reliable.

Its architecture is designed in a manner that makes it inherently unreliable.

Header

It uses a variable-length header, of up to 60 bytes.

It uses a fixed-length header of only eight bytes.

Application

It is suitable for use cases where data integrity, including images, web pages, data files, etc. matters more than transmission speed.

It is ideal for live data transmission (e.g., media), where transmission is so fast that a few dropped packets do not matter.

28 of 44

SOCKET PAIRS

 

  • A socket pair consists of a pair of connected sockets.
  • It is very similar to a pipe and is used in much the same way.
  • Socket pairs are created with the socketpair function, declared in sys/socket.h.
  • A socket pair is much like a pipe; the main difference is that the socket pair is bidirectional; whereas the pipe has one input-only end and one output-only end.
  • This function creates a socket pair, returning the file descriptors in filedes[0] and filedes[1].
  • The socket pair is a full-duplex communications channel, so that both reading and writing may be performed at either end

29 of 44

THE NETSTAT COMMAND

 

  • Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc.,

 

  • -a -all : Show both listening and non-listening sockets. With the –interfaces option, show interfaces that are not up
  • # netstat -a | more : To show both listening and non-listening sockets.
  • # netstat -at : To list all tcp ports.
  • # netstat -au : To list all udp ports.
  • # netstat -l : To list only the listening ports.
  • # netstat -lt : To list only the listening tcp ports.
  • # netstat -lu : To list only the listening udp ports.

30 of 44

APPLICATION LAYER SERVICES

 

  • The application layer is the topmost layer of the protocol hierarchy.
  • It is the layer where actual communication is initiated.
  • It uses the services of the transport layer, the network layer, the data link layer, and the physical layer to transfer data to a remote host.
  • These application layer protocols are as follows:
  • Dynamic Host Configuration Protocol (DHCP)
  • Domain Name System (DNS),
  • File transfer protocol (FTP),
  • Hypertext transfer protocol (HTTP),
  • Simple mail transfer protocol (SMTP), and
  • Simple network management protocol (SNMP).

31 of 44

The Application layer includes the following functions

 

  • Identifying communication partners
  • Determining resource availability
  • Synchronizing communication

Services of Application Layers

 

Network Virtual terminal

File Transfer, Access, and Management (FTAM)

Addressing

Mail Services

Directory Services

Authentication

 

32 of 44

COMMON NETWORK APPLICATION SERVICES

 

  • When the devices are connected together to form a network, the capabilities are enhanced multiple-times.
  • Some basic services computer network can offer are –
  • Directory Services
  • File Services
  • Communication Services
  • Application Services

Directory Services

  • These services are mapping between name and its value, which can be variable value or fixed.
  • This software system helps to store the information, organize it, and provides various means of accessing it.

33 of 44

File Services

File services include sharing and transferring files over the network.

Communication Services

E Mail, Social Networking, Internet Chat , Discussion Boards

Application Services

These are nothing but providing network based services to the users such as web services, database managing, and resource sharing.

DOMAIN NAME SYSTEM

 

  • The DNS is the phonebook of the Internet.
  • Humans access information online through domain names, like nytimes.com or espn.com.
  • Web browsers interact through Internet Protocol (IP) addresses.
  • DNS translates domain names to IP addresses so browsers can load Internet resources.

34 of 44

  • Each device connected to the Internet has a unique IP address which other machines use to find the device.
  • DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

DOMAIN NAME TRANSLATION

  • DNS, or the Domain Name System, translates human readable domain names (for example, www.amazon.com) to machine readable IP addresses (for example, 192.0.2.44).

DNS SERVERS

  • A server is a device or program dedicated to providing services to other programs, referred to as ‘clients’.
  • DNS clients, which are built into most modern desktop and mobile operating systems, enable web browsers to interact with DNS servers.

35 of 44

Fig.: Comparison between Web Server and DNS Server

HTTP

 

  • The HTTP is an application protocol for distributed, collaborative, hypermedia information systems that allows users to communicate data on the World Wide Web.
  • HTTP was invented alongside HTML to create the first interactive, text-based web browser: the original World Wide Web.
  • Today, the protocol remains one of the primary means of using the Internet.

36 of 44

  • As a request-response protocol, HTTP gives users a way to interact with web resources such as HTML files by transmitting hypertext messages between clients and servers. HTTP clients use TCP connections to communicate with servers.
  • HTTP utilizes specific request methods in order to perform various tasks.
  • All HTTP servers use the GET and HEAD methods.

WEB CLIENTS AND SERVERS

 

  • Web content lives on web servers.
  • Web servers speak the HTTP protocol, so they are called HTTP servers.
  • These HTTP servers store the Internet’s data and provide the data when it is requested by HTTP clients.
  • The clients send HTTP requests to servers, and servers return the requested data in HTTP responses.

37 of 44

  • HTTP clients and HTTP servers make up the basic components of the World Wide Web.

Fig.: HTTP messages transferred between Client and Server

FTP:File Transfer Protocol

 

  • The FTP refers to a process that involves the transfer of files between devices over a network.
  • FTP may be used by a business or individual to transfer files from one computer system to another or by websites to upload or download files from their servers.
  • FTP is a way to download, upload, and transfer files from one location to another on the Internet and between computer systems.

38 of 44

  • FTP enables the transfer of files back and forth between computers or through the cloud.
  • Users require an Internet connection in order to execute FTP transfers.

VIRTUAL TERMINALS

 

  • A virtual terminal turns your computer into a credit card terminal.
  • It is perfect for remote billing or taking credit cards over the phone.
  • Any type of business could benefit from a virtual terminal solution, but it is typically a good fit for:
  • Freelancers
  • Restaurants
  • Professional services
  • Retailers

39 of 44

REMOTE ACCESS WITH TELNET OR SSH

 

  • TELNET is a client-server protocol based on character-oriented data exchange over TCP connections.
  • Telnet allows remote control of computers via text-based input and output.
  • For this purpose, a client-server connection is established by default via the TCP protocol and the TCP port 23, where the remotely controlled device acts as a server and waits for commands.
  • SSH or Secure Shell is a network communication protocol that enables two computers to communicate - http or hypertext transfer protocol, which is the protocol used to transfer hypertext such as web pages and share data.
  • An inherent feature of SSH is that the communication between the two computers is encrypted meaning that it is suitable for use on insecure networks.

40 of 44

Fig.: Communication between Telnet Client and Telnet Server

SSH

 

  • The SECURE SHELL PROTOCOL is a cryptographic network protocol for operating network services securely over an unsecured network.
  • Its most notable applications are remote login and command-line execution.
  • SSH applications are based on a client–server architecture, connecting an SSH client instance with an SSH server.

41 of 44

  • SSH is a network communication protocol that enables two computers to communicate and share data.
  • An inherent feature of ssh is that the communication between the two computers is encrypted meaning that it is suitable for use on insecure networks.
  • SSH is often used to "login" and perform operations on remote computers but it may also be used for transferring data.

EMAIL- EMAIL PROTOCOLS

 

  • There are three common protocols used to deliver email over the Internet –
  • Simple Mail Transfer Protocol (SMTP)
  • Post Office Protocol (POP)
  • Internet Message Access Protocol (IMAP).

All three use TCP, and the last two are used for accessing electronic mailboxes.

 

42 of 44

SMTP

  • SMTP stands for Simple Mail Transfer Protocol.
  • It was first proposed in 1982. It is a standard protocol used for sending e-mail efficiently and reliably over the internet.
  • SMTP is application level protocol.
  • SMTP is connection oriented protocol.
  • SMTP is text based protocol.
  • It handles exchange of messages between e-mail servers over TCP/IP network.
  • Apart from transferring e-mail, SMTP also provides notification regarding incoming mail.
  • When you send e-mail, your e-mail client sends it to your e-mail server which further contacts the recipient mail server using SMTP client.
  • These SMTP commands specify the sender’s and receiver’s e-mail address, along with the message to be send.

43 of 44

POST OFFICE PROTOCOL (POP3)

 

  • The POP protocol stands for Post Office Protocol.
  • As SMTP is used as a message transfer agent, when the message is sent, then SMPT is used to deliver the message from the client to the server and then to the recipient server.
  • But the message is sent from the recipient server to the actual server with the help of the Message Access Agent.
  • The Message Access Agent contains two types of protocols - POP3 and IMAP.

Fig.: Use of SMTP and POP3

44 of 44

IMAP4 (Internet Mail Access Protocol version 4)

  • IMAP4 stands for Internet Mail Access Protocol version 4, is an Internet standard protocol for storing and retrieving messages from SMTP hosts.
  • IMAP4 provides functions similar to Post Office Protocol version 3 (POP3), with additional features as described in this entry.
  • It offers synchronization across all the maintained sessions by the user.
  • It provides security over POP3 protocol as the email only exists on the IMAP server.
  • Users have remote access to all the contents.
  • It offers easy migration between the devices as it is synchronized by a centralized server.
  • There is no need to physically allocate any storage to save contents.