0% found this document useful (0 votes)
15 views69 pages

Computer Network Complete Notes

Uploaded by

TOUQEER RASHID
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views69 pages

Computer Network Complete Notes

Uploaded by

TOUQEER RASHID
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Network DIT Part-1

Chapter 1
COMPONENT OF A COMMUNICATION MODEL

Telecommunications Networks:
The electronic transmission of information over distances, called telecommunications, has become virtually inseparable
from computers: Computers and telecommunications create value together.

OR

Telecommunications are the means of electronic transmission of information over distances. The information may be in
the form of voice telephone calls, data, text, images, or video. Today, telecommunications are used to organize more or
less remote computer systems into telecommunications networks. These networks themselves are run by computers.

Six potential media are employed to implement telecommunication links:

1. Twisted pair

2. Coaxial cable

3. Fiber Optics cable

4. Terrestrial Microwave

5. Satellite Transmission

6. Radio Transmission

Components of Communication:
A data communications system has five components.

1. Message.
The message is the information (data) to be communicated. Popular forms of information include text, numbers,
pictures, audio, and video.
2. Sender.
The sender is the device that sends the data message. It can be a computer, workstation, telephone handset, video
camera, and so on.
3. Receiver.
The receiver is the device that receives the message. It can be a computer, workstation, telephone handset,
television, and so on.

1|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

4. Transmission medium.
The transmission medium is the physical path by which a message travels from sender to receiver. Some examples
of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves
5. Protocol.
A protocol is a set of rules that govern data communications. It represents an agreement between the
communicating devices. Without a protocol, two devices may be connected but not communicating, just as a
person speaking French cannot be understood by a person who speaks only Japanese.

2|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
What Is a Computer Network?
A computer network is a system that connects two or more computing devices for transmitting and sharing information.
Computing devices include everything from a mobile phone to a server. These devices are connected using physical wires
such as fiber optics, but they can also be wireless.

The first working network, called ARPANET, was created in the late 1960s and was funded by the U.S. Department of
Defense. Government researchers used to share information at a time when computers were large and difficult to move.
We have come a long way today from that basic kind of network. Today’s world revolves around the internet, which is a
network of networks that connects billions of devices across the world. Organizations of all sizes use networks to connect
their employees’ devices and shared resources such as printers.

What is LAN?
LAN represents Local Area Network. LANs are tiny networks within a single construction or colleges of up to a few
kilometers. When two or more computers are attached in a limited area, i.e., the inside diameter of not more than a few
kilometers, then such a network is called a local area network. Local area network connects various computers in a small
geographical area such a building so that they can share data, resources, programs, tools, etc.

LAN has very high data transmission rate because it connects a very limited number of computers in a single network. The
hardware components like network adapters, hubs, network cables, etc. required to design LAN are relatively less
expensive.

The most common examples of LAN include private computer networks for home, office, schools, hospitals, colleges, etc.

3|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

What is MAN?
MAN represents Metropolitan Area Network. MAN is a huge version of LAN and uses similar technology. It uses one or
two cables but does not include switching components. It covers an entire city and can be associated with the local cable
TV network.

A typical MAN connects two or more computing devices that reside apart but in the same or different cities. MAN convers
comparatively larger geographical area as compared to a LAN. But, it is very costly as compared to a LAN. The speed of
data transmission in MAN is of the order of Mbps (Mega Bytes per Second). The most common examples of MAN are
networks of telephone companies that provide high speed digital subscriber line to cable TV customers.

4|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
What is WAN?
WAN represents Wide Area Network. WAN supports no limit of distance. A WAN offers long-distance communication of
data, voice, pictures and video data over a large geographical area consisting of a country, a continent or even a planet.

A WAN is basically large connection of various LANs and MANs. A WAN makes use of telephone lines or radio waves to
connect LANs together. A WAN uses a relatively very expensive and high-speed technology for data communication.

Based on network structure, WANs are of two types, namely Point-to-Point WAN and Switched WAN. In WANs, satellite
links and public switched telephone networks are used as the communication mediums.

The rate of data transmission in a WAN is comparatively less than a LAN or MAN due to larger distances and the greater
number of computing devices connected in a single network. The speed of data transmission in WANs typically ranges
from a few kbps (kilo bytes per second) to Mbps (Megabytes per second). One of the major issues that WANs face is the
propagation delay. The most common examples of WANs include the Internet, the network of bank cash dispensers, etc.

5|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Difference between LAN, MAN, and WAN
The following table highlights all the key differences between LAN, MAN, and WAN −

Basis of
LAN MAN WAN
Comparison

MAN stands for


LAN stands for Local Area WAN stands for Wide Area
Full Form Metropolitan Area
Network. Network.
Network.

It is a type of networking This networking system has


It is the type of networking
system in which two or many connections, and
system in which systems are
more LANs are these are associated with
Definition very near to each other. This
communicated. It is various companies or
system is generally in a single
located in a vast organizations at an
office, building or home.
geographical area. equivalent time.

LAN is under the complete The ownership of the The ownership of the
Ownership of
control of the owner, i.e., network can be private or network can be private or
Network
Private. public. public.

Data transmission speed is Data transmission speed is Data transmission speed is


Speed
high. average. low.

Maintenance It can be easy to design and


It is tough to maintain. It is tough to maintain.
and Design maintain.

Its operational speed


Operational Its operational speed usually usually is 1.5 Mbps, and it Its operation is speed
Speed is 10,100 and 1000 Mbps. may be very at the wireless usually is 100 Mbps.
network.

There is higher fault tolerance There is smaller fault There is smaller fault
Fault Tolerance
in LAN. tolerance. tolerance.

WAN allows a very large


LAN allows a small number of MAN allows simultaneous
Communication number of computers to
computers to establish a communication of a large
Allotment interact simultaneously with
communication. number of computers.
each other

6|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
In LANs, the network
In MANs, the network In WANs, the network is very
Congestion congestion is very low due to
congestion is high. high.
less number of computers

Propagation In LANs, the propagation In MANs, the propagation In WANs, the propagation
Delay delay is very less. delay is moderate. delay is very high.

Computer networks of Computer networks that Computer networks that


schools, homes, offices, spread over a small city, or cover an entire city, or globe
Examples
hospitals, etc. are the town are the examples of like internet are the
common examples of LANs. MANs. examples WANs.

What Is the Internet?


The internet is a global network of interconnected devices and computers that allows users to access
information, communicate, and more
The internet is a global network of interconnected computers, servers, phones, and smart appliances that communicate
with each other using the transmission control protocol (TCP) standard to enable a fast exchange of information and files,
along with other types of services.

what is vlan in networking


A Virtual Local Area Network (VLAN) is a logical network that divides a physical network into smaller sub-
networks. VLANs can improve network performance and isolate traffic. They can also help with resource sharing
and routing for computers on a campus network, even if they aren't in the same physical location.

7|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

WLAN (Wireless Local Area Network)

WLANs are the wireless LANs, which covers a small area to provide a wireless connection to laptops, smartphones or any
network devices. It is used by wireless capable devices and provide a small network in a limited area.

Wireless networks in your homes, in your company or in Starbucks are all WLAN examples.

What is a VPN service?


A VPN, which stands for virtual private network, establishes a digital connection between your computer and a remote
server owned by a VPN provider, creating a point-to-point tunnel that encrypts your personal data, masks your IP address,
and lets you sidestep website blocks and firewalls on the internet. This ensures that your online experiences are private,
protected, and more secure.

8|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

FUNCTION/ WORKING IN COMPUTER NETWORKING


