Computer Network Note

Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

Computer Networks

EG 3101 CT

Total: 6 hour /week


Year: III Lecture: 3 hours/week
Semester: V Practical: 3 hours/week

Course Objective:
After completing this course the students will be able to:
1. Introduce the architecture of computer network
2. Explain various hardware devices and software used in computer networks
3. Setup small home/office network
4. Make secure computer network.

Introduction of Computer Network

A computer network is a group of devices connected with each other through a transmission
medium such as wires, cables etc. These devices can be computers, printers, scanners, Fax machines
etc.
The purpose of having computer network is to send and receive data stored in other devices over
the network. These devices are often referred as nodes.

There are five basic components of a computer network:

Basic components of a
computer network
Message: It is the data or information which needs to be transferred from one device to another
device over a computer network.
Sender: Sender is the device that has the data and needs to send the data to other device connected
to the network.
Receiver: A receiver is the device which is expecting the data from other device on the network.
Transmission media: In order to transfer data from one device to another device we need a
transmission media such as wires, cables, radio waves etc.
Protocol: A protocol is a set of rules that are agreed by both sender and receiver, without a protocol
two devices can be connected to each other but they cannot communicate. In order to establish a
reliable communication or data sharing between two different devices we need set of rules that are
called protocol. For example, http and https are the two protocols used by web browsers to get and
post the data to internet; similarly SMTP protocol is used by email services connected to the
internet.

Features of a Computer Network

A computer network has following features:

Performance: Performance of a computer network is measured in terms of response time. The


response time of sending and receiving data from one node (computer in a computer network are
often referred as node) to another should be minimal.

Data Sharing: One of the reasons why we use a computer network is to share the data between
different systems connected with each other through a transmission media.

Backup: A computer network must have a central server that keeps the backup of all the data that is
to be shared over a network so that in case of a failure it should be able to recover the data faster.

Software and hardware compatibility: A computer network must not limit all the computers in a
computer network to use same software and hardware; instead it should allow the better
compatibility between the different software and hardware configuration.

Reliability: There should not be any failure in the network or if it occurs the recovery from a failure
should be fast.
Security: A computer network should be secure so that the data transmitting over a network should
be safe from unauthorized access. Also, the sent data should be received as it is at the receiving
node, which means there should not be any loss of data during transmission.

Scalability: A computer network should be scalable which means it should always allow adding new
computers (or nodes) to the already existing computer network. For example, a company runs 100
computers over a computer network for their 100 employees, let’s say they hire another 100
employees and want to add new 100 computers to the already existing LAN then in that case the
local area computer network should allow this.

Classification of computer networks

A computer network can be classified into different categories. Different criteria are used to classify
computer networks. Following are the criteria widely used.
• Geographical spread
• Topology
• Ownership

A computer network can be categorized by their size. A computer network is mainly of four types:

 LAN(Local Area Network)


 PAN(Personal Area Network)
 MAN(Metropolitan Area Network)
 WAN(Wide Area Network)

LAN (Local Area Network)

 Local Area Network is a group of computers connected to each other in a small area such as
building, office.
 LAN is used for connecting two or more personal computers through a communication
medium such as twisted pair, coaxial cable, etc.
 It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and
Ethernet cables.
 The data is transferred at an extremely faster rate in Local Area Network.
 Local Area Network provides higher security.

PAN (Personal Area Network)


 Personal Area Network is a network arranged within an individual person, typically within a
range of 10 meters.
 Personal Area Network is used for connecting the computer devices of personal use is
known as Personal Area Network.
 Thomas Zimmerman was the first research scientist to bring the idea of the Personal Area
Network.
 Personal Area Network covers an area of 30 feet.
 Personal computer devices that are used to develop the personal area network are the
laptop, mobile phones, media player and play stations.

 Wireless Personal Area Network: Wireless Personal Area Network is developed by


simply using wireless technologies such as WiFi, Bluetooth. It is a low range network.
 Wired Personal Area Network: Wired Personal Area Network is created by using the
USB.

MAN (Metropolitan Area Network)

 A metropolitan area network is a network that covers a larger geographic area by


interconnecting a different LAN to form a larger network.
 Government agencies use MAN to connect to the citizens and private industries.
 In MAN, various LANs are connected to each other through a telephone exchange line.
 The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-3, ADSL,
etc.
 It has a higher range than Local Area Network (LAN).

 MAN is used in communication between the banks in a city.


 It can be used in an Airline Reservation.
 It can be used in a college within a city.
 It can also be used for communication in the military

WAN (Wide Area Network)

 A Wide Area Network is a network that extends over a large geographical area such as states
or countries.
 A Wide Area Network is quite bigger network than the LAN.
 A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fiber optic cable or satellite links.
 The internet is one of the biggest WAN in the world.
 A Wide Area Network is widely used in the field of Business, government, and education.

Examples of Wide Area Network:

 Mobile Broadband: A 4G network is widely used across a region or country.


 Last mile: A telecom company is used to provide the internet services to the customers in
hundreds of cities by connecting their home with fiber.
 Private network: A bank provides a private network that connects the 44 offices. This
network is made by using the telephone leased line provided by the telecom company.

Controller Area Network (CAN)

Controller Area Network (CAN) is a serial network technology that was originally designed for the
automotive industry, especially for European cars, but has also become a popular bus in industrial
automation as well as other applications.
Controller Area Network
 Is a serial networking technology for embedded solutions
 Needs only two wires named CAN_H and CAN_L.
 Operates at data rates of up to 1 Megabit per second.
 Supports a maximum of 8 bytes per message frame.
 Does not support node IDs, only message IDs. One application can support multiple message
IDs.
 Supports message priority, i.e. the lower the message ID the higher its priority.
 Supports two message ID lengths, 11-bit (standard) and 29-bit (extended).
 CAN networks significantly reduce wiring

Storage Area Network (SAN)

A storage area network (SAN) is a dedicated high-speed network or sub-network that interconnects
and presents shared pools of storage devices to multiple servers.
Each server can access shared storage as if it were a drive directly attached to the server. A SAN is
typically assembled with cabling, host bus adapters, and SAN switches attached to storage arrays
and servers. Each switch and storage system on the SAN must be interconnected.

Each computer on the network can access storage on the SAN as though they were local disks
connected directly to the computer.

A SAN can offer the following benefits:


 Improved application availability
 Better application performance
 Central and consolidated
 Remote site data transfer and vaulting
 Simple centralized management

Concept of Networking

Simply put, computer networking is the study of how computers can be linked to share data. A
computer without a network, arguably, has little use in daily life.
Networking, also known as computer networking, is the practice of transporting and exchanging
data between nodes over a shared medium in an information system. Networking comprises not
only the design, construction and use of a network, but also the management, maintenance and
operation of the network infrastructure, software and policies.
Computer networking enables devices and endpoints to be connected to each other on a local area
network (LAN) or to a larger network, such as the internet or a private wide area network (WAN).
This is an essential function for service providers, businesses and consumers worldwide to share
resources; use or offer services, and communicate. Networking facilitates everything from telephone
calls to text messaging to streaming video to the internet of things (IoT).

There are two primary types of computer networking: wired networking and wireless networking.
Wired networking requires the use of a physical medium for transport between nodes. Wireless
networking uses radio waves to transport data over the air, enabling devices to be connected to a
network without any cabling.

Concept of Internet
The Internet today is a widespread information infrastructure. Its history is complex and involves
many people and stories. The Internet, sometimes called simply "the Net," is a worldwide system of
computer networks -a network of networks.
The Internet is still evolving. And not just its infrastructure. How we use it and where we use it are
also continuously changing. What might the Internet look like in 10 years?

Internet is defined as an Information super Highway, to access information over the web.
 Internet is a world-wide global system of interconnected computer networks.
 Internet uses the standard Internet Protocol (TCP/IP).
 Every computer in internet is identified by a unique IP address.
 IP Address is a unique set of numbers (such as 110.22.33.114) which identifies a computer
location.
 A special computer DNS (Domain Name Server) is used to give name to the IP Address so
that user can locate a computer by a name.
 Internet is accessible to every user all over the world.

Application and challenging issues of computer Network

Applications of computer Network

Computer networks have become invaluable to organizations as well as individuals. Some of its main
uses are as follows –
1. Information and Resource Sharing
2. Retrieving Remote Information –
3. Speedy Interpersonal Communication
4. E-Commerce
5. Highly Reliable Systems
6. Cost–Effective Systems
7. VoIP
8. Distributed processing

Challenging issues of computer Network

In today’s business world, computer networks have become norm. Today’s networks are supporting
more traffic than ever. Common Challenges of Computer Network are:
1. Performance degradation: When you experience loss of data integrity and speed in a
network, it is generally down to poor transmissions and is also known as performance
degradation.
2. Security Issues: which generally involve protecting the network from denial of service
attacks (DoSA), preventing unauthorized users to infiltrate the system, and maintaining
network integrity.
3. Monitoring and Maintenance: A large network will also have to deal with numerous
network performance issues, which may be caused by switches and routers with insufficient
routing tables.
4. Slow connectivity: If there’s one thing that frustrates an employee then it’s slow
connectivity over a network.
5. Configuration Conflicts: you should ensure that the network structure is designed in a way
that deals with configuration conflicts

The OSI Reference Model


OSI (Open Systems Interconnection) is reference model for how applications can communicate over
a network. A reference model is a conceptual framework for understanding relationships. The
purpose of the OSI reference model is to guide vendors and developers so the digital communication
products and software programs they create will interoperate, and to facilitate clear comparisons
among communications tools.
The OSI reference model architecture divides network communication into seven layers. The seven
layers of function are provided by a combination of applications, operating systems, network card
device drivers and networking hardware that enable a system to put a signal on a network cable or
out over Wi-Fi or other wireless protocol). Each layer covers different network activities, equipment,
or protocols. The OSI layers may be summarized by:

1. Physical Layer: The physical layer is the actual cable, fibers, cards, switches, and other
mechanical and electrical equipment that make up a network. This is the layer that transforms
digital data into signals that can be sent down a wire to transmit data. These signals are often
electrical but, as in the case of fiber optics, they can also be non-electrical signals such as
optics or any other type of pulse that can be digitally encoded. It activates, maintain and
deactivate the physical connection. Voltages and data rates needed for transmission is defined
in the physical layer. It converts the digital bits into electrical signal.

2. Data Link Layer: Data link layer synchronizes the information which is to be transmitted over
the data. Error controlling is easily done. The encoded data are then passed to physical. Error
detection bits are used by the data link on layer. It also corrects the errors. Outgoing messages
are assembled into frames. Then the system waits for the acknowledgements to be received
after the transmission. It is reliable to send message. This layer has two sub-layers, the Logical
Link Control Layer and the Media Access Control Layer.

3. The Network Layer: It routes the signal through different channels to the other end. It acts as
a network controller. It decides by which route data should take. It divides the outgoing
messages into packets and to assemble incoming packets into messages for higher levels. This
layer also determines the route from the source to the destination computer. It determines
which path the data should take based on network conditions, priority of service, and other
factors. It also manages traffic problems on the network, such as switching and routing of
packets and controlling the congestion of data.
4. The Transport Layer: The transport layer is responsible for streaming data across the
network. It decides if data transmission should be on parallel path or single path.
The network layer and the transport layer work together like a postal system. The network
layer addresses the data, much like a person addresses an envelope. Then, the transport layer
acts as the sender’s local postal branch, sorting and grouping all similarly addressed data into
larger shipments bound for other local branches, where they will then be delivered.
Functions such as multiplexing, segmenting or splitting on the data done by layer four that is
transport layer. Transport layer breaks the message (data) into small units so that they are
handled more efficiently by the network layer. Ex. SPX, TCP, UDP.

5. The session Layer: Session layer manages and synchronize the conversation between two
different applications. Transfer of data from one destination to another session layer streams
of data are marked and are resynchronized properly, so that the ends of the messages are not
cut prematurely and data loss is avoided. This layer sets up, coordinates and terminates
conversations. Services include authentication and reconnection after an interruption.

6. The Presentation Layer: Presentation layer takes care that the data is sent in such a way that
the receiver will understand the information (data) and will be able to use the data. The
presentation layer is where received data is converted into a format that the application it is
destined for can understand. Languages (syntax) can be different of the two communicating
systems. Under this condition presentation layer plays a role translator.

7. Application Layer: It is the top layer. It supports application and end-user processes.
Everything at this layer is application-specific. Manipulation of data (information) in various
ways is done in this layer. Transferring of files disturbing the results to the user is also done in
this layer. Mail services, directory services, network resource etc. are services provided by
application layer. Layer 7 Application examples include WWW browsers, NFS, SNMP, Telnet,
HTTP, FTP, etc.

Advantages of OSI model

 It is standard legalized by International Standards Organization (ISO).


 All OSI layers providing error checking and handling.
 Provides connection-oriented and connectionless model.
 OSI protocols are well hidden and can be replaced easily as the technology changes.
 Emphasis on providing reliable data transfer service.

Disadvantages of OSI model

 OSI is complex and costly


 Not so widespread as TCP/ IP

The TCP/IP Reference Model

TCP/IP that is transmission control protocol and the internet protocol was developed by Department
of Defense’s Project Research Agency (ARPA, later DARPA) under the project of network
interconnection.

Originally it was created to connect military networks together, later it was used by government
agencies and universities. It is robust to failures and flexible to diverse networks. Most widely used
protocol for interconnecting computers and it is the protocol of the internet. The following were
seen as major design goals:

 ability to connect multiple networks together seamlessly


 ability for connections to remain intact as long as the source and destination machines were
functioning
 to be built on flexible architecture
1. Link Layer (or Host-To-Network Layer)

The network interface layer, also called the link layer or the data-link layer or Host to Network
Layer, is the interface to the actual network hardware. This is the lowest layer in TCP/IP model.
The host has to connect to network using some protocol, so that it can send IP packets over it.
This protocol varies from host to host and network to network.

2. Internet Layer

The function of this layer is to allow the host to insert packets into network and then make them
travel independently to the destination. However, the order of receiving the packet can be
different from the sequence they were sent. The internetwork layer, also called the internet
layer or the network layer, provides the “virtual network” image of an internet this layer
shields the higher levels from the physical network architecture below it. Internet Protocol (IP) is
the most important protocol in this layer.

3. Transport Layer

It does the same functions as that of transport layer in OSI model. Here are the key points
regarding transport layer:

 It decides if data transmission should be on parallel path or single path.


 Functions such as multiplexing, segmenting or splitting on the data done by layer four that is
transport layer.
 Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
 Functions of the transport layer are same as the OSI model.
 Transport layer also arrange the packets sent in sequence.

4. Application Layer

This layer is same as that of the OSI model and performs the following functions:

 It provides different services such as manipulation of information in several ways,


retransferring the files of information, distributing the results etc.
 The functions such as LOGIN or password checking are also performed by the application
layer.
 TELNET, FTP, SMTP, DN, HTTP, NNTP are the protocols employed in this layer.

Merits of TCP/IP

