0% found this document useful (0 votes)
0 views96 pages

Net

The document provides an overview of various types of shells in Unix/Linux, including Bourne shell, Bash shell, Korn shell, Tshell, and Zshell, detailing their functionalities and commands. It also explains shell scripting, variables, and their types, as well as the structure of the Unix file system. Additionally, it covers the concepts of proxy servers, DNS, and DHCP, highlighting their roles and processes in networking.

Uploaded by

baraliraj843
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)
0 views96 pages

Net

The document provides an overview of various types of shells in Unix/Linux, including Bourne shell, Bash shell, Korn shell, Tshell, and Zshell, detailing their functionalities and commands. It also explains shell scripting, variables, and their types, as well as the structure of the Unix file system. Additionally, it covers the concepts of proxy servers, DNS, and DHCP, highlighting their roles and processes in networking.

Uploaded by

baraliraj843
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

Shell:

• The shell can be defined as a command interpreter within an operating system like Linux/GNU or
Unix. It is a program that runs other programs. The shell facilitates every user of the computer as
an interface to the Unix/GNU Linux system. Hence, the user can execute different tools/utilities or
commands with a few input data .The shell sends the result to the user over the screen when it has
completed running a program which is the common output device. That's why it is known as
"command interpreter”. The shell is not just a command interpreter. Also, the shell is a
programming language with complete constructs of a programming language such as functions,
variables, loops, conditional execution, and many others
1. Shell is responsible to read command provided by user
2. Shell will check whether the command is valid or not.
3. Shell will check whether the command is properly used or not
4. If every thing is proper then shell interprets (convert) that command into command
understandable form and handover that converted command to kernel.
5. Shell acts as interface between user and kernel .shell +kernel is nothing but operating
system.
6. Kernel is responsible to execute that command with the help of hardware .
Bourne shell:
It is developed by Stephen Bourne. It is a first shell which is developed for UNIX. By using sh
command we can access this shell.
[Link] full-path name is /bin/sh and /sbin/sh,
[Link]-root user default prompt is $,
3. Root user default prompt is #.
Bash shell(Bourne Again Shell)
It is advanced version of Bourne shell. This is default shell for most of Linux Flavors.
By using bash command we can access this shell.
Korn Shell:
1. It is developed by David Korn.
2. Mostly this shell used in IBM AIX operating system.
3. By using ksh command, we can access this shell.
4. Command full-path name is /bin/ksh .
Tshell
1.T means Terminal
[Link] is advanced version of Cshell
[Link] is most commonly used in Hp UNIX systems
[Link] using tcsh command we can access Tshell.
[Link] full-path name is /bin/tcsh.
Zshell
1. ZShell was created by Paul Falstad in 1990 while he was a student at Princeton University. Z Shell is
an extended version of the Bourne-Again Shell (bash), with additional features and capabilities.
2. By using zsh command we can acess Zshell
3. Command full-path name is /bin/zsh,
Note:
• Usually owner or root user can change permission of shell
• The most commonly used shell in Linux environment is Bash
• How to check default shell in our system
• echo $0 or echo $SHELL
• We can check default shell information inside /etc/passwd file also.
• How to check all available shell in our system
• cat /etc/shells
What is shell Script?
• A sequence of command saved to a file and this file is nothing but shell script. It
can contains programming features like control statements, loops, functions,
array ,if-else, switch /case etc. Shell Scripting is a way of writing scripts of
programs that are executed in a terminal or shell. Basically, it is a program or
script which is written with the help of variables mentioned in it. It is powerful
because it can automate tasks, and in this one can use programming constructs
that are available in shell, such as loops, conditionals and functions.
Shell Variable is used in shell scripts for many functionalities like storing data
and information, taking input from users, printing values that are stored. They are
also used for storing data temporarily and storing output of commands.
Shell Variables are used to store data and information within a shell (terminal), and they are also
used for controlling the behavior of program and scripts. Some of the common uses are:
1. Setting environment variables.
2. Storing configuration data.
3. Storing temporary data.
4. Passing arguments to scripts.
Rules for variable definition
A variable name could contain any alphabet (a-z, A-Z), any digits (0-9), and an underscore ( _ ).
However, a variable name must start with an alphabet or underscore. It can never start with a
number. Following are some examples of valid and invalid variable names:
Valid variable:
ABC, _AV_3, AV232
Invalid variable:
2_AN, !ABD, $ABC, &QAID
Accessing variable echo $var1 $var2
Variable data could be accessed by appending Note: The unset command could not
the variable name with ‘$’ as follows: be used to unset read-only variables.
#!/bin/bash
VAR_1="Devil"
By using sha-bang, we can specify the
VAR_2="OWL" interpreter(command) which is responsible to
echo "$VAR_1$VAR_2“ execute the script.
Unsetting Variables
The unset command directs a shell to delete a
variable and its stored data from list of
variables. It can be used as follows:
#!/bin/bash
var1="Devil"
var2=23
echo $var1 $var2
unset var1
Variable Types:
1. Local Variables:
Variables declared inside a function or a script block using local keyword are local to that scope and are
not accessible outside.
function my_function() {
local localVar="Hello"
echo $localVar
}
2. Global Variables:
Variables declared outside any function or block are global and can be accessed throughout the script
globalVar="World“
echo $globalVar
3. Environment Variable:
These variables are commonly used to configure the behavior script and programs that are run
by shell. Environment variables are only created once, after which they can be used by any user.
For example:
`export PATH=/usr/local/bin:$PATH` would add `/usr/local/bin` to the beginning of the shell’s
search path for executable programs.
4. Shell Variables:/System Variables:
4. These are predefined variables by the shell or the system, and their values are set by the shell or the
operating system.
For example:
$HOME: Home directory of the user.
$USER: Current username.
$PWD: Present working directory.
$SHELL : Stores the path to the shell program that is being used.
5. Special Variables:
These are variables with special meanings in the shell.
Examples:
$?: Exit status of the last executed command.
$$: Process ID of the current script.
$!: Process ID of the last background command.
6. Array Variables: var1=23
Arrays are used to store multiple values under a echo $var1 $var2
single variable name.
fruits=("apple" "banana" "orange")
echo ${fruits[0]}
Calculate area of rectangle
#!/bin/bash
7. Read only Variables. echo "Enter the length of the
These variables are read only i.e. rectangle"
their values could not be modified later in the read length
script. Following is an example: echo "Enter the width of the
#!/bin/bash rectangle"
var1="Devil" read width
area=$((length * width))
var2=23
echo "The are of the rectangle is:
readonly var1
$area"
echo $var1 $var2
Working with files and directories :
One of the most important features of the Unix file system is its support for symbolic links, which are pointers to other files or
directories. This allows for flexible organization of files and directories without having to physically move them around.
1. /: The slash / character alone denotes the root of the filesystem tree.
2. /bin: Stands for “binaries” and contains certain fundamental utilities, such as ls or cp, which are generally needed by
all users.
3. /boot : Contains all the files that are required for successful booting process.
4. /dev :Stands for “devices”. Contains file representations of peripheral devices and pseudo-devices.
5. /etc : Contains system-wide configuration files and system databases. Originally also contained “dangerous
maintenance utilities” such as init, but these have typically been moved to /sbin or elsewhere.
6. /home: Contains the home directories for the users.
7. /lib: Contains system libraries, and some critical files such as kernel modules or device drivers.
8. /media: Default mount point for removable devices, such as USB sticks, media players, etc.
9. /mnt : Stands for “mount”. Contains filesystem mount points. These are used, for example, if the system uses multiple
hard disks or hard disk partitions. It is also often used for remote (network) filesystems, CD-ROM/DVD drives, and
so on.
10. /proc: procfs virtual filesystem showing information about processes as files.
11. /root: The home directory for the superuser “root” – that is, the system administrator.
This account’s home directory is usually on the initial filesystem, and hence not in
/home (which may be a mount point for another filesystem) in case specific
maintenance needs to be performed, during which other filesystems are not available.
Such a case could occur, for example, if a hard disk drive suffers physical failures and
cannot be properly mounted.
12. /tmp: A place for temporary files. Many systems clear this directory upon startup; it
might have tmpfs mounted atop it, in which case its contents do not survive a reboot, or
it might be explicitly cleared by a startup script at boot time.
13. /usr: Originally the directory holding user home directories,its use has changed. It now
holds executables, libraries, and shared resources that are not system critical, like the X
Window System, KDE, Perl, etc. However, on some Unix systems, some user accounts
may still have a home directory that is a direct subdirectory of /usr, such as the default
as in Minix. (on modern systems, these user accounts are often related to server or
system use, and not directly used by a person).
10. /usr/bin: This directory stores all binary programs distributed with the operating system not
residing in /bin, /sbin or (rarely) /etc.
11. /usr/include: Stores the development headers used throughout the system. Header files are
mostly used by the #include directive in C/C++ programming language.
16. /usr/lib: Stores the required libraries and data files for programs stored within /usr or
elsewhere.
17. /var: A short for “variable.” A place for files that may change often – especially in size, for
example e-mail sent to users on the system, or process-ID lock files.
18. /var/log: Contains system log files.
19. /var/mail: The place where all the incoming mails are stored. Users (other than root) can
access their own mail only. Often, this directory is a symbolic link to /var/spool/mail.
20. /var/spool: Spool directory. Contains print jobs, mail spools and other queued tasks.
21. /var/tmp: A place for temporary files which should be preserved between system reboots.
Proxy Server:
A proxy server is a type of internet intermediate server that operates as a bridge between a client,
like a computer or smartphone, and the destination server. A resource request is made by a client,
which the proxy server intercepts, passes to the target server, and then relays back to the client the
response from the destination server.

