Computer Networks
Unit-6
Client-Server Relationship
Client Server interaction:
Client- A client is a program that runs on the local machine requesting service from the server.
A client program is a finite program means that the service started by the user terminates when the
service is completed.
Server- A server is a program that runs on the remote machine providing services to the clients.
When the client requests for a service, then the server opens the door for the incoming requests, but it
never initiates the service.
Examples of servers include web servers, mail servers, and file servers.
server model describes how a server provides resources and services to one or more clients.
The client-server
Advantages of Client-Server
Server model:
Centralized system with all data in a single place.
Cost efficient requires less maintenance cost and Data recovery is possible.
The capacity of the Client and Servers can be changed separately.
Disadvantages of Client-Server
Server model:
Clients are prone to viruses, Trojans and worms if present in the Server or uploaded into the Server.
Servers are prone to Denial of Service (DOS) attacks.
Data packets may be spoofed or modified during transmission.
Phishing or capturing login credentials or other useful information of the user are common and
MITM(Man in the Middle) attacks are common.
URI, URN, URL:
URI :
URI stands for Uniform Resource Identifier.
URI is a sequence of characters used to identify resource location or a name or both over the World
Wide Web.
A URI can be further classified as a locator, a name, or both.
Dept. of Computer Science & Engg. Page 1 Govt. Polytechnic Athani
Computer Networks
Syntax of URI: Starts with a scheme followed by a colon character, and then by a scheme-specific
part.
The most popular URI schemes, are HTTP, HTTPS, and FTP.
URL:
URL stands for Uniform Resource Locater.
URL is a subset of URI that describes the network address or location where the source is available.
URL begins with the name of the protocol to be used for accessing the resource and then specific
resource location.
URLs build on the Domain Name Service (DNS) to address hosts symbolically and use a file-path like
syntax to identify specific resources at a given host.
For this reason, mapping URLs to physical resources is straightforward and is implemented by various
Web browsers.
URN:
URN stands for Uniform Resource Name.
It is a URI that uses a URN scheme.
“urn” scheme: It is followed by a namespace identifier, followed by a colon, followed by namespace
specific string
URN does not imply the availability of the identified resource.
URNs are location-independent resource identifiers and are designed to make it easy to map other
namespaces into URN space.
Here is a diagram that shows the relationship between URL, URI, URN:
Dept. of Computer Science & Engg. Page 2 Govt. Polytechnic Athani
Computer Networks
TCP/IP Layer 4 Protocols:
TCP- Transmission Control Protocol:
Protocol
TCP stands for Transmission Control ProtocolProtocol.
It is a transport layer protocol that facilitates the transmission of packets from source to destination.
It is a connection-oriented
oriented protocol that means it establishes the connection prior to the communication
that occurs between the computing devices in a network.
This protocol is used with an IP protocol, so together, they are referred to as a TCP/IP
The main functionality of the TCP is to take the data from the application layer.
Thenen 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 we know thatt TCP is a connection-oriented
connection oriented protocol, so the connection will remain established until
the communication is not completed between the sender and the receiver.
Working of TCP
In TCP, the connection is established by using three-way
three handshaking.
The client
ent sends the segment with its sequence number.
The server, in return, sends its segment with its own sequence number as well as the acknowledgement
sequence, which is one more than the client sequence number.
When the client receives the acknowledgment of its segment, then it sends the acknowledgment to the
server.
In this way, the connection is established between the client and the server.
Dept. of Computer Science & Engg. Page 3 Govt. Polytechnic Athani
Computer Networks
UDP-User Datagram Protocol:
UDP stands for User Datagram Protocol. It is a Transport Layer Protocol, which is a part of the Internet
Protocol Suite and an alternative communication protocol to Transmission Control Protocol (TCP).
Both UDP and TCP are transparent layers protocols which are used on the Internet or run on the top of
the Internet Protocol (IP) and commonly known as UDP/IP and TCP/IP, respectively.
Out of these two, the UDP is the simplest transport layer protocol designed to send data over the Internet.
It picks the datagram from the network layer and attaches the header then forwards it to the user.
UDP uses headers to transfer data over connections. Its headers contain a set of parameters called fields.
A UDP header has four fields which are as follows:
Source Port: It is a 2 Byte field that tells the port number of a source.
Destination Port: It is also a 2 Byte long filed that tells the port number of the
destination.
Length: It is the total length of the UDP, including the header and the data. It is a 16-bits
field.
Checksum: It is a 2 Byte long field that is used to check errors, e.g., it is used in IPv6 and
sometimes in IPv4.
How UDP Works:
UDP sends a datagram (data unit) from one computer to another using the Internet Protocol.
UDP encapsulates the data in a UDP packet and adds its header information to the packet.
The data comprises source port, destination port, the packet length, and a checksum.
After the UPD packets are encapsulated in an Internet Protocol packet, they start moving to their
destinations.
Applications of UDP:
It is used for simple request-response communication where data is less and which require one response
for one request, and not much concerned with flow and error control. e.g., DNS
UDP can be used for multicasting as it supports packet switching.
It can be used by routing protocols such as RIP and OSPF as they transmit less data.
It is used by Trivial File Transfer Protocol (TFTP) to send small files.
It is used by multicasting and broadcasting applications.
It can be used by streaming media like video conferencing as they prefer speed over reliability.
Chatting, online games, and similar real-time applications use UDP
Dept. of Computer Science & Engg. Page 4 Govt. Polytechnic Athani
Computer Networks
Application Layer Services:
HTTP Protocol:
HTTP stands for HyperText Transfer Protocol.
Protocol
It is a protocol used to access the data on the World Wide Web (www).
The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and
so on.
This protocol is known as HyperText Transfer Protocol because of its efficiency that allows us to use in
a hypertext environment where there are rapid jumps from one document to another document.
HTTP is similar to the FTP as it also transfers the files from one host to another host. But, HTTP is
simpler thann FTP as HTTP uses only one connection, i.e., no control connection to transfer the files.
HTTP is used to carry the data in the form of MIME
MIME-like format.
HTTP is similar to SMTP as the data is transferred between client and server. The HTTP differs from the t
SMTP in the way the messages are sent from the client to the server and from server to the client. SMTP
messages are stored and forwarded while HTTP messages are delivered immediately.
Features of HTTP:
Connectionless protocol:
HTTP is a connectionless protocol.
HTTP client initiates a request and waits for a response from the server.
When the server receives the request, the server processes the request and sends back the response to
the HTTP client after which the client disconnects the connection.
The connection between client and server exist only during the current request and response time
only.
Media independent:
HTTP protocol is a media independent as data can be sent as long as both the client and server know
how to handle the data content.
It is required for both the client and server to specify the content type in MIME-type
MIME header.
Stateless:
HTTP is a stateless protocol as both the client and server know each other only during the current
request.
Due to this nature of the protocol, botbothh the client and server do not retain the information between
various requests of the web pages.
HTTP Transactions:
Dept. of Computer Science & Engg. Page 5 Govt. Polytechnic Athani
Computer Networks
The above figure shows the HTTP transaction between client and server. The client initiates a transaction
by sending a request message to the server. The server replies to the request message by sending a
response message.
Messages:
HTTP messages are of two types: request and response. Both the message types follow the same
message format.
thee client that consists of a request line, headers, and
Request Message: The request message is sent by th
sometimes a body.
Response Message: The response message is sent by the server to the client that consists of a status line,
headers, and sometimes a body.
FTP- File Transfer Protocol:
File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from
one host to [Link] differs from other client/server applications in that it establishes two
connections between the hosts.
FTP Model:
known TCP ports: Port 21 is used for the control connection, and port 20 is used
FTP uses two well-known
for the data connection.
The client has three components: user interface, client control process, and the client data
transfer process.
The server has two components: the server control process and the server data transfer process.
process
The control connection is made between the control processes.
The data connection is made between the data transfer processes.
The control connection remains connected during the entire interactive FTP session.
The data connection is opened and then closed for each file transferred.
Following figure shows the basic model of FTP.
Dept. of Computer Science & Engg. Page 6 Govt. Polytechnic Athani
Computer Networks
Virtual Terminals:
In open systems, a virtual terminal (VT) is an application service that:
Allows host terminals on a multi-user network to interact with other hosts regardless of terminal type
and characteristics,
Allows remote log-on by local area network managers for the purpose of management,
Allows users to access information from another host processor for transaction processing,
Serves as a backup facility.
PuTTY is an example of a virtual terminal.
ITU-T defines a virtual terminal protocol based on the OSI application layer protocols. However, the
virtual terminal protocol is not widely used on the Internet.
Telnet and SSH protocols:
Telnet and ssh are both application layer protocols used to take remote access and manage a
device.
What is Telnet?
Telnet is the standard TCP/IP protocol for virtual terminal service. It enables you to establish a
connection to a remote system in such a manner that it appears as a local system. The full form of
TELNET is Terminal Network.
Telnet protocol is mostly used by network admin to access and manage network devices remotely.
It helps them access the device by telnetting to the IP address or hostname of a remote device.
It allows users to access any application on a remote computer. This helps them to establish a
connection to a remote system.
What is SSH?
SSH is a network protocol that is widely used to access and manage a device remotely. The full form of
SSH is Secure Shell is a major protocol to access the network devices and servers over the internet.
It helps you to log into another computer over a network and allows you to execute commands in a
remote machine.
You can move files from one machine to another. SSH protocol encrypts traffic in both directions, which
helps you to prevent trafficking, sniffing, and password theft.
Email protocols:
Simple Mail Transfer Protocol (SMTP):
SMTP represents Simple Mail Transfer Protocol. SMTP is a set of interaction guidelines that allow the
software to transmit electronic mail over the internet, referred to as Simple Mail Transfer Protocol.
The main objective of SMTP is used to set up communication rules between servers. The servers have a
way of recognizing themselves and announcing what kind of communication they are trying to perform.
They also have a way of handling errors such as incorrect email address. For example, if the recipient
address is wrong, then receiving a server reply with an error message of some kind.
Working of SMTP
SMTP is an end-to-end delivery in which an SMTP client machine contacts the destination host's SMTP
server directly to deliver this mail.
Unlike the store and the forward principle that provides the mail content to the destination host through
several intermediary nodes in the same network, SMTP continues the mail content being sent until it has
been successfully copied to its SMTP.
Dept. of Computer Science & Engg. Page 7 Govt. Polytechnic Athani
Computer Networks
SMTP maintains only delivery to the mail-gateway host, not to the actual destination host, located
beyond the TCP/IP network.
In the mail gateway, the SMTP end-to-end transmission is hosted to the gateway, gateway to host or
gateway-to-gateway. SMTP does not determine the format of mail beyond the gateway.
Each message of the SMTP contains the following field:
A header or envelop a null line terminates that.
Contents − everything after the invalid or blank line is the message body with a sequence of lines
containing ASCII characters.
Simple Mail Transfer Protocols represents a client/server protocol. The client SMTP device initiates the
session by sending an SMTP message, and the mail server responds by receiving an SMTP message to
the session request.
Problems
There are various problems in SMTP which are as follows −
Some older implementations are not capable of handling messages longer than 64 KB.
If the client and server have multiple time-outs, they may give up when the other is still busy. This will
terminate the connection unexpectedly.
In rare situations can trigger infinite mail storms.
Post Office Protocol (POP3):
The pop3 protocol is an email protocol to download messages from the email-server. These messages can be
stored in the local machine.
POP is an application layer internet standard protocol.
Since POP supports offline access to the messages, thus requires less internet usage time.
POP does not allow search facility.
In order to access the messaged, it is necessary to download them.
It allows only one mailbox to be created on server.
It is not suitable for accessing non mail data.
POP commands are generally abbreviated into codes of three or four letters. Eg. STAT.
Internet Message Access Protocol (IMAP4):
It is an application layer protocol that operates as a contract for receiving emails from the mail
server. It was designed by Mark Crispin in 1986 as a remote access mailbox protocol, the current
version of IMAP is IMAP4.
It is used as the most commonly used protocol for retrieving emails. This term is also known as
Internet mail access protocol, Interactive mail access protocol, and Interim mail access protocol.
Features of IMAP :
It is capable of managing multiple mailboxes and organizing them into various categories.
Provides adding of message flags to keep track of which messages are being seen.
It is capable of deciding whether to retrieve email from a mail server before downloading.
It makes it easy to download media when multiple files are attached.
Dept. of Computer Science & Engg. Page 8 Govt. Polytechnic Athani
Computer Networks
Troubleshoot Common Network Problems:
The Troubleshooting Process:
Troubleshooting is a systematic process used to locate the cause of a fault in a computer system and
correct the relevant hardware and software issues.
Approaching problem solving using a logical and methodical approach is essential to successful
resolution.
Although experience is very useful to problem solving, following a troubleshooting model will enhance
effectiveness and speed.
The troubleshooting process steps are as follows:
Step 1. Identify the problem.
Step 2. Establish a theory of probable cause.
Step 3. Test the theory to determine the cause.
Step 4. Establish a plan of action to resolve the problem and implement the solution.
Step 5. Verify full system functionality and, if applicable, implement preventive measures.
Step 6. Document findings, actions, and outcomes.
Network Troubleshooting Overview:
The term troubleshooting refers to the process of identifying problems with a network through a
rigorous and repeatable process and then solving those problems using testable methods.
Troubleshooting is more effective than trying things at random until the network functions because it
allows you to target individual network components, testing each for function, and encourages you to
document your process.
Network troubleshooting is useful for almost anyone, from a computer enthusiast to an aspiring network
engineer.
How to Troubleshoot a Network
Issues can arise at numerous points along the network. Before you start trying to troubleshoot any
issue, you want to have a clear understanding of what the problem is, how it came up, who it’s affecting,
and how long it’s been going on.
By gathering the right information and clarifying the problem, you’ll have a much better chance of
resolving the issue quickly, without wasting time trying unnecessary fixes.
Dept. of Computer Science & Engg. Page 9 Govt. Polytechnic Athani
Computer Networks
Structured Troubleshooting Methods:
A structured troubleshooting method is used as a guideline through a troubleshooting process.
The key to all structured troubleshooting methods is systematic elimination of hypothetical causes and
narrowing down on the possible causes.
Troubleshooting Example Using Six Different Approaches
An external financial consultant has come into help your company’s controller with an accounting
problem. He needs access to the finance server. An account has been created for him on the server, and
the client software has been installed on the consultant’s laptop. You happen to walk past the controller’s
office and are called in and told that the consultant can’t connect to the finance server. You are a network
support engineer and have access to all network devices, but not to the servers. Think about how you
would handle this problem, what your troubleshooting plan would be, and which method or combination
of methods you would use.
What possible approaches can you take for this troubleshooting task? This case lends itself to many
different approaches, but some specific characteristics can help you decide an appropriate approach:
You have access to the network devices, but not to the server. This implies that you will likely
be able to handle Layer 1–4 problems by yourself; however, for Layer 5–7, you will probably
have to escalate to a different person.
You have access to the client device, so it is possible to start your troubleshooting from it.
The controller has the same software and access rights on his machine, so it is possible to
compare between the two devices.
What are the benefits and drawbacks of each possible troubleshooting approach for this case?
1. Top-down: You have the opportunity to start testing at the application layer. It is good troubleshooting
practice to confirm the reported problem, so starting from the application layer is an obvious choice. The
only possible drawback is that you will not discover simple problems, such as the cable being plugged in
to a wrong outlet, until later in the process.
2. Bottom-up: A full bottom-up check of the whole network is not a very useful approach because it will
take too much time and at this point, there is no reason to assume that the network beyond the first
access switch would be causing the issue. You could consider starting with a bottom-up approach for the
first stretch of the network, from the consultant’s laptop to the access switch, to uncover potential
cabling problems.
3. Divide-and-conquer: This is a viable approach. You can ping from the consultant’s laptop to the
finance server. If that succeeds, the problem is most likely at upper layers. For example, a firewall or
access control list could be the culprit. If the ping fails, assuming that ping is not blocked in the network,
it is safe to assume that the problem is at network or lower layers and you are responsible for fixing it.
The advantage of this method is that you can quickly decide on the scope of the problem and whether
escalation is necessary.
4. Follow-the-path: Similar to the bottom-up approach, a full follow-the-path approach is not efficient
under the circumstances, but tracing the cabling to the first switch can be a good start if it turns out that
the link LED is off on the consultant’s PC. This method might come into play after other techniques
have been used to narrow the scope of the problem.
5. Compare-configurations: You have access to both the controller’s PC and the consultant’s laptop;
therefore, compare-configurations is a possible strategy. However, because these machines are not under
the control of a single IT department, you might find many differences, and it might therefore be hard to
Dept. of Computer Science & Engg. Page 10 Govt. Polytechnic Athani
Computer Networks
spot the significant and relevant differences. The compare-configurations approach might prove useful
later, after it has been determined that the problem is likely to be on the client.
6. Swap-components: Using this approach alone is not likely to be enough to solve the problem, but if
following any of the other methods indicates a potential hardware issue between the consultant’s PC and
the access switch, this method might come into play. However, merely as a first step, you could consider
swapping the cable and the jack connected to the consultant’s laptop and the controller’s PC, in turn, to
see whether the problem is cable, PC, or switch related.
Many combinations of these different methods could be considered here. The most promising methods
are top-down or divide-and-conquer. You will possibly switch to follow-the-path or compare-
configurations approach after the scope of the problem has been properly reduced. As an initial
step in any approach, the swap-components method could be used to quickly separate client-
related issues from network-related issues. The bottom-up approach could be used as the first step
to verify the first stretch of cabling.
Troubleshoot Wireless Issues:
Causes of Wireless Issues:
The 5 Wireless Networking Issues Every IT Pro Deals With
Issue #1: Physical Object Interference / Design.
Issue #2: RF Interference.
Issue #3: Incorrect Antenna Configuration.
Issue #4: Hardware Architecture & Firmware.
Issue #5: WLAN Security & Protection from Internal/External Threats.
Authentication and Association:
Authentication: Mutual recognition between the user and the AS (Access service) using the protocol
and defines a temporary key generation used between the client and the AP between the wireless link.
Association: Establishes an initial association between a station and an AP. Before a station can transmit
or receive frames on a wireless LAN, its identity and address must be known. For this purpose, a station
must establish an association with an AP. The AP can then communicate this information to other APs to
facilitate routing and delivery of addressed frames.
Dept. of Computer Science & Engg. Page 11 Govt. Polytechnic Athani