1. It operated independently.
2. It is scalable.
3. Client/server architecture.
4. Supports a number of routing protocols.
5. Can be used to establish a connection between two computers.
Demerits of TCP/IP

1. In this, the transport layer does not guarantee delivery of packets.


2. The model cannot be used in any other application.
3. Replacing protocol is not easy.
4. It has not clearly separated its services, interfaces and protocols.

Comparison of OSI Reference Model and TCP/IP Reference Model

Following are some major differences between OSI Reference Model and TCP/IP Reference Model.

S.N. OSI (Open System Interconnection) TCP/IP Model

1 OSI provides layer functioning and also TCP/IP model is more based on protocols
defines functions of all the layers. and protocols are not flexible with other
layers.
2 In OSI model the transport layer guarantees In TCP/IP model the transport layer does
the delivery of packets. not guarantees delivery of packets.
3 Follows horizontal approach Follows vertical approach.
4 OSI model has a separate presentation layer TCP/IP does not have a separate
presentation layer
5 OSI is a general model. TCP/IP model cannot be used in any other
application.
6 Network layer of OSI model provide both The Network layer in TCP/IP model
connection oriented and connectionless provides connectionless service.
service.
7 OSI model has a problem of fitting the TCP/IP model does not fit any protocol
protocols in the model
8 Protocols are hidden in OSI model and are In TCP/IP replacing protocol is not easy.
easily replaced as the technology changes.
9 OSI model defines services, interfaces and OSI model defines services, interfaces and
protocols very clearly and makes clear protocols very clearly and makes clear
distinction between them. distinction between them.
10 It has 7 layers It has 4 layers

The TCP/IP Reference Model

TCP/IP that is transmission control protocol and the internet protocol was developed by Department
of Defense’s Project Research Agency (ARPA, later DARPA) under the project of network
interconnection.

Originally it was created to connect military networks together, later it was used by government
agencies and universities. It is robust to failures and flexible to diverse networks. Most widely used
protocol for interconnecting computers and it is the protocol of the internet. The following were
seen as major design goals:

 ability to connect multiple networks together seamlessly


 ability for connections to remain intact as long as the source and destination machines were
functioning
 to be built on flexible architecture

1. Link Layer (or Host-To-Network Layer)

The network interface layer, also called the link layer or the data-link layer or Host to Network
Layer, is the interface to the actual network hardware. This is the lowest layer in TCP/IP model.
The host has to connect to network using some protocol, so that it can send IP packets over it.
This protocol varies from host to host and network to network.

2. Internet Layer

The function of this layer is to allow the host to insert packets into network and then make them
travel independently to the destination. However, the order of receiving the packet can be
different from the sequence they were sent. The internetwork layer, also called the internet
layer or the network layer, provides the “virtual network” image of an internet this layer
shields the higher levels from the physical network architecture below it. Internet Protocol (IP) is
the most important protocol in this layer.

3. Transport Layer

It does the same functions as that of transport layer in OSI model. Here are the key points
regarding transport layer:

 It decides if data transmission should be on parallel path or single path.


 Functions such as multiplexing, segmenting or splitting on the data done by layer four that is
transport layer.
 Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
 Functions of the transport layer are same as the OSI model.
 Transport layer also arrange the packets sent in sequence.

1. Application Layer

This layer is same as that of the OSI model and performs the following functions:
 It provides different services such as manipulation of information in several ways,
retransferring the files of information, distributing the results etc.
 The functions such as LOGIN or password checking are also performed by the application
layer.
 TELNET, FTP, SMTP, DN, HTTP, NNTP are the protocols employed in this layer.

Merits of TCP/IP

1. It operated independently.
2. It is scalable.
3. Client/server architecture.
4. Supports a number of routing protocols.
5. Can be used to establish a connection between two computers.

Demerits of TCP/IP

1. In this, the transport layer does not guarantee delivery of packets.


2. The model cannot be used in any other application.
3. Replacing protocol is not easy.
4. It has not clearly separated its services, interfaces and protocols.

Comparison of OSI Reference Model and TCP/IP Reference Model

Following are some major differences between OSI Reference Model and TCP/IP Reference Model.

S.N. OSI (Open System Interconnection) TCP/IP Model

1 OSI provides layer functioning and also TCP/IP model is more based on protocols
defines functions of all the layers. and protocols are not flexible with other
layers.
2 In OSI model the transport layer guarantees In TCP/IP model the transport layer does
the delivery of packets. not guarantees delivery of packets.
3 Follows horizontal approach Follows vertical approach.
4 OSI model has a separate presentation layer TCP/IP does not have a separate
presentation layer
5 OSI is a general model. TCP/IP model cannot be used in any other
application.
6 Network layer of OSI model provide both The Network layer in TCP/IP model
connection oriented and connectionless provides connectionless service.
service.
7 OSI model has a problem of fitting the TCP/IP model does not fit any protocol
protocols in the model
8 Protocols are hidden in OSI model and are In TCP/IP replacing protocol is not easy.
easily replaced as the technology changes.
9 OSI model defines services, interfaces and OSI model defines services, interfaces and
protocols very clearly and makes clear protocols very clearly and makes clear
distinction between them. distinction between them.
10 It has 7 layers It has 4 layers
Network Protocols Interfaces and Services

Internet protocol Stack

A protocol stack refers to a group of protocols that are running concurrently that are employed for
the implementation of network protocol suite.

The protocols in a stack determine the interconnectivity rules for a layered network model such as in
the OSI or TCP/IP models. To become a stack the protocols must be interoperable being able to
connect both vertically between the layers of the network and horizontally between the end-points
of each transmission segment.
The protocol stack is used to allow the combination of different protocols that each set the
boundaries for a number of network activities.

Note
IGMP - Internet Group Management
Protocol
ICMP – Internet Control Message
Protocol
RARP – Reverse Address Resolution
Protocol
ARP – Address Resolution protocol
SMTP – Simple Mail Transport Protocol
TCP – Transport Control Protocol
UDP – User Datagram Protocol

Layered Architecture

The layer architecture is basically grouping different components according to their purpose and
structuring different layers so that the higher layers use the services provided by the lower layers.
Layered architecture is a technique used in designing computer software, hardware, and
communications in which system or network components are isolated in layers so that changes can
be made in one layer without affecting the others.
The layered architecture has the following benefits.

1. The implementation of higher


level system components is
simplified by the usage of lower
level system component.
2. Lower level system components
are independent of
functionalities and modification
in higher level system
components.
3. Testing of lower level system is
possible, before the higher
system levels are put in use.

E.g. OSI Layer/TCP IP layer in Networking


Network Entities and Layers

In the Open Systems Interconnection (OSI ) model of network communication, an entity is an active
element within a subsystem that communicates with other entities using a defined protocol. A
network element is usually defined as a manageable logical entity uniting one or more physical
devices. This allows distributed devices to be managed in a unified way using one management
system.

Protocol performs the following functions:

1. Data sequencing. It refers to breaking a long message into smaller packets of fixed size. Data
sequencing rules define the method of numbering packets to detect loss or duplication of
packets, and to correctly identify packets, which belong to same message.
2. Data routing. Data routing defines the most efficient path between the source and destination.
3. Data formatting. Data formatting rules define which group of bits or characters within packet
constitute data, control, addressing, or other information.
4. Flow control. A communication protocol also prevents a fast sender from overwhelming a slow
receiver. It ensures resource sharing and protection against traffic congestion by regulating the
flow of data on communication lines.
5. Error control. These rules are designed to detect errors in messages and to ensure transmission
of correct messages. The most common method is to retransmit erroneous message block. In
such a case, a block having error is discarded by the receiver and is retransmitted by the sender.
6. Precedence and order of transmission. These rules ensure that all the nodes get a chance to use
the communication lines and other resources of the network based on the priorities assigned to
them.
7. Connection establishment and termination. These rules define how connections are
established, maintained and terminated when two nodes of a network want to communicate
with each other.
8. Data security. Providing data security and privacy is also built into most communication
software packages. It prevents access of data by unauthorized users.

9. Log information. Several communications Software are designed to develop log information,
which consists of all jobs and data communications tasks that have taken place. Such
information may be used for charging the users of the network based on their usage of the
network resources.
_________________________________________________________________________________
Computer Networks
EG 3101 CT

Total: 6 hour /week


Year: III Lecture: 3 hours/week
Semester: V Practical: 3 hours/week

Course Objective:
After completing this course the students will be able to:
1. Introduce the architecture of computer network
2. Explain various hardware devices and software used in computer networks
3. Setup small home/office network
4. Make secure computer network.

Concept of hardware and software for networking


Computer networks components comprise both physical parts as well as the software required for
installing computer networks, both at organizations and at home. The hardware components are the
server, client, peer, transmission medium, and connecting devices. The software components are
operating system and protocols.
The following figure shows a network along with its components –

Hardware Components

Server −Servers are high-configuration computers that manage the resources of the network. The
network operating system is typically installed in the server and so they give user accesses to the
network resources. Servers can be of various kinds: file servers, database servers, print servers etc.

Clients − Clients are computers that request and receive service from the servers to access and use
the network resources.
Peers − Peers are computers that provide as well as receive services from other peers in a
workgroup network.

Transmission Media − Transmission media are the channels through which data is transferred from
one device to another in a network. Transmission media may be guided media like coaxial cable,
fiber optic cables etc.; or maybe unguided media like microwaves, infra-red waves etc.

Connecting Devices − Connecting devices act as middleware between networks or computers, by


binding the network media together. Some of the common connecting devices are:
a. Routers
b. Bridges
c. Hubs
d. Repeaters
e. Gateways
f. Switches

Software Components

Networking Operating System − Network Operating Systems is typically installed in the server and
facilitate workstations in a network to share files, database, applications, printers etc.

Protocol Suite − A protocol is a rule or guideline followed by each computer for data
communication. Protocol suite is a set of related protocols that are laid down for computer
networks. The two popular protocol suites are −
a. OSI Model ( Open System Interconnections)
b. TCP / IP Model

Network Devices

 Hub
A hub works in the physical layer of the OSI model. It is basically a non-intelligent device, and has
no decision making capability. What a Hub basically does is take the input data from one of the
ports and broadcast the information to all the other ports connected to the network.
So, there is a lack of security in the Hub. The Network Hubs are outdated and are out of the
market.

 Repeaters

A repeater is a device similar to the Hub, but has additional features. It also works in the Physical
layer. The repeaters are used in places where amplification of input signal is necessary. But, the
kind of amplification done by the repeater is different from the regular amplification by
amplifiers. The regular amplifies everything fed into it. That means, if the input signal has noise
induced into it, both the desired signal and noise signal are together amplified. But, in the case
of a repeater, it regenerates the input signal, and amplifies only the desirable signal. Hence, the
noise component of the signal is eliminated.
The repeaters are necessary since, during the transmission of the signals over long distances, the
signal has attenuation, delay distortions and noise, which lead in loss of data. Hence, in order to
prevent this, the regenerative repeaters are used.

 Switches

A switch is an intelligent device that works in the data link layer. The term intelligent refers to
the decision making capacity of the Switch. Since it works in the Data link layer, it has knowledge
of the MAC addresses of the ports in the network.
If data has to be sent from Computer A to Computer B, then, the data is transferred to the
Computer B only, and not to any other computers connected on the network. Hence, it
establishes a link between the sender and the receiver based on the MAC addresses. This also
means that when data is being sent from A to B, Computer C can establish a link with Computer
D and communication can take place between them. So, simultaneous data transfer is possible
in a switch.
It is also to be noted that a switch is a secure device, because it sends information only to the
desired destinations, and also certain security features such as firewalls can be implemented in
the Switches.

 Bridge

A bridge is also a device which works in the Data Link Layer, but is more primitive when
compared to a switch. Initial bridges were used to connect only 2 LAN’s, but the most recent
ones perform similar operation as the switches. It also works on the principle of transfer of
information using the MAC addresses of the ports.
It can be noted is that the normal ADSL modem can be connected via bridging also. The only
difference is that, when bridging is used, each time the device has to be connected to the
internet; it has to dial to the internet and establish a connection. Also, a bridge alone cannot be
used to connect to the internet, because, the bridge works in the Data Link Layer, and has no
knowledge of the IP Addresses, which are used in the Internet.

 Router

The router is connected to at least two networks and decides which way to send each
information packet based on its current understanding of the state of the networks it is
connected to. A router is a device that forwards data packets along networks. A router is
connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP's
network. Routers are located at gateways, the places where two or more networks connect.
A router may create or maintain a table of the available routes and their conditions and use this
information along with distance and cost algorithms to determine the best route for a given
packet. Typically, a packet may travel through a number of network points with routers before
arriving at its destination. Routing is a function associated with the Network layer (layer 3) in the
standard model of network programming, the Open Systems Interconnection (OSI) model.
Static routers: These must have their routing tables configured manually with all network
addresses and paths in the internetwork.
Dynamic routers: These automatically create their routing tables by listening to network traffic.

 Gateway

A gateway is a device used to connect networks using different protocols. Gateways operate at
the network layer of the OSI model. In order to communicate with a host on another network,
an IP host must be configured with a route to the destination network. If a configuration route is
not found, the host uses the gateway (default IP router) to transmit the traffic to the destination
host. The default t gateway is where the IP sends packets that are destined for remote networks.
If no default gateway is specified, communication is limited to the local network. Gateway
receive data from a network using one type of protocol stack, removes that protocol stack and
repackages it with the protocol stack that the other network can use.

A gateway is a network point that acts as an entrance to another network. E-mail gateways-for
example, a gateway that receives Simple Mail Transfer Protocol (SMTP) e-mail, translates it into a
standard X.400 format, and forwards it to its destination.

Networking Models

 Client-Server Model

A client-server network is designed for end-users, called clients, to access resources such as files,
songs, video collections, or some other service from a central computer called a server. A server's
sole purpose is to do what its name implies - serve its clients!
The type of computing system, in which one powerful workstation serves the requests of other
systems, is an example of client server technology.

Once the server has fulfilled the client's request, the connection is terminated. Your Web browser is
a client program that has requested a service from a server; in fact, the service and resource the
server provided is the delivery of this Web page.
Fig: Client-Server Networking Model Fig: Peer-to-Peer Networking Model

• It is also known as centralized computing.


• In this type of system, multiple computers are joined to one powerful mainframe computer.
• The server or mainframe computer has huge storage and processing capabilities.
• The computers that are connected to the mainframe or server are called Clients or Nodes.
• These nodes are not connected to each other; they are only connected to server.

 Peer-to-Peer Network Model (P2P)

In its simplest form, a peer-to-peer (P2P) network is created when two or more PCs are connected
and share resources without going through a separate server computer.
Peer-to-peer networks are quite common in small offices that do not use a dedicated file server. All
client versions of Windows, Mac and Linux can function as nodes in a peer-to-peer network and
allow their files to be shared.
It is easy to install and so is the configuration of computers on this network. P2P is more reliable as
central dependency is eliminated. Failure of one peer doesn’t affect the functioning of other peers.
In case of Client –Server network, if server goes down whole network gets affected. The over-all cost
of building and maintaining this type of network is comparatively very less.
In this network, the whole system is decentralized thus it is difficult to administer. Security in this
system is very less viruses, spywares, Trojans, etc. Malwares can easily transmit over this P-2-P
architecture.
Peer-to-peer (P2P) is a decentralized communications model in which each party has the same
capabilities and either party can initiate a communication session. Unlike the client/server model, in
which the client makes a service request and the server fulfills the request, the P2P network model
allows each node to function as both a client and server.