How Does a Proxy Server Work?


All devices connected to the internet have an internet protocol (IP) address. This address is how a
device is recognized on the internet, and it plays a role in how proxy servers work. Proxies can
have different ways of working, but the following steps are common among all proxy servers:
When a device makes a request to the internet through a proxy, the proxy server reads and interprets the
request.
1. That request is then forwarded to the right internet server.
2. The internet server reads the IP of the proxy and sends the requested data to the IP of that proxy.
3. The proxy server receives the data, extracts it, and checks it for possible malware.
4. Once marked safe, the data is forwarded to the requesting device.
Benefits of proxy Server:
As a proxy server filters out malicious data from the internet before it reaches the company’s servers, it can act
as an additional layer of security. A proxy server alone might not save the company’s network from all hacking
attempts, but it can add to the security of the system and lower the risk of cyberattacks.
1. Anonymity
Since proxies sit between company networks and internet servers, the internet is unable to know the
company IP that generated the request. A company’s research and development process, part of
its intellectual property, is crucial for its success and must be protected. When an additional layer of
security is present between the unfiltered internet and the company servers, it protects sensitive company
data from being stolen.
2. Faster Speed:
Caching is another important function performed by proxy servers. More frequently visited
sites can be cached by the proxy, thereby eliminating the need for the proxy to send a request
to the internet servers whenever a request is made for those pages,.
More than that, proxy servers also compress traffic and remove ads from websites, thereby
making the internet faster than usual.
3. Control Internet Usage:
Proxies can be used to block undesirable content. For example, some companies might want
to block certain social media sites so their employees aren’t distracted from their work. A
proxy server also lets network administrators monitor the requests sent to the internet to
ensure no illegal or improper activities are being carried out.
4. Bypassing Restrictions:
Some websites only allow access to IPs from a certain location. This can be a problem when
a business needs to access a geo-restricted website, but when a company uses a proxy server,
the IP is masked and employees can access the content they need.
DNS(Domain Name System):
Similar to the phone book on the internet is the Domain Name System (DNS). By converting
memorable names (like [Link]) into the numerical IP addresses ([Link])
that computers use to find one another on the internet, it makes it easier for you to find
websites. To access your favorite websites without DNS, you would need to memorize lengthy
String of string . A hostname utilized for IP address translation services is the Domain Name
System (DNS). A hierarchy of name servers implements DNS, which is a distributed database.
It is an application layer protocol that allows clients and servers to exchange messages. It is
necessary for the Internet to operate.
Types of Domain
There are various kinds of domains:

1. Generic Domains: .com(commercial),.edu(educational), .mil(military), .org(nonprofit


organization), .net(similar to commercial) all these are generic domains.
2. Country Domain: .np (Nepal) .us .uk ,.in(India) etc.
3. Inverse Domain: if we want to know what is the domain name of the website. IP to domain
name mapping. So DNS can provide both the mapping for example to find the IP addresses of
[Link] then we have to type
Dynamic Host Configuration Protocol(DHCP):
• A network protocol called Dynamic Host Configuration Protocol is used to automate the process of
configuring devices (such PCs, printers, and smartphones) on a network by assigning IP addresses and other
configuration data. DHCP enables devices to connect to a network and automatically obtain all required
network information, such as IP address, subnet mask, default gateway, and DNS server addresses, from a
DHCP server, eliminating the need for each device to be individually configured with an IP address.
It is an application layer protocol which is used to provide:
1. Subnet Mask (Option 1 – e.g., [Link])
2. Router Address (Option 3 – e.g., [Link]) Default Gateway
3. DNS Address (Option 6 – e.g., [Link])
DORA is the process that is used by DHCP. DORA helps in providing an IP address to hosts
or client machines. DORA is the process that follows some steps between the server and
client. It gets the IP address from the centralized server. It consists of four-stage:
1. Discover
2. Offer
3. Request
4. Acknowledge
Step 1: DHCP Discover Message
This is the first message in the DORA process which helps in finding the DHCP server of the
network. DHCP client will find the server by sending DHCP discover message. The broadcast
message is sent to the network. As the DHCP client doesn’t know the IP address of the server so the
message is broadcast with a destination IP is [Link]. And the source IP will be [Link] as
the client does not have any IP address. Here the DHCP discover message in the data link layer and
network layer is always broadcast.
Source IP address: [Link]
Destination IP address: [Link]
Source MAC address: MAC address of DHCP clients
Destination MAC address: FF:FF:FF:FF:FF:FF
Step 2: DHCP Offer Message
DHCP server receives the discover message and it replays the DHCP client with the DHCP offer
request. The server sends a DHCP offer message with filled information. It has information about the
IP address and duration of time that a host can use. Here destination IP address will be
[Link] as the DHCP client still does not have its IP address. But this DHCP offer message
is broadcast in the network layer and unicast in the data link layer.
Source IP address: IP Address of DHCP Server
Destination IP address: [Link]
Source MAC address: MAC address of DHCP Server
Destination MAC address: MAC address of DHCP clients
Step 3: DHCP Request Message
DHCP clients send the request message to the server when it receives a DHCP offer message from
the server. This message tells the server that it accepts the IP address given by the server. Here
destination address will be [Link] means it’s again broadcast. The reason for this is there
might be many DHCP servers in the network so the client may receive multiple offer messages and
it will accept the request that reaches him first and send a broadcast message to eliminate other
DHCP servers. Here source IP address will be [Link] as the DHCP server hasn’t yet assigned an IP
address to the client. DHCP Request Message is also a broadcast message.
Source IP address: [Link]
Destination IP address: [Link]
Source MAC address: MAC address of DHCP clients
Destination MAC address: MAC address of DHCP server
Step 4: DHCP Acknowledge Message
This is the last step or message in the DORA process. The DHCP server sends Acknowledge
Message to the client when it receives the request message from the DHCP client. This message
will contain the IP address and subnet mask that the server assigns to the client. Source IP address
will be the IP address of the server. This will be again broadcast message as the destination IP
address is [Link]. But it is unicast in the case of the data link layer.
Source IP address: IP Address of DHCP Server
Destination IP address: [Link]
Source MAC address: MAC address of DHCP server
Destination MAC address: MAC address of DHCP clients
IPv6:
The goal of IPv6, the next generation of Internet Protocol (IP) address standard, is to complement IPv4, which
is still widely used today, and eventually replace it. A computer, smartphone, Internet of Things sensor, home
automation component, or any other device connected to the Internet requires a numerical IP address in order to
communicate with other devices. The original IP address scheme, known as IPv4, is running out of addresses
due to the widespread use of linked devices.
This new IP address version is being deployed to fulfil the need for more Internet addresses. With 128-bit
address space, it allows 340 undecillion unique address space.
IPv6 support a theoretical maximum of 340, 282, 366, 920, 938, 463, 463, 374, 607, 431, 768, 211, 456. To
keep it straightforward, we will never run out of IP addresses again.
Internet Protocol version 6 (IPv6) is the next version of the IP standard.
While IPv4 and IPv6 will coexist for some time, IPv6 is designed to function in conjunction with IPv4 before fi
nally replacing it.
In order to move forward and continue adding new devices and services to the Internet, IPv6 must be implemen
ted.
4. Internet of Things (IoT): With a flood of IoT devices ranging from smart home appliances to industrial
sensors, a vast and easily scalable addressing system is required. IPv6 provides a solution by providing an
almost infinite supply of addresses, allowing for effective communication and administration of these
devices.
5. Simplified Header format: When compared to IPv4, IPv6 delivers a simpler and more efficient header
format. This simplified architecture increases routing efficiency and decreases processing overhead on
networking devices, resulting in improved network performance.
6. Security Enhancements: IPv6 has built-in support for IPsec (Internet Protocol Security), a set of
protocols that provides authentication and encryption for data transported over the internet. While IPsec
was optional in IPv4, its presence in IPv6 facilitates secure communication with no additional setups.
7. Address Configuration: IPv6 provides better address configuration techniques, making it easier for
devices to automatically get and configure their IP addresses. This is especially critical in cases where
devices change networks often or must be setup dynamically
8. Global Reachability: IPv6 is designed to provide end-to-end connection without the requirement for
NAT, which in IPv4 frequently results in devices hidden behind a single IP address. This worldwide
accessibility facilitates peer-to-peer communication and contributes to the development of a more
decentralized and efficient network.
Introduction to IPv6 and its necessity
• Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol, designed to
replace IPv4. Because of the rapid development of devices and internet users, IPv4, which has
been in use since the early days of the internet, has a restricted address space that is nearly
depleted. IPv6 was created to solve the limitations of IPv4 and to the coming address exhaustion
situation.
Here are some key aspects of IPv6 and why it's necessary:
1. Address Space: One of the key reasons for the development of IPv6 was the expiration of
accessible IPv4 addresses. IPv4 addresses are 32 bits long, providing for approximately 4.3 billion
distinct addresses. IPv6, on the other hand, employs 128-bit addresses, allowing for a far bigger
pool of addresses—over 340 undecillion (3.4 x 1038) unique addresses. This numerous of
addresses assures that every device, service, and object that requires internet access has its own
unique IP address.
2. Scalability: As the number of devices and users connected to the internet has grown, IPv6's vast
address space enables for seamless growth without the need for sophisticated address management
mechanisms like IPv4's Network Address Translation (NAT). This makes network administration
and routing easier.
Rules to represent IPv6
1. If at least two blocks(segment) contain consecutive zeros, omit them all and replace with double colon sign(::)
FFFF:A890:CDEF:0000:0000:A001:00AB:AD00
can be written as FFFF:A890:CDEF::A001:00AB:AD00
2. (::) must be used to represent the largest number of 16 bits sets of zero as possible
FFAB:0000:0000:ABDC:0000:0000:0000:ABAA
can be written as FFAB:0000:0000:ABDC::ABAA
3. Remove leading zeros
FFFF:ABCD:00CD:A789:0000:0000:00AB:0A79
can be written as FFFF:ABCD:CD:A789::AB:A79
4. If there are multiple places where(::) can be used and the numbers of zeros are the same ,use(::) on the left most set of
zeros
FFFF:0000:0000:AB00:000A:0000:0000:A978
can be written as FFFF::AB00:A:0:0:A978
5 .(::) cannot be used to shorten a single 16 bit set of zero
FFFF:0000:ABCD:EFAB:1000:0011:A983:8977
can be written as FFFF:0:ABCD:EFAB:1000:11:A983:8977
IPV4 vs IPV6
Feature IPv4 IPv6
Address Length 32-bit address scheme 128-bit address scheme
Hexadecimal, e.g.,
Address Notation Decimal, e.g., [Link]
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Number of Addresses Approximately 4.3 billion Approximately 340 undecillion (3.4 x 10^38)
Header Complexity More complex with 12 fields Simpler with fewer fields
Subnetting Supports subnetting More flexible and easier to manage
Network Address Translation Commonly used to extend address Generally not used; direct end-to-end
(NAT) space communication
Broadcasting Supports broadcasting No broadcasting; uses multicast and anycast
Optional, provided through IPsec
Security Mandatory, built into the protocol (IPsec)
and other protocols
Configuration Manual or via DHCP Automatic via SLAAC or manual via DHCPv6