Computer networking is the practice of connecting devices and exchanging data over a shared
medium. It's used by businesses, consumers, and service providers to communicate, share
resources, and offer services.
Here are some key components of computer networking:
• Nodes: These are connection points that can send, receive, or forward
information. Examples of nodes include computers, printers, modems, and file servers.
• Links: These are the transmission media that connect nodes. They can be physical, like
cable wires or optical fibers, or wireless.
• Protocols: These are rules that define how nodes send and receive data.
• Network architecture: This defines the design of the physical and logical components of
the network.
• Switches: These manage communications between network devices by breaking network
communications into packets.
• Routers: These connect different switches and can be used to create larger networks or
connect separate networks.
• Servers: These are specialized computers that store data or run applications.
Some examples of computer networks include:
• Local area networks (LANs): Connect devices on a local area.
• Wide area networks (WANs): Connect networks in larger geographic areas, such as the
internet.
• Personal area networks (PANs): Connect computers and other devices close to one
person, typically within 10 meters.

9|Page
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
CHAPTER - 2
TOPOLOGY:

Types of Network Topology


Network topology refers to the arrangement of different elements like nodes, links, or devices in a computer
network. Common types of network topology include bus, star, ring, mesh, and tree topologies, each with its
advantages and disadvantages. In this article, we will discuss different types of network topology in detail.

What is Network Topology?


Network topology is the way devices are connected in a network. It defines how these components are
connected and how data transfer between the network. Understanding the different types of network
topologies can help in choosing the right design for a specific network.
There are two major categories of Network Topology i.e.
Physical Network topology
Logical Network Topology.

Physical Network Topology refers to the actual structure of the physical medium for the transmission of
data.

Logical network Topology refers to the transmission of data between devices present in the network
irrespective of the way devices are connected. The structure of the network is important for the proper
functioning of the network. one must choose the most suitable topology as per their requirement.

Types of Network Topology


Below mentioned are the types of Network Topology

• Point to Point Topology

• Mesh Topology

• Star Topology

• Bus Topology

• Ring Topology

• Tree Topology

• Hybrid Topology

10 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Point to Point Topology


Point-to-point topology is a type of topology that works on the functionality of the sender and
receiver. It is the simplest communication between two nodes, in which one is the sender and
the other one is the receiver. Point-to-Point provides high bandwidth.

Mesh Topology
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.

11 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Advantages of Mesh Topology


• Communication is very fast between the nodes.
• Mesh Topology is robust.
• The fault is diagnosed easily. Data is reliable because data is transferred among the devices
through dedicated channels or links.
• Provides security and privacy.
Disadvantages of Mesh Topology
• Installation and configuration are difficult.
• The cost of cables is high as bulk wiring is required, hence suitable for a smaller number
of devices.
• The cost of maintenance is high.
A common example of mesh topology is the internet backbone, where various internet service
providers are connected to each other via dedicated channels. This topology is also used in
military communication systems and aircraft navigation systems.
Star Topology
12 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
In Star Topology, all the devices are connected to a single hub through a cable. This hub is the
central node and all other nodes are connected to the central node. The hub can be passive in
nature i.e., not an intelligent hub such as broadcasting devices, at the same time the hub can be
intelligent known as an active hub. Active hubs have repeaters in them. Coaxial cables or RJ-45
cables are used to connect the computers. In Star Topology, many popular Ethernet LAN
protocols are used as CD(Collision Detection), CSMA (Carrier Sense Multiple Access), etc.

Advantages of Star Topology


• If N devices are connected to each other in a star topology, then the number of cables
required to connect them is N. So, it is easy to set up.
• Each device requires only 1 port i.e. to connect to the hub, therefore the total number of
ports required is N.
• It is Robust. If one link fails only that link will affect and not other than that.
• Easy to fault identification and fault isolation.
• Star topology is cost-effective as it uses inexpensive coaxial cable.
Disadvantages of Star Topology
• If the concentrator (hub) on which the whole topology relies fails, the whole system will
crash down.
• The cost of installation is high.
• Performance is based on the single concentrator i.e. hub.

13 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
A common example of star topology is a local area network (LAN) in an office where all
computers are connected to a central hub. This topology is also used in wireless networks where
all devices are connected to a wireless access point.
Bus Topology
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, Pure Aloha, CDMA, Slotted
Aloha, etc.

Advantages of Bus Topology


• If N devices are connected to each other in a bus topology, then the number of cables
required to connect them is 1, known as backbone cable, and N drop lines are required.
• Coaxial or twisted pair cables are mainly used in bus-based networks that support up to
10 Mbps.
• The cost of the cable is less compared to other topologies, but it is used to build small
networks.
• Bus topology is familiar technology as installation and troubleshooting techniques are well
known.
• CSMA is the most common method for this type of topology.
Disadvantages of Bus Topology
• A bus topology is quite simpler, but still, it requires a lot of cabling.
• If the common cable fails, then the whole system will crash down.
14 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• If the network traffic is heavy, it increases collisions in the network. To avoid this, various
protocols are used in the MAC layer known as Pure Aloha, Slotted Aloha, CSMA/CD, etc.
• Adding new devices to the network would slow down networks.
• Security is very low.
A common example of bus topology is the Ethernet LAN, where all devices are connected to a
single coaxial cable or twisted pair cable. This topology is also used in cable television networks.

Ring Topology
In a Ring Topology, it forms a ring connecting devices with exactly two neighboring 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.
Advantages of Ring Topology
• The data transmission is high-speed.
• The possibility of collision is minimum in this type of topology.
• Cheap to install and expand.
15 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• It is less costly than a star topology.
Disadvantages of Ring Topology
• The failure of a single node in the network can cause the entire network to fail.
• Troubleshooting is difficult in this topology.
• The addition of stations in between or the removal of stations can disturb the whole
topology.
• Less secure.

Hybrid Topology
Hybrid Topology is the combination of all the various types of topologies we have studied above.
Hybrid Topology is used when the nodes are free to take any form. It means these can be
individuals such as Ring or Star topology or can be a combination of various types of topologies
seen above. Each individual topology uses the protocol that has been discussed earlier.

16 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

The above figure shows the structure of the Hybrid topology. As seen it contains a combination
of all different types of networks.
Advantages of Hybrid Topology
• This topology is very flexible.
• The size of the network can be easily expanded by adding new devices.
Disadvantages of Hybrid Topology
• It is challenging to design the architecture of the Hybrid Network.
• Hubs used in this topology are very expensive.
• The infrastructure cost is very high as a hybrid network requires a lot of cabling and
network devices.

17 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Wireless network topology — logical topology.


Wireless network topology shows how the computers connect each other when there is no
physical connection. The computers communicate each using the wireless devices.

18 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

What is Satellites network


Satellites connect via radio links to ground stations and end hosts in the region below the satellite’s location. These links
last as long as the satellite has good visibility to the station on earth.

Or

A satellite network typically consists of a transmitting Earth Station with a hub equipment at one end that amplifies and
processes the received signal and transmits it back for reception by one or more ground stations commonly referred to as
Very Small Aperture Terminal (VSAT).

19 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
RADIO WAVES TOPOLOGY COMPUTER NETWORK
Radio waves are used in wireless local area networks (WLANs) to enable
communication between multiple devices in a limited area. WLANs use high-
frequency radio technology similar to digital cellular and low-frequency radio
technology. Wi-Fi is a common type of wireless radio-wave technology that uses
open standards