Protocols and Standards in Computer Networking

A protocol is a set of rules which define:

 How to establish communication between the machines


 The format of any data which is to be exchanged between the machines
 How errors in the data will be detected
 How errors will be corrected
 Methods of compressing the data to transmit it faster and more efficiently
 How the connection between the machines is to be terminated

Network standards are also ground rules that are set by commissions so that hardware is compatible
among similar computers and assures interoperability. This is done to ensure that backwards
compatibility and compatibility from vendor to vendor. It is necessary to have standards because if
each company had its own protocol standards and didn't allow it to talk with other protocols there
would be a lack of communication from different machines and would result in one company being
hugely successful and the other running out of business due to lack of being able to communicate
with other machines.

 Connection Oriented Protocols

These protocols require that a logical connection be established between two devices before
transferring data. This is generally accomplished by following a specific set of rules that specify how
a connection should be initiated, negotiated, managed and eventually terminated. Usually one
device begins by sending a request to open a connection, and the other responds. They pass control
information to determine if and how the connection should be set up. If this is successful, data is
sent between the devices. When they are finished, the connection is broken.

The process is much like a telephone call, where a virtual circuit is established--the caller must know
the person's telephone number and the phone must be answered--before the message can be
delivered. TCP is an example of a connection-oriented protocol.

Implementation of connection oriented service

For connection-oriented service, we need a virtual-circuit subnet. The idea behind virtual circuits
is to avoid having to choose a new route for every packet sent.
Instead, when a connection is established, a route from the source machine to the destination
machine is chosen as part of the connection setup and stored in tables inside the routers. That
route is used for all traffic flowing over the connection, exactly the same way that the telephone
system works.
When the connection is released, the virtual circuit is also terminated. With connection-oriented
service, each packet carries an identifier telling which virtual circuit it belongs to.
As an example, consider the situation of Figure. Here, host H1 has established connection 1 with
host H2.
 Connection less Protocols

Connectionless protocols, in contrast, allow data to be exchanged without setting up a link between
processes. These protocols do not establish a connection between devices. As soon as a device has
data to send to another, it just sends it. Each unit of data, with all the necessary information to route
it to the intended destination, is transferred independent of other data packets and can travel over
different paths to reach the final destination. Some data packets might be lost in transmission or
might arrive out of sequence to other data packets.
UDP is a connectionless protocol. It is known as a datagram protocol because it is analogous to
sending a letter where you don't acknowledge receipt.

Implementation of Connectionless Service

Two different organizations are possible, depending on the type of service offered. If
connectionless service is offered, packets are injected into the subnet individually and routed
independently of each other. No advance setup is needed.
In this context, the packets are frequently called datagrams (in analogy with telegrams) and the
subnet is called a datagram subnet. If connection-oriented service is used, a path from the
source router to the destination router must be established before any data packets can be sent.
This connection is called a VC (virtual circuit), in analogy with the physical circuits set up by the
telephone system, and the subnet is called a virtual-circuit subnet.

Comparison of Virtual-Circuit and Datagram subnets


Computer networks that provide connection-oriented service are called Virtual Circuits while those
providing connection-less service are called as Datagram networks. For prior knowledge, the
Internet which we use is actually based on Datagram network (connection-less) at the network level
as all packets from a source to a destination do not follow the same path.
Both Virtual Circuits and Datagram Networks are the type of connection services which are used for
transmission of information from sender to receiver.

Virtual – Circuit Network

Datagram network
Introduction to LAN Standard and architecture

LAN or a Local Area Network is a type of connectivity for the devices located in a specific
geographical area. It is classified into four types based on the distribution method followed in the
LAN network.

Classification of LAN

LANs are classified as below according to the methods used for sharing data:

1. Ethernet

 It is a network protocol that controls how data is transferred over a local area network.
 In this type of LAN, the user is able to transfer data at a rate of more than 10 megabits per
second.
 Firstly, the system checks the medium used for the transfer of data; if the medium is
available, then only the data transmission is done.
 It is used in wired local area networks.
 When a machine or machines want to communicate with each other on a network, they
detect the main wire connecting all the devices which will be used to carry the data. If the
main wire, which is referred to as the carrier, is available and free, which means no other
machine on the network is transmitting any data, then the sender machine initiates sending
the packets of data on the network.
 Whenever a packet is transmitted, the sender has to wait if there is already a data packet in
the queue. After that, all the devices on the network check that packet to see if they are the
recipients of that packet. The actual recipient then receives the packet.

2. Token Ring

 It is a type of local area network in which all devices are connected in a ring arrangement.
 All the devices are connected in a circle, and they receive a token as per their requirements.
A token keeps on rotating in the circular ring.
 A token is used to avoid collisions of data. It is of 3 bytes and keeps on traveling in the ring of
servers or workstations.

The details of three 1-byte fields of a free token frame are:


1. Starting Delimiter (SD): It signals the beginning of the token frame.
2. Access Control (AC): Contains the priority field, reservation field, a token bit, and a monitor
bit.
3. Ending Delimiter (ED): It refers to the end of the token frame.

 A station can send data frames only if it has a token. After the data frame is received
successfully, the tokens are made free or released.
 The computers are connected by a ring or also called as a star topology.
 The token is passed over the physical ring, which is formed by the circular arrangement of
stations and the coaxial cable network.
 In this type of LAN, it is possible to calculate the maximum time for a token to reach a station.
 It was developed to solve a collision problem, i.e. when two stations transmit simultaneously at
the same time.
 A newer version called Fast Token Ring has been developed, which can transfer data up to a rate
of 100Mbps.
4. Token Bus

 This is also a type of Local Area Network developed by IBM.


 Token Bus standard uses copper cables which are coaxial for connecting multiple devices to
the main large computers or workstations. The coaxial cable acts as the common
communication bus.
 In this protocol, also a token is created by this protocol to manage access for
communication.
 Any computer that holds the token can transfer the data. The token is released when the
station completes its data transmission or when a higher priority device needs to transmit
(such as the mainframe).
 Due to the token freeing mechanism, there is no collision, i.e. two or more devices can easily
transmit information on the bus at the same time, and the transmitted data is also saved
from being destroying.
 It is similar to the token-ring network, but the difference is that the ends of the network do
not meet each other to form a ring. But the network gets terminated at both ends.
 In this protocol, the token or a small message which circulates among the devices of a
computer network is passed along the virtual ring of stations connected to a LAN.
 The topology which is used is a bus or tree type that connects the stations.
 Each and every device is aware of the address of its preceding and succeeding device to
transmit token to.
 Data transmission cannot be performed without a token.
 In this type of LAN topology, it is not possible to calculate the time for the token transfer.
The working procedure of this token bus is the same as the token ring topology.
 These are used for industrial purposes like manufacturing etc.

5. Fiber Distributed Data Interface (FDDI)

 It is a LAN standard used for data transmission via optical media.


 Used for long-distance networks.
 Uses optical fiber and copper cable.
 It provides communication with fiber optic cables up to 200 kilometers at a speed of 100
Mbps.
 FDDI has two token rings, primary and secondary communication rings. One ring is for
backup in the case when the primary one fails.
 The primary ring works, and the second one remains free and is available for backup.
 It is extended to FDDI-2 for long-distance voice and multimedia communication.
 It is used for huge and fast data transfer, such as in voice and video conferences, online
lectures, news, etc.
 It was displaced by fast Ethernet, which is cheaper and has a faster data transfer rate.
 It is used in a large geographical scenario with thousands of end-users.

Media Access Control

A media access control is a network data transfer policy that determines how data is transmitted
between two computer terminals through a network cable. The media access control policy involves
sub-layers of the data link layer 2 in the OSI reference model.
MAC Layer in the OSI Model

The Open System Interconnections (OSI) model is a layered networking framework that
conceptualizes how communications should be done between heterogeneous systems. The data link
layer is the second lowest layer. It is divided into two sub layers −
 The logical link control (LLC) sub layer
 The medium access control (MAC) sub layer

Functions of MAC Layer


 It provides an abstraction of the physical layer to the LLC and upper layers of the OSI
network.
 It is responsible for encapsulating frames so that they are suitable for transmission via the
physical medium.
 It resolves the addressing of source station as well as the destination station, or groups of
destination stations.
 It performs multiple access resolutions when more than one data frame is to be transmitted.
It determines the channel access methods for transmission.
 It also performs collision resolution and initiating retransmission in case of collisions.
 It generates the frame check sequences and thus contributes to protection against
transmission errors.

MAC Addresses

MAC address or media access control address is a unique identifier allotted to a network interface
controller (NIC) of a device. It is used as a network address for data transmission within a network
segment like Ethernet, Wi-Fi, and Bluetooth.
MAC address is assigned to a network adapter at the time of manufacturing. It is hardwired or hard-
coded in the network interface card (NIC). A MAC address comprises of six groups of two
hexadecimal digits, separated by hyphens, colons, or no separators. An example of a MAC address is
00:0A:89:5B:F0:11.
All devices on the same network subnet have different MAC addresses. MAC addresses are very
useful in diagnosing network issues, such as problems with IP addresses.
MAC addresses are useful for network diagnosis because they never change, as opposed to a
dynamic IP address, which can change from time to time. For a network administrator, that makes a
MAC address a more reliable way to identify senders and receivers of data on the network.
PPJ| COMPUTER NETWORK |CTC

Computer Networks

Introduction to physical Layer

The physical layer is the actual cable, fibers, cards, switches, and other mechanical and electrical
equipment that make up a network. This is the layer that transforms digital data into signals that can be
sent down a wire to transmit data. These signals are often electrical but, as in the case of fiber optics, they
can also be non-electrical signals such as optics or any other type of pulse that can be digitally encoded.
It activates, maintain and deactivate the physical connection. Voltages and data rates needed for
transmission is defined in the physical layer. It converts the digital bits into electrical signal.

The lowest layer of the OSI Reference Model is layer 1, the physical layer. The physical layer is special
compared to the other layers of the model, because it is the only one where data is physically moved
across the network interface. The following are the main responsibilities or design issues of the physical
layer in the OSI Reference Model:

➢ Definition of Hardware Specifications: The details of operation of cables, connectors, wireless


radio transceivers, network interface cards and other hardware devices are generally a function
of the physical layer (although also partially the data link layer).

➢ Encoding and Signaling: The physical layer is responsible for various encoding and signaling
functions that transform the data from bits that reside within a computer or other device into
signals that can be sent over the network.

➢ Data Transmission and Reception: After encoding the data appropriately, the physical layer
actually transmits the data, and of course, receives it. Note that this applies equally to wired and
wireless networks, even if there is no tangible cable in a wireless network.

➢ Topology and Physical Network Design: The physical layer is also considered the domain of many
hardware-related network design issues, such as LAN and WAN topology.

Line Coding
The process for converting digital data into digital signal is said to be Line Coding. Digital data is found in
binary format. It is represented (stored) internally as series of 1s and 0s.
ER. PRAKASH POUDEL 1
PPJ| COMPUTER NETWORK |CTC

Digital signal is denoted by discreet signal, which represents digital data. There are three types of line
coding schemes available:

Uni-polar Encoding

Unipolar encoding schemes use single voltage level to represent data. In this case, to represent binary 1,
high voltage is transmitted and to represent 0, no voltage is transmitted. It is also called Unipolar-Non-
return-to-zero, because there is no rest condition i.e. it either represents 1 or 0.

Polar Encoding

Polar encoding scheme uses multiple voltage levels to


represent binary values. Polar encodings is available in four
types:

1. Polar Non-Return to Zero (Polar NRZ)

It uses two different voltage levels to represent


binary values. Generally, positive voltage represents
1 and negative value represents 0. It is also NRZ
because there is no rest condition.
NRZ scheme has two variants: NRZ-L and NRZ-I.

NRZ-L changes voltage level at when a different bit is encountered whereas NRZ-I change voltage
when a 1 is encountered.
ER. PRAKASH POUDEL 2
PPJ| COMPUTER NETWORK |CTC

2. Return to Zero (RZ)

Problem with NRZ is that the receiver cannot conclude when a bit ended and when the next bit is
started, in case when sender and receiver’s clock are not synchronized.

RZ uses three voltage levels, positive voltage to represent 1, negative voltage to represent 0 and
zero voltage for none. Signals change during bits not between bits.

3. Manchester
This encoding scheme is a combination of RZ and NRZ-L. Bit time is divided into two halves. It
transits in the middle of the bit and changes phase when a different bit is encountered.

4. Differential Manchester
This encoding scheme is a combination of RZ and NRZ-I. It also transit at the middle of the bit but
changes phase only when 1 is encountered.

Bipolar Encoding

Bipolar encoding uses three voltage levels, positive, negative and zero. Zero voltage represents binary 0
and bit 1 is represented by altering positive and negative voltages.

Block Coding

To ensure accuracy of the received data frame redundant bits are used. For example, in even-parity, one
parity bit is added to make the count of 1s in the frame even. This way the original number of bits is
increased. It is called Block Coding.
Block coding is represented by slash notation, mB/nB. Means, m-bit block is substituted with n-bit block
where n > m. Block coding involves three steps:
• Division,
• Substitution

ER. PRAKASH POUDEL 3


PPJ| COMPUTER NETWORK |CTC

• Combination.
• After block coding is done, it is line coded for transmission.

What is bandwidth?

Bandwidth refers to the range of component


frequencies that is contained in a signal. If the
minimum and maximum components of frequencies
that occur in a modulated signal are and ,
then the bandwidth is given by .

When the bandwidth is larger, a larger number of


frequencies can be represented by a signal. For digital
devices, the bandwidth is usually expressed in bits per
second (bps) or bytes per second. For analog devices,
the bandwidth is expressed in cycles per second, or
Hertz (Hz). For instance, AM radio signals which have a
bandwidth of 9-10 kHz fail to transmit higher frequencies of sound that FM radios, having bandwidths of
100-200 kHz, can transmit without a problem.

Frequency

For an oscillating or varying current, frequency is


the number of complete cycles per second in
alternating current direction. The standard unit of
frequency is the hertz (Hz).
If a current completes one cycle per second, then
the frequency is 1 Hz.

Bandwidth and data rate

Bandwidth and data rate belongs to the world of Internet connections, basically from web hosting, and
used to determine the amount of data being transferred (bit) in a given time, normally in a second. In
network communication and system, both have different meaning and purposes, which makes them
different from each other. Scroll down for the brief introduction of bandwidth and data rate so that next
time you can choose the best option for your web hosting and network system.

Bandwidth

In communications, bandwidth is the difference between highest and lowest of the frequency range used
for signaling. It is measured in Hertz (Hz). Bandwidth has the same meaning also in electronics, signal
processing, and optics.

