Eec 2502 Computer Networks Lecture 9
Eec 2502 Computer Networks Lecture 9
Eec 2502 Computer Networks Lecture 9
The nodes can share printers or CDROM drives, and allow other devices to read or write to its hard disk, allowing
sharing of files, access to its internet connection, and other resources. Files or resources can be shared directly
between the system on the network, without the need of any central server. Such kind of network, where we allow
nodes to become a server and share things in this manner, can be referred to as a peer-to-peer network.
In a peer-to-peer network, each node can work as either a server as well as a client. This network does not
distinguish between the client or server. Each of the nodes can act as both client/server depending on whether the
node is requesting or providing the service. All the nodes are functionally equal and can send or receive data directly
with one another.
Peer-to-Peer networks can be deployed very easily with most modern Operating Systems such as Windows and Mac
O.S., etc. Computers in the peer-to-peer network run the same network protocols and software. Once connected to
the network, P2P software allows users to search for files and other resources on some other node. The pattern of
communication between peers depends entirely on the application requirement. Each object is replicated in several
computers to further distribute the load and to provide flexibility in the event of disconnection of the individual
computer.
A peer-to-peer network can be configured as both wired as well as a wireless network. It is most commonly used in
the Local Area Network, especially in small offices, or within a single department of a large organization. The nodes
present in the network are situated very near to each other. Each node has access to devices and files on other
computers and can store independently its own software and information.
For Example, BitTorrent is a widely used peer-to-peer network.
Following are the advantages of using a peer-to-peer network:
1. Easy to implement and manage.
2. Nodes or workstations are independent of one another. Also, no access permissions are needed.
3. The network is reliable in nature. If a peer fails, it will not affect the working of others.
4. There is no need for any professional software in such kind of networks.
5. The cost of implementation of such networks is very less.
Following are the disadvantages of using a peer-to-peer network:
1. Storage is decentralized, and also not so efficiently managed.
2. No data backup options are available in peer-to-peer networks.
3. These kinds of networks are not so secure.
Server-Based Networks
A Server-Based network can also be termed as a Client-Server network. A server is a node that acts as a service
provider for clients. They wait for client requests and then respond to them. The server is located elsewhere on the
network, usually on a more powerful machine. Here, the server is the central location where users share and access
network resources. It controls the level of access that users have to share resources. In other words, a server provides
functionality and serve other programs called clients.
There is various kind of servers depending upon their use, they can be a web server(which servers HTTP requests),
Database servers(which runs DBMS), File server(which provides files to clients), Mail server, print server, Game
server, Application server, and so on. A server can contain web resources, host web applications, store user and
program data, etc.
A client is a machine or program requesting services from a server. Clients are often situated at workstations or on
personal computers. They can be a simple application or a whole system that accesses services being provided by a
server. A client program provides an interface to allow a computer user to request for services of the server and to
display the results the server returns. Each client has to log on to the system or server to access the data and its
resources.
A server-based network is centralized in nature. Also, the storage in this kind of network is centralized. In other
words, we can say that a server-based network is based on a centralized structure and provides a way to
communicate via the web. The Internet is the most widely used client-server network.
The Server-based network can be applied for various uses and applications. Some of them are as follows:
1. Centralization: The server administers the whole set-up in the network. Access rights and resource
allocations are also done by the server.
2. Proper Management: Due to centralized storage, it becomes easy to find a file or some other resource.
3. Backup and Recovery: A centralized server makes data backup and recovery possible in a convenient
manner.
4. Upgradation and Scalability: Changes in the network can be made very easily by just upgrading the server.
Also, the network is easily scalable.
5. Accessibility: Servers can be accessed remotely from various platforms in the network.
6. Security: Rules defining security and access rights can be defined at the time of the set-up of the server.
Following are the advantages of using a server-based network:
1. It facilitates a Centralized storage system.
2. Centralization makes administration easy.
3. Data can be easily backed in such networks.
4. The network is easy to scale.
5. Data sharing speed is high.
6. Servers can serve multiple clients at a time.
Following are the disadvantages of using a server-based network:
1. Dependency is more on a centralized server.
2. If the server's data is corrupted, all nodes will be affected.
3. A network administrator is required.
4. The cost of the server and network software is very high.
The original Hypertext Transfer Protocol (HTTP) 1.0 protocol is a stateless protocol whereby a Web browser
forms a connection with a Web server, downloads the appropriate file, and then terminates the connection. The
browser usually requests a file using an HTTP GET method request on TCP port 80, which consists of a series of
HTTP request headers that define the transaction method (GET, POST, HEAD, and so on) and indicates to the
server the capabilities of the client. The server responds with a series of HTTP response headers that indicate
whether the transaction is successful, the type of data being sent, the type of server, and finally the requested data.
IIS 4 supports a new version of this protocol called HTTP 1.1, which has new features that make it more
efficient. These new features include the following:
• Persistent connections:
An HTTP 1.1 server can keep TCP connections open after a file has been transferred, eliminating the
need for a connection to be opened and closed each time a file is transferred, as is the case with HTTP
1.0.
• Pipelining:
This is a process whereby an HTTP 1.1 client can send multiple Internet Protocol (IP) packets to the
server without waiting for the server to respond to each packet.
• Buffering:
This process allows several HTTP requests by the client to be buffered into a single packet and sent to
the server, which results in faster transfer times because fewer and larger packets are used.
• Host headers:
This feature enables an HTTP 1.1–compliant Web server to host multiple Web sites using a single IP
address.
• Http put and http delete commands:
These commands enable Web browsers to upload and delete files from Web servers using HTTP.
HTTPS VS HTTP.
As opposed to HTTP URLs that begin with "http://" and use port 80 by default, HTTPS URLs begin with "https://"
and use port 443 by default. HTTP is unsecured and is subject to man-in-the-middle and eavesdropping attacks,
which can let attackers gain access to website accounts and sensitive information. HTTPS is designed to withstand
such attacks and is considered secure against such attacks . HTTP operates at the highest layer of the OSI Model,
the Application layer; but the security protocol operates at a lower sublayer, encrypting an HTTP message prior
to transmission and decrypting a message upon arrival. Strictly speaking, HTTPS is not a separate protocol, but
refers to use of ordinary HTTP over an encrypted Secure Sockets Layer (SSL) or Transport Layer Security (TLS)
connection. Everything in the HTTP message is encrypted, including the headers, and the request/response load.
A standard Internet protocol that enables the dynamic configuration of hosts on an Internet Protocol (IP)
internetwork. Dynamic Host Configuration Protocol (DHCP) is an extension of the bootstrap protocol (BOOTP).
How It Works
DHCP is a client-server protocol that uses DHCP servers and DHCP clients. A DHCP server is a machine that
runs a service that can lease out IP addresses and other TCP/IP information to any client that requests them. For
example, on Linux System example Ubuntu you can install the DHCP Server service to perform this function. The
DHCP server typically has a pool of IP addresses that it is allowed to distribute to clients, and these clients lease
an IP address from the pool for a specific period of time, usually several days. Once the lease is ready to expire,
the client contacts the server to arrange for renewal.
DHCP clients are client machines that run special DHCP client software enabling them to communicate with
DHCP servers. All versions of Linux and Windows include DHCP client software, which is installed when the
TCP/IP protocol stack is installed on the machine.
DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and various DHCP options from DHCP
servers in a four-step process:
1. DHCPDISCOVER:
The client broadcasts a request for a DHCP server.
2. DHCPOFFER:
DHCP servers on the network offer an
address to the client.
3. DHCPREQUEST:
The client broadcasts a request to lease
an address from one of the offering
DHCP servers.
4. DHCPACK:
The DHCP server that the client
responds to acknowledges the client,
assigns it any configured DHCP options,
and updates its DHCP database. The
client then initializes and binds its
TCP/IP protocol stack and can begin
network communication.
Domain Name
Each node in the tree has a domain name. A
full domain name is a sequence of labels
separated by dots (.). The domain names are
always read from the node up to the root. The
last label is the label of the root (null). This
means that a full domain name always ends in
a null label, which means the last character is
a dot because the null string is nothing. Figure
shows some domain names.
Fully Qualified Domain Name
If a label is terminated by a null string, it is called a fully qualified domain name (FQDN). An FQDN is a domain
name that contains the full name of a host. It contains all labels, from the most specific to the most general, that
uniquely define the name of the host. For example, the domain name
server1.cs.nec.edu. is the FQDN of a computer named server1 installed at the NEC Collete. A DNS server can
only match an FQDN to an address. Note that the name must end with a null label, but because null means nothing,
the label ends with a dot (.).
Generic Domains
The generic domains define registered hosts according to their generic behavior. Each node in the tree defines a
domain, which is an index to the domain name space database
Fig: Generic Domain Labels
Country Domains
The country domains section uses two-character country abbreviations (e.g., np for Nepal and us for United
States). Second labels can be organizational, or they can be more specific, national designations. The United States,
for example, uses state abbreviations as a subdivision of us (e.g., ca.us.).
Inverse Domain
The inverse domain is used to map an address to a name. This may happen, for example, when a server has received
a request from a client to do a task. This type of query is called an inverse or pointer (PTR) query. To handle a
pointer query, the inverse domain is added to the domain name space with the first-level node called arpa (for
historical reasons). The second level is also one single node named in-addr (for inverse address). The rest of the
domain defines IP addresses.
Simple Mail Transfer Protocol (SMTP)
One of the most popular network services, email is supported by TCP/IP protocol SMTP. It provides system for
sending message to other computers and provide a mail exchange between users. SMTP supports:
• Sending a message to one or more recipients.
• Sending message that includes texts,voice, video or graphics.
• Sending message to users on the network outside the Internet.
SMTP supports sending of emai only It cannot pull messages from a remote server on demand. Other protocols,
such as the Post Office Protocol (POP) and the Internet Message Access Protocol (IMAP) are specifically designed
for retrieving messages and managing mail boxes. However, SMTP has a feature to initiate mail queue processing
on a remote server so that the requesting system may receive any messages destined for it (cf. Remote Message
Queue Starting). POP and IMAP are preferred protocols when a user's personal computer is only intermittently
powered up, or Internet connectivity is only transient and hosts cannot receive message during off-line periods.
The overall flow for message creation, mail transport, and delivery may be illustrated as shown.
Email is submitted by a mail client (MUA, mail user agent) to a mail server (MSA, mail submission agent)
using SMTP on TCP port 587. Most mailbox providers still allow submission on traditional port 25. From there,
the MSA delivers the mail to its mail transfer agent (MTA, mail transfer agent). Often, these two agents are just
different instances of the same software launched with different options on the same machine. Local processing
can be done either on a single machine, or split among various appliances; in the former case, involved processes
can share files; in the latter case, SMTP is used to transfer the message internally, with each host configured to
use the next appliance as a smart host. Each process is an MTA in its own right; that is, an SMTP server.
The boundary MTA has to locate the target host. It uses the Domain name system (DNS) to look up the mail
exchanger record (MX record) for the recipient's domain (the part of the address on the right of @). The returned
MX record contains the name of the target host. The MTA next looks up the A record for that name in order to get
the IP address and connect to such host as an SMTP client.
Once the MX target accepts the incoming message, it hands it to a mail delivery agent (MDA) for local mail
delivery. An MDA is able to save messages in the relevant mailbox format. Again, mail reception can be done
using many computers or just one —the picture displays two nearby boxes in either case. An MDA may deliver
messages directly to storage, or forward them over a network using SMTP, or any other means, including the
Local Mail Transfer Protocol (LMTP), a derivative of SMTP designed for this purpose.
Once delivered to the local mail server, the mail is stored for batch retrieval by authenticated mail clients (MUAs).
Mail is retrieved by end-user applications, called email clients, using Internet Message Access Protocol (IMAP),
a protocol that both facilitates access to mail and manages stored mail, or the Post Office Protocol (POP) which
typically uses the traditional mbox mail file format or a proprietary system such as Microsoft Exchange/Outlook
or Lotus Notes/Domino. Webmail clients may use either method, but the retrieval protocol is often not a formal
standard.
IMAP VS POP:
IPSEC
IPsec provides a mechanism for secure data transmission over IP networks, ensuring confidentiality, integrity, and
authenticity of data communications over unprotected networks such as the Internet . IPsec encompasses a suite
of protocols and is not bound to any specific encryption or authentication algorithms, key generation technique,
or security association (SA). IPsec provides the rules while existing algorithms provide the encryption,
authentication, key management, and so on. IPsec acts at the network layer, protecting and authenticating IP
packets between IPsec devices (peers), such as Cisco PIX Firewalls, Adaptive Security Apliances (ASA), Cisco
routers, the Cisco Secure VPN Client, and other IPsec-compliant products.
IPsec is an Internet Engineering Task Force (IETF) standard (RFC 2401-2412) that defines how a VPN can be
created over IP networks.
Data confidentiality: IPsec ensures confidentiality by using encryption. Data encryption prevents third parties
from reading the data, especially data that is transmitted over public networks or wireless networks. The IPsec
sender can encrypt packets before transmitting the packets across a network and prevent anyone from hearing or
viewing the communication (eavesdropping).
Data integrity: IPsec ensures that data arrives unchanged at the destination; that is, that the data is not
manipulated at any point along the communication path. IPsec ensures data integrity by using hashes.
Data origin authentication: The IPsec receiver can authenticate the source of the IPsec packets. Authentication
ensures that the connection is actually made with the desired communication partner.
Anti-replay: Anti-replay protection verifies that each packet is unique, not duplicated. IPsec packets are protected
by comparing the sequence number of the received packets and a sliding window on the destination host, or
security gateway. A packet whose sequence number is before the sliding window is considered late, or a duplicate.
Late and duplicate packets are dropped.
Proxy server
A computer that can act on the behalf of other computers to request content from the Internet or an intranet. Proxy
Server is placed between a user's machine and the Internet. It can act as a firewall to provide protection and as a
cache area to speed up Web page display.
A firewall mechanism that replaces the IP address of a host on the internal (protected) network with its own IP
address for all traffic passing through it. A software agent that acts on behalf of a user, typical proxies accept a
connection from a user, make a decision as to whether or not the user or client IP address is permitted to use the
proxy, perhaps does additional authentication, and then completes a connection on behalf of the user to a remote
destination.
Types of Proxy:
1. Forward Proxy:
Forward proxies are proxies where the client server names the target server to connect to. Forward proxies are
able to retrieve from a wide range of sources (in most cases anywhere on the Internet).
The terms "forward proxy" and "forwarding proxy" are a general description of behavior (forwarding traffic) and
thus ambiguous. Except for Reverse proxy
Fig:A forward proxy taking requests from an internal network and forwarding them to the
Internet
2. Open Proxy:
An open proxy is a forward proxy server that is accessible by any Internet user. There are "hundreds of
thousands" of open proxies on the Internet.. An anonymous open proxy allows users to conceal their IP address
while browsing the Web or using other Internet services.
Fig: An open proxy forwarding requests from and to anywhere on the
Internet.
3. Reverse Proxy:
A reverse proxy is a proxy server that appears to clients to be an ordinary server. Requests are forwarded to one
or more origin servers which handle the request. The response is returned as if it came directly from the proxy
server
Fig: A reverse proxy taking requests from the Internet and forwarding them to servers
in an internal network. Those making requests connect to the proxy and may not be
aware of the internal network.
Network Management
Introduction to Network management, Internet Network – Management framework (SMI & HIB) &
SNMP protocol
Introduction to Network Management:
Network management is defined as monitoring, testing, configuring, and troubleshooting network
components to meet a set of requirements defined by an organization. These requirements include the
smooth, efficient operation of the network that provides the predefined quality of service for users. To
accomplish this task, a network management system uses hardware, software, and humans.
Configuration Management
A large network is usually made up of hundreds of entities that are physically or logically connected to
one another. These entities have an initial configuration when the network is set up, but can change
with time. Desktop computers may be replaced by others; application software may be updated to a
newer version; and users may move from one group to another. The configuration management system
must know, at any time, the status of each entity and its relation to other entities . Configuration
management can be subdivided into two parts reconfiguration and Documentation.
Fault Management:
Falls on two categories.
• Reactive Fault Management
A reactive fault management system is responsible for detecting, isolating, correcting, and
recording faults. It handles short-term solutions to faults.
• Proactive Fault Management
Proactive fault management tries to prevent faults from occurring. Although this is not always
possible, some types of failures can be predicted and prevented.
Performance management:
It is is closely related to fault management and tries to monitor and control the network to ensure that
it is running as efficiently as possible.
Security Management
Security management is responsible for controlling access to the network based on the predefined
policy.
Accounting Management
Accounting management is the control of users' access to network resources through charges. Charging
does not necessarily mean cash transfer; it may mean debiting the departments or divisions for
budgeting purposes. Today, organizations use an accounting management system for the following
reasons:
• It prevents users from monopolizing limited network resources.
• It prevents users from using the system inefficiently.
• Network managers can do short- and long-term planning based on the demand for network use.
The Simple Network Management Protocol (SNMP) is a framework for managing devices in an Internet
using the TCPIIP protocol suite. It provides a set of fundamental operations for monitoring and
maintaining an Internet.
Concept
SNMP uses the concept of manager and agent. That is, a manager, usually a host, controls and monitors
a set of agents, usually routers . SNMP is an application-level protocol in which a few manager stations
control a set of agents. The protocol is designed at the application level so that it can monitor devices
made by different manufacturers and installed on different physical networks.
SNMP operates in the Application Layer of the Internet Protocol Suite (Layer 7 of the OSI model). The
SNMP agent receives requests on UDP port 161. The manager may send requests from any available
source port to port 161 in the agent. The agent response will be sent back to the source port on the
manager. The manager receives notifications (Traps and InformRequests) on port 162. The agent may
generate notifications from any available port.
To do management tasks, SNMP uses two other protocols:
1. Structure of Management Information (SMI)
2. Management Information Base (MIB).
Role of SNMP
SNMP has some very specific roles in network management. It defines the format of the packet to be
sent from a manager to an agent and vice versa. It also interprets the result and creates statistics (often
with the help of other management software). The packets exchanged contain the object (variable)
names and their status (values). SNMP is responsible for reading and changing these values.
Roles of SMI
SMI defines the general rules for naming objects, defining object types (including range and length),
and showing how to encode objects and values. SM1 does not define the number of objects an entity
should manage or name the objects to be managed or define the association between the objects and
their values.
The Structure of Management Information, version 2 (SMIv2) is a component for network
management. Its functions are
1. To name objects
2. To define the type of data that can be stored in an object
3. To show how to encode data for transmission over the network
SMI is a guideline for SNMP. It emphasizes three attributes to handle an object: name, data type, and
encoding method .
Roles of MIB
For each entity to be managed, this protocol must define the number of objects, name them according
to the rules defined by SMI, and associate a type to each named object .MIB creates a collection of
named objects, their types, and their relationships to each other in an entity to be managed.
Each agent has its own MIB2, which is a collection of all the objects that the manager can manage. The
objects in MIB2 are categorized under 10 different groups: system, interface, address translation, ip,
icmp, tcp, udp, egp, transmission, and snmp.
Analogy:
We can compare the task of network management to the task of writing a program.
• Both tasks need rules. In network management this is handled by SMI.
• Both tasks need variable declarations. In network management this is handled by MIB.
• Both tasks have actions performed by statements. In network management this is handled by
SNMP.
NB: You can download a free copy of the Simple Network Management Protocol software version 5 or
latter from the internet, “ net.snmp”