What is Bluetooth?
Bluetooth is used for short-range wireless voice and data communication. It is a Wireless Personal Area Network
(WPAN) technology and is used for data communications over smaller distances.
Bluetooth stages up to 10 meters.
Bluetooth is a wireless technology that lets devices like phones, tablets, and headphones connect to each other
and share information without needing cables. Bluetooth simply follows the principle of transmitting and
receiving data using radio waves.

20 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Chapter-3
NETWORK DEVICES
Network devices are physical devices that allow hardware on a computer network to communicate and interact
with each other. Network devices like hubs, repeaters, bridges, switches, routers, gateways, and routers help
manage and direct data flow in a network. They ensure efficient communication between connected devices by
controlling data transfer, boosting signals, and linking different networks. Each device serves a specific role, from
simple data forwarding to complex routing between networks. we are going to discuss different types of network
devices in detail.

Functions of Network Devices


• Network devices help to send and receive data between different devices.

• Network devices allow devices to connect to the network efficiently and securely.

• Network devices Improve network speed and manage data flow better.

• It protects the network by controlling access and preventing threats.

• Expand the network range and solve signal problems.

21 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
What is Node in Computer Networks?
In Computer Networks, a Node is any device that is capable of sending or receiving data, to and from other nodes at
definite and desired flow rates securely and reliably. In simple words, you can say that Nodes are the connection point
among network devices that results in the transfer of data from one point to another. In a Network, more than one
node can be used at one time.

On the basis of functionality and usage, the node devices can be broadly classified into the following types:

1. End Devices

2. Intermediary Devices

What is a network interface card (NIC)?


A network interface card (NIC) is a hardware component, typically a circuit board or chip, installed on a computer
so it can connect to a network. Modern NICs provide functionality to computers, such as support
for input/output interrupt, direct-memory access interfaces, data transmission, network traffic engineering and
partitioning.

22 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Modems:
Modems is also known as modulator/demodulator is a network device that is used to convert digital
signal into analog signal of different frequencies and transmits these signal to a modem at the receiving location.
These converted signals can be transmitted over the cable systems, telephone lines, and other communication
mediums. A modem is also used to convert analog signal back into digital signal. Modems are generally used to
access internet by customers of an Internet Service Provider (ISP).

Types of Modems
There are four main types of modems:

• DSL Modem: Uses regular phone lines to connect to the internet but it is slower compared to other types.

• Cable Modem: Sends data through TV cables, providing faster internet than DSL.

• Wireless Modem: Connects devices to the internet using Wi-Fi relying on nearby Wi-Fi signals.

• Cellular Modem: Connects to the internet using mobile data from a cellular network not Wi-Fi or fixed cables.

23 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Hub
A hub is a multiport repeater. A hub connects multiple wires coming from different branches, for example, the
connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all
connected devices. In other words, the collision domain of all hosts connected through Hub remains one. Also, they
do not have the intelligence to find out the best path for data packets which leads to inefficiencies and wastage.

Types of Hubs

• Active Hub: These are the hubs that have their power supply and can clean, boost, and relay the signal along with
the network. It serves both as a repeater as well as a wiring center. These are used to extend the maximum distance
between nodes.

Note: A repeater is a network device that amplifies and retransmits signals to extend the range of communication
in a network.

• Passive Hub: These are the hubs that collect wiring from nodes and power supply from the active hub. These hubs
relay signals onto the network without cleaning and boosting them and can’t be used to extend the distance
between nodes.

• Intelligent Hub: It works like an active hub and includes remote management capabilities. They also provide
flexible data rates to network devices. It also enables an administrator to monitor the traffic passing through the
hub and to configure each port in the hub.

24 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Switch
A switch is a multiport bridge with a buffer and a design that can boost its efficiency(a large
number of ports imply less traffic) and performance. A switch is a data link layer device. The
switch can perform error checking before forwarding data, which makes it very efficient as it
does not forward packets that have errors and forward good packets selectively to the correct
port only. In other words, the switch divides the collision domain of hosts, but the broadcast
domain remains the same.

Features of Network Switches

• It operates in the Data Link Layer in the OSI Model.

• It performs error checking before forwarding data.

• It transfers the data only to the device that has been addressed.

• It operates in full duplex mode.

• It allocates each LAN segment to a limited bandwidth.

• It uses Unicast (one-to-one), multicast (one-to-many), and broadcast (one-to-all) transmission modes.

• Packet-switching techniques are used to transfer data packets from source to destination.

• Switches have a more significant number of ports.

WHAT IS A WIRELESS ACCESS POINT?

A Wireless Access Point (WAP) is a networking device that allows connecting the devices with the wired network. A
Wireless Access Point (WAP) is used to create the WLAN (Wireless Local Area Network), it is commonly used in large offices
and buildings which have expanded businesses.

25 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Advantages of Wireless Access Point (WAP)

o More User Access


o Broader Transmission Range
o Flexible Networking
o Mobility

WHAT IS WIRELESS MODEM?


A wireless modem is a device that connects a computer or router to the internet using radio waves instead of
cables. It's also known as a mobile broadband modem or cellular modem.

Wireless modems work by converting digital data from an internet service provider (ISP) into a Wi-Fi signal
that can be used by multiple devices within range. Some wireless modems also have built-in routers that allow
multiple devices to connect simultaneously.

26 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
WHAT IS WIRELESS USB ANTENA

A USB WiFi antenna or USB wireless adapter converts data into high frequency radio waves, encrypts the radio
transmission, and transmits it to a WiFi access point or network router. It also receives radio waves, decrypts
the information, and converts it back into digital data.

• How USB WIFI Antenna Work

A USB WiFi antenna or USB wireless adapter converts data into high frequency radio waves, encrypts the radio
transmission, and transmits it to a WiFi access point or network router. It also receives radio waves, decrypts
the information, and converts it back into digital data. USB WiFi antennas differ from other types of wireless
adapters because they are external devices and only connect to the computer in question via a USB port, while
wireless adapters are often built into a computer, especially laptops.

WHAT IS WIRELESS USB?

Wireless USB (WUSB) is a technology that allows devices to connect to a computer without cables using radio
frequency waves. It's based on the Universal Serial Bus (USB) standard, but it's different from Wi-Fi.

What is a Router?

A Router is a networking device that forwards data packets between computer networks. One or more packet-
switched networks or subnetworks can be connected using a router. By sending data packets to their
intended IP addresses, it manages traffic between different networks and permits several devices to share
an Internet connection.

27 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

How Does Router Work?

• A router determines a packet’s future path by examining the destination IP address of the header and comparing
it to the routing database. The list of routing tables outlines how to send the data to a specific network location.
They use a set of rules to determine the most effective way to transmit the data to the specified IP address.

• To enable communication between other devices and the internet, routers utilize a modem, such as a cable, fiber,
or DSL modem. Most routers include many ports that can connect a variety of devices to
the internet simultaneously. In order to decide where to deliver data and where traffic is coming from, it needs
routing tables.

• A routing table primarily specifies the router’s default path. As a result, it might not determine the optimum path
to forward the data for a particular packet. For instance, the office router directs all networks to its internet service
provider through a single default channel.

• Static and dynamic tables come in two varieties in the router. The dynamic routing tables are automatically
updated by dynamic routers based on network activity, whereas the static routing tables are configured manually.

28 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Chapter-4
TRANSMISSION MEDIA
What is Transmission Media in Computer Networks?

A transmission medium is a physical path between the transmitter and the receiver i.e. it is the channel
through which data is sent from one device to another. Transmission Media is broadly classified into the
following types:

1. Guided Media

Guided Media is also referred to as Wired or Bounded transmission media. Signals being transmitted are
directed and confined in a narrow pathway by using physical links.