ER. PRAKASH POUDEL 4


PPJ| COMPUTER NETWORK |CTC

If talk about computing, then it means how much amount or bits of data can be transferred in a time
period, normally in one second. For example, if the bandwidth of an Internet connection is 1 MB then it
means it can transfer the 1 MB amount of data within one second. It is measured in hertz, bps, kbps and
mbps. Mbps, kbps or bps are used for digital devices while hertz is used for analog devices.

• Signal Bandwidth – the bandwidth of the transmitted signal or the range of frequencies present
in the signal, as constrained by the transmitter.
• Channel Bandwidth – the range of signal bandwidths allowed by a communication channel
without significant loss of energy (attenuation).
• Channel Capacity or Maximum Data rate – the maximum rate (in bps) at which data can be
transmitted over a given communication link, or channel.

Bandwidth is a wider term, which is basically associated with the computer networking and digital
technologies and measures the bit rate of communication resources available or consumed. It was used
firstly in analog tools for submission of radio transmission and electromagnetic signals. If talk about
computing, then it means how much amount or bits of data can be transferred in a time period, normally
in one second. For example, if the bandwidth of an Internet connection is 1 MB, then it means it can
transfer the 1 MB amount of data within one second. It is measured in hertz, bps, kbps and mbps. Mbps,
kbps or bps are used for digital devices while hertz is used for analog devices.

Data Rate

Data rate is the term associated with the rate of data transferred between two or more computing and
telecommunication devices or systems. It describes how much binary digits or bits can be transferred in a
given time, normally in one second. Mostly data transferred rate is measured in Mbps. Data rate depends
upon the bandwidth of Internet connection. If the bandwidth rate is high, data rate will be also high and
vice versa.

Difference

After summarizing the discussion, following differences arises between bandwidth and data rate.

➢ Hz, bps, kbps and Mbps are used for the measurement of bandwidth while in data rate; Mbps is
used as a basic measurement unit.
➢ In a network connection, bandwidth is always higher than data rate because data rate depends
upon how much bandwidth is available for transmission.
➢ In case of website hosting, increase in visitor strengths increases the bandwidth speed of server
while on the other hand data transfer rate decreases.
➢ Bandwidth is a wider term than data rate. Bandwidth is associated with how much amount of
speed is available to you and data rate is associated with transfer of data.

Bit Rate and Baud Rate

Bit rate is measured as number of data bits transmitted / second in communication channel. Baud rate is
measured as number of times a signal state is changed in a communication channel.
One change of state can transmit one bit or less than one bit which depends on modulation technique
used. The bit and baud rate have the connection:

ER. PRAKASH POUDEL 5


PPJ| COMPUTER NETWORK |CTC

bps = baud / second x the number of bits / per baud

Bit rate and baud rate are not always the same. The bit rate is the number of bits transmitted per second,
whereas, the baud rate is the number of signal units transmitted per second and one signal unit is able to
represent one or more bits. Therefore, baud rate is always less than or equal to the bit rate but never
greater.
Because symbols are comprised of bits, the baud rate will equal the bit rate only when there is just one
bit per symbol.

Baud → How many times a signal changes per second


Bit rate → how many bits can be sent per time unit. (Usually per second)
Bitrate is controlled by baud and number of signal levels

Example 1

What is the bit rate and baud rate for an analogue signal that carries 3 bits in each signal unit if 2000
signal units are sent per second?
Answer: Baud rate = 2000 baud per second, Bit rate = 2000 x 3 = 6000 bps

Example 2

What is the baud rate for an analogue signal if the bit rate of the signal is 2000 and each signal unit
carries 4 bits?
Answer: Baud rate = 2000 / 4 = 500 baud

Propagation and Transmission Time


In terms of networking, a packet can be defined as a unit of data that moves from source to destination.
Data delivered across computer networks such as the Internet is separated into packets. The computer
or device that receives them recombines these packets.

The transmission delay is the amount of time required for the router to push out the packet. The
propagation delay, is the time it takes a bit to propagate from one router to the next. then if denote the
distance between two routers d and denote the propagation speed s, the propagation delay will be d/s.
Denote the length of the packet by L bits, and denote the transmission rate of the link from router A to
router B by R bits/sec. For example, for a 10 Mbps Ethernet link, the rate is R = 10 Mbps; for a 100 Mbps
Ethernet link, the rate is R = 100 Mbps. The transmission delay is L/R.
ER. PRAKASH POUDEL 6
PPJ| COMPUTER NETWORK |CTC

Data Link Layer: Data link layer synchronizes the information which is to be transmitted over the data.
Error controlling is easily done. The encoded data are then passed to physical. Error detection bits are
used by the data link on layer. It also corrects the errors. Outgoing messages are assembled into frames.
Then the system waits for the acknowledgements to be received after the transmission. It is reliable to
send message. This layer has two sub-layers, the Logical Link Control Layer and the Media Access Control
Layer.

Data Link Layer is second layer of OSI Layered Model. This layer is one of the most complicated layers and
has complex functionalities and liabilities. Data link layer hides the details of underlying hardware and
represents itself to upper layer as the medium to communicate.
The Data Link Layer is the second layer in the OSI model, above the Physical Layer, which ensures that the
error free data is transferred between the adjacent nodes in the network. It breaks the datagrams passed
down by above layers and converts them into frames ready for transfer.

Data link layer has two sub-layers:

➢ Logical Link Control: It deals with protocols, flow-control, and error control
➢ Media Access Control: It deals with actual control of media

Functionality of Data-link Layer

Data link layer does many tasks on behalf of upper layer. These are some services provided by data link
layer.

1. Framing
Data-link layer takes packets from Network Layer and encapsulates them into Frames. Then, it sends
each frame bit-by-bit on the hardware. At receiver’ end, data link layer picks up signals from
hardware and assembles them into frames.
2. Addressing
Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is assumed to
be unique on the link. It is encoded into hardware at the time of manufacturing.

3. Synchronization
When data frames are sent on the link, both machines must be synchronized in order to transfer to
take place.

4. Error Control

ER. PRAKASH POUDEL 7


PPJ| COMPUTER NETWORK |CTC

Sometimes signals may have encountered problem in transition and the bits are flipped. These
errors are detected and attempted to recover actual data bits. It also provides error reporting
mechanism to the sender.

5. Flow Control
Stations on same link may have different speed or capacity. Data-link layer ensures flow control
that enables both machines to exchange data on same speed.

6. Multi-Access
When host on the shared link tries to transfer the data, it has a high probability of collision. Data-
link layer provides mechanism such as CSMA/CD to equip capability of accessing a shared media
among multiple Systems.

What is framing?

In networking, a frame is a unit of data. A frame works to help identify data packets used in networking
and telecommunications structures. One way to define frames in networking is that the frame is a primary
data unit within Level 2, or the data link layer of the OSI model. By contrast, Level 3, or the networking
layer of the OSI model uses the packet as a primary data unit.

Since the physical layer merely accepts and transmits a stream of bits without any regard to meaning or
structure, it is up to the data link layer to create and recognize frame boundaries. This can be
accomplished by attaching special bit patterns to the beginning and end of the frame. If these bit patterns
can accidentally occur in data, special care must be taken to make sure these patterns are not incorrectly
interpreted as frame delimiters. The four framing methods that are widely used are:

1. Character count
2. Starting and ending characters, with character stuffing
3. Starting and ending flags, with bit stuffing
4. Physical layer coding violations

What is the difference between a packet and a frame?

A packet refers to the encapsulated unit created at the network layer of the OSI model. One of the
most commonly encountered packets is the IP packet, which contains control information such as the
source and destination IP addresses, differentiated services flags and so on. Thus, a packet typically
contains logical address information.

ER. PRAKASH POUDEL 8


PPJ| COMPUTER NETWORK |CTC

A frame, on the other hand, refers to the encapsulated unit created at the data link layer. One of the
most commonly encountered frames is the Ethernet frame, which contains information such as
source and destination MAC addresses etc. Thus, a frame typically contains physical address
information.

It is worth noting that a packet is encapsulated within a frame and hence the packet would always
form the data part of the frame. For a transmitting host, data is first encapsulated within the packet,
which is further encapsulated in a frame. This is then sent out over the physical layer as a bit stream.
For a receiving host, the physical bit stream is picked up, translated into a frame and the frame
headers are stripped off (de-capsulated), thereby retrieving the packet, which is then further de-
capsulated to retrieve higher layer information.

Error Detection and Correction

In networking, error detection refers to the techniques used to detect noise or other impairments
introduced into data while it is transmitted from source to destination. Error detection ensures reliable
delivery of data across vulnerable networks. Error detection minimizes the probability of passing incorrect
frames to the destination, known as undetected error probability.

There are many reasons such as noise, cross-talk etc., which may help data to get corrupted during
transmission. The upper layers work on some generalized view of network architecture and are not aware
of actual hardware data processing. Hence, the upper layers expect error-free transmission between the
systems. Most of the applications would not function expectedly if they receive erroneous data.
Applications such as voice and video may not be that affected and with some errors they may still function
well.

Data-link layer uses some error control mechanism to ensure that frames (data bit streams) are
transmitted with certain level of accuracy. But to understand how errors is controlled, it is essential to
know what types of errors may occur.

Types of Errors

There may be three types of errors:

1. Single bit error: In a frame, there is only one bit, anywhere though, which is corrupt.

2. Multiple bits error: Frame is received with more than one bits in corrupted state.

3. Burst error: Frame contains more than1 consecutive bits corrupted.

ER. PRAKASH POUDEL 9


PPJ| COMPUTER NETWORK |CTC

Error control mechanism may involve two possible ways:

1. Error detection
2. Error correction

Error Detection

Error detection is the process of detecting the error during the transmission between the sender and the
receiver. Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy
Check (CRC). In both cases, few extra bits are sent along with actual data to confirm that bits received at
other end are same as they were sent. If the counter-check at receiver’ end fails, the bits are considered
corrupted.
Types of error detection
1. Parity checking
2. Cyclic Redundancy Check (CRC)
3. Checksum

Error Correction

In the digital world, error correction can be done in two ways:

➢ Backward Error Correction: When the receiver detects an error in the data received, it requests
back the sender to retransmit the data unit. In many cases, the request is implicit; the receiver
sends an acknowledgement (ACK) of correctly received data, and the transmitter re-sends
anything not acknowledged within a reasonable period of time. This mechanism is also called
Automatic Repeat Request (ARQ).

➢ Forward Error Correction: When the receiver detects some error in the data received, it executes
error-correcting code, which helps it to auto-recover and to correct some kinds of errors.

The first one, Backward Error Correction, is simple and can only be efficiently used where retransmitting
is not expensive; for example, fiber optics. But in case of wireless transmission retransmitting may cost
too much. In the latter case, Forward Error Correction is used.

Flow Control

Flow control is the management of data flow between computers or devices or between nodes in a
network so that the data can be handled at an efficient pace. Too much data arriving before a device can
handle it causes data overflow, meaning the data is either lost or must be retransmitted. Flow Control is
one important design issue for the Data Link Layer that controls the flow of data between sender and
receiver.

ER. PRAKASH POUDEL 10


PPJ| COMPUTER NETWORK |CTC

In Communication, there is communication medium between sender and receiver. When Sender sends
data to receiver than there can be problem in below case: Sender sends data at higher rate and receiver
is too sluggish to support that data rate.
To solve the above problem, FLOW CONTROL is introduced in Data Link Layer. It also works on several
higher layers. The main concept of Flow Control is to introduce EFFICIENCY in Computer Networks.

Networks of any size have many different devices connected and each device has unique data
transmission parameters. For instance, a router is built to manage the routing of data whereas a desktop,
at the receiving end of that data, has far less sending/receiving abilities.
These differences sending/receiving abilities may lead to conflict if the sender starts transmitting data
faster than the receiving node’s ability. To counteract this problem, flow control is used. This technique
manages the flow of data between nodes, keeping the sending/receiving capabilities of both nodes as the
primary concern.

Xon-Xoff is an example of a flow control protocol that sync the sender with the receiver. It transmits an
off signal when the receiver no longer has space in its buffer and transmits on signal when the receiver
can resume taking data. Xon-Xoff works on asynchronous serial connections.

Consider a situation in which the sender transmits frames faster than the receiver can accept them. If the
sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped
and will start losing some frames. To prevent this situation two approaches are used they are:

a. Feedback based Flow control: In this approach the receiver sends back information to the sender
giving it permission to send more or at least telling the sender how the receiver is doing. This
method is used in data link layer.
b. Rate based flow control: In this approach the protocol has a built-in mechanism that limits the
rate at which sender may transmits data, without using feedback from the receiver. The protocol
contains well defined rules about when a sender may transmit the next frame. These rules often
prohibit frames from being sent until the receiver has granted permission, either implicitly or
explicitly for ex: when a connection is setup the receiver might say “you may send me a frame,
but after they have been sent, don’t send anymore, until I have told you to continue”. This method
is used in network layer.

Network is responsible for transmission of data from one device to another device. The end to end
transfer of data from a transmitting application to a receiving application involves many steps, each
subject to error. With the error control process, we can be confident that the transmitted and received
data are identical. Data can be corrupted during transmission. For reliable communication, error must be
detected and corrected.
When data-frame is transmitted, there is a probability that data-frame may be lost in the transit or it is
received corrupted. In both cases, the receiver does not receive the correct data-frame and sender does
not know anything about any loss. In such case, both sender and receiver are equipped with some
protocols which help them to detect transit errors such as loss of data-frame. Hence, either the sender
retransmits the data-frame or the receiver may request to resend the previous data-frame.
Requirements for error control mechanism:

1. Error detection - The sender and receiver, either both or any, must ascertain that there is some
error in the transit.

ER. PRAKASH POUDEL 11


PPJ| COMPUTER NETWORK |CTC

2. Positive ACK - When the receiver receives a correct frame, it should acknowledge it.
3. Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it sends a NACK
back to the sender and the sender must retransmit the correct frame.

4. Retransmission: - The sender maintains a clock and sets a timeout period. If an acknowledgement
of a data-frame previously transmitted does not arrive before the timeout the sender retransmits
the frame, thinking that the frame or its acknowledgement is lost in transit.

Key Differences between Flow Control and Error Control

1. Flow control is to monitor the proper transmission of data from sender to receiver. On the other
hand, Error Control monitors the error-free delivery of data from sender to receiver.
2. Flow control can be achieved by the Feedback-based flow control and rate-based flow control
approach whereas, to detect the error the approaches used are Parity checking, Cyclic
Redundancy Code (CRC) and checksum and to correct the error the approaches used are Hamming
code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes.
3. Flow control prevents the receiver’s buffer from overrunning and also prevents the loss of data.
On the other hand, Error control detects and corrects error occurred in the data.

HDLC (High-Level Data Link Control)


High-Level Data Link Control (HDLC) is a bit-oriented code-transparent synchronous data link layer
protocol developed by the International Organization for Standardization (ISO).
HDLC provides both connection-oriented and connectionless service.
HDLC can be used for point-to-multipoint connections via the original master-slave modes Normal
Response Mode (NRM) and Asynchronous Response Mode (ARM), but they are now rarely used; it is now
used almost exclusively to connect one device to another, using Asynchronous Balanced Mode (ABM).

