Computer Network Notes
Computer Network Notes
● Network:
A network is a set of devices that are connected with a physical media link. In a
network, two or more nodes are connected by a physical link, or two or more
networks are connected by one or more nodes. A network is a collection of devices
connected to allow the sharing of data.
● Star :
● Star topology is a network topology in which all the nodes are connected to a
single device known as a central device.
Therefore, it is more robust as a failure in one cable will only disconnect a specific
computer connected to this cable.
5. Examples of Ring topology are the SONET network, SDH network, etc.
● Bus :
1. Bus topology is a network topology in which all the nodes are connected to a
single cable known as a central cable or bus.
2. It acts as a shared communication medium, i.e., if any device wants to send the
data to other devices, then it will send the data over the bus which in turn sends the
data to all the attached devices.
1. Mesh topology is a network topology in which all the nodes are individually
connected to other nodes.
2. It does not need any central switch or hub to control the connectivity among the
nodes.
3. Mesh topology is categorized into two parts: Fully connected mesh topology:
In this topology, all the nodes are connected. Partially connected mesh topology: In
this topology, all the nodes are not connected.
4. It is robust as a failure in one cable will only disconnect the specified computer
connected to this cable.
5. Mesh topology is rarely used as installation and configuration are difficult when
connectivity gets more.
● Tree :
1. Tree topology is a combination of star and bus topology. It is also known as the
expanded star topology.
2. In-tree topology, all the star networks are connected to a single bus. 3. Ethernet
protocol is used in this topology.
4. In this, the whole network is divided into segments known as star networks
which can be easily maintained. If one segment is damaged, there is no effect on
other segments.
5. Tree topology depends on the “main bus,” and if it breaks, then the whole
network gets damaged
● Hybrid :
2. If star topology is connected with another star topology, then it remains a star
topology. If star topology is connected with a different topology, then it becomes a
Hybrid topology.
● HAN (House Area Network): It is actually a LAN that is used within a house
and used to connect homely devices like personal computers, phones, printers, etc.
● WAN (Wide Area Network): It is used over a wide geographical location that
may range to connect cities and countries.
● GAN (Global Area Network): It uses satellites to connect devices over the
global area.
● Advantages of VPN :
2. VPN is used for secure transactions and confidential data transfer between
multiple offices located in different geographical locations.
4. VPN encrypts the internet traffic and disguises the online identity.
● Types of VPN :
● Intranet VPN: Intranet VPN is useful for connecting remote offices in different
geographical locations using shared infrastructure (internet connectivity and
servers) with the same accessibility policies as a private WAN (wide area network).
● Seven Layers :
1. Physical Layer
● It is used for the transmission of an unstructured raw bit stream over a physical
medium.
● The physical layer transmits the data either in the form of electrical/optical or
mechanical form.
● The physical layer is mainly used for the physical connection between the
devices, and such physical connection can be made by using twisted-pair cable,
fiber-optic or wireless transmission media.
2. DataLink Layer
● It is used for transferring the data from one node to another node.
● It receives the data from the network layer and converts the data into data frames
and then attaches the physical address to these frames which are sent to the
physical layer.
● It enables the error-free transfer of data from one node to another node.
● Flow control: Data-link layer controls the data flow within the network.
● Error control: It detects and corrects the error that occurred during the
transmission from source to destination.
● Addressing: Data-link layers attach the physical address with the data frames so
that the individual machines can be easily identified.
3. Network Layer
● The network layer converts the logical address into the physical address.
● The routing concept means it determines the best route for the packet to travel
from source to destination.
● Routing: The network layer determines the best route from source to destination.
This function is known as routing.
● Packetizing: The network layer receives the data from the upper layer and
converts the data into packets. This process is known as packetizing.
● It delivers the message through the network and provides error checking so that
no error occurs during the transfer of data.
5. Session Layer
● The session layer also reports the error coming from the upper layers.
● The session layer establishes and maintains the session between the two users. 6.
Presentation Layer
● At the sender side, this layer translates the data format used by the application
layer to the common format, and at the receiver side, this layer translates the
common format into a format used by the application layer.
○ Data compression
○ Data encryption
7. Application Layer
● Application layer protocols are file transfer protocol, simple mail transfer
protocol, domain name system, etc.
1. Link: Decides which links such as serial lines or classic Ethernet must be used
to meet the needs of the connectionless internet layer. Ex – Sonet, Ethernet 2.
Internet: The internet layer is the most important layer which holds the whole
architecture together. It delivers the IP packets where they are supposed to be
delivered. Ex – IP, ICMP.
3. Transport: Its functionality is almost the same as the OSI transport layer. It
enables peer entities on the network to carry on a conversation. Ex – TCP, UDP
(User Datagram Protocol)
HTTP is the HyperText Transfer Protocol which defines the set of rules and
standards on how the information can be transmitted on the World Wide Web
(WWW). It helps the web browsers and web servers for communication. It is a
‘stateless protocol’ where each command is independent concerning the previous
command. HTTP is an
application layer protocol built upon the TCP. It uses port 80 by default.
● DNS (Imp) :
1. DNS is an acronym that stands for Domain Name System.DNS was introduced
by Paul Mockapetris and Jon Postel in 1983.
2. It is a naming system for all the resources over the internet which includes
physical nodes and applications. It is used to locate resources easily over a
network.
3. DNS is an internet that maps the domain names to their associated IP addresses.
4. Without DNS, users must know the IP address of the web page that they wanted
to access.
● SMTP Protocol: SMTP is the Simple Mail Transfer Protocol. SMTP sets the
rule for communication between servers. This set of rules helps the software to
transmit emails over the internet. It supports both End-to-End and
Store-and-Forward methods. It is in always-listening mode on port 25.
Important Protocols
A protocol is a set of rules which is used to govern all the aspects of information
communication. The main elements of a protocol are:
● Syntax: It specifies the structure or format of the data. It also specifies the order
in which they are presented.
● Timing: Timing specifies two characteristics: When data should be sent and how
fast it can be sent.
● DHCP: DHCP is the Dynamic Host Configuration Protocol. It is an
application layer protocol used to auto-configure devices on IP networks enabling
them to use the TCP and UDP-based protocols. The DHCP servers auto-assign the
IPs and other network configurations to the devices individually which enables
them to communicate over the IP network. It helps to get the subnet mask, IP
address and helps to resolve the DNS. It uses port 67 by default.
● RIP: RIP stands for Routing Information Protocol. It is accessed by the routers
to send data from one network to another. RIP is a dynamic protocol that is used to
find the best route from the source to the destination over a network by using the
hop count
1. Both MAC (Media Access Control) address and IP Address are used to uniquely
define a device on the internet. NIC Card’s Manufacturer provides the MAC
Address, on the other hand, Internet Service Provider provides IP Address.
2. The main difference between MAC and IP address is that MAC Address is
used to ensure the physical address of a computer. It uniquely identifies the devices
on a network. While IP addresses are used to uniquely identify the connection of a
network with that device taking part in a network.
● Firewall: The firewall is a network security system that is used to monitor the
incoming and outgoing traffic and blocks the same based on the firewall security
policies. It acts as a wall between the internet (public network) and the networking
devices (a private network). It is either a hardware device, software program, or a
combination of both. It adds a layer of security to the network.
1. What happens when you enter google.com in the web browser? (Most Imp)
Steps :
● Check the browser cache first if the content is fresh and present in the cache
display the same.
● If not, the browser checks if the IP of the URL is present in the cache (browser
and OS) if not then requests the OS to do a DNS lookup using UDP to get the
corresponding IP address of the URL from the DNS server to establish a new TCP
connection.
● A new TCP connection is set between the browser and the server using
three-way handshaking.
● The browser processes the HTTP response sent by the server and may close the
TCP connection or reuse the same for future requests.
2. Hub: Hub is a networking device that is used to transmit the signal to each port
(except one port) to respond from which the signal was received. Hub is operated
on a Physical layer. In this packet filtering is not available. It is of two types:
Active Hub, Passive Hub.
● Catastrophe: It indicates that the network has been attacked by some unexpected
event such as fire, earthquake.
5. There are mainly two criteria that make a network effective and efficient: ●
Performance: performance can be measured in many ways like transmit time and
response time.
● Reliability: reliability is measured by the frequency of failure.
● Security: It specifies how to protect data from unauthorized access and viruses.
8. NIC (Imp): NIC stands for Network Interface Card. It is a peripheral card
attached to the PC to connect to a network. Every NIC has its own MAC address
that identifies the PC on the network. It provides a wireless connection to a local
area network. NICs were mainly used in desktop computers.
9. POP3 stands for Post Office Protocol version3. POP is responsible for
accessing the mail service on a client machine. POP3 works on two models such as
Delete mode and Keep mode.
10. Private IP Address – There are three ranges of IP addresses that have been
reserved for IP addresses. They are not valid for use on the internet. If you want to
access the internet on these private IPs, you must use a proxy server or NAT server.
13. Ping: The “ping” is a utility program that allows you to check the connectivity
between the network devices. You can ping devices using their IP address or name.
14. The processes on each machine that communicate at a given layer are called
peer-peer processes. (P2P).
15. Unicasting: If the message is sent to a single node from the source then it is
known as unicasting. This is commonly used in networks to establish a new
connection.
Anycasting: If the message is sent to any of the nodes from the source then it is
known as anycasting. It is mainly used to get the content from any of the servers in
the Content Delivery System.
Multicasting: If the message is sent to a subset of nodes from the source then it is
known as multicasting. Used to send the same data to multiple receivers.
Broadcasting: If the message is sent to all the nodes in a network from a source
then it is known as broadcasting. DHCP and ARP in the local network use
broadcasting.