Features:
• High Speed
• Secure
• Used for comparatively shorter distances

29 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Coaxial Cable
Coaxial cable has an outer plastic covering containing an insulation layer made of PVC
or Teflon and 2 parallel conductors each having a separate insulated protection cover.
The coaxial cable transmits information in two modes: Baseband mode (dedicated cable
bandwidth) and Broadband mode (cable bandwidth is split into separate ranges). Cable TVs
and analog television networks widely use Coaxial cables.

Advantages of Coaxial Cable

• Coaxial cables have high bandwidth.

• It is easy to install.

• Coaxial cables are more reliable and durable.

• Less affected by noise or cross-talk or electromagnetic inference.

• Coaxial cables support multiple channels

30 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Disadvantages of Coaxial Cable

• Coaxial cables are expensive.

• The coaxial cable must be grounded in order to prevent any crosstalk.

• As a Coaxial cable has multiple layers it is very bulky.

• There is a chance of breaking the coaxial cable and attaching a “t-joint” by hackers, this compromises the security
of the data.

What Does 10 BASE 5 Mean?

10Base5 refers to a standard for Ethernet network technologies that use a thicker version of coaxial cables. It has the
capability to transmit data at speed of 10Mbps up to 500 meters using baseband transmission.

What Does 10BASE-2 Mean?

10Base2 is among the family of Ethernet network standards for local area networks (LAN) that uses a thinner version of
coaxial cable to establish a network path or medium and operates at a speed of 10 Mbps to carry out baseband
transmission.

What is 10BASE-T?

10BASE-T is an Ethernet standard for local area networks and one of several physical media. 10BASE-T supports 10
megabits per second (Mbps) transmission speed over twisted-pair cabling with a maximum length of 100 meters (m). The
twisted-pair cables connect with an RJ45 connector.

What is 10BASE-X?

10Base-X refers to a family of Ethernet standards that operate at a speed of 10 Mbps (megabits per second). 100BASE-TX
was quite fast.

What is a BNC connector?

Bayonet Neill–Concelman (BNC) is a type of coaxial cable connector commonly used in video and networking applications.
A BNC connector works by using a rotating ring to securely connect two coaxial cables together.

31 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Common Uses of BNC Connectors:

• Networking:
• Television and Video:
• Radio and RF Applications:
• Audio Applications:

Twisted Pair Cables:

These are a type of guided media. It was invented by Alexander Graham Bell. Twisted pair cables have two
conductors that are generally made up of copper and each conductor has insulation. These two conductors are twisted
together, thus giving the name twisted pair cables.

One of the conductors is used to carry the signal and the other is used as a ground reference only. The receiver uses the
difference of signals between these two conductors.

32 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Twisted Pair Cables are further of two types:

Unshielded Twisted Pair Cables (UTP) :

These are a pair of two insulated copper wires twisted together without any other insulation or shielding and hence are
called unshielded twisted pair cables. They reduce the external interference due to the presence of insulation. Unshielded
twisted pair cables are arranged in pairs so that we can add a new connection whenever required. The DSL or telephone
lines in our houses have one extra pair in them. When UTP are arranged in pairs, each pair is coded with a different color.
The Electronic Industries Association divides UTP into 7 categories based on some standards. Categories are based upon
cable quality where 1 is the highest quality and 7 is the lowest quality. Each cable in a category is put to a different use as
needed.

Advantages –

1. These cables are cost-effective and easy to install owing to their compact size.

2. They are generally used for short-distance transmission of both voice and data.

3. It is less costly as compared to other types of cables.

Disadvantages –

1. The connection established using UTP is not secure.


33 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
2. They are efficient only for a distance up to 100 meters and have to be installed in pieces of up to 100 meters.

3. These cables have limited bandwidth.

Shielded Twisted Pair Cables (STP) :

These types of cables have extra insulation or protective covering over the conductors in the form of a
copper braid covering. This covering provides strength to the overall structure of the cable. It also reduces noise and signal
interference in the cable. The shielding ensures that the induced signal can be returned to the source via ground and only
circulate around the shield without affecting the main propagating signal. The STP cables are also color-coded like the UTP
cables as different color pairs are required for analog and digital transmission. These cables are costly and difficult to
install.

Advantages –

1. They are generally used for long-distance communication and transmission and are installed underground.

2. The protective shield prevents external electromagnetic noise penetration into the cable.

3. They have a higher bandwidth as compared to UTP.

Disadvantages –

1. These cables are very expensive.

2. They require a lot of maintenance which increases the cost more.

3. These can be installed underground only.

4. The length of the segment is similar to UTP for these cables.

34 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
The categories of Unshielded Twisted Pair (UTP) cables, such as Cat 2, Cat 3, Cat 4, Cat 5, and Cat 6, define their
performance specifications, particularly for data transmission speeds and bandwidth. Here's an overview:

Category 2 (Cat 2):

• Bandwidth: Up to 4 Mbps.
• Frequency: 1 MHz.
• Usage: Primarily used for token ring networks and early telephone systems.
• Obsolete: Rarely used today, as it cannot support modern data speeds.
Category 3 (Cat 3):

• Bandwidth: Up to 10 Mbps.
• Frequency: 16 MHz.
• Usage: Designed for 10Base-T Ethernet and telephone networks.
• Obsolete: Superseded by higher categories but may still be found in older installations.
Category 4 (Cat 4):

• Bandwidth: Up to 16 Mbps.
• Frequency: 20 MHz.
• Usage: Used in 16 Mbps token ring networks.
• Obsolete: Rarely used today due to limitations in speed and bandwidth.
Category 5 (Cat 5):

• Bandwidth: Up to 100 Mbps.


• Frequency: 100 MHz.
• Usage: Designed for Fast Ethernet (100Base-TX) and can also support 1000Base-T (Gigabit Ethernet) over short
distances.
• Replaced: Often replaced by Cat 5e, which is an enhanced version.
Category 5e (Cat 5 Enhanced):

• Bandwidth: Up to 1 Gbps (Gigabit Ethernet).


• Frequency: 100 MHz.
• Improvement: Reduced crosstalk and better performance for Gigabit Ethernet.

35 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Category 6 (Cat 6):

• Bandwidth: Up to 10 Gbps (for shorter distances, typically up to 55 meters).


• Frequency: 250 MHz.
• Usage: Supports Gigabit Ethernet and 10G Ethernet.
• Advantage: Improved shielding and tighter specifications to reduce crosstalk and EMI

RJ45 Connector

RJ45 stands for Registered Jack 45 and is the most commonly used connector in wired networks. The jacks are mainly used
to connect to the Local Area Network (LAN). It was earlier devised for telephones but is now widely used
in Ethernet Networking. The 45 in RJ45 basically stands for the listing number. The jacks the bandwidth provided by these
is high and the range is usually 10 Gbps. RJ45 has a transparent plastic structure and is an 8-pin connector. It is an 8P8C
connector and the number of wires that can be connected is 8.

The colors of RJ45 wiring include White/Green, Green, White/Orange, Blue, White/Blue, Orange, White/Brown, and
Brown.

36 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Pin T568B T568A

1 white with orange stripe white with green stripe

2 orange green

3 white with green stripe white with orange stripe

4 blue blue

5 white with blue stripe white with blue stripe

6 green orange

7 white with brown stripe white with brown stripe

8 brown brown

What is an Optical Fiber?

Optical fiber is a technology used to transmit data by sending short light pulses along a long fiber, which is typically made
of glass or plastic. In optical fiber communication, metal wires are preferred for transmission because the signals travel
more safely.

37 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Types of Optical Fiber