In HDLC, data is organized into a unit (called a frame) and sent across a network to a destination that
verifies its successful arrival. The HDLC protocol also manages the flow or pacing at which data is sent.
HDLC is one of the most commonly used internet protocols (IP) in what is Layer 2 of the industry
communication reference model called Open Systems Interconnection (OSI).
Layer 1 is the detailed physical level that generates and receives the electronic signals.
Layer 3 is the higher level that has knowledge about the network, including access to router tables that
indicate where to forward or send data.
On sending, programming in Layer 3 creates a frame that usually contains source and destination network
addresses. HDLC (Layer 2) encapsulates the Layer 3 frames, adding data link control information to a new,
larger frame.

Transfer Modes in HDLC

The HDLC protocol offers two modes of transfer that mainly can be used in different
configurations. These are as follows:
1. Normal Response Mode(NRM)

ER. PRAKASH POUDEL 12


PPJ| COMPUTER NETWORK |CTC

2. Asynchronous Balance Mode (ABM)

Let us now discuss both these modes one by one:

Normal Response Mode (NRM)

In this mode, the configuration of the station is unbalanced. There are one primary station and
multiple secondary stations. Where the primary station can send the commands and the
secondary station can only respond.
This mode is used for both point-to-point as well as multiple-point links.

Asynchronous Balance Mode (ABM)


In this mode, the configuration of the station is balanced. In this mode, the link is point-to-point,
and each station can function as a primary and as secondary.
Asynchronous Balance mode (ABM) is a commonly used mode today.

HDLC Frames

In order to provide the flexibility that is necessary to support all the options possible in the modes
and Configurations that are just described above. There are three types of frames defined in the
HDLC:
➢ Information Frames(I-frames) These frames are used to transport the user data and the
control information that is related to the user data. If the first bit of the control field is 0
then it is identified as I-frame.

➢ Supervisory Frames(S-frames) These frames are only used to transport the control
information. If the first two bits of the control field are 1 and 0 then the frame is identified
as S-frame

➢ Unnumbered Frames(U-Frames) These frames are mainly reserved for system


management. These frames are used for exchanging control information between the
communicating devices.

Each type of frame mainly serves as an envelope for the transmission of a different type of
message.

ER. PRAKASH POUDEL 13


PPJ| COMPUTER NETWORK |CTC

Features of HDLC Protocol


Given below are some of the features of the HDLC protocol:
1. This protocol uses bits to stuff flags occurring in the data.
2. This protocol is used for point-to-point as well as multipoint link access.
3. HDLC is one of the most common protocols of the data link layer.
4. HDLC is a bit-oriented protocol.
5. This protocol implements error control as well as flow control.

PPP (Point to Point Protocol)


Point - to - Point Protocol (PPP) is a communication protocol of the data link layer that is used to transmit
multiprotocol data between two directly connected (point-to-point) computers. It is a byte - oriented
protocol that is widely used in broadband communications having heavy loads and high speeds. Since it is
a data link layer protocol, data is transmitted in frames. It is also known as RFC 1661.

Services Provided by PPP


The main services provided by Point - to - Point Protocol are −
• Defining the frame format of the data to be transmitted.
• Defining the procedure of establishing link between two points and exchange of data.
• Stating the method of encapsulation of network layer data in the frame.
• Stating authentication rules of the communicating devices.
• Providing address for network communication.
• Providing connections over multiple links.
• Supporting a variety of network layer protocols by providing a range os services.

Components of PPP

Point - to - Point Protocol is a layered protocol having three components –


➢ Encapsulation Component − It encapsulates the datagram so that it can be transmitted over the
specified physical layer.
➢ Link Control Protocol (LCP) − It is responsible for establishing, configuring, testing, maintaining
and terminating links for transmission. It also imparts negotiation for set up of options and use
of features by the two endpoints of the links.
➢ Authentication Protocols (AP) − These protocols authenticate endpoints for use of services. The
two authentication protocols of PPP are −
• Password Authentication Protocol (PAP)
• Challenge Handshake Authentication Protocol (CHAP)

➢ Network Control Protocols (NCPs) − These protocols are used for negotiating the parameters
and facilities for the network layer. For every higher-layer protocol supported by PPP, one NCP is
there. Some of the NCPs of PPP are −
• Internet Protocol Control Protocol (IPCP)
• OSI Network Layer Control Protocol (OSINLCP)
• Internetwork Packet Exchange Control Protocol (IPXCP)
• DECnet Phase IV Control Protocol (DNCP)

ER. PRAKASH POUDEL 14


PPJ| COMPUTER NETWORK |CTC

• NetBIOS Frames Control Protocol (NBFCP)


• IPv6 Control Protocol (IPV6CP)

PPP Frame
PPP is a byte - oriented protocol where each field of the frame is composed of one or more bytes. The
fields of a PPP frame are −
• Flag − 1 byte that marks the beginning and the end of the frame. The bit pattern of the flag is
01111110.
• Address − 1 byte which is set to 11111111 in case of broadcast.
• Control − 1 byte set to a constant value of 11000000.
• Protocol − 1 or 2 bytes that define the type of data contained in the payload field.
• Payload − This carries the data from the network layer. The maximum length of the payload
field is 1500 bytes. However, this may be negotiated between the endpoints of communication.
• FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code used
is CRC (cyclic redundancy code)

Services Not provided by the PPP protocol

• It does not support flow control mechanism.


• It has a very simple error control mechanism.
• As PPP provides point-to-point communication, so it lacks addressing mechanism to handle
frames in multipoint configuration.

_________________________________________________________________________________

ER. PRAKASH POUDEL 15


CTC_DCOM_CN

Internetworking
Internetworking is the process or technique of connecting different networks by using intermediary
devices such as routers or gateway devices.
Internetworking ensures data communication among networks owned and operated by different
entities using a common data communication and the Internet Routing Protocol. The Internet is the
largest pool of networks geographically located throughout the world but these networks are
interconnected using the same protocol stack, TCP/IP. Internetworking is only possible when the all
the connected networks use the same protocol stack or communication methodologies.

Internetworking is a term used by Cisco. Any interconnection among or between public, private,
commercial, industrial, or governmental computer networks may also be defined as an internetwork
or “Internetworking “.
In modern practice, the interconnected computer networks or Internetworking use the Internet
Protocol. Two architectural models are commonly used to describe the protocols and methods used
in internetworking. The standard reference model for internetworking is Open Systems
Interconnection (OSI).

Network Layer Design Issues

1. Store-and-Forward Packet Switching


2. Services Provided to the Transport Layer
3. Implementation of Connectionless Service
4. Implementation of connection-oriented service
5. Comparison of Virtual-Circuit and Datagram subnets

IPV4 Address

For IP version 4, each TCP/IP host is identified by a logical IP address. The IP address is a Network layer
address and has no dependence on the Data-Link layer address (such as a MAC address of a network
adapter). A unique IP address is required for each host and network component that communicates
using TCP/IP and can be assigned manually or by using Dynamic Host Configuration
Protocol (DHCP).
The IP address identifies a system’s location on the network in the same way a street address identifies
a house on a city block. Just as a street address must identify a unique residence, an IP address must
be globally unique to the internetwork and have a uniform format.

Each IP address includes a network ID and a host ID.


The network ID (also known as a network address) identifies the systems that are located on

ER. PRAKASH POUDEL JIGYASU 1


CTC_DCOM_CN

the same physical network bounded by IP routers. All systems on the same physical network must
have the same network ID. The network ID must be unique to the internetwork.
The host ID (also known as a host address) identifies a workstation, server, router, or other TCP/IP
host within a network. The host address must be unique to the network ID.

IPv4 Address Syntax

An IP address consists of 32 bits. Instead of expressing IPv4 addresses 32 bits at a time using binary
notation (Base2), it is standard practice to segment the 32 bits of an IPv4 address into four 8-bit fields
called octets. Each octet is converted to a decimal number (base 10) from 0–255 and separated by a
period (a dot). This format is called dotted decimal notation. The following table provides an example
of an IP address in binary and dotted decimal formats.

For example, the IPv4 address of 11000000101010000000001100011000 is:


➢ Segmented into 8-bit blocks: 11000000 10101000 00000011 00011000.
➢ Each block is converted to decimal: 192 168 3 24
➢ The adjacent octets are separated by a period: 192.168.3.24.

ER. PRAKASH POUDEL JIGYASU 2


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 3


CTC_DCOM_CN

Public IP Address

Public IP address is assigned to every computer that connects to the Internet where each IP is unique.
In this case, there cannot exist two computers with the same public IP address all over the Internet.
This addressing scheme makes it possible for the computers to “find each other” online and exchange
information. User has no control over the IP address (public) that is assigned to the computer. The
public IP address is assigned to the computer by the Internet Service Provider as soon as the computer
is connected to the Internet gateway.
A public IP address can be either static or dynamic. A static public IP address does not change and is
used primarily for hosting web pages or services on the Internet. On the other hand, a dynamic public
IP address is chosen from a pool of available addresses and changes each time one connects to the
Internet.

ER. PRAKASH POUDEL JIGYASU 4


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 5


CTC_DCOM_CN

Subnetting allows us to create multiple logical networks that exist within a single Class A, B, or C
network. If we do not subnet, we are only able to use one network from your Class A, B, or C network,
which is unrealistic.

ER. PRAKASH POUDEL JIGYASU 6


CTC_DCOM_CN

Sample Exercise

ER. PRAKASH POUDEL JIGYASU 7


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 8


CTC_DCOM_CN

Internet Protocol Version 6 (IPv6)


IPv6 (Internet Protocol version 6) is a set of specifications from the Internet Engineering Task Force
(IETF) that's essentially an upgrade of IP version 4 (IPv4). The basics of IPv6 are similar to those of IPv4
-- devices can use IPv6 as source and destination addresses to pass packets over a network, and tools
like ping work for network testing as they do in IPv4, with some slight variations.

The most obvious improvement in IPv6 over IPv4 is that IP addresses are lengthened from 32 bits to
128 bits. This extension anticipates considerable future growth of the Internet and provides relief for
what was perceived as an impending shortage of network addresses. IPv6 also supports auto-
configuration to help correct most of the shortcomings in version 4, and it has integrated security and
mobility features.

Pv6 features include:

✓ Supports source and destination addresses that are 128 bits (16 bytes) long.
✓ No more NAT (Network Address Translation)
✓ Auto-configuration
✓ No more private address collisions
✓ Better multicast routing
✓ Simpler header format, Simplified, more efficient routing
✓ Built-in authentication and privacy support
✓ Flexible options and extensions
✓ Requires IPsec support.
✓ Uses Flow Label field to identify packet flow for QoS handling by router.
✓ Allows the host to send fragments packets but not routers.
✓ Doesn't include a checksum in the header.
✓ Uses a link-local scope all-nodes multicast address.
✓ Does not require manual configuration or DHCP.
✓ Uses host address (AAAA) resource records in DNS to map host names to IPv6 addresses.
✓ Uses pointer (PTR) resource records in the IP6.ARPA DNS domain to map IPv6 addresses to
host names.
✓ Supports a 1280-byte packet size (without fragmentation).
✓ Uses Multicast Listener Discovery (MLD) messages to manage membership in local subnet
Groups.
✓ Uses ICMPv6 Router Solicitation and Router Advertisement messages to determine the IP
address of the best default gateway.

ER. PRAKASH POUDEL JIGYASU 9


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 10


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 11


CTC_DCOM_CN

ER. PRAKASH POUDEL JIGYASU 12


CTC_DCOM_CN

Routing
Routing is the process of selecting best paths in a network. A simple definition of routing is "learning
how to get from here to there". The main function of the network layer is routing packets from source
to machine to the destination machine.
The algorithms that choose the routes and the data structures that they use are a major area of
network layer design. The routing algorithm is that part of the network layer software responsible for
deciding which output line an incoming packet should be transmitted on. If the subnet uses datagrams
internally, this decision must be made a new for every arriving data packet since the best route may
have changed since last time. If the subnet uses virtual circuits internally, the routing decision is made

ER. PRAKASH POUDEL JIGYASU 13


CTC_DCOM_CN

only when a new virtual circuit is being set up. Thereafter, data packets just follow the previously
established route. The latter case is sometimes called session routing because a route remains in force
for an entire user session.
One can think of a router as having two processes inside it. One of the handles each packet as it arrives,
looking up the outgoing line to use for it in the routing tables. This process is forwarding. The other
process is responsible for filling in and updating the routing tables. That is where the routing algorithm
comes into play.
Regardless of whether routes are chosen independently for each packet or only when new
connections are established certain properties are desirable in a routing algorithm: correctness,
simplicity, robustness, stability, fairness and optimality.
Correctness and simplicity hardly require comment but the need for robustness may be less obvious
at first. Once a major network comes on the air, it may be expected to run continuously for years
without system wide failures. Stability is also an important goal for the routing algorithm. There exist
routing algorithms that never converge to equilibrium, no matter how long they run. A stable
algorithm reaches equilibrium and stays there.
Routing algorithm can be grouped into two major classes: Non-adaptive and adaptive. Non-adaptive
algorithms do not base their routing decision on measurements or estimates of the current traffic and
topology.
Adaptive algorithms, in contrast, change their routing decisions to reflect changes in the topology, and
usually the traffic as well.

Static Routing
A static routing table is created, maintained, and updated by a network administrator, manually. A
static route to every network must be configured on every router for full connectivity. This provides a
granular level of control over routing and is completely manageable on smaller networks. However,
static routing is not fault-tolerant, as any change to the routing infrastructure (such as a link going
down, or a new network added) requires manual intervention. Routers operating in a purely static
environment cannot seamlessly choose a better route if a link becomes unavailable, because no
information is intelligently shared between routers.

Advantages of Static Routing


• Minimal CPU/Memory overhead
• No bandwidth overhead (updates are not shared between routers)
• Granular control on how traffic is routed
Disadvantages of Static Routing
• Infrastructure changes must be manually adjusted
• No “dynamic” fault tolerance if a link goes down
• Impractical on large network

Dynamic Routing

Dynamic routing protocols are the applications which discover network destinations dynamically.
Routers will communicate the adjacent routers which informs the network to which each router is
connected. Dynamic routing protocols are supported by software applications running on the routing
device (the router) which dynamically learn network destinations and how to get to them and also
advertise those destinations to other routers. This advertisement function allows all the routers to
learn about all the destination networks that exist and how to use those networks. Router using
dynamic routing will 'learn' the routes to all networks that are directly connected to the device. Next,
the router will learn routes from other routers that run the same routing protocol.

ER. PRAKASH POUDEL JIGYASU 14


CTC_DCOM_CN

Advantages of Dynamic Routing


• Simpler to configure on larger networks
• Will dynamically choose a different (or better) route if a link goes down
• Ability to load balance between multiple links

Disadvantages of Dynamic Routing