Address Types Unicast, Broadcast, Multicast Unicast, Multicast, Anycast


ARP (Address Resolution Used to map IP addresses to MAC Neighbor Discovery Protocol (NDP) performs this
Protocol) addresses function
Fields IPv4 is a numeric address that IPv6 is an alphanumeric address that consists of 8
consists of 4 fields which are fields, which are separated by colon.
separated by dot (.).
IPv6 Autoconfiguration :
• Every node in the network requires a unique IP address to communicate and exchange data with other nodes.
There are multiple ways to configure IP addresses on nodes. One such way is the address autoconfiguration.
The address autoconfiguration is a feature of IPv6. It allows nodes to automatically configure IPv6 addresses
for them.
• The IPv6 address consists of 128 binary bits. These bits are divided into two equal portions. The first 64 bits
are known as the network ID (network address) and the last 64 bits are known as the interface ID (host
address). An interface ID identifies the interface in the subnet. A network ID identifies a group of interfaces in
the network.
• A stateful address assignment involves a server or other device that keeps track of the state of each
assignment. It tracks the address pool availability and resolves duplicated address conflicts. It also logs every
assignment and keeps track of the expiration times.
• Stateless address assignment means that no server keeps track of what addresses have been assigned and
what addresses are still available for an assignment. Also in the stateless assignment scenario, nodes are
responsible to resolve any duplicated address conflicts following the logic: Generate an IPv6 address, run the
Duplicate Address Detection (DAD), if the address happens to be in use, generate another one and run DAD
again, etc.
Firewall:
• A firewall is a piece of hardware or software for network security that is intended to keep an eye on, filter
out, and regulate incoming and outgoing network traffic in accordance with pre-established security
standards. A firewall's main objective is to create a wall between a trusted internal network and unreliable
external networks, such the internet, in order to safeguard the internal network from intruders, hackers, and
other security threats.
• Firewalls can be implemented in various ways, including as hardware appliances, software applications, or
a combination of both.
1. Packet Filtering Firewall: This is the most basic type of firewall. It examines individual packets of
data as they pass through the network and allows or blocks them based on predetermined rules. Packet
filtering firewalls use information like source and destination IP addresses, port numbers, and protocols
to make filtering decisions.
2. Stateful Inspection Firewall (Stateful Firewall): Stateful firewalls not only analyze individual packets
but also keep track of the state of active connections. They maintain a record of the connections' states
and use this information to make more intelligent filtering decisions. This approach is more secure and
can prevent certain types of attacks that basic packet filtering might miss.
3. Proxy Firewall (Application-Level Firewall): Proxy firewalls act as intermediaries between a user's
device and the destination server. They receive requests from the user, make the request to the server on
behalf of the user, receive the response, and then forward it to the user. This process can hide the user's
true IP address and provide additional security by isolating internal network details from external
entities.
4. Next-Generation Firewall (NGFW): NGFWs combine traditional firewall functionality with advanced
features such as intrusion detection and prevention, deep packet inspection, application-aware filtering,
and more. They offer more sophisticated security mechanisms to deal with modern threats and often
provide better visibility into network traffic.
5. Deep Packet Inspection (DPI) Firewall: DPI firewalls inspect the actual content of
packets, looking beyond just header information. They analyze the data within packets
to identify specific applications, protocols, or even malware patterns. This allows them
to make more informed filtering decisions based on the actual content being
transmitted.
Administering TCP/IP Networks:
• Administering TCP/IP (Transmission Control Protocol/Internet Protocol) networks involves the management, configuration, and troubleshooting of devices and
communication protocols that operate within a network infrastructure. Here are some key areas to consider when administering TCP/IP networks:

[Link] Addressing
• IPv4 & IPv6 Addressing: Assigning IP addresses to devices is fundamental. IPv4 uses a 32-bit address space, while IPv6
uses 128-bit.
• Subnetting: Dividing an IP network into subnets helps manage network traffic and improve performance. This includes
understanding subnet masks, CIDR notation, and calculating subnets.
• DHCP (Dynamic Host Configuration Protocol): Automates the assignment of IP addresses and other network
configuration details to devices.
• NAT (Network Address Translation): Translates private IP addresses to a public IP address to enable internet access for
devices within a network.
2. Routing and Switching
• Routing Protocols: TCP/IP networks rely on routing protocols like OSPF (Open Shortest Path First), BGP (Border
Gateway Protocol), and RIP (Routing Information Protocol) to direct traffic between networks.
• Switching: At Layer 2 of the OSI model, switches help in efficiently forwarding data frames within a local area network
(LAN). VLANs (Virtual Local Area Networks) can be configured to segment network traffic.
• Default Gateways: Devices use the default gateway to route traffic outside of the local network. The default gateway is
often the router's IP address.
3. TCP/IP Protocols and Services
• TCP vs. UDP: TCP provides reliable, connection-oriented communication, while UDP is a faster, connectionless
protocol used for streaming and DNS.
• DNS (Domain Name System): Translates domain names to IP addresses.
• FTP, HTTP, HTTPS, SMTP: Common application layer protocols used for transferring files, web browsing, and
sending emails, respectively.
• ICMP (Internet Control Message Protocol): Used for diagnostics and error reporting, e.g., "ping" commands to
check network connectivity.
4. Security
• Firewalls: Filter incoming and outgoing traffic based on predefined security rules.
• VPN (Virtual Private Networks): Securely connects remote users to the network over the internet.
• Encryption: Securing data with SSL/TLS (for HTTPS) or IPSec for VPNs.
• Access Control Lists (ACLs): Used on routers and firewalls to control which traffic is allowed into or out of the
network.
5. Monitoring and Management Tools
• SNMP (Simple Network Management Protocol): Used to monitor and manage network devices like routers and
switches.
• Syslog: Centralized logging for network devices.
• Network Monitoring Tools: Applications like Nagios, SolarWinds, or Wireshark are used to monitor network
performance, detect anomalies, and troubleshoot issues
[Link] TCP/IP Networks
• Ping and Traceroute: Basic tools for checking connectivity and tracing the path of packets through the
network.
• Packet Capture: Using tools like Wireshark to analyze network traffic at a granular level.
• Network Diagnostics: Testing cable connections, checking routing tables, verifying IP configurations,
and using command-line tools like ipconfig ,ifconfig , netstat
[Link] of Service (QoS)
• Traffic Prioritization: QoS settings help ensure that critical services like VoIP or video conferencing
have the required bandwidth and low latency.
8. Network Redundancy and High Availability
• Load Balancing: Distributes network traffic across multiple servers to prevent overload.
• Redundant Links: Ensuring multiple paths are available for critical network segments.
• Failover Systems: Standby systems that take over if primary systems fail.
9. IPv6 Considerations
• Migration from IPv4 to IPv6: As IPv4 addresses are exhausted, IPv6 adoption is growing. Admins need
to handle dual-stack configurations and ensure compatibility.
• IPv6 Addressing and Stateless Address Auto-configuration (SLAAC): New addressing schemes and
auto-configuration options available in IPv6.
Switch :
• A network switch connects devices in a network to each other, enabling them to talk by
exchanging data packets. Switches can be hardware devices that manage physical networks or
software-based virtual devices.
• A network switch operates on the data-link layer, or Layer 2, of the Open Systems
Interconnection (OSI) model. In a local area network (LAN) using Ethernet, a network switch
determines where to send each incoming message frame by looking at the media access
control (MAC) address. Switches maintain tables that match each MAC address to the port
receiving the MAC address.
Types of Switch
1. Unmanaged switches: These switches have a simple plug-and-play design and do not offer
advanced configuration options. They are suitable for small networks or for use as an expansion to a
larger network.
2. Managed switches: These switches offer advanced configuration options such as VLANs, QoS, and
link aggregation. They are suitable for larger, more complex networks and allow for centralized
management.
5. PoE switches: These switches have Power over Ethernet capabilities, which allows
them to supply power to network devices over the same cable that carries data.
6. Gigabit switches: These switches support Gigabit Ethernet speeds, which are faster
than traditional Ethernet speeds.
7. Rack-mounted switches: These switches are designed to be mounted in a server rack
and are suitable for use in data centers or other large networks.
8. LAN Switch − Local Area Network (LAN) switches connects devices in the internal
LAN of an organization. They are also referred as Ethernet switches or data switches.
These switches are particularly helpful in reducing network congestion or bottlenecks.
They allocate bandwidth in a manner so that there is no overlapping of data packets in a
network.
Routing and its necessity:
• Routing is a process which is performed by layer 3 (or network layer) devices in order to
deliver the packet by choosing an optimal path from one network to another.
• A Routing is a process of selecting path along which the data can be transferred from source
to the destination. Routing is performed by a special device known as a router.
• Routing is process of establishing the routes that data packets must follow to reach the
destination. In this process, a routing table is created which contains information regarding
routes which data packets follow.
• A Router works at the network layer in the OSI model and internet layer in TCP/IP model. A
router is a networking device that forwards the packet based on the information available in
the packet header and forwarding table.
• In internetworking, the process of moving a packet of data from source to destination.
Routing is usually performed by a dedicated device called a router.
• Routing is a key feature of the Internet because it enables messages to pass from one
computer to another and eventually reach the target machine.
Types of Routing:
1. Static Routing: In static routing, network administrators manually configure
the routing tables of routers. The paths that data will take are predetermined and
do not change automatically, even if the network topology changes. While
simple and easy to implement, static routing is not suitable for large, complex
networks that undergo frequent changes.
2. Dynamic Routing: Dynamic routing protocols allow routers to exchange
information about the network's current state, enabling them to dynamically
update their routing tables based on real-time information. This adaptive nature
allows dynamic routing to respond to changes in network topology, link
failures, and traffic conditions. Common dynamic routing protocols include
OSPF (Open Shortest Path First) and RIP (Routing Information Protocol).
• Dynamic Routing Vs Static Routing:

[Link] Static Routing Dynamic Routing


In dynamic routing, routes are updated according to
1. In static routing routes are user-defined.
the topology.
Static routing does not use complex routing
2. Dynamic routing uses complex routing algorithms.
algorithms.
Static routing provides high or more
3. Dynamic routing provides less security.
security.
4. Static routing is manual. Dynamic routing is automated.
Static routing is implemented in small
5. Dynamic routing is implemented in large networks.
networks.
Another name for static routing is non- Another name for dynamic routing is adaptive
6.
adaptive routing. routing.
VLAN (Virtual Local Area Network): VLAN is a method of partitioning a single physical
network into multiple logical networks. It enables network administrators to group devices together
virtually, regardless of their physical location. This grouping is based on factors such as department,
function, or security requirements . VLANs help improve network performance, security, and
manageability.

Here's how VLANs work:


1. Logical Segmentation: Instead of creating separate physical networks for different groups of devices,
VLANs provide a way to create isolated broadcast domains within a single physical network.
2. Grouping Devices: Devices are grouped into VLANs based on certain characteristics, such as
department, function, or security requirements. For example, all devices belonging to the HR
department can be placed in one VLAN, while devices from the IT department are placed in another.
3. Communication between VLANs: By default, devices within a VLAN can
communicate with each other, but they are isolated from devices in other
VLANs. If communication between VLANs is required, a router or a Layer 3
switch is used to route traffic between them.
4. Security: VLANs improve security by segregating sensitive data or critical systems
from general network traffic. This way, unauthorized devices have a harder
time accessing sensitive information.
5. Management Flexibility: VLANs allow network administrators to make changes to the
logical structure of the network without physically rewiring it.
Devices can be moved from one VLAN to another easily through
configuration changes.
Advantages of VLAN:
1. VLAN allows you to add an additional layer of security. The message
broadcast in one group cannot be listened by members of other groups
2. It can make device management simple and easier.
3. You can make a logical grouping of devices by function rather than location.
4. It allows you to create groups of logically connected devices that act like
they are on their own network.
5. VLAN removes the physical boundary.
6. It lets you easily segment your network.
7. It helps you to enhance network security.
8. You can keep hosts separated by VLAN.
9. You do not require additional hardware and cabling, which helps you to
saves costs.
Spanning tree:
• The spanning tree protocol is a layer 2 protocol that tends to solve the problems
when the computers use the shared telecommunications paths on a local area
network. When they share the common path, if all the computers send the data
simultaneously, it affects the overall network performance and brings all the
network traffic near a halt.
• The spanning tree protocol (STP) overcomes this situation by using the concept
of bridge looping. Bridge looping is used when there are multiple connections
between the two endpoints, and messages are sent continuously, which leads to
the flooding of the network. To remove the looping, STP divides
the LAN network into two or more segments with the help of a device known as
bridges. The bridge is used to connect the two segments so when the message is
sent, the message is passed through the bridge to reach the intended destination.
The bridge determines whether the message is for the same segment or a different
segment, and it works accordingly. This network segmentation greatly reduces
the chances of a network coming to a halt.
• Suppose there are three points, i.e., A, B, and C. Three lines connect these three points. A
line connects every two-point, and we get a complete graph.