Single-Mode Fibres: These fibers are used to transmit signals over long distances.

Multimode Fibres: These fibers are used to transmit signals over short distances.

Advantages of Optical Fibers

Increased bandwidth and speed


Cheap
Light and thin
Less signal degradation
Light signals
Long life
Disadvantages of Optical Fibers
Low power
Fragility
Distance
Uses of optical fibers
• Medical industry
• Communication
• Defense
• Internet
• Computer networking
• car industry
38 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• Lighting and décor
Single-mode Optical Fiber:
A common type of optical fiber used to transmit over longer distances is single-mode fiber. One of two types
of optical fiber, the other is multimode fiber. A single strand of glass fiber, called single-mode fiber, is used to
transmit single-mode or light beams. Single-mode fiber allows only one transmission mode.

Multi-Mode Optical Fiber:


Multi-mode fiber is a type of optical fiber designed to carry multiple light rays or modes simultaneously, each at a
marginally different reflection angle inside the optical fiber core.

What is Unguided Media

Unguided media transport electromagnetic waves without using a physical conductor. It is also known as
unbounded or wireless media, and does not rely on physical pathways to transmit signals. Instead, they use wireless
communication methods to propagate signals through the air or free space.

Satellite Microwave Communication

A satellite is an object that revolve around the earth. A satellite microwave is a type of communication technology
that uses microwave radio waves to transmit data between a ground-based station and an orbiting satellite.

How Does Satellite work?

A satellite get signal from ground-based station, enhance that signal and transfer back to another ground-based
station that is situated at different location on the earth. They orbit high above the planet, allowing them to cover large
areas. This process enables long-distance communication, GPS navigation, and weather monitoring.

These are:
• Uplink
• Transponders
• Downlink
39 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Satellite Communication Services

There are two categories in which satellite communication services can be classified:

• One-way satellite communication

• Two- way satellite communication

One-way Satellite Communication

In one-way satellite communication, the communication usually takes place between either one or multiple earth stations
through the help of a satellite.

The communication takes place between the transmitter on the first earth satellite to the receiver which is the second
earth satellite. The transmission of the signal is unidirectional. Some common one-way satellite communication is:

• Position location services are provided by the radio

• Tracking is a part of space operations services

• Internet services take place with broadcasting satellites

Following is the figure which explains the one-way satellite communication:

40 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Two-Way Satellite Communication

In two-way satellite communication, the information is exchanged between any two earth stations. It can be said that there
is a point to point connectivity.

The signal is transmitted from the first earth station to the second earth station such that there are two uplinks and two
downlinks between the earth stations and the satellite.

Following is the figure for the two-way satellite communication:

41 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
What is Wi-Fi?

WiFi is a wireless technology that allows electronic devices to connect to the internet and communicate with each other
without a physical cable. This uses radio waves to transmit the data between a WiFi router and compatible devices like
smartphones, computers, and smart home gadgets. These WiFi networks are common in homes, offices, and public spaces
providing convenient internet access and local connectivity.

How does a Wi-Fi work?

Wi-Fi is a wireless technology for networking, so it uses Electromagnetic waves to transmit networks. We know that there
are many divisions of Electromagnetic waves according to their frequency such as X-ray, Gamma-ray, radio wave,
microwave, etc, in Wi-Fi, the radio frequency is used. For transmitting Wi-Fi signal

What is Bluetooth?

Bluetooth is a wireless communication technology that enables the exchange of data over short distances between devices
using radio frequency (RF) waves. It operates in the 2.4 GHz ISM (Industrial, Scientific, and Medical) band and is widely
used for connecting devices such as smartphones, headphones, speakers, keyboards, mice, and other electronic gadgets
without the need for cables.

42 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Advantages of Bluetooth:

• Wireless Communication
• Low Power Consumption
• Ease of Use:
• Cost-Effective
• Multi-Device Connectivity
• Widely Used
Disadvantages of Bluetooth:

• Limited Range
• Data Transfer Speed is low
• Security Concerns
• Limited Bandwidth
What is Microwave Transmission?
Sending and receiving information using a microwave is known as microwave transmission. It is the
Transmission of information (voice, data, television, telephony, radio signals) by microwave signals.
Microwaves are widely used for point-to-point communications.

Characteristics of Microwave Transmission


• Microwaves are unidirectional.
• Microwave transmission Involves line-of-sight (LOS) communication technology.
• Affected greatly by environmental factors like rain fading.
• Microwaves cannot penetrate through obstacles such as hills, buildings, and trees due to their high
frequency.
• Signals can be degraded during Solar proton events.
43 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• Atmospheric disturbances such as rain and snow can scatter microwave signals
Advantages of Microwaves Transmission

Following are the advantages of microwaves transmission −

• High data transmission rates.

• High capacity to carry huge quantities of data.

• Lower error rates, thus making it more reliable as compared to cable.

• Microwaves offer communication over very long distances.

• They have a better implementation in bad weather conditions than radio waves.

Disadvantages of Microwaves Transmission

Following are the disadvantages of microwaves transmission −

• It is expensive.

• Electromagnetic waves cannot bend or move through obstacles like mountains etc.

• It requires repeaters for long-distance transmission.

• Microwave signals are vulnerable to electromagnetic interference . Microwave systems are also affected by
atmospheric conditions.

• This communication offers limited bandwidth.

What are Radio Waves?


Radio waves are usually produced by radio transmitters and can be received by radio receivers. Radio waves
having different frequencies contains various characteristics of propagation in the Earth’s atmosphere.
Radio waves are the waves having the longest wavelength in the electromagnetic spectrum. These waves
are a kind of electromagnetic radiation and have a frequency from high 300 GHz to low as 3 kHz, though
somewhere it is defined as above 3 GHz as microwaves. At 300 GHz, the wavelength is 1 mm, and at 3 kHz is
100 km. They travel at the speed of light just like all other electromagnetic waves do.

Advantages of Radio Transmission


Following are the advantages of radio transmission −

44 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• Radio waves offer mobility at a lower price.

• It has a very low setup price as it does not need digging and laying the cables.

• Radio waves can transit long distances.

• Radio waves can penetrate well; therefore, we can also receive signals within a building.

• No land acquisition right is required.

• It provides ease of transmission in complicated geographical conditions.

Disadvantages of Radio Transmission

Following are the disadvantages of radio transmission −

• It is uncertain and simple to tap communication.

• It gets effected by weather effects like rains, thunderstorms etc.

What are wireless LANs?


Wireless Local Area Network or WLAN is a wireless network that allows two or more devices to be wirelessly connected to
form a local area network on a limited scale. WLAN relies on high-frequency radio waves rather than wired connections
and often includes an Internet access point.

Wireless LANs (WLANs) are wireless computer networks that use high-frequency radio waves instead of cables for
connecting the devices within a limited area forming LAN (Local Area Network). Users connected by wireless LANs can
move around within this limited area such as home, school, campus, office building, railway platform, etc.

45 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Advantages of WLANs

• They provide clutter-free homes, offices and other networked places.

• The LANs are scalable in nature, i.e. devices may be added or removed from the network at greater ease than
wired LANs.

• The system is portable within the network coverage. Access to the network is not bounded by the length of the
cables.

• Installation and setup are much easier than wired counterparts.

• The equipment and setup costs are reduced.

Difference between Hub, Switch and Router

Hub Switch Router

Hub is a physical layer Switch is a data link layer Router is a network layer
device i.e. layer 1. device i.e. layer 2. device i.e. layer 3.

A Hub works on the basis Switch works on the basis A router works on the basis of
of broadcasting. of MAC address. IP address.