• Updates are shared between routers, thus consuming bandwidth
• Routing protocols put additional load on router CPU/RAM
• The choice of the “best route” is in the hands of the routing protocol, and not the
network administrator

Routing Algorithm
The main function of the network layer is routing packets from the source machine to the destination
machine. In most subnets, packets will require multiple hops to make the journey. The only notable
exception is for broadcast networks, but even here routing is an issue if the source and destination
are not on the same network.
The algorithms that choose the routes and the data structures that they use are a major area of
network layer design. The routing algorithm is that part of the network layer software responsible for
deciding which output line an incoming packet should be transmitted on.
If the subnet uses datagrams internally, this decision must be made a new for every arriving data
packet since the best route may have changed since last time. If the subnet uses virtual circuits
internally, routing decisions are made only when a new virtual circuit is being set up.

Shortest Path Routing Algorithm

Links between routers have a cost associated with them. In general, it could be a function of distance,
bandwidth, average traffic, communication cost, mean queue length, measured delay, router
processing speed, etc.
The shortest path algorithm just finds the least expensive path through the network, based on the
cost function.

_________________________________________________________________________________

ER. PRAKASH POUDEL JIGYASU 15


CTC_DCOM_CN

Transport Layer
In the Open Systems Interconnection (OSI) communications model, the Transport layer ensures the
reliable arrival of messages and provides error checking mechanisms and data flow controls. The
Transport layer provides services for both "connection-mode" transmissions and for "connectionless-
mode" transmissions. For connection-mode transmissions, a transmission may be sent or arrive in the
form of packets that need to be reconstructed into a complete message at the other end.
The transport layer is the layer in the open system interconnection (OSI) model responsible for end
to-end communication over a network. It provides logical communication between application
processes running on different hosts within a layered architecture of protocols and other network
components. The transport layer is also responsible for the management of error correction, providing
quality and reliability to the end user. This layer enables the host to send and receive error corrected
data, packets or messages over a network and is the network component that allows multiplexing.

Congestion Control

When too many packets are sent to a subnet more than its capacity, the Situation that arises is called
congestion.
Reasons for Congestion:
1. If input packets coming from 3 or 4 lines, requires only one particular output line.
2. If routers are supplied with infinite amount of memory, packets take longtime to reach to the
front of queue where duplicates are generated as they are timed out.
3. Slow processors cause congestion.
4. Low bandwidth lines also cause congestion.
5. Congestion feeds upon itself and cause congestion.

Congestion Control Algorithms

These algorithms control congestion. These are mainly divided into two groups:
1. Open Loop Solutions.
2. Closed Loop Solutions.
3.

ER. PRAKASH POUDEL JIGYASU 1


CTC_DCOM_CN

Open Loop Solutions attempt to solve the problems by good design to make sure it does not occur
in the first place. Once the system is up and running, mid-course corrections are not made.

Closed Loop Solutions are based on the concepts of a feedback loop. It has 3 parts.
1. Monitor the system to detest when and where congestion occurs.
2. Pass this information to places where action can be taken.
3. Adjust system operation to correct the problem.

These closed loop algorithms are further divided into two categories:
Implicit feedback: The source reduces the congestion existence by making local observations.
Explicit feedback: Packets are sent back from the point of congestion to warn source

Congestion prevention policies


Congestion is prevented using appropriate policies at various levels.

The Leaky Bucket Algorithm


The leaky bucket algorithm is a method of temporarily storing a variable number of requests and
organizing them into a set-rate output of packets in an asynchronous transfer mode (ATM) network.
The leaky bucket is used to implement traffic policing and traffic shaping in Ethernet and cellular data
networks. The algorithm can also be used to control metered-bandwidth Internet connections to
prevent going over the allotted bandwidth for a month, thereby avoiding extra charges.

Imagine a bucket with a small hole in the bottom. No matter, at what rate water enters the bucket,
the outflow is at a constant rate, ‘p’, when there is any water in the bucket and ‘r’, when the bucket
is empty. Also, once the bucket is full, any additional water entering it spills over the sides and is lost.
The same idea can be applied to packets. Conceptually, each host is connected to the network by an
interface containing a leaky bucket, i.e., a finite internal queue. If a packet arrives at the queue when
it is full, it is discarded. In other words, if one or more processes within the host try to send a packet
when the maximum number is already queued, the new packet is unceremoniously discarded. This
arrangement can be built into the h/w inter face or simulated by the host operating system. It was
first proposed by TURNER and is called the “LEAKY BUCKET ALGORITHM”.

ER. PRAKASH POUDEL JIGYASU 2


CTC_DCOM_CN

The host is allowed to put one packet per clock tick onto the network, which turns an uneven flow of
packets from the user processes inside the host into an even flow of packets onto the network,
smoothing out bursts and greatly reducing the chances of congestion.

The Token Bucket Algorithm


The token bucket is an algorithm used in packet switched computer networks and
telecommunications networks. It can be used to check that data transmissions, in the form of packets,
conform to defined limits on bandwidth and burstiness (a measure of the unevenness or variations in
the traffic flow). It can also be used as a scheduling algorithm to determine the timing of transmissions
that will comply with the limits set for the bandwidth and burstiness.

The algorithm that allows the output to speedup when large bursts arrive and one that never loses
data is the TOKEN BUCKET ALGORITHM. In this algorithm, the leaky bucket holds tokens, generated
by a clock at the rate of one token every ∆T sec. This algorithm allows to save up permission by hosts,
up to the maximum size of the bucket, ‘n’ i.e., bursts of up to ‘n’ packets can be sent at once, allowing
some burstiness in output stream and giving faster response to sudden bursts of input.

In the above circuit, we see a bucket holding 3 tokens, with 5 packets waiting to be transmitted. For
a packet to be transmitted, it must be capture and destroy one token. In the above example, 3 out of
5 packets have gotten through by capturing the 3 tokens in the bucket, but the other 2 are struck
waiting for 2 more tokens to be generated. The implementation of the token bucket algorithm is just
a variable that counts tokens. The counter is incremented by 1, every ∆T and decremented by 1,
when a packet is sent. When the counter hits ‘0’, no packets may be sent.

ER. PRAKASH POUDEL JIGYASU 3


CTC_DCOM_CN

The major advantage of the token bucket algorithm is that it throws away tokens instead of packets,
when the bucket fills up.

Flow Control
Flow control is the management of data flow between computers or devices or between nodes in a
network so that the data can be handled at an efficient pace. Too much data arriving before a device
can handle it causes data overflow, meaning the data is either lost or must be retransmitted. Flow
Control is one important design issue for the Data Link Layer that controls the flow of data between
sender and receiver.
In Communication, there is communication medium between sender and receiver. When Sender
sends data to receiver than there can be problem in below case: Sender sends data at higher rate and
receiver is too sluggish to support that data rate.
To solve the above problem, FLOW CONTROL is introduced in Data Link Layer. It also works on several
higher layers. The main concept of Flow Control is to introduce EFFICIENCY in Computer Networks.
Networks of any size have many different devices connected and each device has unique data
transmission parameters. For instance, a router is built to manage the routing of data whereas a
desktop, at the receiving end of that data, has far less sending/receiving abilities. These differences
sending/receiving abilities may lead to conflict if the sender starts transmitting data faster than the
receiving node’s ability. To counteract this problem, flow control is used. This technique manages the
flow of data between nodes, keeping the sending/receiving capabilities of both nodes as the primary
concern.
Xon-Xoff is an example of a flow control protocol that sync the sender with the receiver. It transmits
an off signal when the receiver no longer has space in its buffer and transmits on signal when the
receiver can resume taking data. Xon-Xoff works on asynchronous serial connections. Consider a
situation in which the sender transmits frames faster than the receiver can accept them. If the sender
keeps pumping out frames at high rate, at some point the receiver will be completely swamped and
will start losing some frames. To prevent this situation two approaches are used they
are:
a) Feedback based Flow control: In this approach the receiver sends back information to the
sender giving it permission to send more or at least telling the sender how the receiver is
doing. This method is used in data link layer.
b) Rate based flow control: In this approach the protocol has a built-in mechanism that limits
the rate at which sender may transmits data, without using feedback from the receiver. The
protocol contains well defined rules about when a sender may transmit the next frame.

These rules often prohibit frames from being sent until the receiver has granted permission, either
implicitly or explicitly for ex: when a connection is setup the receiver might say “you may send me a
ER. PRAKASH POUDEL JIGYASU 4
CTC_DCOM_CN

frame, but after they have been sent, don’t send anymore, until I have told you to continue”. This
method is used in network layer.

Quality of Service (QoS)


Quality of service (QoS) refers to any technology that manages data traffic to reduce packet
loss, latency and jitter on a network. QoS controls and manages network resources by setting
priorities for specific types of data on the network.

Need for QoS –


• Video and audio conferencing require bounded delay and loss rate.
• Video and audio streaming requires bounded packet loss rate, it may not be so sensitive to
delay.
• Time-critical applications (real-time control) in which bounded delay is considered to be an
important factor.
• Valuable applications should be provided better services than less valuable applications.

QoS Specification –

QoS requirements can be specified as:


✓ Delay
✓ Delay Variation (Jitter)
✓ Throughput
✓ Error Rate

QoS is an overall performance measure of the computer network.

Important flow characteristics of the QoS are given below:


1. Reliability
If a packet gets lost or acknowledgement is not received (at sender), the re-transmission of
data will be needed. This decreases the reliability. The importance of the reliability can differ
according to the application.
For example:
E- mail and file transfer need to have a reliable transmission as compared to that of an audio
conferencing.
2. Delay
Delay of a message from source to destination is a very important characteristic. However,
delay can be tolerated differently by the different applications.
For example:
The time delay cannot be tolerated in audio conferencing (needs a minimum time delay),
while the time delay in the e-mail or file transfer has less importance.
3. Jitter
The jitter is the variation in the packet delay.
If the difference between delays is large, then it is called as high jitter. On the contrary, if the
difference between delays is small, it is known as low jitter.
Example:
Case1: If 3 packets are sent at times 0, 1, 2 and received at 10, 11, 12. Here, the delay is same
for all packets and it is acceptable for the telephonic conversation.
Case2: If 3 packets 0, 1, 2 are sent and received at 31, 34, 39, so the delay is different for all

ER. PRAKASH POUDEL JIGYASU 5


CTC_DCOM_CN

packets. In this case, the time delay is not acceptable for the telephonic conversation.

4. Bandwidth
Different applications need the different bandwidth.
For example:
Video conferencing needs more bandwidth in comparison to that of sending an e-mail.

TCP (Transmission Control Protocol)


Transmission control protocol (TCP) is a network communication protocol designed to send data
packets over the Internet. TCP is a transport layer protocol in the OSI layer and is used to create a
connection between remote computers by transporting and ensuring the delivery of messages over
supporting networks and the Internet.

Transmission Control Protocol is one of the most used protocols in digital network communications
and is part of the Internet protocol suite, commonly known as the TCP/IP suite. Primarily, TCP ensures
end-to-end delivery of data between distinct nodes. TCP works in collaboration with Internet Protocol,
which defines the logical location of the remote node, whereas TCP transports and ensures that the
data is delivered to the correct destination.

Before transmitting data, TCP creates a connection between the source and destination node and
keeps it live until the communication is active. TCP breaks large data into smaller packets and also
ensures that the data integrity is intact once it is reassembled at the destination node.

UDP (User Datagram Protocol)


The User Datagram Protocol (UDP) is simplest Transport Layer communication protocol available of
the TCP/IP protocol suite. It involves minimum amount of communication mechanism. UDP is said to
be an unreliable transport protocol but it uses IP services which provides best effort delivery
mechanism. In UDP, the receiver does not generate an acknowledgement of packet received and in
turn, the sender does not wait for any acknowledgement of packet sent. This shortcoming makes this
protocol unreliable as well as easier on processing.

✓ UDP is used when acknowledgement of data does not hold any significance.
✓ UDP is good protocol for data flowing in one direction.
✓ UDP is simple and suitable for query-based communications.
✓ UDP is not connection oriented.
✓ UDP does not provide congestion control mechanism.
✓ UDP does not guarantee ordered delivery of data.
✓ UDP is stateless.
✓ UDP is suitable protocol for streaming applications such as VoIP, multimedia streaming.

Here are few applications where UDP is used to transmit data:


✓ Domain Name Services
✓ Simple Network Management Protocol
✓ Trivial File Transfer Protocol
✓ Routing Information Protocol
✓ Kerberos

ER. PRAKASH POUDEL JIGYASU 6


CTC_DCOM_CN

KEY DIFFERENCES:

✓ TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol.


✓ The speed for TCP is slower while the speed of UDP is faster
✓ TCP uses handshake protocol like SYN, SYN-ACK, ACK while UDP uses no handshake protocols
✓ TCP does error checking and also makes error recovery, on the other hand, UDP performs
error checking, but it discards erroneous packets.
✓ TCP has acknowledgment segments, but UDP does not have any acknowledgment segment.
✓ When we compare TCP vs UDP protocol, TCP is heavy-weight, and UDP is lightweight.

Application Layer
The Application Layer is the seventh layer of the seven-layer OSI model. Application layer interface
directly interacts with the application and provides common web application services. The application
layer also makes a request to the presentation layer. Application layer is the highest level of open
systems, providing services directly for the application process.

The Application Layer is at the top level of the OSI model. It is permissible by this layer to the software
or user to get access to the network.

✓ It provides interfaces and support for services such as electronic mail, remote file access, and
transfer, shared database management, directory services, network resources, etc. and other
types of distributed information services also.
✓ In numerous ways manipulation of data (information) is done in this layer.
✓ The Application Layer contains a variety of protocols that are commonly required by users. A
widely-used application protocol is HTTP (Hypertext Transfer Protocol), which is the basis for
the World Wide Web (WWW).
✓ When a browser requests a web page, it sends the name of the page it wants to the server
using HTTP. The server then fulfills the request by sending the page back.
✓ The application layer uses More than 15 protocols, including File Transfer Protocol, Telnet,
Trivial File Transfer Protocol, and Simple Network Management Protocol, etc.

ER. PRAKASH POUDEL JIGYASU 7


CTC_DCOM_CN

Design Issues with Application Layer

In the design and implementation of Application Layer protocols occurring problems and these
problems can be addressed by patterns from several different pattern languages:
• Design (pattern) Language for Application-level Communication Protocols
• Service Design Patterns
• Enterprise Application Architecture's Patterns
• Pattern-Oriented Software Architecture

Functionalities of the Application layer

Specific functionalities of the Application layer are as follows:


1. Network Virtual terminal
The application layer is the software version of a physical terminal and this layer permitted
to a user to log on to a remote host.
For this, an application creates a software emulation of a terminal at the remote host. By
this user's computer can communicate with the software terminal, which in turn,
communicates with the host.
It is shown that the remote host is communicating with one of its terminals, so it allows the
user to log on.

2. File Transfer, Access, and Management (FTAM)


An application permits a user to access files in a remote computer, to retrieve files from a
computer and to manage files on a remote computer.
FTAM is concerned with a hierarchical virtual file in terms of file attributes, file structure and
the types of operations performed on the files and their attributes.