• The complete graph is formed when a maximum number of lines connects all the points,
whereas the spanning tree is formed when a minimum number of lines connects all the
points.
1. A is directly connected to B and C, while B and C are indirectly connected through A. In this spanning
tree, A is a central point and all the points are connected without any formation of loops.
2. B is directly connected to A and C, while A and C are connected through B. B is a bridge between A and
C, or we can say that B is a central point. In this case, also, all the points are connected without any
formation of loops.
3. C is directly connected to both A and B, while A and B are connected through C. Therefore, C is a bridge
between A and B, and C is a central point. In this case, all the points are connected without any formation
of loops.
How spanning tree protocol works?
1. This protocol selects one switch as a root bridge where the root bridge
is a central point as when the message is sent; then it always passes
through the bridge.
2. It selects the shortest path from a switch to the root bridge.
3. It blocks the links that cause the looping on a network, and all the
blocked links are maintained as backups. It can also activate the blocked
links whenever the active link fails. Therefore, we can say that it also
provides fault tolerance on a network.
Why use Linux?
• This is the one question that most people ask. Why bother learning a completely different computing
environment, when the operating system that ships with most desktops, laptops, and servers works just fine?
• To answer that question, I would pose another question. Does that operating system you’re currently
using really work “just fine”? Or, do you find yourself battling obstacles like viruses, malware, slow downs,
crashes, costly repairs, and licensing fees?
If you struggle with the above, Linux might be the perfect platform for you. Linux has evolved into one of
the most reliable computer ecosystems on the planet. Combine that reliability with zero cost of entry and you
have the perfect solution for a desktop platform.
• That’s right, zero cost of entry… as in free. You can install Linux on as many computers as you like without
paying a cent for software or server licensing.
• Let’s take a look at the cost of a Linux server in comparison to Windows Server 2016. The price of the
Windows Server 2016 Standard edition is $882.00 USD (purchased directly from Microsoft). That doesn’t
include Client Access License (CALs) and licenses for other software you may need to run (such as a
database, a web server, mail server, etc.). For example, a single user CAL, for Windows Server 2016, costs
$38.00. If you need to add 10 users, for example, that’s $388.00 more dollars for server software
licensing. With the Linux server, it’s all free and easy to install.
Linux (as both a desktop and server platform) does not have any issues with ransomware,
malware, or viruses. Linux is generally far less vulnerable to such attacks. As for server
reboots, they’re only necessary if the kernel is updated. It is not out of the ordinary for a
Linux server to go years without being rebooted. If you follow the regular recommended
updates, stability and dependability are practically assured.
Open source
Linux is also distributed under an open source license. Open source follows these key tenets:
1. The freedom to run the program, for any purpose.
2. The freedom to study how the program works, and change it to make it do what you
wish.
3. The freedom to redistribute copies so you can help your neighbor.
4. The freedom to distribute copies of your modified versions to others.
Basic Linux commands:
1. pwd :The pwd command is used to display the location of the current working directory.
Syntax: pwd.
2. . mkdir :The mkdir command is used to create a new directory under any directory.
Syntax: mkdir <directory name>
3. rmdir: The rmdir command is used to delete a empty directory.
Syntax: rmdir <directory name>
rmdir -r <directory name> :To delete non empty directory
4. ls : The ls command is used to display a list of content of a directory.
Syntax: ls
5. cd :The cd command is used to change the current directory.
Syntax: cd <directory name>
6. touch: The touch command is used to create empty files. We can create multiple empty files by
executing it once.
Syntax: touch <file name>
touch <file1> <file2> ....
7. cat : The cat command is a multi-purpose utility in the Linux system. It can be used to create a file, display
content of the file, copy the content of one file to another file, and more.
Syntax: cat [OPTION]... [FILE]..
To create a file, execute it as follows:
cat > <file name>
// Enter file content Press "CTRL+ D" keys to save the file.
To display the content of the file, execute it as follows: cat <file name>
8. rm : The rm command is used to remove a file.
Syntax: rm <file name>
9. cp : The cp command is used to copy a file or directory.
Syntax: To copy in the same directory: cp <existing file name> <new file name>
10. mv : The mv command is used to move a file or a directory form one location to another
location.
Syntax: mv <file name> <directory path>
11. head : The head command is used to display the content of a file. It displays the first 10 lines of a
file.
Syntax: head <file name>
12. tail Command : The tail command is similar to the head command. The difference between both
commands is that it displays the last ten lines of the file content. It is useful for reading the
error message.
Syntax: tail <file name>
13. tac Command: The tac command is the reverse of cat command, as its name specified. It
displays the file content in reverse order (from the last line).
Syntax: tac <file name>
14. more command : The more command is quite similar to the cat command, as it is used to display
the file content in the same way that the cat command does. The only difference between
both commands is that, in case of larger files, the more command displays screenful output
at a time.
In more command, the following keys are used to scroll the page:
ENTER key: To scroll down page by line.
Space bar: To move to the next page.
b key: To move to the previous page.
/ key: To search the string.
Syntax: more <file name>
15. less Command: The less command is similar to the more command. It also includes some extra
features such as 'adjustment in width and height of the terminal.' Comparatively, the
more command cuts the output in the width of the terminal.
Syntax: less <file name>
16. id Command: The id command is used to display the user ID (UID) and group ID (GID).
Syntax:id
17. wc Command: The wc command is used to count the lines, words, and characters in a file.
Syntax: wc <file name>
18. od Command: The od command is used to display the content of a file in different s, such as
hexadecimal, octal, and ASCII characters.
Syntax: od -b <fileName> // Octal format
od -t x1 <fileName> // Hexa decimal format
od -c <fileName> // ASCII character format
19. sort Command: The sort command is used to sort files in alphabetical order.
Syntax: sort <file name>
20. gzip Command :The gzip command is used to truncate the file size. It is a compressing tool. It
replaces the original file by the compressed file having '.gz' extension.
Syntax: gzip <file1> <file2> <file3>...
21. gunzip Command: The gunzip command is used to decompress a file. It is a reverse operation of
gzip command.
Syntax: gunzip <file1> <file2> <file3>
22. date Command :The date command is used to display date, time, time zone, and more.
Syntax: date
23. cal Command: The cal command is used to display the current month's calendar with the current
date highlighted.
Syntax: cal
24. sleep Command: The sleep command is used to hold the terminal by the specified amount of
time. By default, it takes time in seconds.
Syntax: sleep <time>
25. time Command: The time command is used to display the time to execute a command.
Syntax: time
26. zcat Command: The zcat command is used to display the compressed files.
Syntax: zcat <file name>
27. df Command: The df command is used to display the disk space used in the file system. It displays the
output as in the number of used blocks, available blocks, and the mounted directory.
Syntax: df
28. mount Command: The mount command is used to connect an external device file system to the system’s
file system.
Syntax: mount -t type <device> <directory>
29. exit Command: Linux exit command is used to exit from the current shell. It takes a parameter as a
number and exits the shell with a return of status number.
Syntax: exit
30. clear Command: Linux clear command is used to clear the terminal screen.
Syntax: clear
31. man command : The man command displays a user manual for any commands or utilities available in
the Terminal, including their name, description, and options. Command to view the full manual:
Syntax: man <command name>
32. ping Command: The ping command is used to check the connectivity between two nodes, that is whether
the server is connected. It is a short form of "Packet Internet Groper."
Syntax: ping <destination>
33. host Command :The host command is used to display the IP address for a given domain name and vice
versa. It performs the DNS lookups for the DNS Query.
Syntax: host <domain name> or <ip address>
34. history command: The history command is used to review all the commands which you have entered.
syntax : history
35. echo command : The echo command in Linux is specially used to print something in the
terminal,
Syntax: echo “string to be printed”
36. wget command :The wget command in the Linux command line allows you to download files from the
internet.
Syntax: wget <url>
vi : a program text editor , it can be used to edit all kind of plain text
. It is specially useful for editing program.
Note:
1. : w -> to save
2. :wq→ to save and quit
3. :q→ to quit
4. :q!→ forcefully quit without saving.
Useful Linux commands for user management
• Linux user management commands are straightforward and allow administrators to perform basic and
advanced operations such as creating, modifying, and deleting user accounts and groups and managing
account properties. Some useful Linux commands that administrators use regularly include:
Command Description
useradd Create new Linux user accounts and customize them by specifying various options such as
username, home directory, and user ID.
passwd Set or change the password for a user account.
usermod Modify the attributes of a user account, such as the username, home directory, user ID or group
ID associated with a particular user.
userdel Delete a user account that is no longer needed from the system, ensuring that the user no longer
has access to the system resources.
groupadd Add a new group in Linux and specify group options.
groupmod Modify or change an existing group.
groupdel Delete an existing group and all the files associated with that group.
chown Transfer the ownership of a file or directory to a different user or group.
chmod Change the permissions of a file or directory.
chgrp Change the group ownership of a file or directory with this command.
• /etc/passwd
• /etc/shadow
• /etc/group
• /etc/gshadow
• Useradd [option]
• -d :home directory
• -u: userid
• -g:groupid
• -m : without home directory
• -e : expiry date
• -c : with comment
• -s : login shell
File System Hierarchy
1. /home: home directory for other user.
2. /root: it is home directory for root user. You can say administrator user in linux.
3. /boot: it contains bootable file for linux
4. /etc: it contains all configuration file. Eg web server, Database server, DNS server etc.
5. /user: by default software are installed in this directory.
6. /bin: it contains commands used by all user including root user.
7. /sbin: it contains commands used by only root user.
8. /opt: optional application software package.
9. /dev : essential device file. This include terminal devices, used or any device attached to
the system.
10. /proc: Stores System and process related files.
11. /var: stores files which changes dynamically. For example Web server Data, Database
related files , log files.
12. /tmp: Stores all temporary files. All files will be deleted when system reboots.
Linux Kernel:
• The Linux kernel is the core component of the Linux operating system. It serves as the bridge between the
hardware of a computer system and the user-level applications and processes. The kernel is responsible for
managing system resources, such as the CPU, memory, devices, and input/output (I/O) operations.