A Switch is a tele-
A Hub is a multiport communication device A router reads the header of
repeater in which a signal which receives a message incoming packet and forward it
introduced at the input of from any device connected to the port for which it is
any port appears at the to it and then transmits the intended there by determines
output of the all-available message only to the device the route. It can also perform
ports. for which the message is filtering and encapsulation.
intended.

46 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Hub Switch Router

A route is more sophisticated


and intelligent device as it can
A Switch is an intelligent
read IP address and direct the
Hub is not an intelligent device as it passes on the
packets to another network
device that may include message to the selective
with specified IP address.
amplifier on repeater. device by inspecting the
Moreover, routers can build
address.
address tables that helps in
routing decisions.

At least single network is At least single network is Router needs at least two
required to connect. required to connect. networks to connect.

Hub is cheaper as Router is a relatively much


Switch is an expensive
compared to switch and more expensive device than
device than hub.
router. hub and switch.

maximum speed for wireless is


Speed of original hub
maximum speed is 1-10 Mbps and maximum
10Mbps and modern
10Mbps to 100Mbps. speed for wired connections is
internet hub is 100Mbps.
100 Mbps.

Routers are used in LANs,


Hubs are used in LANs. Switch is used in LANs.
MANs and WANs.

What is Wireless Card?

A wireless card, a wireless network card, or a Wi-Fi card is a hardware component that enables a device, such as a computer
or a smartphone, to connect to a wireless network. It allows the device to communicate and exchange data with other
devices or access points over radio frequency signals without physical cables.

Wireless network cards come in various types, each catering to specific technologies such as Wi-Fi, 4G, and the game-

47 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
changing 5G. These cards are designed to seamlessly integrate with different communication standards, allowing devices
to connect and communicate effortlessly.

What Are the Advantages of Wireless Cards?

Wireless cards offer numerous advantages contributing to their widespread adoption and use in various devices. Here are
some of the key benefits of wireless cards:

• Mobility and Flexibility


• Convenience and Simplicity
• Cost Efficiency
• Scalability
Mobility and Flexibility

The most significant advantage of wireless cards is their freedom of movement. Users can connect to networks and access
the internet without being tethered to a specific location by cables. This mobility is especially beneficial for laptops,
smartphones, tablets, and other portable devices.

Convenience and Simplicity

Wireless cards eliminate the need for physical cables and connectors, simplifying setup and configuration. Users can
connect to Wi-Fi networks with a few clicks or taps without plugging and unplugging cables.

Cost Efficiency

Installing and maintaining wired networks can be expensive and labor-intensive, especially in complex environments.
Wireless cards reduce the need for extensive cabling and infrastructure, resulting in potential cost savings.

Scalability

Wireless networks can accommodate multiple devices simultaneously, making them highly scalable. This is particularly
important in environments where many devices must connect to the same network, such as crowded public spaces or
enterprise settings.

48 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Chapter 5

NETWORK MODEL
OSI Model
o OSI stands for Open System Interconnection is a reference model that describes how information from
a software application in one computer moves through a physical medium to the software application in another
computer.

o OSI consists of seven layers, and each layer performs a particular network function.

o OSI model was developed by the International Organization for Standardization (ISO) in 1984, and it is now
considered as an architectural model for the inter-computer communications.

o OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a particular task.

o Each layer is self-contained, so that task assigned to each layer can be performed independently.

(All people seem to need data processing)

49 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Characteristics of OSI Model:

o The OSI model is divided into two layers: upper layers and lower layers.

o The upper layer of the OSI model mainly deals with the application related issues, and they are implemented
only in the software. The application layer is closest to the end user. Both the end user and the application layer
interact with the software applications. An upper layer refers to the layer just above another layer.

o The lower layer of the OSI model deals with the data transport issues. The data link layer and the physical layer
are implemented in hardware and software. The physical layer is the lowest layer of the OSI model and is closest
to the physical medium. The physical layer is mainly responsible for placing the information on the physical
medium.

7 Layers of OSI Model


There are the seven OSI layers. Each layer has different functions. A list of seven layers are given below:

1. Physical Layer

2. Data-Link Layer

50 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
3. Network Layer

4. Transport Layer

5. Session Layer

6. Presentation Layer

7. Application Layer

1. Application Layer

o An application layer serves as a window for users and application processes to access network service.

o It handles issues such as network transparency, resource allocation, etc.

o An application layer is not an application, but it performs the application layer functions.

o This layer provides the network services to the end-users.


51 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Functions of Application layer:

o File transfer, access, and management (FTAM):


o Mail services
o Directory services

2) Presentation Layer

o A Presentation layer is mainly concerned with the syntax and semantics of the information exchanged between
the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one presentation format to another
format.
o The Presentation layer is also known as the syntax layer.
Functions of Presentation layer:
o Translation: The processes in two systems exchange the information in the form of character strings, numbers
Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting the sender-
transmitted information into another form and sends the resulting message over the network.
o Compression: Data compression is a process of compressing the data, i.e., it reduces the number of bits to be
transmitted. Data compression is very important in multimedia such as text, audio, video.

52 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
3) Session Layer

o It is a layer 3 in the OSI model.


o The Session layer is used to establish, maintain and synchronizes the interaction between communicating
devices.
Functions of Session layer:
o Dialog control: Session layer acts as a dialog controller that creates a dialog between two processes or we can
say that it allows the communication between two processes which can be either half-duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when transmitting the data in a sequence. If some error
occurs in the middle of the transmission of data, then the transmission will take place again from the checkpoint.
This process is known as Synchronization and recovery.

4) Transport Layer

53 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
o The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which they are sent and
there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units known as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point connection between source and
destination to deliver the data reliably.
The two protocols used in this layer are:
o Transmission Control Protocol (TCP)
o It is a standard protocol that allows the systems to communicate over the internet.
o User Datagram Protocol (UDP)
o User Datagram Protocol is a transport layer protocol.
Functions of Transport Layer:
o Service-point addressing: the responsibility of the transport layer is to transmit the message to the correct
process.
o Segmentation and reassembly: When the transport layer receives the message from the upper layer, it divides
the message into multiple segments, and each segment is assigned with a sequence number that uniquely
identifies each segment.
o Connection control: Transport layer provides two services Connection-oriented service and connectionless
service
o Flow control: The transport layer also responsible for flow control
o Error control: The sender transport layer ensures that message reach at the destination without any error.

5) Network Layer

o It is a layer 5 that manages device addressing, tracks the location of devices on the network.
o It determines the best path to move data from source to the destination based on the network conditions, the
priority of service, and other factors.
54 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 5 devices, they are specified in this layer and used to provide the routing services within an
internetwork.
o The protocols used to route the network traffic are known as Network layer protocols. Examples of protocols are
IP and Ipv6.
Functions of Network Layer:
o Internetworking: It provides a logical connection between different devices.
o Addressing: Addressing is used to identify the device on the internet.
o Routing: it determines the best optimal path out of the multiple paths from source to the destination.
o Packetizing: A Network Layer receives the packets from the upper layer and converts them into packets.

6) Data-Link Layer

o This layer is responsible for the error-free transfer of data frames.


o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or more devices.
o It is mainly responsible for the unique identification of each device that resides on a local network.
o It contains two sub-layers:
Logical Link Control Layer
o It is responsible for transferring the packets to the Network layer of the receiver that is receiving.
Media Access Control Layer
o A Media access control layer is a link between the Logical Link Control layer and the network's
physical layer.

55 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
Functions of the Data-link layer
o Framing: The data link layer translates the physical's raw bit stream into packets known as Frames.