3. Addressing
To achieve communication between client and server system, there is a need for addressing.
When a request is sent from the client side to the server side, this request contains the
server address and its own address.
The server answered to the client request, this request contains the destination address, i.e.,
client address. DNS is used to achieve this type of addressing.

4. Mail Services
Email forwarding and storage of e-mails provided by an application layer.

5. Directory Services
A distributed database is contained by an application that provides access for global
information about various objects and services.

6. Authentication
It provides authentication to occur between devices for an extra layer of security and it
authenticates the sender or receiver's message or both

SMTP

• SMTP stands for Simple Mail Transfer Protocol.


• SMTP is a set of communication guidelines that allow software to transmit an electronic mail
over the internet is called Simple Mail Transfer Protocol.
• It is a program used for sending messages to other computer users based on e-mail addresses.
ER. PRAKASH POUDEL JIGYASU 8
CTC_DCOM_CN

• It provides a mail exchange between users on the same or different computers, and it also
supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
• The main purpose of SMTP is used to set up communication rules between servers. The
servers have a way of identifying themselves and announcing what kind of communication
they are trying to perform. They also have a way of handling the errors such as incorrect email
address. For example, if the recipient address is wrong, then receiving server reply with an
error message of some kind.

Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail message using
a Mail User Agent (MUA). Submission of Mail: After composing an email, the mail client then
submits the completed e-mail to the SMTP server by using SMTP on TCP port 25.
2. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and domain
name. For example, [email protected], where "Vivek" is the username of the recipient and
"gmail.com" is the domain name.
3. Receipt and Processing of Mail: Once the incoming message is received, the exchange
server delivers it to the incoming server (Mail Delivery Agent) which stores the e-mail where
it waits for the user to retrieve it.
4. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA (Mail
User Agent). MUA can be accessed by using login and password.

FTP

• FTP stands for File transfer protocol.


• FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from
one host to another.
• It is mainly used for transferring the web page files from their creator to the computer that
acts as a server for other computers on the internet.
• It is also used for downloading the files to computer from other servers.

Objectives of FTP

• It provides the sharing of files.

ER. PRAKASH POUDEL JIGYASU 9


CTC_DCOM_CN

• It is used to encourage the use of remote computers.


• It transfers the data more reliably and efficiently.

Why FTP?
Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file conventions. Two
systems may have different ways to represent text and data. Two systems may have different
directory structures. FTP protocol overcomes these problems by establishing two connections
between hosts. One connection is used for data transfer, and another connection is used for the
control connection.

Advantages of FTP:

• Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way to
transfer the files from one computer to another computer.
• Efficient: It is more efficient as we do not need to complete all the operations to get the
entire file.
• Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
• Back & forth movement: FTP allows us to transfer the files back and forth. Suppose you are
a manager of the company, you send some information to all the employees, and they all
send information back on the same server.

Key Points
➢ File transfer protocol is a way to download, upload, and transfer files from one location to
another on the internet and between computer systems.
➢ 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.
➢ FTP is an essential tool for those who build and maintain websites.
➢ Many FTP clients are free to download, although most websites already have the FTP built-
in.

DHCP (Dynamic Host Configuration Protocol)


Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an
Internet Protocol (IP) host with its IP address and other related configuration information such as the
subnet mask and default gateway. RFCs 2131 and 2132 define DHCP as an Internet Engineering Task
Force (IETF) standard based on Bootstrap Protocol (BOOTP), a protocol with which DHCP shares many
implementation details. DHCP allows hosts to obtain required TCP/IP configuration information from
a DHCP server.

Advantages – The advantages of using DHCP include:


• Centralized administration of IP
• Dynamic host configuration
• Seamless IP host configuration
• Flexibility and scalability

The DHCP protocol gives the network administrator a method to configure the network from a
centralized area.
With the help of DHCP, easy handling of new users and reuse of IP address can be achieved.

ER. PRAKASH POUDEL JIGYASU 10


CTC_DCOM_CN

Disadvantages – Disadvantage of using DHCP is:


• IP conflict can occur
• Security Risk

When a DHCP client wants to connect to a network, a four-step process is initiated.


The client starts this process by sending a broadcast message, also known as DHCP Discover message
using its own MAC address and an IPv4 broadcast address of 0.0.0.0 0.0.0.0 to discover any available
DHCPv4 server.

1. PC-A boots up and needs an IP address. It sends a DHCPv4 Discover broadcast message to the
network to locate a DHCPv4 server. Because PC-A has no valid IPv4 information at boot-up, it
uses its MAC (Media Access Control) address and default IP broadcast of 0.0.0.0 0.0.0.0
to communicate with a DHCPv4 server.
2. When the DHCPv4 server receives the DHCPv4 Discover message from PC-A, it reserves any
available IPv4 address for PC-A. It then sends a DHCPv4 Offer message back to the client,
informing the client about its willingness to lease out an IP address.
3. PC-A can receive more than one DHCPv4 offer message from various servers. Being a client,
PC-A uses DHCPv4 Request to select which DHCP server’s offer is found suitable and is willing
to accept.
4. The server sends the DHCPv4 Acknowledgment message upon receiving the DHCPv4 request
message from PC-A to verify the lease information and an ICMP ping is issued to that address
by PC-A to ensure that it is not already in use by another client.

Components of DHCP

When working with DHCP, it is important to understand all of the components. Following are the list
of components:
1. DHCP Server: DHCP server is a networked device running the DCHP service that holds IP
addresses and related configuration information. This is typically a server or a router but could
be anything that acts as a host, such as an SD-WAN appliance.
2. DHCP client: DHCP client is the endpoint that receives configuration information from a DHCP
server. This can be any device like computer, laptop, IoT endpoint or anything else that
requires connectivity to the network. Most of the devices are configured to receive DHCP
information by default.
3. IP address pool: IP address pool is the range of addresses that are available to DHCP clients.
IP addresses are typically handed out sequentially from lowest to the highest.
4. Subnet: Subnet is the partitioned segments of the IP networks. Subnet is used to keep
networks manageable.
5. Lease: Lease is the length of time for which a DHCP client holds the IP address information.
When a lease expires, the client has to renew it.

ER. PRAKASH POUDEL JIGYASU 11


CTC_DCOM_CN

6. DHCP relay: A host or router that listens for client messages being broadcast on that network
and then forwards them to a configured server. The server then sends responses back to the
relay agent that passes them along to the client. DHCP relay can be used to centralize DHCP
servers instead of having a server on each subnet.

DNS (Domain Name System)


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).
The Domain Name System resolves the names of internet sites with their underlying IP addresses
adding efficiency and even security in the process.

The Domain Name System (DNS) is one of the foundations of the internet, yet most people outside of
networking probably don’t realize they use it every day to do their jobs, check their email or waste
time on their smartphones.

Here is a simple way to understand how DNS works in four steps.


Suppose you want to visit our site at www.wpbeginner.com.
1. You open your browser and type www.wpbeginner.com in the address bar and hit Enter on
the keyboard. Immediately there is a quick check to see if you have visited our website
previously.
If the DNS records are found in your computer’s DNS cache, then the rest of the DNS lookup
is skipped and you will be taken directly to www.wpbeginner.com.
2. If no DNS records are found, then a query is sent to your local DNS server. Typically, this is
your Internet provider’s server and is often called a “resolving nameserver”.
3. If the records are not cached on the resolving nameserver, then the request is forwarded to
what’s called a “root nameserver” to locate the DNS records. Root nameservers are

ER. PRAKASH POUDEL JIGYASU 12


CTC_DCOM_CN

designated servers around the world that are responsible for storing DNS data and keeping
the system working smoothly. Once the DNS record is found on the root nameserver, it’s
cached by your computer.
4. Now that the DNS records are located, a connection to the server where the website is stored
will be opened and www.wpbeginner.com will be displayed on your screen.

DNS provides the following functions:

• Server: Configures DNS servers and default domain names for the security appliance.
• Proxy: The security appliance acts as a DNS proxy server and provides proxy service for the
connected PCs and other clients. Besides, the security appliance can also choose different
DNS servers according to domain names.
• Resolver: Sets retry times and timeout for DNS service.
• Cache: Stores DNS mappings to cache to speed up query. You can create, edit and delete
DNS mappings.
• NBT Cache: Displays NBT cache information.

There are 13 root name servers that have information for the generic top-level domains like com, net,
org, biz, edu or country specific domains like uk, nl, de, be, au, ca, and such.
A top-level domain, or TLD, is the most general part of the domain. The top-level domain is the furthest
portion to the right (as separated by a dot). Common top-level domains are “com”, “net”, “org”, “gov”,
“edu”, and “io”.
Top-level domains are at the top of the hierarchy in terms of domain names. Certain parties are given
management control over top-level domains by ICANN (Internet Corporation for Assigned Names and
Numbers). These parties can then distribute domain names under the TLD, usually through a domain
registrar.

HTTP (Hypertext Transfer Protocol)


Hypertext Transfer Protocol. It's the communication protocol you use when you browse the web. t a
fundamental level, when you visit a website, your browser makes an HTTP request to a server. Then
that server responds with a resource (an image, video, or the HTML of a web page) - which your
browser then displays for you.
This is HTTP's message-based model. Every HTTP interaction includes a request and a response.
By its nature, HTTP is stateless.

Stateless means that all requests are separate from each other. So each request from your browser
must contain enough information on its own for the server to fulfill the request. That also means that
each transaction of the message-based model of HTTP is processed separately from the others.

HTTP is a protocol which allows the fetching of resources, such as HTML documents. It is the
foundation of any data exchange on the Web and it is a client-server protocol, which means requests
are initiated by the recipient, usually the Web browser. A complete document is reconstructed from
the different sub-documents fetched, for instance text, layout description, images, videos, scripts, and
more.

ER. PRAKASH POUDEL JIGYASU 13


CTC_DCOM_CN

In reality, there are more computers between a browser and the server handling the request: there
are routers, modems, and more. Thanks to the layered design of the Web, these are hidden in the
network and transport layers. HTTP is on top, at the application layer. Although important to diagnose
network problems, the underlying layers are mostly irrelevant to the description of HTTP.

Like most of the Internet protocols http it is a command and response text-based protocol using a
client server communications model.

This means:
• All requests originate at the client (your browser)
• The server responds to a request.
• The requests(commands) and responses are in readable text.
• The requests are independent of each other and the server doesn’t need to track the
requests.

The HTTP has a simple mechanism for requesting Web content. There is a set of standard HTTP
commands that are issued by the Client after a connection has been successfully established on the
TCP well-known port 80 (port 443 for HTTPS). The following shows some of the basic HTTP commands:

• GET resource HTTP/1.1 Get the specified resource


• POST resource HTTP/1.1 Get the specified resource and pass attached input to the HTTP
Server
• HEAD resource HTTP/1.1 Treated like a GET but not content is returned by the HTTP Server
• PUT resource HTTP/1.1 Place resource on HTTP Server
• DELETE resource HTTP/1.1 Delete resource on the Server

The HTTP Server utilizes the same well-known TCP port 80 (443 for HTTPS) to send Client command
responses. Once the HTTP Server processes the Client command, it returns an ASCII response string
that includes a 3-digit numeric status code. The numeric response is used by the HTTP Client software
to determine whether the operation succeeded or failed. Following is a list of various HTTP Server
responses to Client commands:

• 200 Request was successful


• 400 Request was not formed properly
• 401 Unauthorized requests, client needs to send authentication
• 404 Specified resources in request were not found
• 500 Internal HTTP Server error
• 501 Request not implemented by HTTP Server
• 502 Service is not available

ER. PRAKASH POUDEL JIGYASU 14


CTC_DCOM_CN

WWW (World Wide Web)


World Wide Web, which is also known as a Web, is a collection of websites or web pages stored in
web servers and connected to local computers through the internet. These websites contain text
pages, digital images, audios, videos, etc. Users can access the content of these sites from any part of
the world over the internet using their devices such as computers, laptops, cell phones, etc. The
WWW, along with internet, enables the retrieval and display of text and media to your device.

The building blocks of the Web are web pages which are formatted in HTML and connected by links
called "hypertext" or hyperlinks and accessed by HTTP. These links are electronic connections that link
related pieces of information so that users can access the desired information quickly. Hypertext offers
the advantage to select a word or phrase from text and thus to access other pages that provide
additional information related to that word or phrase.
A web page is given an online address called a Uniform Resource Locator (URL). A particular collection
of web pages that belong to a specific URL is called a website, e.g., www.facebook.com,
www.google.com, etc. So, the World Wide Web is like a huge electronic book whose pages are stored
on multiple servers across the world.

