Computer Networks
Computer Networks
Computer Networks
UNIT – 1
Network Criteria:
Based on the information provided, here are the key criteria for evaluating a network:
1. Performance:
Transit Time: The time taken for a message to travel from one device to another.
Throughput: The amount of data transferred successfully over the network in a given
period.
Delay: The time taken for data to travel across the network. It's desirable to have low
delay for better performance.
2. Reliability:
Recovery Time: The time it takes for the network to recover from a failure or
disruption.
3. Security:
Unauthorized Access Prevention: Protecting the network and its resources from
unauthorized users.
Data Damage and Development Protection: Preventing data from being altered,
destroyed, or corrupted.
In addition to these criteria, physical structures such as network topology, hardware components,
and connection types also play a significant role in defining a network's capabilities and performance.
These attributes provide the foundation upon which network design and implementation are built.
NETWORK TYPES:
https://www.javatpoint.com/types-of-computer-network
OSI MODEL:
PHYSICAL LAYER:
The Physical Layer is the first layer of the OSI (Open Systems Interconnection) model. It deals
with the physical transmission of data over the network medium
The primary function of the Physical Layer is to transmit raw bit streams over the physical
medium. It defines the electrical, mechanical, and procedural specifications for transmitting
data between devices. This layer ensures that the data is transmitted reliably
he Physical Layer supports various types of transmission media, including copper wires, optical fibers,
and wireless radio frequencies.
The data link layer, also known as layer 2 in the OSI model, is crucial for ensuring reliable and error-
free data transmission between directly connected devices on a network segment. It acts as a bridge
between the network layer and the physical layer, performing various functionalities to guarantee
successful data delivery.
he Data Link Layer encapsulates network layer packets into data frames, adding header and trailer
information. This framing allows the receiver to identify the boundaries of individual frames and
extract the data payload.
the Data Link Layer plays a crucial role in ensuring reliable and efficient communication between
devices within the same network segment, managing access to the physical medium, and providing
error detection and correction mechanisms. Popular protocols operating at this layer include
Ethernet, Wi-Fi (IEEE 802.11), and Point-to-Point Protocol (PPP).
NETWORK LAYER:
The network Layer is the third layer in the OSI model of computer networks. Its main
function is to transfer network packets from the source to the destination. It is involved both
the source host and the destination host. At the source, it accepts a packet from the
transport layer, encapsulates it in a datagram, and then delivers the packet to the data link
layer so that it can further be sent to the receiver. At the destination, the datagram is
decapsulated, and the packet is extracted and delivered to the corresponding transport
layer.
Features of Network Layer
1. The main responsibility of the Network layer is to carry the data packets from the
source to the destination without changing or using them.
2. If the packets are too large for delivery, they are fragmented i.e., broken down into
smaller packets.
3. It decides the route to be taken by the packets to travel from the source to the
destination among the multiple routes available in a network (also called routing).
4. The source and destination addresses are added to the data packets inside the
network layer.
Transport Layer:
The transport layer, layer 4 in the internet world, acts like a reliable mail carrier for your applications.
Imagine you're sending an important document to your friend across town. Here's how the transport
layer helps:
Reliable Delivery: The transport layer makes sure your data arrives correctly at the
destination application on another computer. It breaks large amounts of data (like your
document) into smaller chunks (packets) and adds labels (headers) with sending and
receiving application information.
Error Correction: Just like a careful mail carrier checking for rips or tears, the transport layer
checks for errors during transmission. If it finds any mistakes, it requests retransmission of
the lost or corrupt packets.
Flow Control: The transport layer ensures the receiving application isn't overwhelmed. It's
like a mail carrier pacing deliveries if the recipient's mailbox is full. The sender transmits data
in manageable amounts based on the receiver's capacity.
TCP (Transmission Control Protocol): This is like the reliable express mail option,
guaranteeing in-order delivery and error correction. It's ideal for important data transfers like
file downloads or video calls.
UDP (User Datagram Protocol): Think of this as the faster, but less secure regular mail
option. UDP prioritizes speed over reliability and is used for applications like online gaming
or live streaming where a slight delay is less critical than real-time delivery.
In summary, the transport layer ensures your data gets delivered accurately and efficiently between
applications on different computers across a network. It's the reliable middleman that makes sure
your information gets where it needs to go.
Application Layer:
Introduction :
The Application Layer is topmost layer in the Open System Interconnection (OSI) model. This layer
provides several ways for manipulating the data (information) which actually enables any type of
user to access network with ease. This layer also makes a request to its bottom layer, which is
presentation layer for receiving various types of information from it. The Application Layer interface
directly interacts with application and provides common web application services. This layer is
basically highest level of open system, which provides services directly for application process.
Application Layer provides a facility by which users can forward several emails and it also
provides a storage facility.
This layer allows users to access, retrieve and manage files in a remote computer.
This layer provides services which include: e-mail, transferring files, distributing results to the
user, directory services, network resources and so o
UNIT – 2
DESIFN ISSUES IN DATA LINK LAYER:
Frame
https://www.tutorialspoint.com/framing-in-data-link-layer
ERROR CORRECTION:
Error is a condition when the receiver’s information does not match the sender’s
information. During transmission, digital signals suffer from noise that can introduce errors
in the binary bits traveling from sender to receiver. That means a 0 bit may change to 1 or a
1 bit may change to 0.
Data (Implemented either at the Data link layer or Transport Layer of the OSI Model) may get
scrambled by noise or get corrupted whenever a message is transmitted. To prevent such
errors, error-detection codes are added as extra data to digital messages. This helps in
detecting any errors that may have occurred during message transmission.
https://www.tutorialspoint.com/data_communication_computer_network/
error_detection_and_correction.htm
https://www.geeksforgeeks.org/error-detection-in-computer-networks/
https://www.tutorialspoint.com/a-one-bit-sliding-window-protocol#:~:text=In%20one
%20%E2%80%93%20bit%20sliding%20window,provides%20for%20full%20%E2%80%93%20duplex
%20communications.
High-Level Data Link Control (HDLC): This is a protocol that is commonly used in wide area networks
(WANs). It is a complex protocol that provides a number of features, including error checking, flow
control, and multi-station access control.
Packet over SONET (Synchronous Optical Networking): Packet over SONET is a method of
transmitting IP packets over the SONET network, which is a high-speed optical fiber network widely
used in telecommunications. It enables the efficient transmission of data packets over SONET links,
providing high bandwidth and reliability.
ADSL (Asymmetric Digital Subscriber Loop): ADSL is a type of digital subscriber line (DSL) technology
used for high-speed internet access over existing telephone lines. It provides asymmetric bandwidth,
meaning the download speed is faster than the upload speed. ADSL uses frequency division
multiplexing to separate voice and data signals on the same line, allowing simultaneous use of
telephone and internet services.
UNIT – 3
Design Issues In Network Layer:
The network layer is responsible for providing services to the transport layer and managing
the internal design of the subnet. Here are some of the key design issues and considerations
discussed in Andrew S. Tanenbaum's "Computer Networks":
1. Store-and-Forward Packet Switching:
This mechanism involves routers receiving packets, verifying checksums, and
forwarding them to the next router along the path until they reach their
destination host. This process is known as store-and-forward packet
switching.
2. Services Provided to the Transport Layer:
The network layer shields the transport layer from the details of the
underlying router technology, number, type, and topology of routers. It aims
to provide a uniform numbering plan for network addresses across LANs and
WANs.
There's a debate between providing connection-oriented or connectionless
services. The connectionless service involves sending packets independently
of each other, while the connection-oriented service requires establishing a
virtual circuit before sending data packets.
3. Implementation of Connectionless Service:
In a datagram subnet (connectionless service), packets are injected into the
subnet individually and routed independently. Each packet carries the full
destination address, and no advance setup is needed. Routers make routing
decisions based on their internal tables.
4. Implementation of Connection-Oriented Service:
In a virtual-circuit subnet (connection-oriented service), a route from the
source to the destination is established during connection setup and stored in
routing tables inside routers. This route is used for all traffic flowing over the
connection, similar to how the telephone system operates.
Routing Alogorithm:
https://www.javatpoint.com/computer-network-routing-algorithm
Shortest Path:
https://www.geeksforgeeks.org/shortest-path-algorithm-in-computer-network/
Flooding:
https://www.tutorialspoint.com/flooding-in-computer-network
Hierarchical Routing:
https://www.tutorialspoint.com/what-is-hierarchical-routing
Broad Cast:
Broadcasting refers to the process of transmitting data, messages, or signals from one
sender to multiple recipients simultaneously. In a broadcast communication model, a single
sender sends information that is intended for multiple recipients who may be located in
different locations or connected to the same network. The recipients receive the
broadcasted information and can process or act upon it as necessary.
Broadcasting is commonly used in various communication systems, including television and
radio broadcasting, computer networks, and telecommunications. It allows for efficient
dissemination of information to a wide audience without the need for individualized
communication with each recipient.
Distance vector is a type of routing algorithm used in computer networks to determine the
best path for forwarding packets from a source to a destination. In distance vector routing,
each router maintains a table (vector) that contains information about the distance (cost) to
reach various destinations in the network and the next-hop router to reach those
destinations.
The "distance" in distance vector routing typically represents a metric such as hop count,
bandwidth, or delay. Each router periodically exchanges its routing table with its neighboring
routers, and based on this information, updates its own routing table to reflect the shortest
path to each destination.
The vector aspect of distance vector routing refers to the fact that the routing table is
essentially a vector or array of entries, with each entry containing the destination address,
the cost to reach that destination, and the next-hop router to reach it.
Distance vector routing algorithms, such as the Bellman-Ford algorithm, are simple to
implement and require less computational overhead compared to other routing algorithms
like link-state routing. However, they are susceptible to certain issues such as slow
convergence and count-to-infinity problems.
Distance vector routing is a dynamic routing algorithm used in computer networks to find
the shortest paths to destinations within the network. Here's a simplified explanation of how
it works:
1. Routing Tables:
Each router maintains a routing table, which is essentially a list of destinations
and the best path (or next hop) to reach them.
The table entries include the preferred outgoing line (or interface) to use for
reaching each destination and an estimate of the distance (or cost) to that
destination.
2. Exchange of Information:
Routers periodically exchange routing information with their neighboring
routers.
This exchange allows routers to update their routing tables based on the
information received from neighboring routers.
The information exchanged typically includes the estimated distance to each
destination.
3. Calculation of Best Paths:
Upon receiving routing information from neighbors, each router calculates
the best path to each destination based on the received information.
The calculation involves considering the estimates received from neighbors
and adding the distance to the neighbor itself to determine the total distance
to the destination via that neighbor.
4. Choosing the Best Path:
After calculating the distances to each destination via all neighbors, the router
selects the neighbor with the shortest estimated distance as the next hop for
reaching each destination.
The router updates its routing table with the chosen next hops for each
destination.
5. Iterative Process:
The process of exchanging routing information, calculating best paths, and
updating routing tables continues iteratively.
Over time, routers converge on optimal paths to each destination within the
network.
6. Example:
For instance, if a router receives information from a neighbor that the delay
to a certain destination is 25 milliseconds, and if the router knows that it can
reach the neighbor in 8 milliseconds, it updates its routing table to indicate
that it can reach the destination via the neighbor with a total delay of 33
milliseconds.
7. Terminology:
Distance vector routing is also known as the distributed Bellman-Ford routing
algorithm.
It was widely used in early networks like ARPANET and the Internet under
protocols like RIP (Routing Information Protocol).
In summary, distance vector routing dynamically determines the best paths to destinations
in a network based on exchanged routing information, allowing routers to update their
routing tables accordingly and converge on optimal routing paths.
Network Layer In Internet:
The network layer, layer 3 of the OSI model, plays a crucial role in the internet by
handling data packets and ensuring they get delivered to the right address across
different networks. Here's a breakdown of its key functions:
Routing: This is the magic that makes the internet work. The network layer
uses routing protocols to figure out the best path for data packets to travel
across different networks. Imagine it like a GPS for data packets, guiding
them through the internet maze to their destination.
Logical Addressing: While devices on a network have physical addresses
like MAC addresses, the network layer uses logical addresses like IP
addresses. These IP addresses are like unique identifiers that help route
packets to the correct device on the internet.
Packet Forwarding: Once the network layer knows the destination address
and the best path, it forwards the data packets from one network to another
until they reach their final destination. Think of it as handing off a package to
the right mail carrier at each city to get it delivered to the addressee.
The internet protocol (IP) is the workhorse protocol of the network layer. It's
responsible for encapsulating data into packets, adding header information like
source and destination IP addresses, and ensuring packets are delivered efficiently.
Here's an analogy to understand the network layer better: Imagine you're sending a
letter to a friend across the country. You write the message (data) on a piece of
paper (data packet). You put the letter in an envelope (packet with header) and write
your friend's address (destination IP) on the envelope. You take the envelope to the
post office (network layer). The postal service (routing protocols) figures out the best
route to get the letter to your friend's city (different networks). The letter is then
handed off to different mail carriers (packet forwarding) at each city until it reaches
your friend's mailbox (destination device).
INTERNETWORKING:
Internetting, also called internetworking, is basically connecting different computer
networks together to form a larger network.expand_more Imagine it like connecting several
towns with roads to create a big country. Here are some key points about internetworking:
Connects multiple networks: It allows separate computer networks, like those in
offices, schools, or even countries, to talk to each other.expand_more
Uses routers and protocols: Special devices called routers act like traffic directors,
sending data packets along the right paths to reach their destination on different
networks.expand_more Protocols are like agreed-upon languages that ensure all
devices communicate properly.expand_more
Creates a larger internet: When many networks are interconnected, it forms a vast
internetwork, like the internet with a lowercase "i" that we use today. The internet is
a global network of networks that allows communication and data sharing between
billions of devices.expand_more
Benefits: Internetting allows us to share resources (like printers or files), access
information from remote locations, and communicate with people worldwide.
I hope this explanation clarifies internetworking in simple terms!
UNIT – 4
Transport Layer:
The passage describes the importance of the transport layer in computer networks,
especially alongside the network layer. Here's a breakdown in simpler terms:
Network & Transport Layers: The Heart of Communication
o These layers work together to deliver data between applications on different
computers.
Network Layer: The Router
o It figures out the best path (like a GPS) to send data packets (like packages)
across different networks.
o It uses addresses (like zip codes) to route packets to the right destination
network.
Transport Layer: The Reliable Mail Carrier
o It guarantees data arrives correctly between applications (like delivering a
document).
o It breaks down data into manageable pieces (packets) and adds labels for
receiving applications.
o It checks for errors and ensures packets are delivered in the right order (like
checking for rips and delivering in order).
o It controls the flow of data to prevent overwhelming the receiver (like pacing
deliveries).
UDP (User Datagram Protocol) is a connectionless and unreliable protocol used in computer
networking for transmitting datagrams (packets) over a network. Here's an overview of UDP:
1. Connectionless: Unlike TCP, UDP does not establish a connection before transmitting
data. Each packet is sent independently, without establishing a session between
sender and receiver.
2. Unreliable: UDP does not guarantee delivery of packets, nor does it ensure that
packets arrive in the same order as they were sent. It does not perform error
checking or retransmission of lost packets, leaving this responsibility to higher-layer
protocols or applications.
3. Simple: UDP is lightweight and efficient because it has minimal overhead. It only
adds a small header to the data payload, containing source and destination port
numbers.
4. Low Latency: UDP is often used in real-time applications where low latency is crucial,
such as streaming media, online gaming, and VoIP (Voice over Internet Protocol).
Since there is no connection setup or error recovery mechanisms, UDP packets can
be transmitted quickly.
5. Broadcast and Multicast: UDP supports broadcasting, where a packet is sent to all
devices on a network, and multicasting, where a packet is sent to a specific group of
devices. This makes it suitable for applications that need to send data to multiple
recipients simultaneously.
UDP Header
UDP header is an 8-byte fixed and simple header, while for TCP it may vary from 20 bytes to
60 bytes. The first 8 Bytes contain all necessary header information and the remaining part
consists of data. UDP port number fields are each 16 bits long, therefore the range for port
numbers is defined from 0 to 65535; port number 0 is reserved. Port numbers help to
distinguish different user requests or processes.
1. Source Port: Source Port is a 2 Byte long field used to identify the port number of the
source.
2. Destination Port: It is a 2 Byte long field, used to identify the port of the destined
packet.
3. Length: Length is the length of UDP including the header and the data. It is a 16-bits
field.
4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the
one’s complement sum of the UDP header, the pseudo-header of information from
the IP header, and the data, padded with zero octets at the end (if necessary) to
make a multiple of two octets.
Domain Name System:
I assume you're referring to the "Domain Name System" (DNS). The Domain Name System is
a hierarchical decentralized naming system for computers, services, or any resource
connected to the Internet or a private network. It associates various information with
domain names assigned to each of the participating entities.
In simpler terms, DNS acts as a phone book for the internet. When you type a domain name
(like www.example.com) into your web browser, your computer uses DNS to look up the IP
address associated with that domain name so it can connect to the correct server and
retrieve the website.
Here's a breakdown of how it works:
1. Domain Names: These are the human-readable names we use to access websites or
services on the internet (e.g., google.com, facebook.com).
2. IP Addresses: These are numerical labels assigned to each device connected to a
network, like the internet. They're used to identify and locate devices. (e.g.,
192.0.2.1)
3. DNS Servers: These are servers that store databases of domain names and their
corresponding IP addresses. When you type a domain name into your browser, your
computer sends a request to a DNS server to translate that domain name into the
corresponding IP address.
4. Hierarchy: The DNS system is hierarchical, meaning it's organized in layers. At the top
of the hierarchy are the root DNS servers, which store information about the top-
level domains (TLDs) like .com, .org, .net, etc. Below the root servers are
authoritative DNS servers, which store information about specific domains.
5. Caching: To improve performance and reduce the load on DNS servers, DNS clients
(like your computer or router) often cache DNS information locally for a period of
time. This means that if you visit a website, your computer will store the IP address it
retrieved from the DNS server for a certain amount of time, so it doesn't have to look
it up again if you visit the same site again soon.
Overall, the Domain Name System plays a crucial role in enabling users to navigate the
internet by providing a mapping between human-readable domain names and machine-
readable IP addresses.
HTTP:
https://www.javatpoint.com/computer-network-http
Streaming stored audio and video refers to the process of delivering multimedia content,
such as music, movies, or TV shows, over a network in real-time from a stored source. This
method allows users to access and consume the content without having to download the
entire file beforehand. Instead, the data is delivered progressively as it is being played,
providing a seamless and uninterrupted playback experience.
Here's how the process generally works:
1. Content Storage: The audio or video content is stored on a server or content delivery
network (CDN). This storage could be on dedicated media servers, cloud storage
platforms, or streaming services.
2. Client Request: A user initiates a request to access the desired content through a
streaming application, website, or media player. This request could involve selecting
a specific song, movie, or TV show from a library or playlist.
3. Server Response: Upon receiving the request, the server begins streaming the
content to the user's device. Instead of transmitting the entire file at once, the server
breaks down the content into smaller, manageable chunks called packets.
4. Data Transmission: The packets containing audio or video data are transmitted over
the network to the user's device. The streaming protocol used (such as HTTP Live
Streaming, MPEG-DASH, or RTMP) governs how the data is formatted, transmitted,
and decoded on the client side.
5. Buffering and Playback: As the packets arrive at the user's device, they are buffered
to ensure smooth playback. The media player on the device decodes and plays the
audio or video in real-time, while additional packets continue to be streamed from
the server.
6. Adaptive Bitrate Streaming (Optional): Many streaming services employ adaptive
bitrate streaming techniques to optimize the streaming experience. This involves
dynamically adjusting the quality of the content based on factors like network
conditions, device capabilities, and available bandwidth, ensuring a consistent
viewing or listening experience.
7. End of Stream: When the user stops playback or reaches the end of the content, the
streaming session ends, and the connection to the server is closed.
Streaming stored audio and video has become increasingly popular due to its convenience,
accessibility, and flexibility. It allows users to enjoy their favorite media content on-demand,
across various devices, and without the need for extensive local storage.