o Physical Addressing: The Data link layer adds a header to the frame that contains a destination address.
o Flow Control: is the technique through which the constant data rate is maintained on both the sides so that no
data get corrupted
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic Redundancy Check).
o Access Control: the data link layer protocols are used to determine which device has control over the link at a
given time.
7) Physical layer

o The main functionality of the physical layer is to transmit the individual bits from one node to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface specifications.
Functions of a Physical layer:
o Line Configuration: It defines the way how two or more devices can be connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-duplex or full-duplex mode
between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the information.
56 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

What is TCP/IP Model?

• The TCP/IP model is a fundamental framework for computer networking.


• It stands for Transmission Control Protocol/Internet Protocol, which are the core protocols of the Internet.
• This model defines how data is transmitted over networks, ensuring reliable communication between devices.
• The main work of TCP/IP is to transfer the data of a computer from one device to another.
The TCP/IP model is divided into four different layers:
• Application layer
• Transport layer (TCP/UDP)
• Internet layer (IP)
• Network Access layer
Each layer has specific functions that help manage different aspects of network communication, making it essential for
understanding and working with modern networks.
Each layer performs a specific task on the data that is being transmitted over the network channel, and data moves from
one layer to another in a preset pattern as mentioned below.

57 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
The diagrammatic comparison of the TCP/IP and OSI model is as follows:

The advantages of using the TCP/IP model


• It helps establish a connection between different types of computers.
• It works independently of the OS.
• TCP/IP supports many routing protocols.
• It uses a client-server architecture that's highly scalable.
• TCP/IP can be operated independently.
• It supports several routing protocols.
• It's lightweight and doesn't place unnecessary strain on a network or computer.
The disadvantages of TCP/IP model
• It's complicated to set up and manage.
• The transport layer doesn't guarantee the delivery of packets.
• It isn't easy to replace protocols in TCP/IP.
• It doesn't clearly separate the concepts of services, interfaces and protocols, so it isn't suitable for describing new
technologies in new networks.
• It's especially vulnerable to synchronization attacks, which are a type of denial-of-service attack in which a bad
actor uses TCP/IP.

Application Layer:

58 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
1. The topic three layers of the OSI Model: Application, Presentation and Sessions, when combined together, they
perform similar functions as the Application Layer of the TCP/IP model
2. node-to-node communication based on the user-interface occurs here
3. Multiple protocols are present in this layer, a few common ones have been mentioned below in brief
• HTTP: Hypertext transfer protocol is used for accessing the information available on the internet.
• SMTP: Simple mail transfer protocol, assigned the task of handling e-mail-related steps and issues.
• FTP: This is the standard protocol that responsible for the transfer of files over the network channel.
Transport Layer
1. This Transport layer is responsible for establishing the connection between the sender and the receiver device
(end-to-end)
2. It also performs the task of maintaining the data, i.e. to be transmitted without error.
3. It controls the data flow rate over the communication channel for smooth transmission of data.
The protocols used in this layer are:
• TCP: Transmission Control Protocol is responsible for the proper transmission of segments over the communication
channel. It also establishes a network connection between the source and destination system.
• UDP: User Datagram Protocol is responsible for identifying errors, and other tasks during the transmission of
information. UDP maintains various fields for data transmission.

Internet /network Layer

This layer performs many important functions in the TCP/IP model, some of which are:
1. It is responsible for specifying the path that the data packets will use for transmission.
2. The Internet layer performs the task of controlling the transmission of the data over the network modes
3. This layer is responsible for providing IP addresses to the system for the identification matters over the network
channel.

Some of the protocols applied in this layer are:


• IP: stands for Internet Protocol and it is responsible for delivering packets from the source host to the destination
host by looking at the IP addresses in the packet headers. IP has 2 versions: IPv4 and IPv6.
• ICMP: stands for Internet Control Message Protocol. It is responsible for providing hosts with information about
network problems.
• IGMP: IGMP stands for Internet Group Management Protocol help in multicasting.

59 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• Network Access Layer

• This is the bottom-most layer of the TCP/IP model architecture


• It is a combination of the Data Link and Physical Layer of the OSI model
• The physical transmission of data takes place at this layer
• Once the frames are transmitted by a network, encapsulating the IP datagram into these frames is done in this
layer
• Also, the mapping of IP address into physical address is done in this layer
• Mainly, the function of this layer is to transmit the data between two devices, connected in a network

Difference between TCP/IP and OSI Model

TCP/IP OSI Model

The full form of TCP/IP is Transmission Control Protocol/ The full form of OSI is Open Systems
Internet Protocol. Interconnection.

It is a communication protocol that is based on standard It is a structured model which deals which the
protocols and allows the connection of hosts over a functioning of a network.
network.

In 1982, the TCP/IP model became the standard In 1984, the OSI model was introduced by the
language of ARPANET. International Organization of Standardization
ARPANET stands for Advanced Research Projects Agency (ISO).
Network.

It comprises of four layers: It comprises seven layers:


• Network Interface • Physical
• Internet • Data Link
• Transport • Network
• Application • Transport
• Session
• Presentation
• Application

60 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

It follows a horizontal approach. It follows a vertical approach.

The TCP/IP is the implementation of the OSI Model. An OSI Model is a reference model, based on
which a network is created.

It is protocol-dependent. It is protocol-independent.

The above points of comparison display the difference between the TCP/IP and OSI models efficiently.

CHAPTET-6

IP ADRESS
What is an IP Address?
• An IP address represents an Internet Protocol address.
• A unique address that identifies the device over the network.
• It is almost like a set of rules governing the structure of data sent over the Internet or through a local network.
• An IP address helps the Internet to distinguish between different routers, computers, and websites.
• It serves as a specific machine identifier in a specific network and helps to improve visual communication
between source and destination.
• IP addresses play a crucial role in the transfer of data across networks, such as the Internet.
• They function as unique identifiers that enable devices to locate and communicate with each other in a network.

EXAMPLE
IP address is divided into two parts: X1. X2. X3. X4
1. [X1. X2. X3] is the Network ID
2. [X4] is the Host ID
Example IP Address: 192.168.1.15
Here’s how the parts are divided based on your format:
1. Network ID: 192.168.1 (This corresponds to [X1.X2.X3])
2. Host ID: 15 (This corresponds to [X4])

The version of The IP Address


Currently, there are 2 versions of IP addresses in use i.e. IPV4 and IPV6

IPV4 (Internet Protocol Version 4):

1. It is the first version of the Internet Protocol address.

2. The address size of IPV4 is a 32-bit number.

3. In this version, Internet Protocol Security (IPSec) for network security is optional.

4. It has 4.9 *10 7addresses, but we are still seeing a shortage in network addresses as the use of network and
virtual devices is increasing rapidly.
61 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
The following table outlines the details between IP address classes.

Name First Number of subnets Number of Description


octet hosts

Class A 1 to 126 126 Approximately Many hosts per


16.7 million network.

Class B 128 to 16,384 65,536 Many hosts per


191 network.

Class C 192 to Approximately 2.1 254 Many networks with


223 million fewer hosts per
network.

Class D 224 to n/a n/a Multicasting.


239

Class E 240 to n/a n/a Experimental.


254

First octet - Defines the network class and part of the network ID. The range of decimal numbers in each octet is
between 0 and 255.

subnet: A subnet is a logical division of an IP network into smaller, more manageable networks

62 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

IPV6 (Internet Protocol Version 6)


1. It is the recent version of the Internet Protocol address.
2. The address size of IPV6 is 128-bit number.
3. In this Internet Protocol Security (IPSec) with respect to network security is mandatory.
4. It allows 3.4 x 10^38 unique IP addresses which seems to be more than sufficient to support trillions of
internet devices present now or coming in future.