WWW works on client- server approach. Following steps explains how the web works:
1. User enters the URL (say, http://www.cct.edu.np) of the web page in the address bar of web
browser.
2. Then browser requests the Domain Name Server for the IP address corresponding to
www.tutorialspoint.com.
3. After receiving IP address, browser sends the request for web page to the web server using
HTTP protocol which specifies the way the browser and web server communicates.
4. Then web server receives request using HTTP protocol and checks its search for the requested
web page. If found it returns it back to the web browser and close the HTTP connection.
5. Now the web browser receives the web page, it interprets it and display the contents of web
page in web browser’s window.

Some people use the terms 'internet' and 'World Wide Web' interchangeably. They think they are the
same thing, but it is not so. Internet is entirely different from WWW. It is a worldwide network of
devices like computers, laptops, tablets, etc. It enables users to send emails to other users and chat
with them online. For example, when you send an email or chatting with someone online, you are
using the internet.
But, when you have opened a website like google.com for information, you are using the World Wide
Web; a network of servers over the internet. You request a webpage from your computer using a
browser, and the server renders that page to your browser. Your computer is called a client who runs
a program (web browser), and asks the other computer (server) for the information it needs.
The World Wide Web was invented by a British scientist, Tim Berners-Lee in 1989. He was working at
CERN at that time.

ER. PRAKASH POUDEL JIGYASU 15


CTC_DCOM_CN

CIA Triad or CIA Triangle

The CIA triad refers to an information security model made up of the three main components:
confidentiality, integrity and availability. Each component represents a fundamental objective of
information security. In order to avoid confusion, the CIA triad is sometimes referred to as the AIC
triad.
Information security teams use the CIA triad to develop security measures. The CIA triad shows the
fundamental goals that must be included in information security measures. The CIA triad serves as a
tool or guide for securing information systems and networks and related technological assets. While
a wide variety of factors determine the security situation of information systems and networks, some
factors stand out as the most significant. The assumption is that there are some factors that will always
be important in information security. These factors are the goals of the CIA triad, as follows:

1. Confidentiality
This component is closely linked with privacy. This means that data are only available to the
appropriate parties, which may be parties that require access to the data or parties that are trusted.
Data that have been kept confidential means that they have not been compromised by other parties;
confidential data are not disclosed to people who do not require them or who should not have access
to them. Encryption process supports confidentiality since it protects (if used correctly) any sensitive
information from being stolen or leakage by converting the plain text into cipher text which cannot be
read easily.

2. Integrity
Integrity involves maintaining the consistency, accuracy, and trustworthiness of data over its entire
life cycle. Data must not be changed in transit, and steps must be taken to ensure that data cannot
be altered by unauthorized people.

ER. PRAKASH POUDEL JIGYASU 1


CTC_DCOM_CN

Some data might include checksums, even cryptographic checksums, for verification of integrity.
Integrity relates to information security because accurate and consistent information is a result of
proper protection. Data integrity and system integrity are the components of integrity.

3. Availability

The CIA triad goal of availability is the situation where information is available when and where it is
rightly needed. The main concern in the CIA triad is that the information should be available when
authorized users need to access it. Availability is maintained when all components of the
information system are working properly.

Denial of service, loss of information system capabilities and equipment failures during normal use
can affect the availability of information when required. The importance of the whole CIA Triad is
equally important; however, sometimes we need to give importance to one of them or a
combination of them over the other as per the context. For example:

✓ Let’s assume we are examining proprietary information and finding priority among CIA Triad
to assign to. In this case, since it is proprietary, the priority and importance should be
Confidentiality i.e., limiting access to the underlying information itself.
✓ In another example consider the scenario of financial information in a bank which is supposed
to be protected. In this case, importance will be to protect the integrity of the underlying
information so that all the transactions hold their true value.
✓ Let’s now consider the case when some type of information is available for public
consumption. Now in this case Availability will hold the priority because that is the main
motive for this information to the public. Confidentiality will not be an issue in this since it is
available to everyone whereas Integrity holds lower priority than Availability.

Firewall
A firewall is a software utility or hardware device that acts as a filter for data entering or leaving a
network or computer. You could think of a firewall as a security guard that decides who enters or
exits a building. A firewall works by blocking or restricting network ports. Firewalls are commonly
used to help prevent unauthorized access to both company and home networks.

Software Firewalls
Software firewalls are designed to protect a computer by blocking certain programs from sending
and receiving information from a local network or the Internet. The image to the right shows the
icon for Windows Firewall, an example of a firewall software program.

Hardware Firewalls

Hardware firewalls are found on most network routers and can be configured through the router
setup screen. Hardware firewalls can be purchased as a stand-alone product.

Firewall Filtering Techniques

Firewalls are used to protect both home and corporate networks. A typical firewall program or
hardware device filters all information coming through the Internet to your network or computer
system.

ER. PRAKASH POUDEL JIGYASU 2


CTC_DCOM_CN

The firewall is the barrier between a trusted and untrusted network, often used between your LAN
and WAN. It’s typically placed in the forwarding path so that all packets have to be checked by the
firewall, where we can drop or permit them. Here’s an example:
There are several types of firewall techniques that will prevent potentially harmful information from
getting through:

Packet Filter: Looks at each packet entering or leaving the network and accepts or rejects it based on
user-defined rules. Packet filtering is fairly effective and transparent to users, but it is difficult to
configure. In addition, it is susceptible to IP spoofing.

Application Gateway: Applies security mechanisms to specific applications, such as FTP and Telnet
servers. This is very effective, but can impose performance degradation.

Circuit-level Gateway: Applies security mechanisms when a TCP or UDP connection is established.
Once the connection has been made, packets can flow between the hosts without further checking.

Proxy Server: Intercepts all messages entering and leaving the network. The proxy server effectively
hides the true network addresses.

VPN (Virtual Private Network)

Virtual Private Network (VPN) is the technology that you can use to access the office or home network
remotely and securely over the Internet, so that the communication data is protected from sniffing or
hijacking by hackers. Typically, private networks are not accessible from the Internet or other public
networks, because firewalls will block all unrequested traffic. To remotely access a private network
over Internet, we need to use technology like Virtual Private Network (VPN). When the VPN
connection is established between 2 parties (between a VPN client and VPN gateway or between 2
VPN gateways), a secured virtual tunnel will be created with capability to encrypt the data (so no
hacker can see the data content), preserve data integrity (no data change during transmission) and
ensure the communication only happen between that 2 authenticated parties.

In the Figure, host 1 and host 6 need to communicate. The connection passes in the clear between
host 1 and the local Security Gateway. From the source and destination addresses of the packet, the
Security Gateway determines that this should be an encrypted connection. If this is the first time the
connection is made, the local Security Gateway initiates an IKE negotiation with the peer Security

ER. PRAKASH POUDEL JIGYASU 3


CTC_DCOM_CN

Gateway in front of host 6. During the negotiation, both Security Gateways authenticate each other,
and agree on encryption methods and keys. After a successful IKE negotiation, a VPN tunnel is created.

After a VPN tunnel has been established:


✓ A packet leaves the source host and reaches the Security Gateway.
✓ The Security Gateway encrypts the packet.
✓ The packet goes down the VPN tunnel to the second Security Gateway. In actual fact, the
✓ packets are standard IP packets passing through the Internet. However, because the packets
✓ are encrypted, they can be considered as passing through a private "virtual" tunnel.
✓ The second Security Gateway decrypts the packet.
✓ The packet is delivered in the clear to the destination host. From the hosts' perspectives, they
are connecting directly.

Advantages of VPNs

VPNs promise two main advantages over competing approaches -- cost savings, and scalability (that
is really just a different form of cost savings).

The Low Cost of a VPN


One way a VPN lowers costs is by eliminating the need for expensive long-distance leased lines. With
VPNs, an organization needs only a relatively short dedicated connection to the service
provider. Another way VPNs reduce costs is by lessening the need for long-distance telephone charges
for remote access.

Scalability
The cost to an organization of building a dedicated private network may be reasonable at first but
increases exponentially as the organization grows. A company with two branch offices, for example,
can deploy just one dedicated line to connect the two locations, but 4 branch offices require 6 lines to
directly connect them to each other, 6 branch offices need 15 lines, and so on.
Internet based VPNs avoid this scalability problem by simply tapping into the public lines and network
capability readily available.

ER. PRAKASH POUDEL JIGYASU 4


CTC_DCOM_CN

Disadvantages of VPNs

Despite their popularity, VPNs are not perfect and limitations exist as is true for any technology.
Organizations should consider issues like the below when deploying and using virtual private
networks in their operations:
1. VPNs require an in-depth understanding of public network security issues and proper
deployment of precautions.
2. The availability and performance of an organization's wide-area VPN (over the Internet in
particular) depends on factors largely outside of their control.
3. VPN technologies from different vendors may not work well together due to immature
standards.
4. VPNs need to accommodate protocols other than IP and existing ("legacy") internal network
technology.

Cryptography

Cryptography is a method of storing and transmitting data in a particular form so that only those for
whom it is intended can read and process it.
Cryptography is derived from the Greek words: kryptos, "hidden", and graphein, "to write" – or
"hidden writing". People who study and develop cryptography are called cryptographers. The study of
how to circumvent the use of cryptography for unintended recipients is called cryptanalysis, or code-
breaking. Cryptography and cryptanalysis are sometimes grouped together under the umbrella term
cryptology.
Modern cryptography concerns itself with the following four objectives:
1. Confidentiality (the information cannot be understood by anyone for whom it was
unintended)
2. Integrity (the information cannot be altered in storage or transit between sender and
intended receiver without the alteration being detected)
3. Non-repudiation (the creator/sender of the information cannot deny at a later stage his or her
intentions in the creation or transmission of the information)
4. Authentication (the sender and receiver can confirm each other’s identity and the
origin/destination of the information)

Encryption

Encryption is the process of taking a readable plain text document or image and scrambling that
document or image to an extent that it is no longer readable. The intent of encryption is hiding and to
protect the contents of that file from improper disclosure.
The various components of a basic cryptosystem are as follows –

Plaintext. It is the data to be protected during transmission.


Encryption Algorithm. It is a mathematical process that produces a cipher text for any given
plaintext and encryption key. It is a cryptographic algorithm that takes plaintext and an encryption key
as input and produces a cipher text.
Cipher text. It is the scrambled version of the plaintext produced by the encryption algorithm using a
specific the encryption key. The cipher text is not guarded. It flows on public channel. It can be
intercepted or compromised by anyone who has access to the communication channel.
Decryption Algorithm. It is a mathematical process, that produces a unique plaintext for any given
cipher text and decryption key. It is a cryptographic algorithm that takes a cipher text and a decryption
key as input, and outputs a plaintext. The decryption algorithm essentially reverses the encryption
algorithm and is thus closely related to it.

ER. PRAKASH POUDEL JIGYASU 5


CTC_DCOM_CN

Encryption Key. It is a value that is known to the sender. The sender inputs the encryption key into
the encryption algorithm along with the plaintext in order to compute the cipher text.
Decryption Key. It is a value that is known to the receiver. The decryption key is related to the
encryption key, but is not always identical to it. The receiver inputs the decryption key into the
decryption algorithm along with the cipher text in order to compute the plaintext.

For a given cryptosystem, a collection of all possible decryption keys is called a key space. An
interceptor (an attacker) is an unauthorized entity who attempts to determine the plaintext. He can
see the cipher text and may know the decryption algorithm. He, however, must never know the
decryption key.

Types of Encryptions

There are two types of encryptions schemes as listed below:


✓ Symmetric Key encryption
✓ Public Key encryption

Symmetric Key Encryption

An encryption system in which the sender and receiver of a message share a single, common key
that is used to encrypt and decrypt the message is called Symmetric key encryption.

Symmetric key encryption algorithm uses same cryptographic keys for both encryption and
decryption of cipher text. Symmetric-key systems are simpler and faster, but their main drawback is
that the two parties must somehow exchange the key in a secure way. Symmetric encryption is also
known as private-key encryption and secure-key encryption.
The salient features of cryptosystem based on symmetric key encryption are –

ER. PRAKASH POUDEL JIGYASU 6


CTC_DCOM_CN

➢ Persons using symmetric key encryption must share a common key prior to exchange of
information.
➢ Keys are recommended to be changed regularly to prevent any attack on the system.
➢ A robust mechanism needs to exist to exchange the key between the communicating
parties. As keys are required to be changed regularly, this mechanism becomes expensive
and cumbersome.
➢ In a group of n people, to enable two-party communication between any two persons, the
number of keys required for group is n × (n – 1)/2.
➢ Length of Key (number of bits) in this encryption is smaller and hence, process of encryption-
decryption is faster than asymmetric key encryption.
➢ Processing power of computer system required to run symmetric algorithm is less.

Asymmetric Key Encryption (Public Key Encryption)

Asymmetric cryptography uses encryption that splits the key into two smaller keys. One of the keys
is made public and one is kept private. You encrypt a message with the recipient's public key. The
recipient can then decrypt it with their private key. And they can do the same for you, encrypting a
message with your public key so you can decrypt it with your private key.

Asymmetric cryptography is usually implemented by the use of one-way functions. In mathematic


terms, these are functions that are easy to compute in one direction but very difficult to compute in
reverse. This is what allows you to publish your public key, which is derived from your private key. It
is very difficult to work backwards and determine the private key.

The most important properties of public key encryption scheme are –


➢ Different keys are used for encryption and decryption. This is a property which set this scheme
different than symmetric encryption scheme.
➢ Each receiver possesses a unique decryption key, generally referred to as his private key.
➢ Receiver needs to publish an encryption key, referred to as his public key.
➢ Some assurance of the authenticity of a public key is needed in this scheme to avoid spoofing
by adversary as the receiver. Generally, this type of cryptosystem involves trusted third party
which certifies that a particular public key belongs to a specific person or entity only.
➢ Encryption algorithm is complex enough to prohibit attacker from deducing the plaintext
from the cipher text and the encryption (public) key.
Though private and public keys are related mathematically, it is not be feasible to calculate
the private key from the public key. In fact, intelligent part of any public-key cryptosystem is
in designing a relationship between two keys.

ER. PRAKASH POUDEL JIGYASU 7


CTC_DCOM_CN

Wireless Security and Mitigation

Wireless networks have become an inherent part of our life and we all use wireless networks in some
form in our day-to-day life. Of all the utilities provided by wireless networks, we use wireless networks
widely for connecting to the internet. We connect to the internet wirelessly either by router or using
mobile data and enjoy the internet on our device from anywhere in the house.
However, maintaining security of our wireless network is vitally important. The wireless network we
use is responsible for transferring and sending data like username, password, card details and other
sensitive data. If the wireless network we use is not secure then we are at risk and face undesirable
consequences.

For example – An attacker could perform following attacks if the wireless network is not secured –
1) Intercept data being transmitted or received
2) Gain access to the files and folders onto the system
3) Use your internet connection and hijack it to use your bandwidth

Following are the tools widely used for conducting various types of attacks over WIFI connection –

1) Aircrack 6) Fern WiFi Wireless 10) NetStumbler


2) AirSnort Cracker 11) Reaver
3) Kismet 7) CoWPAtty 12) Pyrit
4) Cain & Able 8) Airjack
5) Wireshark 9) WepAttack

The 7 most common wireless network threats are:

1) Configuration Problems: Misconfigurations, incomplete configurations.


2) Denial of Service: Sending large amounts of traffic (or viruses) over the network with the
intent of hijacking resources or introducing backdoors.
3) Passive Capturing: Eavesdropping within range of an access point to capture sensitive
information.
4) Rogue (or Unauthorized/Ad-Hoc) Access Points: Fool devices into connecting with a false
access point.
5) Evil Twin Attacks: Impersonating legit access points with a stronger signal to entice
authorized users to sign on.
6) Hacking of Lost or Stolen Wireless Devices: Bypassing the password to gain access.
7) Freeloading: Piggybacking on a connection or intercepting file sharing.

Mitigation techniques:
Take a deep look to protect against the threats. The mitigate techniques and methods are mainly
depends upon the type of threats. Listed below are some of the mitigation techniques:

Training and awareness


It is considered as the most convenient and comfortable form of security. User training is
considered as the least expensive and most effective mitigation techniques. It is the best way
to keep the users from making mistakes that will lead to a success of the social engineering
attack is educating how to handle them. It is important to know the procedures, protocols and
policies for the security of a network. Or else training users give a real advantage of the
relatively low cost.

ER. PRAKASH POUDEL JIGYASU 8


CTC_DCOM_CN

Patch management
When an application or an operating system is released, it is not perfect from the security
perspective. Then after the release, updates and security patches are released on the ongoing
basis, which can add to a software to make them more secure or provide it more functionality.
The windows update systems which are installed in the latest servers and clients can be
configured to install as well as download the patches automatically from the site. The windows
server update services to download the patches to servers and then test it before applying to
the bulk of the clients on the network.

Policies and procedures


The security procedures and policies must be outlined clearly in writing in the organization. It
should define acceptable behaviors on networks and organization computers. Who uses the
computers has to read the procedures and policies and also sign the form for agreeing it.

Incident response
When the intruder has enacted an attack on the network, then the first instinct gets the user
back to work regardless of what that takes. It makes a more sense in the short run, but in case
of long run it might be a wrong move. The reinstall software which is damaged by the attack,
then this re-installation may cover the track of an attacker and prevent it from prosecuting
and finding it.

________________________________________________________________________________

ER. PRAKASH POUDEL JIGYASU 9

You might also like