System Admin New4 (1)
System Admin New4 (1)
COLLEGE OF INFORMATICS
DEPARTMENT OF COMPUTER SCIENCE
Belayneh M.
Gondar, Ethiopia
November 2024
Chapter One: Introduction to System and Network Administration
Contents
▪ Definition of network administration, and system administration.
▪ Tasks of network administration, and system administration.
▪ Define OS and types and examples of OS.
▪ Differentiate Unix vs Window OS.
▪ Linux distributions and Uis.
▪ Linux file system hierarchies and standards.
▪ Essential and advanced shell commands and features.
Chapter One: Introduction to System and Network Administration
Definition
▪ A Network is just a combination of two or more objects to exchange or share
information.
▪ A system is a collection of elements or components that are organized for a common
purpose.
▪ All systems have inputs, outputs, and feedback mechanisms
▪ A computer network is a system in which a number of independent computers are
linked together to share data and peripherals, such as printers.
▪ A computer system is a collection of computer components (HW and SW component)
combined to perform complex tasks and achieve some objective.
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Batch OS
▪ Batch OS is the first operating system for second-generation computers.
▪ This OS does not directly interact with the computer.
▪ Instead, an operator takes up similar jobs and groups them together
into a batch, and then these batches are executed one by one based on
the first-come, first, serve principle.
Advantages of Batch OS
▪ Execution time taken for similar jobs is higher.
▪ Multiple users can share batch systems.
▪ Managing large works becomes easy in batch systems.
Chapter One: Introduction to System and Network Administration
Disadvantages of OS
▪ It is hard to debug batch systems.
▪ If a job fails, then the other jobs have to wait for an unknown time till
the issue is resolved.
▪ Batch systems are sometimes costly.
Examples of Batch OS: payroll system, bank statements, data entry,
etc.
Chapter One: Introduction to System and Network Administration
Distributed OS
▪ A distributed OS is a recent advancement in the field of computer
technology and is utilized all over the world that too with great pace.
▪ In this OS, various computers are connected through a single
communication channel.
▪ These independent computers have their memory unit and CPU and are
known as loosely coupled systems.
▪ The system processes can be of different sizes and can perform
different functions.
▪ The major benefit of such a type of operating system is that a user can
Chapter One: Introduction to System and Network Administration
Advantages of Distributed OS
▪ Failure of one system will not affect the other systems because all the
computers are independent of each other.
▪ The load on the host system is reduced and higher speed.
▪ The size cab be easily scalable as many computers can be added to the
network.
▪ Data exchange speed is increased with the help of electronic mail.
Disadvantages of Distributed OS
▪ The setup cost is high.
▪ Software used for such systems is highly complex.
Chapter One: Introduction to System and Network Administration
Multitasking OS
▪ The multitasking OS is also known as the time-sharing operating system
as each task is given some time so that all the tasks work efficiently.
▪ This system provides access to a large number of users, and each user
gets the time of CPU as they get in a single system.
▪ The tasks performed are given by a single user or by different users.
▪ The time allotted to execute one task is called a quantum, and as soon
as the time to execute one task is completed, the system switches over
to another task.
Chapter One: Introduction to System and Network Administration
Advantages of Multitasking OS
▪ Each task gets equal time for execution.
▪ The idle time for the CPU will be the lowest.
▪ There are very few chances for the duplication of the software.
Disadvantages of Multitasking OS
▪ Processes with higher priority cannot be executed first as equal priority
is given to each process or task.
▪ Various user data is needed to be taken care of from unauthorized
access.
▪ Sometimes there is a data communication problem.
Chapter One: Introduction to System and Network Administration
Network OS
o Network operating systems are the systems that often run on a server
and manage all the networking functions.
o They allow sharing of various files, applications, printers, security, and
other networking functions over a small network of computers like LAN
or any other private network.
o In the network OS, all the users are aware of the configurations of every
other user within the network, which is why network operating systems
are also known as tightly coupled systems.
Chapter One: Introduction to System and Network Administration
Advantages of Network OS
o New technologies and hardware can easily upgrade the systems.
o Security of the system is managed over servers.
o Servers can be accessed remotely from different locations and systems.
o The centralized servers are stable.
Disadvantages of Network OS
o Server costs are high.
o Regular updates and maintenance are required.
o Users are dependent on the central location for the maximum number
of operations.
Chapter One: Introduction to System and Network Administration
Real-Time OS
▪ Real-Time operating systems serve real-time systems.
▪ These operating systems are useful when many events occur in a short
time or within certain deadlines, such as real-time simulations.
Types of the real-time OS are:
o Hard real-time OS
o Soft real-time OS
Chapter One: Introduction to System and Network Administration
Hard real-time OS
▪ The hard real-time OS is the operating system for mainly the
applications in which the slightest delay is also unacceptable.
▪ The time constraints of such applications are very strict. Such systems
are built for life-saving equipment, which immediately need to be in
action if an accident happens.
Soft real-time OS
▪ The soft real-time OS is the operating system for applications where
time constraint is not very strict.
▪ An important task is prioritized over less important tasks, and this
Chapter One: Introduction to System and Network Administration
Mobile OS
▪ A mobile OS is an operating system for smartphones, tablets, and
PDA’s. It is a platform on which other applications can run on mobile
devices.
Advantages of Mobile OS
▪ It provides ease to users.
Disadvantages of Mobile OS
▪ Some of mobile operating systems give poor battery quality to users.
▪ Some of the mobile operating systems are not user-friendly.
▪ Examples of Mobile OS: Android OS, Symbian OS, and Windows
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
Chapter One: Introduction to System and Network Administration
1. / (Root): Primary hierarchy root and root directory of the entire file
system hierarchy.
• Every single file and directory starts from the root directory
• The only root user has the right to write under this directory
• /root is the root user’s home directory
• 2. /bin : Essential command binaries that need to be available in single-
user mode; for all users, e.g., cat, ls, cp.
• Contains binary executables
• Common Linux commands you need to use in single-user modes are
located under this directory.
• Commands used by all the users of the system are located here e.g. ps,
Chapter One: Introduction to System and Network Administration
3. cd command
• To navigate through the Linux files and directories, use the cd command. Depending on your
current working directory, it requires either the full path or the directory name.
• Running this command without an option will take you to the home folder.
• Keep in mind that only users with sudo privileges can execute it.
• cd Photos.
• If you want to switch to a completely new directory, for example, /home/username/Movies,
you have to enter cd followed by the directory’s absolute path:
• cd /home/username/Movies
• Here are some shortcuts to help you navigate:
• cd ~[username] goes to another user’s home directory.
• cd .. moves one directory up.
• cd- moves to your previous directory.
Chapter One: Introduction to System and Network Administration
4. ls command
• The ls command lists files and directories within a system. Running it
without a flag or parameter will show the current working directory’s
content.
• To see other directories’ content, type ls followed by the desired path. For
example, to view files in the Documents folder, enter:
• ls /home/username/Documents
• Here are some options you can use with the ls command:
• ls -R lists all the files in the subdirectories.
• ls -a shows hidden files in addition to the visible ones.
• ls -lh shows the file sizes in easily readable formats, such as MB, GB, and
Chapter One: Introduction to System and Network Administration
5. cat command
• Concatenate, or cat, is one of the most frequently used Linux commands.
It lists, combines, and writes file content to the standard output. To run
the cat command, type cat followed by the file name and its extension.
For instance:
• cat filename.txt.
• Here are other ways to use the cat command:
• cat > filename.txt creates a new file.
• cat filename1.txt filename2.txt >
filename3.txt merges filename1.txt and filename2.txt and stores the
output in filename3.txt.
Chapter One: Introduction to System and Network Administration
6. cp command: cp command copies files or directories and their content. Take a look at
the following use cases.
• To copy one file from the current directory to another, enter cp followed by the file name
and the destination directory. For example:
• cp filename.txt /home/username/Documents
• To copy files to a directory, enter the file names followed by the destination directory:
• cp filename1.txt filename2.txt filename3.txt /home/username/Documents
• To copy the content of a file to a new file in the same directory, enter cp followed by the
source file and the destination file:
• cp filename1.txt filename2.txt
• To copy an entire directory, pass the -R flag before typing the source directory, followed
by the destination directory:
• cp -R /home/username/Documents /home/username/Documents_backup
Chapter One: Introduction to System and Network Administration
7. mv command
• The primary use of the mv command is to move and rename files and
directories. Additionally, it doesn’t produce an output upon execution.
• Simply type mv followed by the filename and the destination directory.
For example, you want to move filename.txt to
the /home/username/Documents directory:
• mv filename.txt /home/username/Documents.
• You can also use the mv command to rename a file:
• mv old_filename.txt new_filename.txt
8. mkdir: Use the mkdir command to create one or multiple directories at
once and set permissions for each of them. Eg. mkdir Music
Chapter One: Introduction to System and Network Administration
9. rmdir command
• To permanently delete an empty directory, use the rmdir command.
Remember that the user running this command should
have sudo privileges in the parent directory.
• For example, you want to remove an empty subdirectory
named personal1 and its main folder mydir: rmdir -p
mydir/personal1
10. rm command
• The rm command is used to delete files within a directory. Make sure that
the user performing this command has write permissions.
• Remember the directory’s location as this will remove the file(s) and you
Chapter One: Introduction to System and Network Administration
• To remove multiple files, enter the following command:
• rm filename1 filename2 filename3
Here are some acceptable options you can add:
• -i prompts system confirmation before deleting a file.
• -f allows the system to remove without a confirmation.
• -r deletes files and directories recursively.
Chapter One: Introduction to System and Network Administration
User
• User isn’t necessary a person
• Some user accounts exist only to execute the processes required by a
specific service
• In most cases, user means a particular individual who can log in, edit files,
run programs, and make use of the system.
Each user has a username that identifies him
• When adding a new user account to the system,
– the administrator assigns the username a user identification number (UID)
– Internally, the UID is the system's way of identifying a user
– The username is just mapped to the UID
Chapter Two: Access Control
Chapter Two: Access Control
Chapter Two: Access Control
Chapter Two: Access Control
Chapter Two: Access Control
File Permissions
▪ Access to files in Linux is based on permissions
▪ Each user and group has different permissions regarding access to files
▪ Available permissions – read, write, execute, and no permission
Three types of users in Linux
– User: username of the person who owns the file
– Group: set of users
– Other: user who isn't the owner of the file and doesn't belong in the same
group the file does.
• Everyone else other than user and group.
Chapter Two: Access Control
▪ The command chmod 755 cs.txt will permit the above privileges fore a specific files for the
owner, group, and others.
Chapter Two: Access Control
▪ Files are used to provide a uniform view of data storage by the operating
system.
▪ All the files are mapped onto physical devices that are usually non
volatile so data is safe in the case of system failure.
File Attributes
• The attributes of a file may vary a little on different operating systems.
However, the common file attributes are −
Name
• This denotes the symbolic name of the file. The file name is the only
attribute that is readable by humans easily.
Chapter Three: File Systems and Management of Data Storage
Identifier
• This denotes the file name for the system. It is usually a number and
uniquely identifies a file in the file system.
Type
• If there are different types of files in the system, then the type attribute
denotes the type of file.
Location
• This points to the device that a particular file is stored on and also the
location of the file on the device.
Chapter Three: File Systems and Management of Data Storage
Size
• This attribute defines the size of the file in bytes, words or blocks. It may
also specify the maximum allowed file size.
Protection
• The protection attribute contains protection information for the file such
as who can read or write on the file.
Chapter Three: File Systems and Management of Data Storage
Reading a file
• To read from a file, the system call should specify the name and location
of the file.
Chapter Three: File Systems and Management of Data Storage
Writing a file
• To write into a file, the system call should specify the name of the file
and the contents that need to be written.
• There should be a write pointer at the location where the write should
take place.
• After the write process is done, the write pointer should be updated.
Deleting a file
• The file should be found in the directory to delete it. After that all the file
space is deleted so it can be reused by other files.
Chapter Three: File Systems and Management of Data Storage
Repositioning in a file
• This is also known as file seek. To reposition a file, the current file value
is set to the appropriate entry. This does not require any actual I/O
operations.
Truncating a file
• This deletes the data from the file without destroying all its attributes.
Only the file length is reset to zero and the file contents are erased. The
rest of the attributes remain the same.
Chapter Three: File Systems and Management of Data Storage
• LVM is a method of disk space management in the Linux operating system (OS).
By creating a layer of abstraction over physical storage, LVM also allows system
administrators (sys admins) to manage storage volumes across multiple
physical hard disks.
• LVM first became available in Fedora Linux.
• Over time, LVM version 2 (LVM2) evolved, and it is now available in other Linux
versions like RedHat
• An appropriate LVM tool makes it easy to allocate hard drives to physical volumes,
create logical volumes from the physical volumes, and ultimately, increase the size
of a hard drive partition.
Chapter Three: File Systems and Management of Data Storage
Example:
▪ Suppose there are three disks of 1 terabyte (TB) capacity each.
▪ Each of these physical disks is a physical volume (PV), designated PV 1, PV 2, and PV 3.
▪ The total or aggregate available physical storage is 3 TB.
▪ All three disks are added to Volume Group 1.
Two logical volumes (LVs) are created from the volume group: LV1 and LV2. Each LV has a
capacity of 1.5 TB.
Other LV combinations with different capacities can also be created, such as the following:
•3 LVs of capacities 1 TB, 500 gigabytes (GB), 1.5 TB.
•4 LVs of capacities 500 GB, 500 GB, 1 TB, and 1 TB.
•5 LVs of capacities 500 GB, 500 GB, 500 GB, 500 GB, 1 TB.
In this way, LVM adds flexibility to storage needs without increasing the complexity of
storage management.
Chapter Three: File Systems and Management of Data Storage
Contents:
o How to install LVM on major Linux distros
o How to create partitions
o How to create physical volumes
o How to create a virtual group
o How to create logical volumes
o How to create a filesystem on logical volumes
o How to extend a logical volume
o How to remove a logical volume
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
Create partitions
✔ The first thing we will do is create partitions on our disk.
✔ This is to facilitate the creation of physical volumes in the next section,
which can either be created on raw, unpartitioned block devices or single
partitions.
✔ For this example, the disk we’ll be working with is /dev/sdb, which is a
5GB (and currently unpartitioned) hard disk.
✔ We can see our /dev/sdb disk and its pertinent details with the following
command.
# fdisk -l
Chapter Three: File Systems and Management of Data Storage
Finalize your changes by choosing “write,” then exit the utility when done.
We can now see our partition listed when we execute fdisk -l again.
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
Chapter Three: File Systems and Management of Data Storage
RAID 0 – dividing data into blocks and spread blocks across multiple disks
Advantages of RAID 0 – dividing data into blocks and spread
across multiple disks
✔ RAID 0 offers great performance, both in read and write
operations. There is no overhead caused by parity controls.
✔ All storage capacity is used, there is no overhead.
✔ The technology is easy to implement.
Disadvantages of RAID 0
✔ RAID 0 is not fault-tolerant.
✔ If one drive fails, all data in the RAID 0 array are lost. It should not be
Chapter Three: File Systems and Management of Data Storage
Advantages of RAID 1
• Offers excellent read speed and a write-speed that is comparable to that
of a single drive.
• In case a drive fails, data do not have to be rebuild, they just have to be
copied to the replacement drive. RAID 1 is a very simple technology.
Disadvantages of RAID 1 The main disadvantage is that the effective
storage capacity is only half of the total drive capacity because all data get
written twice.
• Software RAID 1 solutions do not always allow a hot swap of a failed
drive. That means the failed drive can only be replaced after powering
Chapter Three: File Systems and Management of Data Storage
RAID level 5 – Striping with parity RAID 5 is the most common secure
RAID level.
• It requires at least 3 drives but can work with up to 16. Data blocks are
striped across the drives and on one drive a parity checksum of all the
block data is written.
• The parity data are not written to a fixed drive, they are spread across all
drives.
• Using the parity data, the computer can recalculate the data of one of
the other data blocks, should those data no longer be available.
• That means a RAID 5 array can withstand a single drive failure without
Chapter Three: File Systems and Management of Data Storage
Advantages of RAID 5
• Read data transactions are very fast while write data transactions
are somewhat slower (due to the parity that has to be calculated).
• If a drive fails, you still have access to all data, even while the failed
drive is being replaced and the storage controller rebuilds the data on the
new drive.
Disadvantages of RAID 5
• Drive failures have an effect on throughput, although this is still acceptable.
• This is complex technology.
• If one of the disks in an array using 4TB disks fails and is replaced, restoring
the data (the rebuild time) may take a day or longer, depending on the load
Chapter Three: File Systems and Management of Data Storage
RAID 6
Chapter Three: File Systems and Management of Data Storage
Advantages of RAID 6
• Like with RAID 5, read data transactions are very fast.
• If two drives fail, you still have access to all data, even while the
failed drives are being replaced. So RAID 6 is more secure than RAID
5.
Disadvantages of RAID 6
• Write data transactions are slower than RAID 5 due to the
additional parity data that have to be calculated. The write
performance was almost 20% lower.
• Drive failures have an effect on throughput, although this is still
Chapter Three: File Systems and Management of Data Storage
Advantages of RAID 10
• If something goes wrong with one of the disks in a RAID 10 configuration,
the rebuild time is very fast since all that is needed is copying all the
data from the surviving mirror to a new drive.
• This can take as little as 30 minutes for drives of 1 TB.
Disadvantages of RAID 10
• Half of the storage capacity goes to mirroring, so compared to
large RAID 5 or RAID 6 arrays, this is an expensive way to have
redundancy.
What about the other RAID levels?
Chapter Three: File Systems and Management of Data Storage
▪ Scalability: RAID can be scaled by adding more disks to the array. This
means that storage capacity can be increased without having to replace
the entire storage system.
▪ Cost-effective: Some RAID configurations, such as RAID 0, can be
implemented with low-cost hardware. This makes RAID a cost-effective
solution for small businesses or home users.
Disadvantages of RAID:
▪ Cost: Some RAID configurations, such as RAID 5 or RAID 6, can be
expensive to implement because they require additional hardware or
software to provide redundancy.
Chapter Three: File Systems and Management of Data Storage
• All RAID levels except RAID 0 offer protection from a single drive failure.
• A RAID 6 system even survives 2 disks dying simultaneously.
• For complete security, you do still need to back-up the data stored on a
RAID system.
• That back-up will come in handy if all drives fail simultaneously because
of a power spike.
• It is a safeguard when the storage system gets stolen.
• Back-ups can be kept off-site at a different location.
• This can come in handy if a natural disaster or fire destroys your
workplace.
Chapter Four: Network Management
TCP/IP Networking
TCP – Transmission Control Protocol and IP – Internet Protocol
o TCP/IP (Transmission Control Protocol/Internet Protocol) is a suite of
communication protocols used to interconnect network devices on the Internet.
o It provides a set of rules for how data should be formatted, transmitted, and
received over networks.
o TCP/IP is the foundation of the modern internet and is used for a wide range of
applications, from web browsing to email to file transfer.
o TCP defines how applications can create channels of communication across a
network.
Chapter Four: Network Management
o It manages how a message is assembled into smaller packets before they are
transmitted over the internet and reassembled in the right order at the
destination address.
o IP defines how to address and route each packet to make sure it reaches the right
destination.
o IP (Internet Protocol): IP is responsible for addressing and routing packets of data
so they can travel across networks and reach their intended destination.
o Each device on a network is assigned a unique IP address.
o TCP (Transmission Control Protocol): TCP is a connection-oriented protocol
that provides reliable, ordered delivery of data between devices on a network.
Chapter Four: Network Management
Configuration Options:
• IPADDR: Assigns the IP address to the interface.
• NETMASK: Defines the subnet mask for your network.
• BROADCAST: Sets the broadcast address for the subnet.
• ONBOOT: Controls if the interface starts automatically at boot (set to yes or no).
• There are other options for setting up DNS servers, gateways, etc.
2. Using a GUI Tool: Many Linux distributions offer a graphical user interface (GUI)
tool for configuring networking.
• This tool typically resides in the network settings of your desktop environment.
• It provides a user-friendly interface to set up IP addresses, DNS servers, and other
network parameters.
Chapter Four: Network Management
✔ Configuring a Linux box for networking involves several steps to ensure that it can
communicate with other devices on the network and access the internet.
Here's a general guide to configuring network settings on a Linux system:
1. Check Network Interfaces: First, you need to identify the network interfaces
available on your Linux box.
✔ You can do this using the ifconfig or ip addr command. Common network
interfaces include eth0 (Ethernet) and wlan0 (Wi-Fi).
2. Edit Network Configuration Files: Network configuration files are typically located
in the /etc/network/ directory or /etc/sysconfig/network-scripts/ directory,
depending on the Linux distribution you're using.
Chapter Four: Network Management
3. Configure Network Settings: Within the network configuration file, you can set
various parameters such as IP address, subnet mask, gateway, DNS servers, and
more.
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
Apply Changes: After editing the network configuration file, save your changes and
Chapter Four: Network Management
• Verify Connectivity: Once the configuration is applied, verify that your Linux box
can communicate with other devices on the network and access the internet.
• You can use commands like ping, traceroute, or curl to test connectivity.
ping google.com
traceroute google.com
• Configure Additional Network Settings (Optional): Depending on your network
setup, you may need to configure additional settings such as firewall rules, VLANs,
bonding, or bridging.
• Refer to the documentation specific to your Linux distribution for detailed
instructions on configuring these features.
Chapter Four: Network Management
5. Set up DHCP: If you want your router to assign IP addresses to devices on your
internal network dynamically, you can install and configure a DHCP server such as
dhcpd or dnsmasq.
6. Configure routing: If your internal and external networks are on different subnets,
you may need to configure static routes or use a dynamic routing protocol such as
OSPF or RIP to ensure that packets are routed correctly between them.
7. Firewall Configuration: Optionally, configure firewall rules using iptables or
another firewall management tool to control which packets are allowed to pass
through your router.
8. Testing: Once configured, test your router by connecting devices to both the
Chapter Four: Network Management
✔ The browser requests for a specific file or resource and initiates the
process.
✔ In response, Web Server read the request and grab the resources and
serve them as web pages so the user can interpret them.
✔ All the communication occurs via HTTP or HTTPS.
✔ It is not as easy as it looks.
✔ Many users are requesting different web pages at the same time.
✔ Web Server has to respond to all requests and provide the correct
files to each one.
Chapter Four: Network Management
2. Installing Apache
✔ To install Apache, install the latest meta-package apache2
by running:
• sudo apt update
• sudo apt install apache2
✔ After letting the command run, all required packages are installed
and we can test it out by typing in our IP address for the web server
✔ After that if you type “localhost” in your browser, you will get the
following interface if you are installed apache web server successfully.
Chapter Four: Network Management
Chapter Four: Network Management
• We have it named gci here but any name will work, as long as we point
to it in the virtual hosts configuration file later.
• Now that we have a directory created for our site, lets have an HTML file
in it.
• Let’s go into our newly created directory and create one by typing:
How to use the Linux BIND command to install and configure DNS
• Much like a phone book, a domain name system (DNS) bridges the
communication gap between humans and computers by matching
domain names to their respective Internet Protocol (IP) addresses.
How Does DNS Work?
• When users enter a domain name into the address bar of their web
browser, they will be taken to the site they want to visit.
• However, this seemingly instant task consists of several steps known as
the DNS lookup or DNS resolution process.
Chapter Four: Network Management
TLD Nameserver
• The TLD nameserver is a DNS server function that is responsible for
storing and managing information about domain names that use
a specific top-level domain (TLD).
• A TLD is the far end of a domain name, such as .com, .org, .online,
and .net.
• If your query is to find the IP address of hostinger.com, the root
nameserver will redirect the DNS recursive resolver to the .com TLD
nameserver.
• Next, the TLD nameserver will inform the resolver about the location of
Chapter Four: Network Management
Authoritative Nameserver
• The authoritative nameserver or authoritative DNS server is the
final authority in the DNS resolution process.
• It stores all information related to the domain name you want to
visit, including its IP address. The recursive resolver will obtain the
IP address and send it back to your computer, directing you to the site.
• Finally, the domain name system resolver performs DNS caching,
storing IP addresses collected from authoritative nameservers as
temporary data.
• In other words, DNS caching makes it so that the next time you want to
Chapter Four: Network Management
• Sending a request from the DNS client to the DNS server is called
a lookup request.
• Getting a response from the DNS server to the DNS client is called
a lookup response.
• The system on which the DNS service is configured is called a DNS
server.
• The system that accesses the DNS server is called a DNS client.
Chapter Four: Network Management
Chapter Four: Network Management
Chapter Four: Network Management
Chapter Four: Network Management
❖ Once the MTA gets the email, relaying comes into play.
❖ That’s why mail transfer agents are often called mail relays.
❖ The email can be forwarded to other MTAs if the recipient is not hosted locally.
❖ Then it hits the mail delivery agent (MDA).
❖ This is the email’s last stopover before it is delivered to the recipient’s mailbox.
❖ The email sending is carried out using SMTP, and for the final stage (MDA to MUA),
POP3 is often used.
Chapter Four: Network Management
o Postfix is the default Mail Transfer Agent (MTA) in Ubuntu. It attempts to be fast and
secure, with flexibility in administration.
o Postfix is an open-source mail transfer agent (MTA) that routes and delivers
email on a Unix-like operating system.
o Developed by Wietse Venema, Postfix is widely used due to its security
features, performance, and flexibility.
o It's licensed under the IBM Public License making it free to use and modify.
Other Alternative of MTA are:-
Postfix Exim Postfix Sendma Qmail Microso
il ft
Exchan
ge
Chapter Four: Network Management
o During the installation, you will be asked to choose your general type of mail configuration.
You can choose “Internet Site” and press ok to install postfix with the default values.
Then, you need to enter your FQDN (Fully Qualified Domain Name) as your mail-domain
name.
Chapter Four: Network Management
• After setting up the mail domain, you will be asked to set up the user account of the
system administrator, where all the mail will be redirected to.
• You can use this format “[email protected]” and replace the user and domain
names with those you have.
Chapter Four: Network Management
Chapter Four: Network Management
✗When the proxy server forwards your web requests, it can make
changes to the data you send and still get you the information that you
expect to see.
✗And lastly, a proxy server can block access to certain web pages,
based on IP address.
Chapter Four: Network Management
✗Privacy benefits
✗Improved security
more users.
✗When the requested objects arrive from the server, it delivers the
objects to the client and keeps a copy of them in the hard disk
cache.
✗This enables clients to receive the data much faster than from the
Chapter Four: Network Management
servers
✗Defining strict access control lists for all clients accessing the proxy
server
applications
/etc/squid/squid.conf
Chapter Four: Network Management
Ping
✔ Ping command is one of the most helpful network diagnostic tools.
✔ For finding problems for both local network and the wider internet.
✔ To “ping” something on a network means sending an internet packet to a destination
computer or other network device, asking for a response.
✔ That device then sends a packet back to you.
The ping command has two primary uses:
• To check whether your connection to a remote computer works at all.
• To check how healthy that connection is.
Chapter Four: Network Management
• Even if your ping reaches its destination and you get a reply, the ping response will
tell you how long a packet took to return and how many packets have been lost.
• You can use the ping command to diagnose if the connection is too slow or unreliable.
✔ Packets are the fundamental units of the modern internet.
✔ When you send someone data, like a photo, it gets broken up into tiny pieces.
✔ Each packet is marked with a source and destination address and then sent off into
the internet.
✔ These packets pass through many other computers, such as web servers and internet
routers.
✔ Packets keep getting passed along until they reach the target system.
Chapter Four: Network Management
Traceroute
o Traceroute is a command-line tool included with Windows and other operating
systems.
o It is used to track the pathway taken by a packet on an IP network from the
source to the destination. It shows the number of hops (routers) between the
source and the destination and the time taken for each hop.
o If you’re having trouble connecting to a website, traceroute can tell you where the
problem is.
o It can help visualize the path traffic takes between your computer and a web server.
o Tell us more information than the ping command
Chapter Four: Network Management
Ifconfig vs ipconfig
✔ ifconfig stands for Interface Configuration. This command displays all the TCP/IP
network configurations of the computer. Eg. ifconfig eth0
✔ We use ifconfig command mainly in Unix-based operating systems.
✔ Initially, the ifconfig command only displays the network configurations of enabled
network devices that are currently connected to the system.
Furthermore, let’s see some of the most common ifconfig commands:
• ifconfig [interface name]: displays the network configuration information of the
specified interface only
• ifconfig -a: displays all the interfaces that are currently available even if they are down.
Chapter Four: Network Management
Chapter Four: Network Management
Netstat
• It displays various network related information such as network connections,
routing tables, interface statistics, connections, multicast memberships etc.,
• Netstat stands for "network statistics".
• Shows list of ports with a specific status and check if a specific port is in use or not and
check which process is using a specific port.
• If you're having difficulties accessing the internet, the netstat command can help
you identify where the problem lies.
• Netstat will display all of your computer's active network connections and the
status of those connections.
Chapter Four: Network Management
• If a connection is not working, netstat can often provide more information about why
it is not working.
• Netstat can also be used to monitor your computer for security threats.
• To view a list of active network connections, open a terminal and type netstat -
tuln.
Chapter Four: Network Management
✔ Both are common, but most sysadmins default to the simplicity, flexibility, and
efficiency of SSH.
✔ SSH (Secure Shell) is a network protocol that enables secure communication
between two devices, often used to access remote servers as well as to transfer
files or execute commands.
✔ SSH was originally developed by Tatu Ylonen in 1995 to replace Telnet, a network
protocol that allowed users to connect to remote computers, most often to test
connectivity or to remotely administer a server.
✔ This was necessary because Telnet was not secured or encrypted in any way.
Chapter Four: Network Management
▪ Today, SSH has become the standard for remote access for many organizations,
and is used by system administrators to manage servers remotely or to securely
connect to their personal computers.
What is SSH access used for?
✔ SSH access is used for a variety of tasks, including remotely logging into servers,
transferring files, and running commands.
✔ Some popular SSH clients include PuTTY (Windows), Terminal (Mac), and Linux Shell.
Chapter Four: Network Management
o The scp command relies on ssh for data transfer, so it requires an ssh key or
password to authenticate on the remote systems.
o To be able to copy files, you must have at least read permissions on the source file
and write permission on the target system.
o Be careful when copying files that share the same name and location on both
systems, scp will overwrite files without warning.
Chapter Four: Network Management
SAMBA
o Samba is an open-source software suite that provides file and print services to
various clients across different operating systems.
o It allows interoperability between Unix/Linux servers and Windows-based
clients on a network.
o It allows these systems to share files, printers, and other resources, making it
possible for users on different platforms to collaborate and access shared
resources transparently.
Chapter Four: Network Management
Components:
● NIS Server: The server hosts the NIS database, which contains user,
group, and other network-related information.
● NIS Client: Systems that use NIS to retrieve network information from
the NIS server.
Chapter Four: Network Management
Chapter Four: Network Management
● These characteristics are defined in maps, or databases, that specify certain
system information such as user names, passwords, and host names.
● An NIS server is a host that provides configuration information to other hosts on
the network.
● Servers retain a set of maps and run the ypserv daemon, which processes
requests from clients for information contained in maps.
● There are two types of servers: a master server and a slave server.
Master Servers
● A master server is the single host in a particular domain that maintains the
authoritative maps.
● The master server runs ypupdated daemon, which prompts slave servers to
update their copies of the maps (all other hosts in the domain must obtain their
map information from the master server, either directly or indirectly).
Chapter Four: Network Management
● The master server also runs the yppasswdd daemon, which processes requests
to change users' passwords.
● For a small number of hosts, each host can access the master server directly.
● However, for a larger number of hosts in a domain, the master server can become
overloaded.
● To balance the NIS processing load and provide services when the master server
is unavailable, additional hosts can be designated as slave servers.
Slave Servers
● NIS slave servers act as intermediaries between clients and the master server by
keeping exact replicas of the master server's maps.
● All changes to the maps are made on the master server.
Chapter Four: Network Management
● Then, the changes are propagated from the master server to the slave servers.
● Once a slave server is added to the domain, it is able to answer the same queries
that the master is able to answer.
● In this way, slave servers can help with extra load on the master server without
violating the authority of the master server.
● Slave servers also act as a backup in case the master server or the network fails.
Clients
● NIS clients make up the majority of hosts in a NIS domain.
● Clients run the ypbind daemon, which enables client processes to obtain
information from a server.
Chapter Four: Network Management
● Clients do not maintain maps themselves, but rather query servers for system
and user account information. (Clients do not make a distinction between querying
the master server or a slave server.)
● To access system information contained in an map, a client makes a Remote
Procedure Call (RPC) to a server.
● The server searches its local database and returns the requested information to
the client.
NIS Domain
● An NIS domain is a collection of systems that are logically grouped together.
● A group of hosts that share the same set of NIS maps belong to the same domain.
Chapter Four: Network Management
● The hosts are usually grouped together in the domain for a common reason; for
example, when working in the same group at a particular location.
● Each NIS host is assigned to a domain when the system starts.
● The domain name must be set on all hosts that intend to use NIS.
● There is one master server per NIS domain, and the systems in the domain are
typically on the same network.
NIS Maps
● NIS maps are databases that specify certain system information such as user
names, passwords, and host names, in a database format called DBM (Database
Management).
● Each map is constructed from a standard text file by associating an index key with
a value.
Chapter Four: Network Management
How it Works:
● The NIS server maintains a centralized database called the "map,"
which contains various network-related information.
● NIS clients query the NIS server for information like user accounts,
group memberships, and other configuration data.
● When a client needs information, it sends a request to the NIS server,
which responds with the requested information from its database.
Chapter Four: Network Management
Advantages:
● Simplifies user and group management in a networked environment by
centralizing administration.
● Reduces the administrative overhead of managing configuration files on
multiple systems.
● Provides a unified mechanism for authentication and authorization
across the network.
Disadvantages:
● Security concerns: NIS does not encrypt the data it transmits, making it
vulnerable to eavesdropping and other security risks.
● Single point of failure: If the NIS server goes down, NIS may become
unavailable.
Chapter Four: Network Management
What is virtual network computing (VNC)?
● Virtual Network Computing is a platform-independent remote desktop-sharing
application.
● It is a technology that allows users to remotely access and control a computer
desktop or server over a network
● The desktop display of one computer can be controlled remotely by another via a
network.
● VNC is among several kinds of desktop remote-sharing systems available for
professionals.
● With its flexible configuration, VNC is highly popular with IT professionals and
system administrators as it provides a powerful tool to manage remote desktops.
Chapter Four: Network Management
How does VNC work?
● VNC works by using a client-server model.
● The user intending to access the remote computer needs a VNC viewer
application installed on their local machine that connects to the server running on
the remote machine
● VNC operates using a specific protocol known as the VNC protocol.
● This protocol transmits the keyboard inputs and mouse movements from one
computer to another.
● The screen changes made on the computer being controlled are sent to the
controlling computer in the form of small rectangles.
● Upon receipt, the controlling computer updates its display.
Chapter Four: Network Management
Advantages of virtual network computing
● VNC is a good choice for users who need a basic and customizable
remote desktop access solution, while TeamViewer is suitable for users
who require a more feature-rich and user-friendly experience, especially
for commercial use and collaboration.
Chapter Four: Network Management
Port Forwarding
➔ Port forwarding is a crucial concept that often comes into play when engaging in
certain activities.
➔ Whether you’re setting up a game server to facilitate seamless gaming
experiences, hosting your own website directly from your home, or ensuring
remote access to security cameras while you’re away, port forwarding plays a
pivotal role.
➔ The examples above all involve setting up servers to be accessed from an outside
source.
➔ Port forwarding establishes a connection between a router’s public IP address and
the IP addresses and ports of services on a network.
Chapter Four: Network Management
How a router works
➔ When you browse the internet, router forwards your request to the
modem.
➔ When the response comes back, the router routes it back to the right
device using its assigned IP address.
➔ This forwarding is necessary because only by the router knows the local
IP addresses assigned to each device in the network.
➔ Any data traveling to your device never gets there directly. It must be
forwarded.
Chapter Four: Network Management
What are ports?
When the IP version 4 address was created, engineers had no concept of how
big the internet would become.
So having 4 billion IP version 4 addresses available seemed like more than
enough.
In fact, the rate of growth has been such that the Internet is effectively doubling in
size each year.
Chapter Four: Network Management
Chapter Six: Managing Network Services
Boot Problem
A boot problem refers to any issue that prevents a computer from starting up
properly or accessing the operating system.
• Resolving boot problems can be tricky, but here's a general step-by-step guide to
help you troubleshoot and fix common issues:
1. Check Hardware Connections: Ensure all cables, including power and data
cables for hard drives and other peripherals, are securely connected.
• Loose connections can prevent your computer from booting properly.
Chapter Six: Managing Network Services
2. Boot into Safe Mode: Try booting into Safe Mode by pressing F8 or Shift + F8
during startup.
• Safe Mode loads only essential drivers and system services, which can help you
identify if the problem is caused by third-party software or drivers. If you can boot
into Safe Mode, you may be able to troubleshoot further from there.
3. Use System Restore: If your computer was previously working fine, try using
System Restore to revert your system to a previous state where it was functioning
properly.
Chapter Six: Managing Network Services
4. Check BIOS Settings: Ensure that your BIOS settings are correctly configured,
especially settings related to boot order and disk detection.
• Incorrect BIOS settings can prevent your computer from booting into the operating
system.
5. Run Startup Repair: Boot from your Windows installation media and select
"Repair your computer" to access Startup Repair.
• Automatically fix certain boot problems, such as missing or damaged system files.
6. Check Disk for Errors: Boot into the Windows Recovery Environment and run the
"chkdsk" command to check your system drive for errors.
• Go to “cmd” and run as an administrator and type CHKDSK C:
Chapter Six: Managing Network Services
7. Update Drivers and Firmware: Ensure that all device drivers and firmware are
up to date, especially drivers for critical hardware components such as the
motherboard, graphics card, and storage devices.
8. Perform a Clean Boot: Disable unnecessary startup programs and services using
the System Configuration utility (msconfig). This can help identify if a third-party
program or service is causing the boot problem.
9. Repair or Reinstall Windows: If none of the above steps work, you may need to
repair or reinstall Windows. You can perform a repair installation from your Windows
installation media or use the "Reset this PC" feature in Windows Settings.
10. Seek Professional Help or contacting the manufacturer for support.
Chapter Six: Managing Network Services
Backup and restore refer to the processes of creating copies of data (backup)
and then using those copies to recover or restore the original data if it is lost,
corrupted, or otherwise damaged.
Backup Methods
1. File Backup: Copying individual files and folders to the backup location.
2. System Image Backup: Creating a complete image of your system drive,
including the operating system and installed programs.
3. Cloud Backup: Using a cloud storage to back up your files over the internet.
Chapter Six: Managing Network Services
Restore
Restore is the process of recovering data from backups when it has been lost,
corrupted, or deleted.
Types:
• File Restore: Recovering individual files or folders from a backup.
• System Restore: Restoring the entire operating system or system drive from
a backup.
Chapter Six: Managing Network Services
Event Viewer
A Windows utility that logs system, security, and application events, allowing
users to monitor and troubleshoot various aspects of their computer's operation.
By analyzing the logs within Event Viewer, users can identify patterns, diagnose
problems, and take appropriate actions to maintain the stability and security of
their system.
Chapter Six: Managing Network Services
• Once you've opened Event Viewer, you'll see a tree structure on the left side
containing different types of logs:
• Application: Logs related to applications.
• Security: Logs related to security events like logon attempts, etc.
• System: Logs related to system events like hardware failures, driver issues, etc.
• Setup: Logs related to system setup and installation.
• Within each category, you'll find specific events listed in the center pane.
• You can click on an event to view more details about it, including its description
and any associated error codes.
• Critical errors are highlighted with a red exclamation mark icon. Look for events with "Critical"
level.
Chapter Six: Managing Network Services
Bootloader
• A bootloader is a critical piece of software running on any system.
• Whenever a computing system is initially powered on, the first piece of code to
be loaded and run is the boot loader.
• A software program that is responsible for “actually loading” the operating
system
• LILO (LInux LOader) and GRUB (GRand Unified Bootloader) are both bootloaders
used in Linux systems to load the operating system kernel into memory during
the boot process.
Chapter Seven: Systems Security
LILO served as the default boot loader for Linux systems for a long time, but GRUB
has recently taken its place.
Chapter Seven: Systems Security
Chapter Seven: Systems Security
Iptable
• Iptables is a firewall application that works with the Linux kernel.
• Controls incoming and outgoing traffic and provides a method to filter, block, or
allow traffic based on criterias, such as port number, IP address, protocol…
• Iptable is designed to protect system from unauthorized access and provide a
secure environment for applications and services.
• Iptables works by defining a set of rules that determine how traffic is handled.
• These rules are stored in kernel and are evaluated for each incoming or outgoing
packet. If a packet matches a rule, it is allowed or blocked based on action
specified in rule.
Chapter Seven: Systems Security