How Does IPv6 Work?


The working of IPv6 relies on the following key concepts:

IPv6 addresses
An IPv6 address uses 128 bits, four times more than the IPv4 address, which uses only 32 bits.
IPv6 addresses are written using hexadecimal rather than dotted decimal, as in IPv4.
An IPv6 address consists of 32 hexadecimal numbers since a hexadecimal number uses 4 bits.
These numbers are grouped into eight groups of 4’s and are written with a colon (:) as a separator. For
instance, group6: group7: group8: etc.

THREE THINGS BECAUSE IPV6 IS IMPORTANT FOR INTERNET OF THINGS


The most recent version of the Internet Protocol, IPv6, has a number of benefits over IPv4. These benefits
consist of:
• Security: IPv6 is designed with features to ensure data security. It uses Internet Protocol Security
(IPsec) to provide security and encryption at the IP level.
• Scalability for the Internet of Things (IoT): As IPv6 has 128-bit address space, so it provides larger
space address giving unique IP address to each device. The large address space of IPv6 is ideal for
growth of IoT devices.
• Connect ability: IPv6 large address space, its higher packet handling, and direct device communication
make it more reliable for newer networking needs, providing stable infrastructure.
IS IPV6 AVAILABLE IN PAKISTAN?
Yes, IPv6 is available in Pakistan: The Pakistan Telecommunication Authority (PTA) has instructed all telecom
operators and internet service providers to transition to IPv6 as soon as possible.
Mobile operators have enabled the IPv6 option for end users.

63 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Components in IPv6 Address Format

• There are 8 groups and each group represents 2 Bytes (16-bits).

• Each Hex-Digit is of 4 bits (1 nibble).

• Delimiter used – colon (:).

CHAPTET-7

PROTOCOLS (Communication Protocols)

What is Network Protocol?


An approved set of rules that control data transmission across various networked devices is known as a network protocol.

These set of rules specify the data's transmission, reception, and processing steps and make sure that devices can
understand and analyze the data they share.

It makes it possible for connected devices to interact with one another despite internal and structural differences.

THREE TYPES OF PROTOCOLS USED IN NETWORK COMMUNICATIONS:


• Network Communication Protocols
• Network Security Protocols:
• Network Management Protocols:
1. Network Communication Protocols:
1. These protocols determine the rules and formats to transfer data across networks.
2. Communication protocols govern various aspects of analog and digital communications, such as syntax,
authentication, semantics, and error detection, among others.

Some key network communication protocols include:

• Hyper-Text Transfer Protocol (HTTP)


• Transmission Control Protocol (TCP
• Internet Protocol (IP)
64 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• User Datagram Protocol (UDP)
• File Transfer Protocol (FTP)
2. Network Security Protocols:
1. These protocols ensure safe data transmission over the network connections.
2. Network security protocols define the procedures to secure data from any unauthorized access.
3. These protocols leverage encryption and cryptography to safeguard. Here are the most widely used network
security protocols:

• Secure File Transfer Protocol (SFTP)


• Hyper-Text Transfer Protocol Secure (HTTPS)
• Secure Socket Layer (SSL)
3. Network Management Protocols:
1. Network managers require standard policies and procedures to manage and monitor the network for maintaining
smooth communication.
2. Network management protocols ensure quick troubleshooting and optimal performance across the network.

The following are essential network protocols management:

• Simple Network Management Protocol (SNMP)


• Internet Control Message Protocol (ICMP)
Routed Protocols
• A Routed Protocol is a network protocol which can be used to send the user data from one network to
another network.
• Routed Protocol carries user traffic such as e-mails, file transfers, web traffic etc.
• Routed protocols use an addressing system (example IP Address).

Routing Protocol

• Routing protocols running in different routers exchange information between each other and most
efficient routes to a destination.
• Routing Protocols have capacity to learn about a network when a new network is added and detect when
a network is unavailable.
Examples of Routing Protocols are:

RIP (Routing Information Protocol),


EIGRP (Enhanced Interior Gateway Routing Protocol) and
OSPF (Open Shortest Path First).

65 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

Routing v/s Routed Protocols in Computer Network

Here’s a tabular difference between routing protocols and routed protocols in computer networking:

Feature Routing Protocols Routed Protocols


Function Determine the best path for data packets Carry data packets between devices
Examples RIP, OSPF, BGP, EIGRP IP, IPv6, IPX, AppleTalk
Responsibility Build and maintain routing tables Define format and rules for data transmission
Dependency Dependent on network topology Independent of network infrastructure
Updating Dynamically update routing tables No updates needed for protocol behavior
Role Used by routers Used for end-to-end communication

What is TCP (Transmission Control Protocol)?

1. TCP (Transmission Control Protocol) is one of the main protocols of the TCP/IP suite.
2. It lies between the Application and Network Layers which are used in providing reliable delivery
services.
3. Transmission Control Protocol (TCP) ensures reliable and efficient data transmission over the internet.
4. Transmission Control Protocol (TCP) is a connection-oriented protocol for communications that helps in
the exchange of messages between different devices over a network.
5. The position of TCP is at the transport layer of the OSI model.
6. TCP also helps in ensuring that information is transmitted accurately by establishing a virtual connection
between the sender and receiver.

66 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
What is Internet Protocol (IP)?
1. Internet Protocol (IP) is a method that is useful for sending data from one device to another from all over the
internet.
2. It is a set of rules governing how data is sent and received over the internet.
3. It is responsible for addressing and routing packets of data so they can travel from the sender to the correct
destination across multiple networks.
4. Every device contains a unique IP Address that helps it communicate and exchange data across other devices
present on the internet.
Difference Between TCP and IP
Feature TCP (Transmission Control Protocol) IP (Internet Protocol)

Ensures reliable, ordered, and error-


Provides addressing and routing of
Purpose checked delivery of data between
packets across networks.
applications.

Type Connection-oriented Connectionless

Manages data transmission between Routes packets of data from the source to
Function
devices, ensuring data integrity and order. the destination based on IP addresses.

Error Yes, includes error checking and recovery No, IP itself does not handle errors; relies
Handling mechanisms. on upper-layer protocols like TCP.

User Datagram Protocol (UDP)

• User Datagram Protocol (UDP) is a Transport Layer protocol.


• UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite.
• it is an unreliable and connectionless protocol. So, there is no need to establish a connection before data
transfer.
• The UDP helps to establish low-latency and loss-tolerating connections over the network.
• The UDP enables process-to-process communication.

File transfer protocol (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.

67 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1
• 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.


• It is used to encourage the use of remote computers.
• It transfers the data more reliably and efficiently.

Mechanism of FTP

The above figure shows the basic model of the FTP.

Hyper Text Transfer Protocol (HTTP)

• HTTP stands for Hyper Text Transfer Protocol.


• It is a protocol used to access the data on the World Wide Web (www).
• The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video,
and so on.
• This protocol is known as Hyper Text Transfer Protocol because of its efficiency that allows us to use
in a hypertext environment where there are rapid jumps from one document to another document.
• HTTP is similar to the FTP as it also transfers the files from one host to another host. But HTTP is
simpler than FTP as HTTP uses only one connection.
• HTTP is similar to SMTP as the data is transferred between client and server.

68 | P a g e
Compiled by: Sir Touqeer
MS Computer Science
Computer Network DIT Part-1

End chapter 7

69 | P a g e
Compiled by: Sir Touqeer
MS Computer Science

You might also like