Here are some key aspects and functions of the Linux kernel:
• Hardware Abstraction: The kernel abstracts the underlying hardware, providing a uniform interface for
applications to interact with different types of hardware components. This abstraction allows Linux to run on
a wide range of hardware architectures.
• Process Management: The kernel is responsible for managing processes, which are the running instances of
programs. It allocates resources, schedules tasks, and facilitates communication between processes.
• Memory Management: The kernel manages the system's memory, allocating and deallocating memory as
needed by processes. It also implements virtual memory, allowing multiple processes to run
simultaneously without interfering with each other's memory space.
• Device Drivers: The kernel includes device drivers that allow the operating system to communicate with
hardware devices such as hard drives, network interfaces, graphics cards, and more. These drivers enable
the kernel to control and interact with various hardware components.
• File System Management: The kernel manages file systems, providing an interface for reading, writing,
and organizing files on storage devices. It abstracts the details of different file systems, allowing users to
work with various storage media seamlessly.
• System Calls: The kernel exposes a set of system calls that applications can use to request services from
the kernel, such as file operations, process control, and communication between processes.
• Security: The kernel plays a crucial role in ensuring the security of the system. It enforces access control
policies, manages user permissions, and protects the system from unauthorized access.
• Networking: The kernel handles networking tasks, including protocol implementation, network stack
management, and communication between devices over a network.
Process management:
Process management in Linux is an essential skill for Linux administrators and developers.
It involves controlling and monitoring the processes running on a Linux system, including
managing process resources, scheduling processes to run on the CPU, and terminating
processes when necessary. Understanding the different types of processes, their states, and
the available commands for process management, such as ps, top, kill, nice, and renice,
are important for managing processes effectively.

Introduction to Process
A process is an instance of a program currently running on a computer system. In Linux,
processes are managed by the operating system's kernel, which allocates system resources
and schedules processes to run on the CPU. Understanding and managing processes is a
critical skill for Linux administrators and developers.
Types of Processes
• In Linux, processes can be categorized into two types:
Foreground Processes
• Foreground processes are the kinds of processes that require input from the user and are
characterized by their interactivity. For instance, a foreground process would be like you
are running an Office application on the Linux system.
Background Processes
• On the other hand, background processes are non-interactive operations carried out in
the background and do not call for any participation from the user. Antivirus software is
an example of a Background Process.
• Additionally, processes can be system processes or user processes. System
processes are initiated by the kernel, while users initiate User processes
• Process States in Linux:
In Linux, a process can be in one of five states:
• Running: The process is currently executing on the CPU.
• Sleeping: The process is waiting for a resource to become available.
• Stopped: The process has been terminated by a user
• Zombie: The process has completed execution but has not yet been cleaned by the
system.
• Orphan: The parent process of the current process has been terminated.
• Linux provides several commands for managing processes, which include:
Commands Description
ps Displays information about the processes running currently.

top Provides real-time information about system processes and their resource usage.

kill Terminates a process by sending a signal to it.


nice Adjusts the priority of a process.
renice Changes the priority of a running process.
ps PID Shows the state of an exact process.
pidof Shows the Process ID of a process.
df Shows Disk Management of your system.
free Shows the status of your RAM.
bg For sending a running process to the background.
fg For running a stopped process in the foreground.
• Sorting the process llist:
• M : to sort by memory usage
• P : to sort by CPU usage
• N: to sort by process ID
• T: to sort by running time.

• =========================
• Echo $SHLVL: to check level
• Exec bash
• Ps fx : to display process detail in system
• Ps fx | grep bash: to display bash shell details
• Ps –ef:
• Pgrep: to search process eg. Pgrep bash , pgerp sshd
• Pstree : to display tree of process and child process
• to show process id with tree pstree –P
• Pstree –p –u moon: to display process associated with particular user.
• Strace –p <pid>: to check system call details and process state details.
• Pkill : to kill process with name.
• Killall process1 process 2 : kill all process.
• Sudo apt update
• Sudo apt install mysql-server
• Sudo systemctl status [Link] : to check status
• if not active and running (Sudo systemctl start [Link] : use this
command if and only active and running not found)
• Sudo mysql : to run nysql.
• Sudo mysql_secure_installation
• open new terminal then
• Sudo mysql
• Mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED WITH
mysql_native_password BY’root’;
• Exit
• Sudo mysql_secure_installation
Mail server:
• A mail server (sometimes also referred to an e-mail server) is a server that handles and delivers
e-mail over a network, usually over the Internet. Email servers, or mail servers, are computer
programs that are in charge of sending, receiving, and storing emails. They are essential to the
operation of email communication. A mail server can receive e-mails from client computers and
deliver them to other mail servers. A mail server can also deliver e-mails to client computers. A
client computer is normally the computer where you read your e-mails, for example your
computer at home or in your office.

figure: working mechanism of mail server


Here are some key components and concepts related to mail servers:
1. Mail Transfer Agent (MTA):
The MTA is responsible for the transmission of emails between servers. It uses standard
protocols like SMTP (Simple Mail Transfer Protocol) to send emails from the sender's server
to the recipient's server.
2. Mail Delivery Agent (MDA):
The MDA is responsible for delivering emails to the recipient's mailbox. It takes care of the
final step in the email delivery process, placing the email in the appropriate mailbox.
3. Mail Access Protocols:
There are different protocols for users to access their emails stored on a server. The two main
protocols are:
• Post Office Protocol (POP): POP allows users to download emails from the server to
their local device. It usually deletes the email from the server once it's downloaded.
• Internet Message Access Protocol (IMAP): IMAP allows users to view and
manipulate messages stored on a mail server. It keeps messages on the server and allows
users to organize, delete, or mark emails as read/unread.
4. Domain Name System (DNS):
DNS plays a crucial role in email communication by translating human-readable domain names
(like [Link]) into IP addresses that machines can understand. DNS is used to locate the
mail servers associated with a specific domain.
5. Mailbox:
A mailbox is a location where incoming emails are stored for a particular user. Each user
typically has their own mailbox on a mail server.
6. SMTP (Simple Mail Transfer Protocol):
SMTP is a protocol used by MTAs to send emails. It defines how messages are sent from the
sender's email client to the recipient's email server.
7. POP3 (Post Office Protocol 3) and IMAP (Internet Message Access Protocol):
These are the protocols used by MDAs to retrieve emails from the server to the user's device.
POP3 is typically used for downloading emails, while IMAP is used for more advanced email
management, allowing users to organize emails on the server.
4. SSL/TLS Encryption:
Secure Sockets Layer (SSL) and its successor, Transport Layer Security (TLS), are
cryptographic protocols that provide secure communication over a computer network. They
are often used to encrypt the communication between email clients and servers, ensuring
the privacy and integrity of the email data during transmission.
5. Spam Filtering:
Mail servers often implement spam filtering mechanisms to identify and filter out
unwanted or malicious emails before they reach the user's inbox.
File Server:
• A file server is a computer responsible for the storage and management of data files so that other
computers on the network can access the files. It enables users to share information over a network
without having to physically transfer files. The server administrator has given strict rules that
which users have the access to the files. These rules include opening, closing, adding, deleting, and
editing a file.

