1. COMPUTER NETWORK AND COMMUNICATION -
SEE COMPUTER SCIENCE -
CDC NEW CURRICULUM 2083 -
1. COMPUTER NETWORK AND COMMUNICATION -
SEE COMPUTER SCIENCE -
CDC NEW CURRICULUM 2083 -
SEE COMPUTER SCIENCE - CDC NEW CURRICULUM - 2083
- Computer Network and Communication -
Theory
1.1 Concept of telecommunication and key terminology:
Definition, Broadband, Bandwidth, Throughput, 3G/4G/5G, Data Packets, Frequency
1.3 Connector: RJ45, Media Convertor
1.4 Networking Devices: Repeater, Hub, Switch, Bridge,and Router
1.5 Topologies overview: BUS, Star, Ring, Hybrid
1.6 Overview of different Network based on coverage:PAN, LAN, MAN, WAN
1.7 Network Architecture: client-Server, Peer to peer
1.8 Concept of IP addressing (IPv4 and IPv6)
1.9 Concept of internet, intranet and extranet
a. Demonstrate and identify devices and cables
b. Check IP address, and default Gateway
c. Demonstrate the use of following command: ping, ipconfig, tracert, nslookup
DOWNLOAD PDF NOTES
SEE GRADE 10 NEPAL
- COMPUTER SCIENCE
CDC NEW CURRICULUM 2083
1. Computer Network and Communication
2. Database
3. Multimedia
4. Python Programming
5. AI and Contemporary
📘 4.2 User-defined Functions [Python Programming] - SEE COMPUTER SCIENCE 2083 - CDC NEW CURRICULUM
DOWNLOAD PDF NOTES [4.2 USER DEFINED FUNCTIONS]
📘 4.2 User-defined
Functions [Python Programming]
A Python function is a block of organized and reusable
code designed to perform a specific task.
Functions provide better modularity for applications
and reduce code repetition through reusability.
Modularity: Breaking down a large, complex
application into smaller, manageable blocks.
Types of Python Functions
1. Built-in Functions (Library Functions)
Functions that are already available in Python are
called built-in functions. They are loaded into the computer's memory as soon
as the Python interpreter starts.
Example:
2. User-defined Functions
Functions created by the programmer to perform a
specific task are called user-defined functions. User-defined functions are
written using the def keyword. Once defined, they can be called multiple times
in a program.
Difference Between Built-in Functions and User-defined
Functions
|
Feature |
Built-in Functions |
User-defined Functions |
|
Creator |
Created by Python developers. |
Created by the user / programmer. |
|
Availability |
Available by default in Python without importing
additional modules. |
Must be written before using. |
|
Memory |
Loaded immediately when interpreter starts. |
Loaded only when defined in your code. |
|
Examples |
print(), len() |
calculate_tax ( ) |
|
Real-Life Example |
Readymade clothes from a store. |
Tailor-stitched custom clothes. |
Creating User-defined Functions
A function definition begins with the keyword def
(short for define). The syntax for creating a user-defined function is as
follows:
Syntax
def <function_name> (parameter1, parameter2,
...):
set of
instructions to be executed
[return
<value>]
Important Points
i. The items enclosed in “[ ]” are optional
parameters. Therefore, a function may or may not have parameters. Similarly, a
function may or may not return a value.
ii. The function header always ends with a colon (:).
iii. The function name should be unique. The rules for
naming identifiers also apply to function names.
iv. The statements outside the function indentation
are not considered part of the function.
Example
# Program to illustrate the use of user-defined
functions
def add_numbers(x, y):
total = x +
y
return total
num1 = 5
num2 = 6
print("The sum is", add_numbers(num1, num2))
Output
The sum is 11
Scope of Function
The scope of a function refers to the area of a
program where a function or variable can be accessed.
Generally, scope can be classified into the following
types:
i. Local Scope
Variables declared inside a function are accessible
only within that function.
ii. Global Scope
Variables declared outside any function can be
accessed from anywhere in the program.
Functions Returning a Value
The return statement in Python is used to return a
value back to the calling function. A function can take input values as
parameters, process them, and return the output using the return statement.
Usually, function definitions have the following basic
structure:
Syntax
def function_name(arguments):
return
<value>
Example
# Function to calculate the area of a rectangle
def area(length, width):
return
length * width
length = 5
width = 8
result = area(length, width)
print("Area of Rectangle:")
print(result)
Output
Area of Rectangle:
40
Parameters and Arguments in Functions
Parameters are the variables written inside the
parentheses in a function definition. These values are required for the
function to work.
Example
# Function to
calculate the area of circle using function
def area_of_circle(radius):
area =
radius ** 2 * 22 / 7
return area
radius =
float(input("Please enter the radius of the given circle: "))
print("The area of the given circle is:", area_of_circle(radius))
An argument is an actual value passed to a function.
In other words, arguments are the values provided in the function call
statement.
The list of arguments should match the order of
parameters in the function definition.
Example of argument in function call
area(5)
5 is an argument. An argument can be constant,
variable, or expression.
Parameters are
actually variables/placeholders, not values.
Arguments are the actual values passed during function call.
Scope of Variables
The scope of a variable determines where the variable
can be accessed in a program.
The two common types of variable scope are:
1. Local Scope
2. Global Scope
1. Local Scope
Variables declared inside a function are called local
variables. These variables can only be accessed within that function. A local
variable exists only while the function is executing.
Example
def
multiply_by_two():
number = 5 # local variable
result = number * 2
print("Inside function:",
result)
multiply_by_two()
# print(result) # This will give an
error because 'result' is local to the function
Output
Inside function: 10
2. Global Scope
Variables declared outside all functions are called
global variables. These variables can be accessed from anywhere in the program.
Example
number = 10 # global variable
def add_five():
result = number + 5
print("Inside function:",
result)
add_five()
print("Outside function:", number)
Output
Inside function:
15
Outside function: 10
Passing Parameters
Python allows different ways to pass data (arguments)
into a function.
Python supports three types of arguments:
1. Positional (Required) Arguments
2. Default Arguments
3. Keyword (Named)
1. Positional/Required Arguments
Arguments passed in the same order as the parameters
are defined are called positional or required arguments.
Example
If a function definition header is like
def check(a, b, c):
then function calls for this can be:
check(x, y,
z) # 3 values (all variables) passed
check(2, x, y) # 3 values (literal
variables) passed
check(2, 5, 7) # 3 values (all
literals) passed
2. Default Arguments
Default arguments are the parameters that take default
values if no value is provided during the function call.
Example
def interest(principal, time, rate=0.10):
here 0.10 is the default value for parameter rate
The default value is specified in a manner
syntactically similar to a variable initialization.
Example
def Interest(prin,
time, rate=0.10): # legal
def Interest(prin, time=2, rate):
# illegal
def Interest(prin=2000, time=2, rate):
# illegal
def Interest(prin, time=2, rate=0.10):
# legal
def Interest(prin=200, time=2, rate=0.10): # legal
Important point
Default parameters must always come after required
parameters.
Example 2
def power (base, exp = 2) :
return base
** exp
print (power(4))
print (power (2, 3))
Here, in the first function call, only one argument,
i.e. the base. So, it uses default value of exp, i.e. 2. In the second function
call, both arguments are defined so base = 2 and exp = 3.
Output
16
8
3. Keyword (Named) Arguments
Arguments passed using parameter names in a function
call, so the order does not matter, are called keyword (or named) arguments.
Examples
interest(prin=2000,
time=2, rate=0.10)
interest(time=2, prin=2600, rate=0.09)
interest(time=2, rate=0.12, prin=2000)
All the above function calls are valid now, even if
the order of arguments does not match the order of parameters as defined in the
function header.
Returning Values
from Functions
A function in Python can be defined with or without returning a value to the
calling function. There are two types of functions in Python:
1. Functions Returning Values (Non-void Functions)
2. Functions Not Returning Values (Void Functions)
1. Functions Returning Values (Non-void
Functions)
Functions that return a computed value to the calling
function are called non-void functions.
The return statement is used to return the value.
The returned value may be a literal (5), a variable
(x), or an expression (x + y).
Syntax
return <value>
Example
def add(x, y):
return x + y
result = add(5, 3)
Here, the returned value from add( ) replaces the
function call.
2. Functions Not Returning Values (Void
Functions)
Functions that perform a task but do not return any
value to the calling function are called void functions.
A void function may contain:
return
That is, the return statement without any value or
expression.
Examples of Void Functions
def greet():
print("Hello")
def greet1(name):
print("Hello", name)
def quote():
print("Python is good")
return
def printsum(a, b, c):
print("Sum is", a + b + c)
return
Important Point
Void functions do not return any value. However,
Python automatically returns a special value called None.
Example
def greet():
print("Hello")
a = greet()
print(a)
Output
Hello
None
Returning Multiple Values
Python allows a function to return multiple values
using a single return statement.
Syntax
return <value1>, <value2>, <value3>
Example
def squared(x, y,
z):
return x * x, y * y, z * z
t = squared(2, 5, 7)
print(t)
Output
(4, 25, 49)
Example
def squared(x, y,
z):
return x * x, y * y, z * z
v1, v2, v3 = squared(2, 3, 4)
print("The returned values are as under:")
print(v1, v2, v3)
Output
The returned
values are as under:
4 9 16
Complete theory notes and practical tasks based on the CDC New Curriculum 2083.
This chapter introduces the fundamentals of computer networking and communication, including telecommunication, communication media, connectors, networking devices, topologies, network coverage, architecture, IP addressing, and Internet technologies. It also includes practical networking activities prescribed by the CDC New Curriculum 2083.
In telecommunication, a network is a system in which two or more electronic devices are connected to share information and communicate with each other.
A network mainly works in two ways:
1. Wired Network: A wired network uses physical cables or telephone lines to connect devices.
2. Wireless Network: A wireless network connects devices without physical wires using technologies such as Wi-Fi and mobile networks.
Through these networks, people can easily share messages, sound, pictures, videos, and data over long distances quickly and efficiently.
Broadband is a high-speed Internet connection that allows users to send and receive large amounts of data quickly through different communication technologies. It is much faster than the old dial-up Internet connection.
Watching videos online , Attending online classes , Playing online games , Downloading files
Homes , Schools , Offices, Public places
Uses television (TV) cables to deliver fast and stable Internet, mainly for homes.
Uses fiber-optic (glass) cables to provide very high-speed, reliable Internet for gaming, streaming, and large file transfers.
Uses communication satellites to provide Internet in remote and rural areas where cable connections are unavailable, but weather can affect the signal.
Uses Wi-Fi, 4G, or 5G mobile networks to provide convenient wireless Internet access without physical cables.
Throughput is the actual amount of data that is successfully sent or received over a network in a given period of time. It shows the real speed of data transfer between devices.
In simple words, throughput measures how much data is actually transferred successfully.
Higher throughput means faster and smoother performance, such as quicker downloads, video streaming without buffering, and a better online experience.
Bandwidth is the maximum amount of data that a network can transmit in a given period of time. It represents the data-carrying capacity of a network.
In simple words, bandwidth shows how much data can be sent or received at one time.
Higher bandwidth allows more data to travel at once, resulting in faster Internet access, smoother video streaming, quicker file downloads, and better online communication.
| Bandwidth | Throughput |
|---|---|
| Bandwidth is the maximum amount of data that a network can transmit in a given period of time. | Throughput is the actual amount of data that is successfully transmitted over a network in a given period of time. |
| It represents the maximum capacity of a network connection. | It represents the actual performance of a network connection. |
| It is the theoretical or maximum speed that a network can provide. | It is the practical or real speed experienced by users. |
| It usually remains fixed for a particular network connection. | It changes depending on network traffic and conditions. |
| It is less affected by network congestion or interference. | It is affected by congestion, interference, hardware, and network load. |
3G is the third generation of mobile network technology. It provides faster Internet speed and better communication services than 2G.
3G made smartphones more useful by providing faster Internet access and better communication services. It helped people use online learning, social media, entertainment, and other Internet-based services more easily.
4G is the fourth generation of mobile network technology. It is much faster and more reliable than 3G. It provides high-speed Internet and a better online experience on mobile devices.
4G made it easier to study online, watch videos, play games, browse the Internet, and communicate with others using mobile phones and tablets.
5G is the fifth generation of mobile network technology. It is much faster, smarter, and more powerful than 4G. It provides very high Internet speed, a strong network connection, and supports many devices at the same time.
5G is improving communication and making technology faster and more efficient. It is helping in education, healthcare, transportation, business, entertainment, and smart city development.
| Feature | 3G (Third Generation) | 4G (Fourth Generation) | 5G (Fifth Generation) |
|---|---|---|---|
| Definition | The third generation of mobile network technology that provides fast Internet and supports services like web browsing and video calling. | The fourth generation of mobile network technology that provides very fast Internet with better speed, quality, and lower latency than 3G. | The fifth and latest generation of mobile network technology that provides ultra-fast Internet, extremely low latency, and supports advanced technologies. |
| Video Calls | Supports basic video calling. | Supports high-quality video calling. | Supports Ultra HD video calling with excellent quality. |
| Online Gaming | Suitable for basic online gaming. | Provides a better gaming experience with lower latency. | Offers an excellent gaming experience with extremely low latency. |
| Latency | Has moderate latency. | Has low latency. | Has very low latency for real-time communication. |
| IoT Support | Provides limited support for IoT devices. | Provides partial support for IoT applications. | Provides excellent support for IoT and smart devices. |
| AR & VR | Does not support AR and VR applications. | Provides limited support for AR and VR. | Fully supports AR and VR applications. |
| Self-driving Vehicles | Does not support self-driving vehicles. | Provides limited support for autonomous vehicles. | Fully supports self-driving vehicles and other smart technologies. |
| Basis | 1G | 2G | 3G | 4G | 5G |
|---|---|---|---|---|---|
| Generation | First Generation | Second Generation | Third Generation | Fourth Generation | Fifth Generation |
| Technology | Analog | Digital | Advanced Digital | High-Speed Digital | Smart Network Technology |
| Internet Support | Not Available | Very Limited | Available | High-Speed | Ultra-High-Speed |
| Main Service | Voice Calls | Voice Calls and SMS | Internet and Video Calls | HD Streaming and Online Gaming | Smart Devices and Advanced Applications |
| Speed | Very Slow | Slow | Fast | Very Fast | Extremely Fast |
| Call Quality | Low | Better than 1G | Good | High | Very High |
| Device Support | Mobile Phones | Mobile Phones | Smartphones | Smartphones and Tablets | Smartphones, Smart Devices, IoT Devices |
| Examples of Use | Voice Communication | SMS and Calls | Web Browsing and Video Calls | Video Streaming and Gaming | Smart Homes, Smart Cities, AR/VR |
Data packets are small units of data into which information is divided before being sent over a network. These packets travel through the network separately and are reassembled at the destination to form the original information.
Each data packet contains a part of the information along with details such as the sender's address and receiver's address, ensuring that it reaches the correct destination.
In telecommunication, frequency refers to the number of times a signal is transmitted in one second. It affects how data is sent and received through communication channels.
kHz (Kilohertz) = 1,000 cycles per second
MHz (Megahertz) = 1,000,000 cycles per second
GHz (Gigahertz) = 1,000,000,000 cycles per second
| Technology | Frequency Range | Purpose / Use |
|---|---|---|
| Wi-Fi | 2.4 - 2.5 GHz | Wireless Internet |
| Bluetooth | 2.4 - 2.5 GHz | Wireless connection between devices |
| FM Radio | 88 - 108 MHz | Music and news broadcasting |
| AM Radio | 530 - 1710 kHz | Long-distance radio broadcasting |
| Microwave Oven | 2.45 GHz | Heating food |
| RFID (UHF) | 860 - 960 MHz | Smart cards and inventory tracking |
| Television (UHF) | 470 - 890 MHz | Digital TV broadcasting |
| 5G (mmWave) | 24 - 100 GHz | Ultra-fast mobile communication |
Communication mode refers to the direction in which data and information are transmitted between devices.
There are three types of communication modes:
In simplex mode, data is transmitted in one direction only. The receiver cannot send data back.
Radio broadcasting
Television broadcasting
Newspaper
Books
In half-duplex mode, data can flow in both directions, but only one direction at a time.
Walkie-talkie
Wireless handsets
In full-duplex mode, data can flow in both directions at the same time.
Mobile phones
Landline phones
| Basis | Simplex Mode | Half-Duplex Mode | Full-Duplex Mode |
|---|---|---|---|
| Definition | Simplex mode is a communication mode in which data is transmitted in only one direction, from the sender to the receiver. | Half-duplex mode is a communication mode in which data can travel in both directions, but only one direction at a time. | Full-duplex mode is a communication mode in which data can travel in both directions simultaneously. |
| Direction of Communication | One-way communication only. | Two-way communication, but not at the same time. | Two-way communication at the same time. |
| Data Flow | Data flows only from sender to receiver. | Data flows in both directions alternately. | Data flows in both directions simultaneously. |
| Main Advantage | Simple, reliable, and inexpensive communication. | Allows two-way communication using a single communication path. | Provides the fastest and most efficient communication with real-time interaction. |
| Main Disadvantage | Receiver cannot send any response or feedback. | Communication is slower because devices must wait for their turn. | Requires more complex and costly networking equipment. |
| Common Examples | Radio broadcasting, Television broadcasting, Newspaper, Keyboard to Computer | Walkie-talkie, Wireless handsets, CB Radio | Mobile phones, Landline telephones, Video conferencing, Online voi |
Communication media is the path or channel through which data and information are transmitted from one device to another. It is also known as transmission media.
Communication media helps connect devices and enables them to exchange data and information.
1. Guided Media (Wired Media) and 2. Unguided Media (Wireless Media)
Guided media is a type of communication media that uses physical cables or wires to transmit data and information between computers and other network devices.
It is also called wired media because devices are connected using cables.
Twisted Pair Cable
Coaxial Cable
Optical Fiber Cable
Guided media is generally faster, more secure, less interference from external signals and more reliable than wireless communication.
1. CAT6 (Category 6 Cable) and 2. Optical Fiber Cable
CAT6 (Category 6) is a type of network cable used to connect computers, routers, switches, and other network devices. It provides faster and more reliable communication than older cables such as CAT5e.
CAT6 cables are commonly used in homes, offices, and data centers where fast and strong internet is important.
Optical Fiber Cable is a high-speed communication cable made of thin strands of glass or plastic. It transmits data using light signals, allowing data to travel very fast over long distances.
Optical fiber is faster, more reliable, and more efficient than twisted pair and coaxial cables.
High-speed Internet services
Telecommunications
Data centers
Cable television networks
ST (Straight Tip)
SMA (Screw-Mounted Adaptor)
SC (Subscriber Connector)
| CAT6 Cable | Optical Fiber Cable |
|---|---|
| CAT6 is made of copper wires that transmit data using electrical signals. | Optical fiber is made of glass or plastic fibers that transmit data using light signals. |
| It provides speeds of up to 1 Gbps over 100 m and up to 10 Gbps over shorter distances. | It provides very high-speed data transmission over long distances. |
| It is suitable for short to medium-distance communication. | It is suitable for long-distance communication. |
| It can be affected by electromagnetic interference (EMI). | It is not affected by electromagnetic interference. |
| It is less expensive and easier to install. | It is more expensive but offers better performance and reliability. |
| It commonly uses an RJ45 connector. | It commonly uses ST, SC, or SMA connectors. |
| It is mainly used in Local Area Networks (LANs). | It is mainly used by Internet Service Providers (ISPs), backbone networks, and data centers. |
Unguided media is a type of communication media that transmits data and information without using physical cables or wires. It uses wireless signals such as radio waves to send and receive data between devices. It is also known as wireless media.
Unguided media is widely used for Internet access, mobile communication, and wireless data sharing.
In Nepal, permission to use wireless technology is given by the government to ensure proper use and security
Wi-Fi (Wireless Fidelity) is a wireless technology that allows devices to connect to the Internet without using cables. It uses radio waves to send and receive data between devices.
It commonly operates on 2.4 GHz and 5 GHz frequency bands.
Wi-Fi provides a fast and reliable Internet connection. It can connect many devices to the Internet at the same time through a router or access point.
Wi-Fi is widely used in homes, schools, offices, and public places for wireless Internet access.
Bluetooth is a wireless technology that allows devices to exchange data over short distances without using cables.
It is commonly used in smartphones, tablets, computers, smartwatches, wireless headphones, and fitness bands.
Bluetooth uses radio waves to connect devices and transfer files, music, photos, and other information.
It uses a technique called Frequency Hopping Spread Spectrum (FHSS), which reduces signal interference and improves connection reliability.
Bluetooth uses very little power, making it suitable for small electronic devices. It is built into most modern devices and is commonly used to connect wireless headphones, speakers, keyboards, mice, smartwatches, and other gadgets.
RFID (Radio Frequency Identification) is a wireless technology that uses radio waves to identify and track objects, animals, or people.
An RFID system consists of RFID tags and an RFID reader. When the reader scans a tag, it receives the information stored in the tag.
RFID is widely used for identifying and tracking items. It is also used in inventory management, access control systems, and contactless payment systems.
RFID provides a fast and reliable way to collect data and is commonly used in stores, offices, schools, and transportation systems.
Satellite communication is a wireless communication system that uses artificial satellites to transmit information over long distances around the world.
Satellites receive signals from one location and transmit them to another, making global communication possible.
Satellite communication has been used for communication services such as telecommunication, radio, television, and Internet services.
It allows the transmission of text, images, audio, and video to any part of the world.
Today, satellite communication is widely used for television broadcasting, weather forecasting, GPS navigation, military communication, and Internet services.
| Basis | Guided Media | Unguided Media |
|---|---|---|
| Definition | Guided media transmits data through physical cables or wires. | Unguided media transmits data through the air using electromagnetic waves without physical cables. |
| Medium | Uses copper or fiber-optic cables as the transmission medium. | Uses air or free space as the transmission medium. |
| Signal Type | Transmits data using electrical or light signals. | Transmits data using radio waves, microwaves, infrared, or satellite signals. |
| Speed | Generally provides higher speed and a more stable connection. | Speed varies depending on signal strength, distance, and interference. |
| Reliability | More reliable because the transmission path is fixed. | Less reliable because signals can be affected by interference. |
| Security | More secure as data travels through cables. | Less secure because wireless signals can be intercepted more easily. |
| Weather Effect | Generally not affected by weather conditions. | Can be affected by rain, storms, obstacles, and other environmental factors. |
| Also Known As | Also called wired media or bounded media. | Also called wireless media or unbounded media. |
| Examples | CAT6 Cable, Coaxial Cable, Optical Fiber | Wi-Fi, Bluetooth, RFID, Satellite Communication |
Connectors are hardware devices used to connect communication media (cables) to network devices such as computers, routers, and switches. Connectors help transfer data signals between network devices and communication media.
Connectors play an important role in computer networking because they:
Connect cables to networking devices.
Ensure stable and reliable data transmission.
Reduce signal loss during communication.
Allow easy installation and replacement of cables.
Support high-speed communication.
Help different networking devices communicate efficiently.
There are two common types of connectors:
RJ-45 Connector
Media Converter
The RJ45 connector is a standardized interface for connecting Ethernet cables to network devices like computers, routers, and switches.
It features eight pins in a modular jack format, easy insertion and removal, and follows specific wiring schemes.
It supports reliable, highspeed data transmission over Ethernet networks.
RJ-45 connectors are used in Local Area Networks (LANs), home Internet connections, school computer labs, offices, data communication, and for connecting computers to switches and routers.
A media converter is a networking device used to connect different types of communication media, such as Ethernet (copper) cables and optical fiber cables.
It converts electrical signals from copper cables into light signals for optical fiber cables, and vice versa.
A media converter converts electrical signals from Ethernet (copper) cables into light signals for optical fiber cables, and vice versa.
It is commonly used in schools, offices, and data centers to connect different network systems.
Useful when copper cables cannot cover long distances.
Allows the use of optical fiber for faster and more reliable communication.
A media converter is useful when:
Copper cable cannot cover the required distance.
Fiber optic cable is needed for higher speed.
A network needs to connect copper and fiber cables.
Better network performance is required.
Long-distance communication is needed.
| Basis | RJ-45 Connector | Media Converter |
|---|---|---|
| Definition | RJ-45 is a connector used to connect Ethernet cables to network devices. | A media converter is a networking device that connects copper and fiber optic networks. |
| Signal Type | Transmits electrical signals through copper cables. | Converts electrical signals into light signals and light signals into electrical signals. |
| Cable Used | Uses copper Ethernet cables such as CAT5e and CAT6. | Uses both copper cables and fiber optic cables. |
| Main Function | Connects Ethernet cables to computers, routers, switches, and other network devices. | Connects copper and fiber optic networks by converting signal types. |
| Transmission Distance | Supports communication up to 100 meters. | Supports communication over several kilometers using fiber optic cables. |
| Speed | Provides high-speed Ethernet communication. | Provides very high-speed communication over long distances. |
| Cost | Less expensive and economical. | More expensive due to additional hardware and fiber optic technology. |
| Installation | Easy and simple to install. | Installation is more complex and requires technical knowledge. |
| Power Supply | Does not require an external power supply. | Requires an external electrical power supply to operate. |
| Common Uses | Used in homes, schools, offices, and Local Area Networks (LANs). | Used in data centers, Internet Service Providers (ISPs), hospitals, campuses, and large organizations. |
Networking devices are hardware devices used to connect computers and other devices in a network. They help establish communication, manage the flow of data, and enable users to share resources such as files, printers, and Internet connections efficiently.
The common networking devices are: Repeater , Hub , Switch , Bridge , Router
A Repeater is a networking device that receives weak signals and regenerates them to their original strength, and retransmits them to the next device.
It makes it possible for long-distance data transfer. So, it boosts the data signals that are received from the network.
A Hub is a basic networking device with multiple ports that connects several computers in a star topology. When it receives data from one device, it broadcasts the data to every connected device regardless of the intended destination.
It is simple, easier to install and low cost as compared to other devices.
It can receive or send information between the computers. Nowadays, hub is replaced by switch.
A Switch is an network connectivity device that connects multiple computers and forwards data only to the intended destination device. It makes communication faster, more secure, and more efficient than a hub.
A switch receives data from a computer.
It checks the destination MAC address.
It identifies the correct receiving device.
It sends the data only to that specific device instead of broadcasting it to all devices.
A Bridge is a networking device that connects two similar networks or LAN segments using the same communication protocol. It examines incoming data and decides whether to forward or discard it, helping reduce unnecessary network traffic.
A Router is an intelligent networking device that connects two or more different wired or wireless networks. It forwards data packets using IP addresses and automatically selects the best possible path for data transmission.
A router receives incoming data packets.
It examines the destination IP address.
It determines the most efficient route.
It forwards the data to the correct destination network.
Network topology is the physical or logical arrangement of computers, network devices, and cables in a computer network. It defines how devices are connected and how data travels from one device to another.
Physical topology shows the actual arrangement of cables and devices.
Logical topology shows the path through which data travels in the network.
A LAN topology refers to the layout or structure used to connect computers within a Local Area Network (LAN).
There are four main types of network topology:
Bus Topology 2. Star Topology 3. Ring Topology 4. Hybrid Topology
Bus topology is a network topology in which all computers and devices are connected to a single main cable called a bus.
The cable has terminators at both ends to prevent signal loss and ensure proper data transmission.
When the bus topology has exactly two endpoints, it is called a Linear Bus Topology.
Requires less cable, making it low-cost.
Easy to install and maintain.
Suitable for small LANs.
Easy to add new devices.
Does not require a central device such as a switch or hub.
If the backbone cable fails, the entire network stops working.
Network performance decreases as more devices are added.
Difficult to identify faults in the cable.
Data collisions can occur when multiple devices transmit simultaneously.
Limited cable length and number of connected devices.
Common Uses : Small offices , Small computer laboratories , Temporary networks , Home networks with a few devices (older installations)
Star topology is a network topology in which all computers and devices are connected to a central device called a hub or switch through separate cables.
The hub or switch controls the communication between devices in the network.
Fast and efficient data communication.
Easy to install, manage, and troubleshoot.
Failure of one computer or cable does not affect the rest of the network.
Easy to add or remove devices without disturbing the network.
Better performance because each device has its own dedicated cable.
If the hub or switch fails, the entire network stops working.
Requires more cable than bus topology.
Installation cost is higher due to the central device and additional cables.
Network performance depends on the central hub or switch.
Schools and colleges
Computer laboratories
Offices and businesses
Banks
Modern home and office LANs
Ring topology is a network topology in which each computer is connected to the next computer, and the last computer is connected to the first, forming a closed loop or ring.
Data travels from one computer to another in a sequential manner around the ring.
Data collisions are greatly reduced because data moves in one direction.
Performs well even under heavy network traffic.
Every computer has equal access to the network.
Can cover longer distances using repeaters.
Suitable for networks requiring orderly data transmission.
Failure of a single computer or cable can disrupt the entire network.
Adding or removing a computer may interrupt the network.
Troubleshooting is more difficult than in a star topology.
Data must pass through multiple computers, which may increase transmission time.
Fiber optic communication networks
Metropolitan Area Networks (MANs)
Industrial control systems
Older LAN implementations
Hybrid topology is a network topology formed by combining two or more different topologies, such as star, bus, and ring, into a single network.
It combines the advantages of different topologies to provide better flexibility, reliability, and performance.
Highly flexible and scalable.
Easy to expand as the network grows.
More reliable because failure in one part usually does not affect the entire network.
Provides better performance by combining the strengths of different topologies.
Suitable for organizations with different networking requirements.
Expensive to install and maintain.
Complex to design and manage.
Troubleshooting can be difficult.
Requires more networking devices and cables.
Large companies and corporate offices
Universities and colleges
Banks
Hospitals
Government organizations
Large campus networks
| Basis | Bus Topology | Star Topology | Ring Topology | Hybrid Topology |
|---|---|---|---|---|
| Definition | All devices are connected to a single backbone cable. | All devices are connected to a central hub or switch. | Each device is connected to two neighboring devices, forming a closed loop. | A combination of two or more different network topologies. |
| Connection | Single backbone cable. | Central hub or switch. | Closed circular loop. | Combination of different topologies. |
| Central Device | Not required. | Hub or Switch is required. | Not required. | Depends on the topologies used. |
| Data Transmission | Data travels through the backbone cable. | Data passes through the hub or switch. | Data travels sequentially from one device to another. | Depends on the combined topologies. |
| Cable Required | Least amount of cable. | More cable than bus topology. | Moderate amount of cable. | Highest amount of cable. |
| Cost | Low. | Medium. | Medium. | High. |
| Installation | Easy. | Easy. | Moderate. | Complex. |
| Expansion | Easy to expand. | Easy to add new devices. | Expansion may interrupt the network. | Highly flexible and scalable. |
| Failure Effect | Failure of the backbone cable stops the entire network. | Failure of one node does not affect others, but hub/switch failure stops the network. | Failure of one node or cable may stop the entire network. | Failure in one section usually does not affect the whole network. |
| Performance | Performance decreases as more devices are added. | Fast performance with low network traffic. | Performs well under heavy traffic. | High performance by combining the strengths of different topologies. |
| Best Used For | Small networks. | Schools, offices, and LANs. | Fiber optic and industrial networks. | Large organizations and enterprise networks. |
A computer network is a group of two or more computers and devices connected through wired or wireless communication media to exchange data, communicate, and share resources such as hardware, software, and files.
In simple words, a computer network allows multiple computers to work together and share information and resources efficiently.
Print Service: Allows multiple users to share a printer.
File Service: Enables users to store and share files.
Database Service: Allows users to access a common database.
Application Service: Shares software applications across the network.
Message Service: Supports communication through email and messaging.
The first computer network, called ARPANET, was created in 1969 and became the foundation of today's Internet.
The first message sent over ARPANET was supposed to be "LOGIN", but the system crashed after sending only "LO".
So, the first message in Internet history was simply "LO"! 😄
Types of Computer Networks Based on Coverage Area (geographical area)
1. PAN (Personal Area Network)
2. LAN (Local Area Network)
3. MAN (Metropolitan Area Network)
4. WAN (Wide Area Network)
A Personal Area Network (PAN) is a computer network that connects devices around a single person within a short distance, usually up to 10 meters.
It is mainly used for personal communication and data sharing between devices such as smartphones, tablets, laptops, smartwatches, and other personal gadgets.
Smartphone connected to a smartwatch
Laptop connected to a wireless mouse
Mobile phone connected to Bluetooth headphones
File sharing through Bluetooth
A Local Area Network (LAN) is a computer network that connects computers and devices within a small geographical area such as a room, building, school, college, or office.
LAN generally uses wired communication, although wireless LAN (WLAN) can also be used. It provides high-speed data transfer and allows devices to share resources and information.
School computer lab
Office network
Home network
College computer lab
A WLAN is a LAN that uses wireless technology such as Wi-Fi instead of cables to connect devices.
A Metropolitan Area Network (MAN) is a computer network that covers a larger area than a LAN but a smaller area than a WAN. It usually connects computers and networks within a city, valley, or metropolitan area.
A MAN can use both wired and wireless communication technologies and is commonly used by organizations with branches located in different parts of a city.
Network connecting bank branches in a city
University campus network
City-wide government office network
A Wide Area Network (WAN) is a computer network that connects computers and networks over a large geographical area, such as countries or continents.
WAN connects computers and networks over long distances using communication technologies such as telephone lines, optical fiber, mobile networks, and satellite communication.
The Internet is the largest example of a WAN.
Internet
4G/5G Mobile Networks
Satellite Communication
International Banking Networks
| Basis | PAN | LAN | MAN | WAN |
|---|---|---|---|---|
| Full Form | Personal Area Network | Local Area Network | Metropolitan Area Network | Wide Area Network |
| Coverage Area | Covers a very small area (1–10 metres) around a single person. | Covers a small geographical area such as a room, office, school, or campus. | Covers a city or metropolitan area by connecting multiple LANs. | Covers a very large geographical area, such as countries or continents. |
| Ownership | Usually owned and managed by an individual user. | Usually owned and managed by a single organization or institution. | May be owned and managed by one or more organizations. | Usually managed by multiple organizations and Internet service providers (ISPs). |
| Communication Speed | Provides moderate speed for connecting personal devices. | Provides very high-speed communication with low transmission errors. | Provides high-speed communication between different LANs within a city. | Provides lower communication speed than LAN because of the large geographical distance. |
| Technology Used | Uses Bluetooth, USB, and Wi-Fi Direct for communication. | Uses Ethernet cables and Wi-Fi technology. | Uses fiber optic cables, leased lines, and high-speed communication links. | Uses fiber optics, satellites, microwave links, and the Internet. |
| Main Purpose | Used for connecting and sharing data between personal devices. | Used for sharing resources and information within a building or campus. | Used for connecting multiple LANs within a city. | Used for connecting networks across countries and continents. |
| Installation Cost | Has the lowest installation and maintenance cost. | Has a low installation and maintenance cost. | Has a moderate installation and maintenance cost. | Has the highest installation and maintenance cost because of its large coverage area. |
| Examples | Smartphone connected to wireless earbuds. | School computer lab or office network. | City-wide banking or university network. | The Internet or a multinational company network. |
Network architecture is the design or structure of a computer network that determines how devices are connected, communicate, and share resources.
Client-Server Network
Peer-to-Peer Network
Common server operating systems include Microsoft Windows Server, Ubuntu Server, CentOS, and UNIX.
Real-Life Example
In a school computer lab, students use client computers to access files, printers, and the Internet through a central server.
A network administrator is a person who manages, maintains, and secures a computer network.
| Basis | Client-Server Network | Peer-to-Peer (P2P) Network |
|---|---|---|
| Definition | A network architecture in which one or more servers provide services and resources to client computers. | A network architecture in which all computers are equal and share resources directly without a central server. |
| Resource Sharing | Resources are shared through the server. | Resources are shared directly between computers. |
| Security | Provides better security because the server controls access to resources. | Provides less security because each computer manages its own resources. |
| Network Administrator | Requires a network administrator. | Does not require a network administrator. |
| Cost | More expensive because a dedicated server is required. | Less expensive because no dedicated server is needed. |
| Suitable for | Large organizations and networks with many users. | Small networks with a few computers. |
| Examples | Schools, banks, hospitals, offices, and government organizations. | Home networks, small offices, small computer labs, and small businesses. |
A network protocol is a set of rules that governs the interconnection, communication, and exchange of data between computers and other devices on a network.
NCP (Network Control Protocol) was the first network protocol used for communication between computers on early computer networks. Later, it was replaced by TCP/IP, which is now the standard protocol used on the Internet.
TCP/IP is the standard network protocol used for communication over the Internet. It ensures that data is transmitted reliably and reaches the correct destination.
HTTP is a network protocol used to transfer web pages and other web resources between a web server and a web browser on the World Wide Web (WWW).
HTTPS is the secure version of HTTP that encrypts data exchanged between a web browser and a web server to provide safe and secure communication.
DHCP is a network protocol that automatically assigns IP addresses and other network configuration settings to devices connected to a network.
SMTP is a network protocol used to send e-mails over the Internet.
FTP is a network protocol used to transfer files between computers over a network or the Internet.
Example: Uploading website files to a web server.
POP is a network protocol used to receive and download e-mails from a mail server to a user's device.
| Protocol | Full Form | Use |
|---|---|---|
| TCP/IP | Transmission Control Protocol / Internet Protocol | Internet Communication |
| HTTP | Hyper Text Transfer Protocol | Web Pages |
| HTTPS | Hyper Text Transfer Protocol Secure | Secure Websites |
| DHCP | Dynamic Host Configuration Protocol | Automatic IP Address Assignment |
| SMTP | Simple Mail Transfer Protocol | Sending E-mails |
| FTP | File Transfer Protocol | File Transfer |
An Internet Protocol (IP) Address is a unique numerical address assigned to every device connected to a network and routing data between devices. It identifies the device and allows data to be sent to and received from the correct destination.
Internet Protocol (IP) is a set of rules that identifies devices on a network and controls how data is sent from one device to another.
IP works like a postal system. It gives every device a unique address and ensures that data reaches the correct destination.
An IP address is important because it:
Identifies each device on a network.
Allows devices to communicate with one another.
Helps route data to the correct destination.
Prevents data from being delivered to the wrong device.
IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6) are two different versions of the Internet Protocol.
IPv4 (Internet Protocol Version 4) is the fourth version of the Internet Protocol that uses a 32-bit address to uniquely identify devices and enable communication over a network.
Uses a 32-bit IP address.
Can generate about 4.29 billion unique IP addresses.
Addresses are written in decimal numbers separated by dots (.). (e.g., 192.168.1.1)
An IPv4 address consists of 4 octets, with each octet containing 8 bits.
It is simple, fast, and widely supported by network devices.
Every device connected to a network is assigned a unique IPv4 address.
When data is sent, the sender includes the destination IPv4 address in the data packet.
Routers read the destination address and forward the packet through the network.
The data reaches the correct destination device.
The biggest limitation of IPv4 is its limited number of addresses.
As the number of computers, smartphones, tablets, and other Internet-connected devices has increased rapidly, the available IPv4 addresses have nearly run out. This problem is known as IPv4 address exhaustion.
IPv6 (Internet Protocol Version 6) is the latest version of the Internet Protocol that uses a 128-bit address to identify devices and provide communication over a network.
Uses a 128-bit IP address.
Can generate approximately 3.4 × 10³⁸ unique IP addresses.
Addresses are written in hexadecimal notation and separated by colons (:).
An IPv6 address consists of 8 groups, with each group containing 4 hexadecimal digits.
Provides better security, faster communication, and automatic address configuration.
IPv6 addresses are written in hexadecimal notation.
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
The address consists of 8 groups, and each group contains 4 hexadecimal digits (0–9 and A–F).
A device connected to a network receives an IPv6 address automatically or from a network administrator.
When data is sent, the destination IPv6 address is attached to the data packet.
Routers read the destination IPv6 address.
The data is forwarded through the network.
The data reaches the correct destination device.
IPv6 was developed to overcome the limited address space of IPv4 and to provide better security, improved performance, and support for the growing number of Internet-connected devices.
| Basis | IPv4 | IPv6 |
|---|---|---|
| Address Length | IPv4 uses a 32-bit IP address. | IPv6 uses a 128-bit IP address. |
| Address Format | IPv4 addresses are written in decimal notation and separated by dots (.), e.g., 192.168.1.1. | IPv6 addresses are written in hexadecimal notation and separated by colons (:), e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334. |
| Address Space | IPv4 can generate about 4.29 billion (4.29 × 10⁹) unique IP addresses. | IPv6 can generate approximately 3.4 × 10³⁸ unique IP addresses. |
| Configuration | IPv4 mainly uses manual configuration or DHCP to assign IP addresses. | IPv6 supports automatic address configuration (Auto-Configuration) as well as manual configuration. |
| Security | IPv4 does not provide built-in encryption and authentication. | IPv6 includes built-in security (IPsec) with encryption and authentication support. |
| Purpose | IPv4 was developed for the early Internet but has a limited number of IP addresses. | IPv6 was developed to overcome IPv4 address exhaustion and support the growing number of Internet-connected devices. |
The Internet is a worldwide network of interconnected computers and devices that allows people to communicate, access information, and share resources across the globe.
It uses TCP/IP protocols to transfer data between devices through wired or wireless connections.
Global network connecting millions of devices worldwide.
Publicly accessible to anyone with an Internet connection.
Provides services like websites, e-mail, cloud storage, and online communication.
Supports fast information sharing and communication.
Uses standard protocols such as TCP/IP.
Web browsing , E-mail , Social media , Online shopping
Video streaming , Online gaming , Cloud storage , Video conferencing
Provides access to vast amounts of information.
Enables fast communication through e-mail, chat, and video calls.
Supports online education, banking, shopping, and entertainment.
Allows global connectivity and collaboration.
Offers cloud storage and online services.
Security risks such as hacking and malware.
Privacy issues due to data theft and tracking.
Spread of false or misleading information.
Internet addiction and time wastage.
Exposure to inappropriate or harmful content.
An Intranet is a private network used within an organization that allows employees to communicate, share information, and access company resources securely.
Unlike the Internet, an intranet is accessible only to members of the organization.
It uses Internet technologies such as TCP/IP, HTTP, and HTML to provide services within the organization.
Private network used within an organization.
Accessible only to authorized users or employees.
Provides secure sharing of files, data, and resources.
Improves communication and collaboration within the organization.
Protected by firewalls and user authentication.
Provides secure communication within an organization.
Allows easy sharing of files and resources.
Improves teamwork and employee productivity.
Reduces paperwork and communication costs.
Access is restricted to authorized users, increasing security.
Limited access only within the organization.
Installation and maintenance can be costly.
Requires technical support and management.
Network failure can disrupt internal communication.
Employees need proper training to use it effectively.
An Extranet is a private network that allows an organization to securely share information with authorized external users such as customers, suppliers, and business partners.
It provides controlled and secure access to selected users outside the organization using Internet technologies.
Private network with controlled access for external users.
Allows customers, suppliers, or business partners to access selected information.
Provides secure communication and data sharing between organizations.
Uses authentication and encryption for security.
Improves business collaboration while protecting internal resources.
Enables secure communication with customers, suppliers, and business partners.
Improves business collaboration and coordination.
Allows controlled sharing of information.
Reduces communication time and operational costs.
Supports faster business transactions and services.
More expensive to set up and maintain than an intranet.
Requires strong security measures to prevent unauthorized access.
Managing user permissions can be complex.
Security breaches may expose confidential business data.
Depends on reliable Internet connectivity for remote access.
Internet is a public network, whereas Intranet and Extranet are private networks.
Internet is accessible to everyone, whereas Intranet is accessible only to employees.
Extranet allows access to authorized external users such as customers and business partners.
Intranet is used for internal communication, whereas Extranet is used for communication with external partners.
| S.N. | Internet | Intranet | Extranet |
|---|---|---|---|
| 1. Definition | The Internet is a global public network that connects millions of computers and devices worldwide. | An Intranet is a private network used within an organization for internal communication and resource sharing. | An Extranet is a private network that provides secure access to selected external users such as customers, suppliers, and business partners. |
| 2. Access | It is accessible to anyone with an Internet connection. | It is accessible only to authorized employees of the organization. | It is accessible to authorized employees and selected external users. |
| 3. Main Purpose | Its main purpose is to share information and provide communication and online services worldwide. | Its main purpose is to improve communication, collaboration, and resource sharing within an organization. | Its main purpose is to securely share information and collaborate with external users. |
| 4. Security | It is less secure because it is open to the public and requires security measures such as firewalls and antivirus software. | It is more secure because access is restricted to authorized users within the organization. | It is highly secure because only authorized external users are allowed to access specific resources. |
| 5. Users | Used by the general public around the world. | Used by employees or members of an organization. | Used by employees, customers, suppliers, and business partners. |
| 6. Examples | Google, YouTube, Facebook, Gmail, and Wikipedia. | School portal, company employee portal, hospital management system. | Supplier portal, customer portal, online banking partner system, vendor management portal. |
To check the IP Address and Default Gateway of a computer.
Press Windows + R.
Type cmd and press Enter.
Type the following command:
ipconfig
Press Enter.
Example Output:
IPv4 Address . . . . . . . . . : 192.168.1.10 Subnet Mask . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . : 192.168.1.1
IP Address: Unique address assigned to a computer on a network.
Default Gateway: Address of the router used to communicate with other networks and the Internet.
Tests network connectivity between two devices.
ping google.com
Checks whether a website or device is reachable.
Measures response time.
Displays network configuration information.
ipconfig
Displays IP Address.
Displays Subnet Mask.
Displays Default Gateway.
Shows the route taken by data packets to reach a destination.
tracert google.com
Identifies network routes.
Helps troubleshoot network issues.
Finds the IP address of a domain name.
nslookup google.com
Checks DNS functionality.
Converts domain names into IP addresses.
These commands are useful for network troubleshooting and configuration checking.
Small plastic connector with 8 metal pins.
Used with Ethernet cables (CAT5e/CAT6).
Connects computers, switches, and routers in a LAN.
Transmits data using electrical signals.
SC (Subscriber Connector)
LC (Lucent Connector)
ST (Straight Tip)
Used in fiber optic cables.
Transmits data using light signals.
| RJ45 Connector | Fiber Connector |
|---|---|
| Uses copper cable | Uses fiber optic cable |
| Uses electrical signals | Uses light signals |
| Lower speed | Higher speed |
| Short distance | Long distance |
Strip the cable jacket.
Arrange wires according to standard color codes.
Insert wires into the RJ45 connector.
Crimp using a crimping tool.
Connect the cable to a network port.
High speed
Long-distance communication
High bandwidth
Low signal loss
Immune to electromagnetic interference
Local Area Networks (LANs)
Offices
Schools
Homes
ISP networks
Data centers
Telecommunications
Backbone networks
RJ45 connectors are used in Ethernet networks, while fiber connectors are used for high-speed and long-distance communication.
Function: Connects different networks and provides Internet access.
Function: Connects multiple devices in a LAN and forwards data to the correct destination.
Function: Connects multiple devices and broadcasts data to all connected devices.
Function: Connects a computer network to an Internet Service Provider (ISP).
Function: Provides wireless (Wi-Fi) connectivity to devices.
Use: Commonly used in LANs with RJ45 connectors.
Use: High-speed and long-distance communication using light signals.
Use: Cable television and broadband Internet connections.
| Device/Cable | Function |
|---|---|
| Router | Connects networks and provides Internet access |
| Switch | Connects devices in a LAN |
| Hub | Broadcasts data to all devices |
| Modem | Connects network to ISP |
| Access Point | Provides wireless connectivity |
| UTP Cable | Transfers data through copper wires |
| Fiber Optic Cable | Transfers data through light signals |
| Coaxial Cable | Used for cable TV and broadband Internet |
Networking devices and cables work together to establish communication and data transfer within a computer network.
Demonstrate and identify networking devices, CAT6 cable, optical fiber cable, RJ45 connector, and media converter.
Find the IP address, subnet information, and default gateway of a computer.
Demonstrate ping, ipconfig, tracert, and nslookup.
Demonstrate RJ45 and fiber connectors and explain where they are used.