Computer Network - Unit 1
Computer Network - Unit 1
Introduction to Networking
A computer network is a system of interconnected computing devices that can exchange data and share
resources. These devices, called nodes, can be computers, printers, servers, or other devices capable of
sending and receiving data. Networks allow for efficient communication and resource sharing among
users.
A computer network is a collection of two or more computer systems that are linked together. A
network connection can be established using either cable or wireless media. Hardware and software
are used to connect computers and tools in any network.
Collaboration:
Networks enable teams to collaborate on projects, share documents, and work together more
effectively.
Access to Information:
Networks provide access to a vast amount of information and resources, empowering users with
knowledge and tools.
In essence, computer networks are the backbone of modern digital communication and resource
sharing, enabling a wide range of applications and services that we rely on every day.
Social Media:
Platforms like Facebook, Twitter, and Instagram rely on networks for real-time communication
and content sharing.
Video Conferencing:
Enables face-to-face communication over long distances using platforms like Zoom and
Skype.
Instant Messaging:
Provides real-time text-based communication through apps like WhatsApp and Slack.
2. Resource Sharing:
Hardware Sharing:
Allows multiple users to share printers, storage devices, and other hardware resources.
Software Sharing:
Enables centralized installation and sharing of software applications across a network.
Data Sharing:
Facilitates the exchange of files and information between users and systems.
3. Information Access:
World Wide Web: Provides access to a vast repository of information through websites and
online resources.
Remote Access: Enables users to access and control computers or resources from remote
locations.
Databases: Allows users to access and manage data stored on centralized servers.
4. Entertainment:
Online Gaming: Supports multiplayer gaming experiences over the internet.
Streaming Services: Enables access to movies, music, and other media content through
platforms like Netflix and Spotify.
Interactive Entertainment: Provides access to various online games, virtual worlds, and other
interactive entertainment options.
6. Other Applications:
Education:
Supports online learning platforms, virtual classrooms, and access to educational resources.
Transportation:
Enables traffic management, vehicle tracking, and efficient transportation systems.
Healthcare:
Supports remote patient monitoring, electronic health records, and telehealth services.
1. Network Devices
Basic hardware interconnecting network nodes, such as Network Interface Cards (NICs), Bridges,
Hubs, Switches, and Routers, are used in all networks.
2. Links
Links are the ways information travels between devices, and they can be of two types:
Wired: Communication done in a wired medium. Copper wire, twisted pair, or fiber optic cables are
all options. A wired network employs wires to link devices to the Internet or another network, such as
laptops or desktop PCs.
Wireless: Wireless means without wire, media that is made up of electromagnetic waves (EM Waves)
or infrared waves. Antennas or sensors will be present on all wireless devices. For data or voice
communication, a wireless network uses radio frequency waves rather than wires.
3. Communication Protocols
A communication protocol is a set of rules that all devices follow when they share information. Some
common protocols are TCP/IP, IEEE 802, Ethernet, wireless LAN, and cellular standards. TCP/IP is a
model that organizes how communication works in modern networks. It has four functional layers for
these communication links:
Network Access Layer: This layer controls how data is physically transferred, including how
hardware sends data through wires or fibers.
Internet Layer: This layer packages data into understandable packets and ensures it can be sent and
received.
Transport Layer: This layer keeps the communication between devices steady and reliable.
Application Layer: This layer allows high-level applications to access the network to start data
transfer.
Most of the modern internet structure is based on the TCP/IP model, although the similar seven-layer
OSI model still has a strong influence.
IEEE 802 is a group of standards for local area networks (LAN) and metropolitan area networks
(MAN). The most well-known member of the IEEE 802 family is wireless LAN, commonly known as
WLAN or Wi-Fi.
4. Network Defense
While nodes, links, and protocols are the building blocks of a network, a modern network also needs
strong defenses. Security is crucial because huge amounts of data are constantly being created, moved,
and processed. Some examples of network defense tools are firewalls, intrusion detection systems
(IDS), intrusion prevention systems (IPS), network access control (NAC), content filters, proxy
servers, anti-DDoS devices, and load balancers.
Network topology:
Network topology refers to the physical or logical arrangement of devices and connections in a
computer network. It defines how nodes, such as computers, routers, and switches, are interconnected
and how data flows between them. Understanding network topology is crucial for optimizing network
performance, troubleshooting, and ensuring efficient data transmission.
Bus Topology: All devices are connected to a single cable (the bus).
Bus Topology is a network type in which every computer and network device is connected to a
single cable. It is bi-directional. It is a multi-point connection and a non-robust topology because if
the backbone fails the topology crashes. In Bus Topology, various MAC (Media Access Control)
protocols are followed by LAN Ethernet connections like TDMA (Time Division Multiple
Access) , Pure Aloha, CDMA (Code Division Multiple Access) , Slotted Aloha, etc.
Ring Topology: Devices are connected in a closed loop, with data traveling in one direction.
In a Ring Topology, it forms a ring connecting devices with exactly two neighbouring devices. A
number of repeaters are used for Ring topology with a large number of nodes, because if someone
wants to send some data to the last node in the ring topology with 100 nodes, then the data will have
to pass through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters are used in
the network.
The data flows in one direction, i.e. it is unidirectional, but it can be made bidirectional by having 2
connections between each Network Node, it is called Dual Ring Topology. In-Ring Topology, the
Token Ring Passing protocol is used by the workstations to transmit the data.
Fig. : Ring Topology
Mesh Topology: Each device is connected to multiple other devices, providing redundancy and high
reliability.
In a mesh topology, every device is connected to another device via a particular channel. Every
device is connected to another via dedicated channels. These channels are known as links. In Mesh
Topology, the protocols used are AHCP (Ad Hoc Configuration Protocols), DHCP (Dynamic Host
Configuration Protocol), etc.
Fig. : Mesh Topology
Suppose, the N number of devices are connected with each other in a mesh topology, the total
number of ports that are required by each device is N-1. In Figure , there are 6 devices
connected to each other, hence the total number of ports required by each device is 5. The
total number of ports required = N * (N-1).
Suppose, N number of devices are connected with each other in a mesh topology, then the total
number of dedicated links required to connect them is N C 2 i.e. N(N-1)/2. In Figure, there
are 6 devices connected to each other, hence the total number of links required is 6*5/2 = 15.
The above figure shows the structure of the Hybrid topology. As seen it contains a combination of
all different types of networks.
A common example of a hybrid topology is a university campus network. The network may have a
backbone of a star topology, with each building connected to the backbone through a switch or
router. Within each building, there may be a bus or ring topology connecting the different rooms and
offices. The wireless access points also create a mesh topology for wireless devices. This hybrid
topology allows for efficient communication between different buildings while providing flexibility
and redundancy within each building.
Logical Topology:
Describes how data flows through the network, regardless of the physical layout. For example, a
network might be physically wired as a star, but logically operate as a ring.
By understanding and selecting the appropriate topology, organizations can design networks that are
efficient, reliable, and cost-effective.
Protocol Hierarchies
Generally, Computer networks are comprised of or contain a large number of hardware and software.
For network design, various networks are organized and arranged as a stack of layers of hardware
and software, one on top of another. The number, name, content, and function of each layer might
vary and can be different from one network to another. The main purpose of each layer is to provide
services to higher layers that are present. Every layer has some particular task or function. The
networks are organized and arranged as different layers or levels simply to reduce and minimize the
complexity of the design of network software.
Below is diagram representing a five-layer network. The diagram shows communication between
Host 1 and Host 2. The data stream is passed through a number of layers from one host to other.
Virtual communication is represented using dotted lines between peer layers. Physical
communication is represented using solid arrows between adjacent layers. Through physical
medium, actual communication occurs. The layers at same level are commonly known as peers. The
peer basically has a set of communication protocols. An interface is present between each of layers
that are used to explain services provided by lower layer to higher layer.
Advantages of Protocol Hierarchy
The layers generally reduce complexity of communication between networks
It increases network lifetime.
It also uses energy efficiently.
It does not require overall knowledge and understanding of network.
Transmission Media: The physical medium (e.g., copper wires, fiber optics, or wireless signals)
through which data travels.
Signal Encoding: Conversion of binary data into signals that can be transmitted over the physical
medium.
Data Rate and Bandwidth: The speed at which data can be transmitted over the medium.
Design Considerations:
Transmission Medium Selection: Choosing appropriate media based on performance needs and
distance (e.g., fiber optic vs. copper).
Error Detection and Correction: Ensuring that data frames are error-free by using checksums or
cyclic redundancy checks (CRC).
MAC Addressing: Media Access Control addresses are used to uniquely identify devices on the
local network.
Flow Control: Prevents data from being sent faster than it can be processed by the receiver.
Design Considerations:
Frame Integrity: Ensuring frames are transmitted without errors.
Medium Access Control: Mechanisms to regulate access to shared communication mediums (e.g.,
CSMA/CD in Ethernet).
Traffic Control: Managing data transmission to prevent collisions and optimize network efficiency.
Design Considerations:
Routing Efficiency: Optimal path selection using algorithms like Dijkstra’s or Bellman-Ford.
Address Space Management: Effective use of available IP address space, including subnetting and
address allocation.
Network Topology: Design of efficient network topologies that support optimal routing.
Design Considerations:
Error Handling: Mechanisms to detect and correct transmission errors (e.g., checksums,
acknowledgment).
Congestion Control: Methods to prevent network congestion (e.g., sliding window protocol, TCP
flow control).
Connection vs. Connectionless: Whether to use connection-oriented protocols (e.g., TCP) or
connectionless protocols (e.g., UDP).
Design Considerations:
Session Recovery: The ability to resume communication after a session failure or interruption.
State Management: Maintaining session state information over the course of the communication.
Security: Ensuring that sessions are properly authenticated and secure against unauthorized
interruption.
Design Considerations:
Format Standardization: Need for standardized formats like ASCII, JPEG, and XML for ease of
translation and interoperability.
Data Compression Efficiency: Choosing compression methods that balance speed and the
compression ratio.
Security: Ensuring that encryption methods are strong and compatible across different platforms.
Design Considerations:
Scalability: Applications must be scalable to support more users without significant degradation in
performance.
Interoperability: Ability to work across different operating systems, hardware, and networks.
Error Handling: Applications should be designed to handle errors gracefully, informing the user
without disrupting operations.
2. Scalability
The design of each layer must account for scalability in terms of network size, traffic volume, and
geographical spread.
3. Security
Security mechanisms, such as encryption, authentication, and access controls, should be integrated
across all layers to ensure data confidentiality and integrity.
4. Efficiency
The protocol mechanisms at each layer should be efficient in terms of bandwidth usage, error
handling, and latency.
1. Connection-Oriented services
2. Connectionless services.
1. Connection-Oriented Service
A connection-oriented service requires a dedicated communication path to be established between
the sender and receiver before data can be transmitted. It ensures reliable data delivery by
maintaining the sequence and integrity of the data.
Characteristics:
Establishment of Connection: Before the transmission starts, a connection setup is required
between the sender and the receiver (e.g., 3-way handshake in TCP).
Reliable Data Transfer: The system guarantees that the data will reach the destination without
errors, and any lost packets are retransmitted.
Sequencing: Data is transmitted in a specific sequence, and the order is maintained.
Flow Control: Prevents network congestion by controlling the rate of data flow.
Error Handling: Error detection and recovery mechanisms are implemented, ensuring reliable
delivery.
Connection Teardown: Once communication is complete, the connection is closed, freeing up
resources.
Examples:
TCP (Transmission Control Protocol): A common connection-oriented protocol in the transport
layer. TCP ensures reliable communication by using acknowledgment (ACK) mechanisms,
retransmission of lost packets, and ordering.
Virtual Circuit (VC): In networks like ATM, a virtual circuit is established before data transfer.
Advantages:
* Reliable data transfer.
* Guarantees the order of delivery and error-free transmission.
* Flow and congestion control.
Disadvantages:
* More overhead due to connection setup and teardown.
* Slower compared to connectionless service because of the acknowledgment and error-recovery
mechanisms.
* Uses more resources.
2. Connectionless Service
A connectionless service does not require the establishment of a dedicated communication path
between the sender and receiver. Data is sent independently as packets, each traveling separately
through the network.
Characteristics:
No Connection Setup: Communication can occur without establishing a connection beforehand.
Unreliable Delivery: The system does not guarantee delivery, and packets may be lost or delivered
out of order.
No Acknowledgments: There is no mechanism for ensuring that the receiver has received the data.
No Flow Control: No mechanism to control the data flow.
No Sequencing: Each packet is treated independently, and there’s no guarantee of the order in
which packets will arrive.
Examples:
UDP (User Datagram Protocol): A connectionless protocol at the transport layer that sends data as
discrete packets (datagrams) without establishing a connection or ensuring reliability.
IP (Internet Protocol): The network layer protocol that routes data packets independently from
source to destination, without a connection setup.
Advantages:
Disadvantages:
An end-to-end connection is
It does not establish any connection before
Definition established before sending data over
sending data between sender and receiver.
different or similar networks.
It guarantees the transfer of data from It does not guarantee the transfer of data
Data
the host to the destination so it’s a from host to destination so it’s an
Reliability
reliable protocol. unreliable protocol.
Connectionless Applications:
Streaming (e.g., YouTube, Netflix): UDP or RTP (Real-time Transport Protocol) is often used
where occasional packet loss is acceptable for better performance and lower latency.
Voice over IP (VoIP): UDP is preferred for voice communication because it minimizes delay, and
slight data loss is often imperceptible to users.
DNS (Domain Name System): Uses UDP for faster queries because the overhead of establishing a
connection is unnecessary for small, simple queries.