• Key features of file server:


Centralized Storage: File servers provide a centralized location for storing files, which makes it
easier to manage and back up data.
Accessibility: Users can access files from different devices connected to the network, including
computers, tablets, and smartphones.
Security: File servers offer various security measures, such as user authentication, permissions, and
encryption, to protect data from unauthorized access.
Scalability: As storage needs grow, file servers can be expanded with additional storage capacity.
Collaboration: File servers facilitate collaboration by allowing multiple users to access and work
on the same files simultaneously.
Backup and Recovery: Centralized storage makes it easier to implement regular backup and recovery
procedures to prevent data loss.
Advantages:
1. Helps in resource and information sharing.
2. Helps in central storage of data.
3. Helps in connecting with multiple computers for sending and receiving information when accessing
the network.
4. Faster-problem-solving.
5. Boots Storage Capacity.
6. Highly flexible and reliable.
Protocols in File Server:
Server Message Block(SMB): The network File sharing protocol allowing applications to do some
operations to request services for the server is called Server Message Block(SMB). These operations
can be reading or writing files in a computer network. LAN File Servers use this protocol. It is
supported for Windows and macOS.
Network File System(NFS): A distributed file system whose operation is to store files on a network is
referred to as a Network File System(NFS). These operations can be accessing files(create, remove,
read, write) and directories over a network and acting like they are present locally.

File Transfer Protocol(FTP): The process involving sending and receiving files between devices over a
network is called File Transfer Protocol(FTP).It is a standard communication protocol. It is built on a
client-server model architecture means clients can execute information from the remote file system
directly.
Web server:
Web servers are software applications or hardware devices that serve content to users over the
internet. They handle requests from client devices (such as web browsers) and deliver web pages,
images, videos, or other resources in response to those requests.

On the hardware side a web server is a computer that stores web server software and a
website’s components files( for example ,HTML documents, images, CSS stylesheet and
JavaScript files). A web server connects to the internet and supports physical data
interchange with other devices connected to the web.
On the software side a web server includes several parts that control how web users hosted files. At
minimum , this is an HTTP server. A HTTP server is a software that understands URLs(web
addresses) and HTTP (the protocol your browser uses to view webpages). An HTTP server can be
accessed through the domain names of the website it stores and it delivers the content of these
hosted websites to the end user’s device.
Here are some key aspects of web servers:
1. When client sends request for a web page, the web server search for the requested page if requested page
is found then it will send it to client with an HTTP response.
2. If the requested web page is not found, web server will the send an HTTP response: Error 404 Not
found.
3. If client has requested for some other resources then the web server will contact to the application server
and data store to construct the HTTP response.
There are several popular web servers, including:
Apache HTTP Server: This is the most popular web server in the world developed by the
Apache Software Foundation. Apache web server is an open source software and can
be installed on almost all operating systems including Linux, UNIX, Windows,
FreeBSD, Mac OS X and more. About 60%
Internet Information Services (IIS): The Internet Information Server (IIS) is a high
performance Web Server from Microsoft. This web server runs on Windows NT/2000
and 2003 platforms (and may be on upcoming new Windows version also). IIS comes
bundled with Windows NT/2000 and 2003; Because IIS is tightly integrated with the
operating system so it is relatively easy to administer it. the web server machines run the
Apache Web Server.
Sun Java System Web Server: This web server from Sun Microsystems is suited for medium and
large web sites. Though the server is free it is not open source. It however, runs on
Windows, Linux and UNIX platforms. The Sun Java System web server supports
various languages, scripts and technologies required for Web 2.0 such as JSP, Java
Servlets, PHP, Perl, Python, and Ruby on Rails, ASP and ColdFusion etc.

Jigsaw Server: Jigsaw (W3C's Server) comes from the World Wide Web Consortium. It is
open source and free and can run on various platforms like Linux, UNIX, Windows,
and Mac OS X Free BSD etc. Jigsaw has been written in Java and can run CGI scripts and
PHP programs.
Webmin : Webmin is a powerful web-based interface designed to manage Unix-like systems, such as Linux,
FreeBSD, Solaris, and so forth. It eliminates the need for system administrators to physically alter configuration
files in order to configure and administer a server.
Features:
• User and Group Management: Add, remove, and modify users and groups.
• Service Management: Manage services like Apache, MySQL, SSH, FTP, and more.
• Network Configuration: Configure networking, DNS settings, routing, and more.
• Package Management: Install, remove, and update software packages.
• Disk and Filesystem Management: Partition management, mount points, and filesystem checks.
• Security: SSL management, firewall configuration, and user permissions.
• Automation: Webmin offers scheduling and cron job configuration.
• Modular Design: Webmin is modular, meaning additional features can be added through modules.
Usermin
Purpose: Usermin is more user-focused and is designed to give regular users control over personal account
settings. It does not provide administrative functionality but focuses on tasks a non-admin user would need,
such as:
Managing emails (reading, sending, filtering)
Changing passwords
Managing files and file permissions
Viewing logs related to their own account
Configuring their own SSH keys
Setting up cron jobs for personal tasks
Key Differences
Audience:
Webmin: For system administrators managing the entire server.
Usermin: For individual users managing their personal settings.
Scope:
Webmin: Full system administration and server management.
Usermin: Limited to user-specific tasks like email,password management, etc.
• TELNET:
• TELNET stands for Teletype Network. It is a client/server application protocol that provides access to virtual
terminals of remote systems on local area networks or the Internet. The local computer uses a telnet client
program and the remote computers use a telnet server program.
• TELNET is a type of protocol that enables one computer to connect to the local computer. It is used as a
standard TCP/IP protocol for virtual terminal service which is provided by ISO. The computer which starts
the connection is known as the local computer. The computer which is being connected to i.e. which accepts
the connection known as the remote computer. During telnet operation, whatever is being performed on the
remote computer will be displayed by the local computer. Telnet operates on a client/server principle.
• SSH:
• The SSH (Secure Shell) is an access credential that is used in the SSH Protocol. In other words, it is a
cryptographic network protocol that is used for transferring encrypted data over the network. The port
number of SSH is [Link] Shell or SSH, is a protocol that allows you to connect securely to another
computer over an unsecured network. It developed in 1995. SSH was designed to replace older methods like
Telnet, which transmitted data in plain text.
• Features of SSH
• Encryption: Encrypted data is exchanged between the server and client, which ensures confidentiality
and prevents unauthorized attacks on the system.
• Authentication: For authentication, SSH uses public and private key pairs which provide more security
than traditional password authentication.
• Data Integrity: SSH provides Data Integrity of the message exchanged during the communication.
• Tunneling: Through SSH we can create secure tunnels for forwarding network connections over
encrypted channels.
• Telnet vs SSH
Feature Telnet SSH
Full Form Teletype Network Secure Shell
No encryption; data is transmitted in plain
Security Encrypted; provides secure data transmission
text
Uses public key cryptography or encrypted
Authentication Username and password sent in plain text
passwords
Encryption None Strong encryption (e.g., RSA, AES)
Port Number Default port 23 Default port 22
Secure remote management of network
Usage Legacy and less secure remote management
devices/servers

Data Confidentiality None Ensures confidentiality and integrity of data

Provides data integrity through cryptographic


Data Integrity No data integrity checks
algorithms
Supported on most platforms but not Supported on all major platforms and highly
Platform
recommended for security reasons recommended
Performance Faster, due to no encryption overhead Slower than Telnet due to encryption
Common Usage Secure administration of systems and
Debugging or managing legacy systems
Scenarios networks
SCP:
• scp (secure copy) command in Linux system is used to copy file(s) between servers in a
secure way. The SCP command or secure copy allows the secure transferring of files
between the local host and the remote host or between two remote hosts. It uses the same
authentication and security as it is used in the Secure Shell (SSH) protocol.
rsync:
• rsync or remote synchronization is a software utility for Unix-Like systems that efficiently
sync files and directories between two hosts or machines. One is the source or the local-
host from which the files will be synced, the other is the remote-host, on which
synchronization will take place. There are basically two ways in which rsync can
copy/sync data:
• Copying/syncing to/from another host over any remote shell like ssh, rsh.
• Copying/Syncing through rsync daemon using TCP.
• NFS Vs DFS
Feature Network File System (NFS) Distributed File System (DFS)

A protocol that allows users to access files over a network as if A file system where files are stored across multiple servers and
Definition
they were on a local drive. locations, appearing as one unified system.

Centralized: usually involves a single server providing files to Decentralized: typically involves multiple servers storing and
Architecture
multiple clients. managing files collaboratively.
Highly scalable, as more servers can be added to handle larger
Scalability Limited scalability due to reliance on a single server.
datasets and traffic.
Fault Tolerance Limited fault tolerance; server failure affects file access for clients. High fault tolerance, as files are replicated across multiple nodes.
Can be slower due to the single-server bottleneck, especially under Generally faster, as load is distributed across multiple servers,
Performance
high loads. reducing bottlenecks.
Data replication is typically not inherent; relies on external Built-in data replication, where files are often copied across
Data Replication
backups. multiple nodes for redundancy.
Maintains strong consistency; changes on the server are Consistency can vary (e.g., eventual consistency), depending on
Data Consistency
immediately visible to clients. the DFS design.

Suitable for small to medium-sized networks, such as local Ideal for large-scale applications, like cloud storage, big data
Use Cases
networks and enterprise file sharing. processing, and content delivery networks.

HDFS (Hadoop Distributed File System), Google File System


Examples NFS, CIFS (Common Internet File System).
(GFS), Amazon S3.
Management More complex due to the distributed architecture and data
Relatively simple to set up and manage, with fewer components.
Complexity replication requirements.
Shared Resources:
Shared resources also known as network resources, refer to computer data, information, or
hardware devices that can be easily accessed from a remote computer through a local area
network(LAN) or enterprise intranet.
Successful shared resources access allows users to operate as if the shared resources were on their
own computer. The most frequently used shared network environment objects are files , data ,
multimedia and hardware resources like printers, fax machines and scanners. File and printer
sharing occurs via two network communication mechanisms: Peer-to-peer(p2p) sharing and the
client-server network model.
Sharing network resources requires:
• Security :Organization present ongoing opportunities for unauthorized shared resources. Security
mechanism should be implemented to provide efficient parameters.
• Compatibility: Various client –server operating systems may be installed, but the client must have a
compatible OS or application to access shared resources. Otherwise, the client may encounter
issues that create communication delays and requires troubleshooting.
• Mapping : any shared OS hardware drive , file or resource may be accessed via mapping ,
which requires a shred destination address and naming convention.
• File transfer protocol(FTP) and file sharing: FTP is not affected by shared resources because the
internet is FTP’s backbone. File sharing is a LAN concept.
Network File System(NFS):
• Network File System(NFS) is a type of file system mechanism that enables the storage
and retrieval of data from multiple disks and directories across a shared network. A
network file system enables local users to access remote data and files in the same way
they are accessed locally . NFS was initially developed by sun Microsystems.
• NFS is derived from the distributed files system mechanism .it is generally
implemented in computing environments where the centralized management of data
and resources is critical . Network file system works on all IP-based networks. It uses
TCP and UDP for data access and delivery, depending on the version in use.
• Network File System is implemented in a client/server computing model where an NFS
server manages the authentication, authorization and management of clients, as well as
all the data shared within a specific file system . Once authorized, clients can view and
access the data through their local systems much like they’d access it from an internal
disk drive.
Advantages of NFS:
• Easy to Set Up: NFS is relatively easy to setup and manage, making it accessible for users with varying
levels of technical expertise.
• High Performance : NFS is designed for high throughput and low latency , making it suitable for
environments where performance is priority.
• Cross-platform: While most commonly used on unix and linux systems, NFS clients exist for other
operating Systems, including Windows.
• Scalability: NFS can easily scale to accommodate growing storage and user demands.
• File Locking: NFS supports file locking , which is essential for multi-user collaboration.
Disadvantages Of NFS:
• Security Concerns: Earlier version of NFS had limited security features , making them susceptible to
unauthorized access. While newer versions have improved security , it remains a concern.
• Network Dependency : Being a network file system, the performance and availability of NFS are highly
dependent on the network’s reliability.
• No Native Encryption: NFS does not provide native encryption for data in transit, although this can be
mitigated using external solutions.
• Complexity in Large Environments: while NFS is easy to setup for small networks, it can become complex
to manage in larger, more heterogeneous environments.
Samba:
• Samba is an open-source software package that allows file and print services between
Linux and windows machines. It is an open-source implementation of the SMB/CIFS
protocol.
• Samba is a widely adopted solution for enabling file and print services in heterogenous
network environments. It provides a bridge between windows and Unix-like systems,
facilitating collaboration and resources sharing across platforms.
• Samba was originally developed in 1991 for and fast and secure file and print share for all
clients using the SMB protocol. Since then it has evolved and added more capabilities.
• Samba server in Linux is specially designed to facilitate the communication between the
operating systems and several resources. It takes the usage or advantage of the most
important protocol called server message block in order to ensure the communication
between various systems.
The main uses of samba:
• File Sharing: samba allows Linux/Unix systems to share files and directories with
windows clients using the SMB/CIFS protocol.
• Print Sharing: samba enables Linux/Unix systems to share printers with windows
clients, allowing centralized printer management.
• Domain Controller: samba can act as a domain controller, enabling Linux/Unix systems
to join and participate in windows domains.
• Integration with windows services: samba integrates with windows services like WINS
and supports Windows domain authentication.
• Interoperability: samba promotes seamless collaboration and data exchange between
Windows and Linux/Unix systems.
• Security: Samba provides user authentication, access control, encryption , and signing
mechanism for secure sharing.
Print services:
• Printer sharing is the process of allowing multiple computers and devices connected to the
same network to access one or more printers. Each node or device on the network can
print to any shared printer and . To some extent, make changes to the printer setting ,
depending on the permission set by administrator for each user.
• If a printer is attached to a computer that supports printer sharing the computer can share
that printer with other computers on the same network. It does not matter whether the
shared printer is old or new, as long as it is properly installed in one computer it can be
shared by that computer.
• The sharing is facilitated by the OS, which handles the communication between
computers and devices within the network and the printer itself. When a print request is
sent from a networked computer, this is received by the computer where the shared printer
is attached , this host computer initializes the printer then sends the print job to it . Printers
can also be shared through a LAN cable if the printer supports the LAN cable port without
connecting printer to any of host computers.
Cloud Computing:
• Cloud computing is an emerging model of Business Computing. It distributes computing tasks in a resource
pool which consists of many computers, so that various applications can access the cloud as they need. For
example computing ability, storage space and a variety of software services. Cloud computing is the product
of grid computing, distributed computing, parallel computing, utility computing, network storage and load
balancing traditional product development of computer technology and network technology.

• Cloud computing uses the internet as a bridge for digital services. It allows computers to send and receive
data to run processes without relying on the local computer. Cloud computing offers faster innovation ,
flexible resources, and economies of scale. It’s also easier to maintain cloud computing applications because
they don’t need to be installed on each user’s computer
Software-as-a-Service (SaaS):
• Software-as-a-Service (SaaS) is a way of delivering services and applications over the Internet. Instead of
installing and maintaining software, we simply access it via the Internet, SaaS provides a complete software
solution that you purchase on a pay-as-you-go basis from a cloud service provider. Most SaaS applications
can be run directly from a web browser without any downloads or installations required. The SaaS
applications are sometimes called Web-based software, on-demand software, or hosted software.
Platform as a Service:
• PaaS is a category of cloud computing that provides a platform and environment to allow developers to build
applications and services over the internet. The consumer does not manage or control the underlying cloud
infrastructure including network, servers, operating systems, or storage, but has control over the deployed
applications and possibly configuration settings for the application-hosting environment.
Infrastructure as a Service:
• Infrastructure as a service (IaaS) is a service model that delivers computer infrastructure on an outsourced
basis to support various operations. Typically IaaS is a service where infrastructure is provided as
outsourcing to enterprises such as networking equipment, devices, database, and web servers.
It is also known as Hardware as a Service (HaaS).

You might also like