Module3 Final
Module3 Final
VRINDA KN
Department of CSE
College of Engg. Trikaripur
VRINDA KN,AP,CSE,CETKR
Module 3
VRINDA KN,AP,CSE,CETKR
Operating System
Defined as a collection of computer programs that integrate the hardware
resources of the computer and make those resources available to a user and the user’s
programs, in a way that allows the user access to the computer in a productive,
timely, and efficient manner.
The operating system acts as an intermediary between the user and the user’s
programs and the hardware of the computer.
Examples of Popular Operating Systems:
Microsoft Windows
macOS
Linux
Android
iOS
VRINDA KN,AP,CSE,CETKR
Operating System
Types of Operating Systems:
VRINDA KN,AP,CSE,CETKR
Operating System
Modern computer systems enable users to work with more than one program at the
same time as a way to improve their efficiency. A user can be listening to music on
the Web while word processing a document
This technique is known as multitasking or multiprogramming.
The operating system must support concurrency, which simulates the
simultaneous execution of multiple programs to provide multitasking and multiuser
support.
It plays a role in the computer startup process. This process is known as
bootstrapping or Initial Program Load (IPL). The word bootstrapping is often
abbreviated simply to boot or booting.
VRINDA KN,AP,CSE,CETKR
Operating System services
Relationships between the different components of an operating system.
VRINDA KN,AP,CSE,CETKR
Operating System
Operating system provides three basic types of services:
1. Command services. It accepts and processes commands and requests from the
user and the user’s programs and presents appropriate output results.
2. Program services. It manages, loads, and executes programs.
3. Hardware services. It manages the hardware resources of the computer,
including the interfaces to networks and other external parts of the system
VRINDA KN,AP,CSE,CETKR
Services and Facilities
[Link] Interface and Command Execution Services:
the most important and visible service provided by the operating system is the user
interface and the capability that it provides to execute commands.
Different types of user interfaces exist:
[Link] user interface (GUI)
2. Command line interface (CLI).
The graphical user interface accepts commands primarily in the form of icons, drop-
down menus or tabbed ribbons, on-screen buttons, mouse or finger movements, and
mouse or finger clicks. The command line interface relies on typed commands.
The command interface provides direct access to various other modules within
the operating system.
VRINDA KN,AP,CSE,CETK
Services and Facilities
The commands access the file system for file operations and the scheduler for
program loading and execution.
Commands may also provide direct access to the I/O system, protection services,
network services, and process control services.
Some commands are built directly into the operating system. They remain in
memory(RAM) for immediate access. These are known as resident
commands.(cd,[Link]...) Other commands are loaded only as they are needed.
These are called nonresident commands (secondary storage). Eg : format(Disk
format), ping
The command interface is viewed as a shell.
Most modern operating systems provide some capability for combining computer
commands into pseudo-programs, commonly called shell scripts.
VRINDA KN,AP,CSE,CETKR
Services and Facilities
Shell scripts can be executed as they were actual programs. Other common features
include the following:
• Redirecting I/O data to a device different from that ordinarily used, to a storage
device file instead of the screen. (cat >> filename)
• A way to combine commands using a technique called piping, so that the output
from one command is automatically used as the input for another (ls | grep word
filename)
• Providing additional parameters to the script that can be entered by the user at the
time the program is executed. (./[Link] arg1 arg2)
VRINDA KN,AP,CSE,CETKR
Services and Facilities
Windows also include a more powerful scripting facility called Windows
PowerShell.
There are a number of scripting languages that are designed to work independently of
the particular operating system in use. The most popular of these include python,
JavaScript, perl, PHP, and Ruby.
2. File Management
The concept of a file is central to the effective use of a computer system. A file is
generally loosely defined as a collection of related information.
A file may be organized internally into records or it may simply be a stream of bytes.
A file constitutes a logical unit of storage, that is, logical to the person or program
using the file
VRINDA KN,AP,CSE,CETKR
Services and Facilities
The file management system provides and maintains:
• Directory structures for each I/O device : The directory structure allows the
retrieval and storage of files by name instead of remembering physical locations and
provides other functions required to maintain the structures of the file system.
Provisions are made to move easily from one structure to another.
• Information about each file in the system and tools to access that information:
Typically, information about a file might include its name, type of file, size, date and
time of creation, date and time of the most recent update, and protection and backup
characteristics
VRINDA KN,AP,CSE,CETKR
Services and Facilities
• Security mechanisms to protect files and control and limit file access to authorized
users. Most modern systems also provide encryption protection and journaling, a
technique which assures the currency and integrity of files when system failures
occur during file changes
3. Input/Output Services
The operating system includes I/O device driver programs for each device installed
on the system. These drivers provide services to the file management system and are
also available, through the API, to other programs for their use. The I/O device
drivers accept I/O requests and perform the actual data transfers between the
hardware and specified areas of memory.
VRINDA KN,AP,CSE,CETKR
Services and Facilities
Modern systems provide certain I/O drivers with minimal functionality in ROM, to
assure access to critical devices, such as the keyboard, display, and boot disk during
the system start-up process.
Device drivers for newly installed devices are added and integrated into the operating
system at the time of installation. In Windows, this capability is known as plug-and-
play.
4. Process Control Management
A process is an executing program. This includes not only application programs, but
the programs within the operating system itself.
VRINDA KN,AP,CSE,CETKR
Services and Facilities
Each program is assigned memory space and the various resources that it initially
requires to complete its work. As the process executes, it may require additional
resources, or it may release resources that it no longer needs. The operating system
performs various functions with processes, including scheduling and memory
management, setting process priorities.
Processes may cooperate with each other by sending messages back and forth using
inter process messaging services.
Process control management keeps track of each process in memory. It determines
the state of each process: whether it is running, ready to run, or waiting for some
event, such as I/O to be completed, in order to proceed.
VRINDA KN,AP,CSE,CETKR
Services and Facilities
Most modern systems further break the process down into smaller units called
threads. A thread is an individually executable part of a process. It shares memory and
other resources with all other threads in the same process, but can be scheduled to run
separately from other threads
5. Memory Management
The memory management system has three primary tasks.
1. It keeps track of memory, maintaining records that identify each program loaded
into memory together with the space being used and also keeps track of available
space. It allocates additional space for running programs as required. It prevents
programs from reading and writing memory outside their allocated space, so that they
cannot accidentally or intentionally damage other programs
VRINDA KN,AP,CSE,CETKR
Services and Facilities
.2. If necessary, it maintains one or more queues of programs waiting to be loaded
into memory as space becomes available, based on such program criteria as priority
and memory requirements. When space is available, it allocates memory to the
programs that are next to be loaded.
3. It deallocates a program’s memory space when it completes execution. The
deallocated space is made available for other programs.
VRINDA KN,AP,CSE,CETKR
Services and Facilities
6. Scheduling and Dispatch
The operating system is responsible for the allocation of CPU time in a manner that is
fair to the various programs competing for time, as well as maximizing efficient
utilization of the system overall.
There are two levels of scheduling. one for admittance to the system, the other to
assign memory. One level of scheduling determines which jobs will be admitted to
the system and in what order.
Admission to the system means that a job will be placed into a queue, based on some
order of priority, and ultimately assigned memory space and other resources, which
will allow the program to be loaded into memory and executed.
This scheduling function is sometimes known as long-term scheduling. The other
level of scheduling is known as short-term scheduling/dispatching
VRINDA KN,AP,CSE,CETKR
Services and Facilities
7. System Administration Support
The system administrator is the person who is responsible for maintaining the
computer system or systems. In a large organization, the sysadmin may support
hundreds, or even thousands, of computers, including those of the employees.
Some of the important administrative tasks managed by a system administrator
include:
• System configuration and setting group configuration policies
• Adding and deleting users
• Controlling and modifying user privileges to meet the changing needs of the users
• Providing and monitoring appropriate security
VRINDA KN,AP,CSE,CETKR
Services and Facilities
• Managing, mounting(making file system available to users), and unmounting file
systems
• Managing, maintaining, and upgrading networks
• Providing secure and reliable backups
• Providing and controlling software, installing new software, and upgrading software
as required
• Patching and upgrading the operating systems and other system software
• recovering lost data
• Tuning the system for optimum availability and performance
• Monitoring system performance and recommending system modifications and
upgrades when necessary to meet user requirements.
VRINDA KN,AP,CSE,CETKR
Linux Commands
The human interaction module is a key required component of each computer
system that makes interacting or working with the system easier.
Text-based interface or command line interface (CLI) is a much more effective
way of communication with computer
CLI helps you to handle complex tasks very straightforwardly.
The shell acts as an intermediary layer between the Linux kernel and the user
which takes input from the user and passes it to the kernel and vice versa. A good
number of Linux shells have been created to use in Linux distribution. However, the
Bourne Again Shell (bash) is the most popular among all available shells.
VRINDA KN,AP,CSE,CETKR
Linux Commands
The basic syntax of a user input command on shell prompt is given as follows:
$<command_name> <-options> <List_of_arguments>
For example:
$ ls // To see the content of the present working directory,
VRINDA KN,AP,CSE,CETKR
Linux Commands
Options : Most of the commands have one or more options that help to categorize
various operations of a particular command. Each distinct operation of a
command is represented with a character or word, headed by one (-) or two
hyphens(--), respectively. It is one-letter code that changes the style of command
action. The options are added after command_name and separated with space. It is
optional and totally depends on the type of action being performed by the command.
For example:
$ ls -l // The -l option of ls command changes the output behavior of ls, by
providing the outputs in a longer detailed format.
VRINDA KN,AP,CSE,CETKR
Linux Commands
Arguments : Arguments may be described as input to the given command on shell
prompt or command line after command options (this may be optional, totally
depending upon operation behavior). An argument can be in the form of a
directory or a file’s name that can be passed as an input to the entered command on
shell terminal or console.
$ ls -l filename // Display only that file details in long format with permission
details.
VRINDA KN,AP,CSE,CETKR
Linux Commands
Metacharacters : Every shell has some specific set of characters that have a special
meaning to the shell command line, known as metacharacters.
Some key characters, referred to as metacharacters, are ?,*, ., [,], $,>,<, &, |, etc.
Some examples of metacharacters are:
$ls –l > xyz // Redirect the output of ls –l into file, named as xyz. Here,> is the
metacharacter, that is, output redirection operator
VRINDA KN,AP,CSE,CETKR
Linux Commands
All the Linux commands may be categorized into internal and external commands.
VRINDA KN,AP,CSE,CETKR
Linux Commands
External commands : All commands that are not built into the shell are referred to
as external commands. Such commands are written as programs that have their own
binary files. Most commands are external in nature, and the shell starts a separate
sub-process to execute such commands due to the existence of a binary.
These files mostly reside in /bin, /sbin, and /usr/sbin directory locations.
$type more // Specifying that more is an external type command with the message
“more is /bin/more.”
$type cat // Specifying that cat is an external type command with the message
“cat is /bin/cat.”
VRINDA KN,AP,CSE,CETKR
Linux Commands
•One of the important features of Linux-/Unix-like operating systems is that all the
resources, tools, utilities, and APIs are stored in the form of files that are categorized
into various file types.
•These files are further stored in directories. A directory is also a type of file.
•All these files and directories are organized in the form of a hierarchical directory
structure that can be thought of as treelike structure of directories (sometimes called
folders). The first directory in this hierarchical structure is referred to as
root directory, represented as /.
•The root directory (/) further comprises various files and sub directories,which may
include more number of files and subdirectories.
• Everything on the Linux system is located under the root directory (/)
VRINDA KN,AP,CSE,CETKR
Linux Commands
ls It lists the contents of a given directory.
ls –l Display the list of filenames in long format, i.e., with detailed in formation of
the current working directory
pwd To check the full path of your current working directory, use the pwd
command
mkdir directories_names It creates one or more directories, if they do not already
exist.
mkdir xyz // Make a single directory with the name x
mkdir xyz1 xyz2 xyz3 // Make three directories with names xyz1,xyz2, andxyz3
cp -option<src><dest>
It performs the copy of files and directories from one place to another (src—source;
dest—destination).
cp fle_1 fle_2 // Copy the fle_1 content in fle_2. If fle_2 exists, then it is
overwritten. Use the -i option to confirm before overwriting
VRINDA KN,AP,CSE,CETKR
Linux Commands
mv -option<source><destination>
It is used to rename the name of files and directories and also to move a set of files to
a directory. The renaming and moving operation of mv is depending on how it is
used. When it is used to rename a file, then simply use the new filename as the
second argument. But in the case of moving a set of files, then the last argument
should be the path of directory where you want to transfer the operation.
• mv item1 item2 (in the same directory // rename)
(item1 is renamed item2)
• mv item1 item2 Dir1 (in other directory location // move) (move the flesitem1 and
item2 into the directory named Dir1)
• mv fle_1 fle_2 // Rename fle_1 to fle_2. If any file with the name fle_2exists, then
it is overwritten by the contents of fle_1, and you may accidentally delete the original
fle_2, so be careful while renaming the file.
VRINDA KN,AP,CSE,CETKR
Linux Commands
cd Use cd to navigate between directories in your Linux. Syntax cd
[path_or_directory] The cd command has several shortcuts:
• cd – returns to the current user’s home directory.
• cd .. – moves a directory up. • cd – – goes back to the previous directory.
grep The grep command stands for “global Regular expression print.” It is a
pattern-matching command that matches the given search pattern or text line by line
from a given filename and prints all lines that comprise the given pattern. The basic
syntax of this command is as follows:
• grep -option<search option><flename>
grep “hope” [Link]
grep -n word filename to show the matching line and its number
(-c display only the count of matching lines, -v show all the lines do not match
the search string)
man The Man command is used to provide the complete in formation about a
given command.
VRINDA KN,AP,CSE,CETKR
Pipe connect the output of one command as the input to another [Link]
to combine multiple commands.
ls | grep .txt list files and filter by .txt
VRINDA KN,AP,CSE,CETKR
Linux Commands Questions
[Link] command syntax, options, and arguments of Linux command line.
[Link] metacharacter and how it is important in a Linux environment.
3. By using the cd command, you go to /bin/xyx and then type cd
~ (tilde command) and press [Link], fnd out your current place. ?
4. How to distinguish between an internal command and an external
command?Explain why internal commands do not have process ID whereas external
commands have. ? [Ans : Internal commands executed directly within the shell]
5. Assume that you type a command for execution and then see
the message “command not found,” but the command exists in its location. Explain
the possible cause of such error message.
6. Rename [Link] to [Link]?
[Link] [Link] to another directory?
8. Find all files in the home directory that end with .txt?
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
A command line user interface (CUI) communication with Linux/Unix is provided
by a shell, which is normally used for improving system interaction and
administration. A shell takes input in text form and gives output in the same way. It
is also a programming language as well as a command interpreter.
A shell is a command language interpreter that offers a command line user
environment to execute various commands and perform operations..
The shell executes the script file line by line by searching and executing all the
commands mentioned in each line on the system.
The shell is always available with any Linux distribution.
run the ps command (which shows the list of currently active processes), then you
will see the below output which comprised with currently running processes, as
shown below:
$ ps
PID TTY TIME CMD
357 0:00 pts/6 bash
VRINDA KN,AP,CSE,CETKR // bash shell
Shell Scripting(bash)
To know the name of currently active or running shell, then type the following
command on command line:
#echo $SHELL // The output could be shown as /bin/bash
The syntax of command line structure of the shell may be as follows:
#command_name [-options] [list of arguments]
Basic components of SHELL Scripting
Bourne Again Shell (bash), popular Unix shell .
First line of the script : #!/bin/bash (shebang: it tells the system which interpreter
should be used to execute the script.)
Some generally utilized built-in commands are as follows
echo: Display a string on screen or to print the value of a variable
read: Read a line from a file or from standard input
case: Conditional loop to select a choice for multiple options
cd: Change the present working directory
for: A conditional loop
VRINDA KN,AP,CSE,CETKR
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
Global environment variables are also visible and available to all child processes
running under the same shell session.
Local variables are not visible and available in all shells, and they are visible and
accessible only in the current shell in which it is defined. These variables may also be
assumed to be user-defined variables.
The built-in command set, without any option, is used to display all variables
including user-defined variables, local environment variables, and global
environment variables.
In the shell, there is no concept of a “type” or “data type” declaration of variables .
Local variables are declared in lowercase.
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
A variable’s name may be defined with any set of alphabetic characters,
including the underscore. Variable names may also contain a number, but the
first character should not be a digit.
Characters such as an exclamation mark (!), an ampersand (&), or even a space may
not be included while creating a variable name. Such symbols are reserved and used
by the shell only.
You can give any set of characters as value to a variable.
In the following examples, the variable my_variable is assigned various values as
shown below:
my_variable1=Hello
my_variable2=45
echo “$my_variable1”
Output : Hello
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
conditional commands permit you to repeat and have a logical flow control over
some set of commands. It also allows you to alter the direction of execution flow on
the basis of some condition or logic.
Conditional blocks (if, if-then-else, test):
1. If-then statement:
The most fundamental type of structured command is if-then statement, and the
format of the same is given below:
if command
then
commands
fi
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
2. If-then-else statement:
The if-then-else statement offers another group of commands in conditional block
structure as shown below:
if command
then
commands
else
commands
fi
3. Nested ifs statement: To check for multiple conditions in your script, you may
apply another version of if-else section, known as elif, instead of individual
separate if-then statements for each condition.
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
Conditional loops (while, until, for):
• while command: It repeats the execution as long as its test condition is true (exit
code is 0).
• until command: It repeats the execution as long as its test condition is false (exit
code is not 0).
• for ((expression; expression; expression)): It starts the loop by evaluating the first
arithmetic expression; repeats the loop as long as the second expression condition
is successful; and at the end of each loop, evaluates the third arithmetic
expression
Comments
Used for adding explanations. # symbol is used to add comments
Eg: #!/bin/bash #uses the bash shell
VRINDA KN,AP,CSE,CETKR
Shell Scripting(bash)
The following key steps are required to effectively make and run a shell script:
• Create a script: A shell script is a regular text file that requires a text editor to write
and create it. The vi/vim or other text editors may be used to create shell scripts.
The shell script file has .sh extension
• Provide execute permission to script: After creation, you need to provide the exe
cute permission to each shell script by using the chmod command
chmod +x [Link] (chmod a+x or chmod 777 )
Store in the PATH environment variable: You store the script file in such a folder,
so that the shell can find it easily for execution. The shell automatically searches
certain directories to locate executable files when no explicit path name is
mentioned or provided. Generally, the /bin directory is one of the directories that
the system automatically searches. But all the directories listed under the PATH
envi ronment variable are searched automatically by the shell for execution.
Run the script : ./[Link]
VRINDA KN,AP,CSE,CETKR
Shell Script :Read a file line by line
#!/bin/bash
filename=“[Link]”
VRINDA KN,AP,CSE,CETKR
Shell program using if
#!/bin/bash
VRINDA KN,AP,CSE,CETKR
Computer Communications
Two end nodes, or hosts, are connected by a communication channel. An interface
connects each node with the channel. The channel carries signals/ messages between
the nodes. Protocols define the ground rules for the channel signals and for the
messages.
VRINDA KN,AP,CSE,CETKR
Messages
The message is the primary purpose of the communication.
It may be data in the traditional sense of the word.
It may also be a program or a file or a snippet of personal conversation or a request
or status information or a video or audio stream or some other agreed-upon content.
Usually describe the data as a byte stream.
Message length may vary widely from application to application. A message might
be as small as a few bytes.
Messages are transmitted through communication channels using various protocols
like HTTP,TCP/IP…
For example the HTTP keyword “GET” used by the Web browser is recognized by
the cooperating Web server application as a request for a Web page as the appropriate
response
VRINDA KN,AP,CSE,CETKR
Packets
A way to break long messages into smaller units. These units are called packets.
Packets from different sources can share the channel, using one or more of several
multiplexing techniques, allowing for the concurrent passage of different messages.
Packets are used for most data communications.
VRINDA KN,AP,CSE,CETKR
Packets
The messages are broken into packets at the source.
At the cell tower, the two messages are multiplexed, i.e., transmitted alternately,
packet by packet, and relayed to the next node for further processing.
VRINDA KN,AP,CSE,CETKR
Packets
Packets offer a number of important advantages in data communication:
VRINDA KN,AP,CSE,CETKR
Packets
• The receiving computer is able to process a block of data all at once, instead of a
character or a byte at a time. Furthermore, it is usually easier to organize the data,
since there are fewer individual blocks of data to deal with.
VRINDA KN,AP,CSE,CETKR
General Channel Characteristics
Medium
The communication channel provides the path for the message between the two
communicating end nodes in the model.
the communication channel is actually divided into segments, called links.
A communication channel medium can be either guided(wired :ethernet,fiber
optics) or unguided(wireless).
Radio waves transmitted from an antenna are unguided
Unguided media include cellular phone, broadcast radio, microwave, wireless net
working, infrared light, and satellite technologies.
Unguided communication channels are inherently insecure
Signaling is achieved by varying certain properties of the radio wave at the
transmitter and detecting the variations at the receiver. This process is called
modulation and demodulation. (A modem works on the same principle.)
The signals in guided media may be viewed as either analog or digital.
Guided medium transmitted through physical cables(cable tv, telephone network)
VRINDA KN,AP,CSE,CETKR
General Channel Characteristics
Data Transmission Directionality
Channels can also be characterized by the direction in which the messages can
flow.
A half duplex channel may carry messages in both directions, but only one
direction at a time. Eg: walkie-talkie
Channels which carry signals simultaneously in both directions are called full-
duplex channels. Traditional telephone landlines are full-duplex channels
Both parties can speak simultaneously, and each can hear the other
VRINDA KN,AP,CSE,CETKR
Networking Network Topology
Network topology:
VRINDA KN,AP,CSE,CETKR
Network Topologies
VRINDA KN,AP,CSE,CETKR
Networking
Star topology:
In this configuration, all nodes are connected point-to-point to a central device
called Hub. Nodes communicate through the central device.
This topology is used primarily for local area net works, although it is sometimes
used in metropolitan and wide area networks to connect individual centers of activity
to a central office.
If N devices are connected means N number of cables required to connect. So it is
easy to set up.
If one link fails only that link will affect.
Here the performance is based on the single concentrator ie Hub.
Disadvantage is if the central hub fails the entire network goes down.
Also the performance depends on the central hub.
VRINDA KN,AP,CSE,CETKR
Networking
Bus Topology:
All stations are attached to the same cable.
To communicate, a sending node “broadcasts” a message which travels along the
bus. Every other node receives the message.
Each node compares its address to that of the message; therefore, the message is
ignored by every node except that of the desired recipient.
Each end of the bus is equipped with a terminator to prevent signals from
bouncing back.
If N nodes are connected only one cable is required to connect known as back bone
cable and N drop lines are required.
Bus topology also has the advantage of low cost.
Traffic congestion is a major issue with bus topology.
If the common cable fails then whole system will crash down.
Security is very low.
Adding new devices would slow down network.
VRINDA KN,AP,CSE,CETKR
Networking
Mesh Topology
VRINDA KN,AP,CSE,CETKR
Networking
Ring topology:
A ring topology consists of a point-to-point connection from each node on the
network to the next.
The last node on the network is connected back to the first to form a closed ring.
Each node retransmits the signal that it receives from the previous node to the next
node in the ring.
Packets are placed on the loop at a node, and travel from node to node until the
desired node is reached.
Although the ring is inherently unidirectional
Data transmission is high speed.
Possibility of collision is minimum.
Failure of single node in the network can cause the entire network to fail.
Less secure.
VRINDA KN,AP,CSE,CETKR
Types of networks
There are numerous ways to categorize networks: by medium (coaxial cable,
wireless …), by protocol (TCP/IP, Ethernet..), by standard specification number
(802.3, 802.11, X.25), by usage (Web server, database server, peer-to-peer, storage
area network), or by range of service (Bluetooth, LAN, MAN, WAN)
VRINDA KN,AP,CSE,CETKR
Types of Area Network LAN- MAN- WAN
A local area network (LAN) is a network that connects computers and other
supporting devices over a relatively small localized area, typically a room, the floor of a
building, a building, or multiple buildings within close range of each
other(home,office,college…). usually, most of the computers in a LAN are personal
computers or workstations.
It may be wired or wireless. most commonly, a LAN will conform to a star or bus
topology.
LAN is easy to design and maintain.
Ethernet : most modern LANs are based on a set of standards and associated protocols
called Ethernet, which are defined and identified by their IEEE standards
Switched Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11), and hub-based Ethernet (also
IEEE 802.3).
Backbone networks are used to interconnect local area networks.
VRINDA KN,AP,CSE,CETKR
LAN
Router : Is a networking device that connect different networks. Commonly used to
connect a LAN.
Consider a home network with a router, The router uses Ethernet to connect to a
Modem for Internet access. An Ethernet cable connects a printer directly to the switch,
and one or more computers use wireless Ethernet to connect wirelessly.
VRINDA KN,AP,CSE,CETKR
LAN
Hub-based Ethernet is based physically on star but working based on the bus
topology a hub is a central connection device . The simplest form of hub is passive.
All of the connections at the hub are simply tied together inside the hub. The word
“passive” means that the hub performs no operation or modification of the signals as
they arrive at the hub. In contrast, an active hub is a repeater, which recreates the
arriving signals.
VRINDA KN,AP,CSE,CETKR
LAN
Switched Ethernet: switched Ether net is both a physical and logical star
topology. Each node of the network is connected to a central switch that is capable of
connecting any two nodes together. When a node on the network wishes to
communicate with another node, the switch sets up a direct connection between the
two.
VRINDA KN,AP,CSE,CETKR
LAN
Wireless Ethernet, or “Wi-Fi” : is a radio-based, compatible extension to the
Ethernet standard. Each wireless unit is connected by radio to a base station central
access point that is some what equivalent to a hub. However, the access point is an
active node, since it must transmit and receive radio waves to communicate with the
nodes.
it is possible for stations to be out of range or blocked by buildings or other
obstacles from each other. This is sometimes referred to as a hidden node condition.
VRINDA KN,AP,CSE,CETKR
MAN - Metropolitan Area Networks
Is usually defined as a network larger in geographical scope than a local area
network, but generally within a range of less than 30 miles or 50 kilometers.
A MAN would be used to connect several buildings in an area together or connect a
company’s buildings in a city or region together.
Create network links to connect properties over areas that would require right-of-way
access, that is, permission to run wires through somebody else’s property.
Company generally requires services from a service provider (SP) or other public
carrier.
A service provider is a company that provides internet access. Provides the
equivalent of a link or links between nodes that are not directly accessible to simple
forms of connection, like wire or fiber-optic cable.
VRINDA KN,AP,CSE,CETKR
MAN
A connection to a provider occurs at an access point on the customer’s premises.
The access point is usually connected to the company networks with a switch, a
router, or a gateway, depending on the type of connection. The connection is often
referred to as an edge connection, because it sits at the “edge” of the local network.
Thus, a router at the access point would be called an edge router.
Example MAN connection in fig 12.21 : Most of the business and IT operations in
this company take place at the company headquarters; those needs are satisfied by an
intranet consisting of local area networks connected with an on-site back bone. On
the outskirts of the city, however, are three additional offices with links that connect
to the backbone system at the company headquarters.
VRINDA KN,AP,CSE,CETKR
MAN - Metropolitan Area Networks
VRINDA KN,AP,CSE,CETKR
MAN - Metropolitan Area Networks
The office that hosts the web servers is connected to the Internet with a high-speed
optical fiber link to an Internet Service Provider (ISP). (All connections to the
Internet are made through an ISP)
Service provider provides Ethernet access to each site, creating a logical connection
between the two sites. The literature refers to this link as an Ethernet Virtual
Connection
standard Ethernet switches at the access points connect the company’s backbone
network to the service at the headquarters and to a local area network at the satellite
office
The other two offices communicate with each other and with the headquarters using
a virtual network created by a carrier using T1 lines and a Frame relay supplied by
the telephone company.
VRINDA KN,AP,CSE,CETKR
WAN - Wide Area Networks
Networks designed to facilitate communications between users and applications
over large distances—between the various corporate offices of an international
organization that are located in cities all over the world(hundreds to thousands of
kilometers)
There are two primary reasons for designing and building wide area networks:
VRINDA KN,AP,CSE,CETKR
WAN - Wide Area Networks
Wide area networks require the use of resources that are within the sphere of public
switched telephone networks (PSTNs), large cable companies, and other common
carrier service providers.
PSTN traditionally used for voice communication. Is a global network of circuit
switched telephone lines.
A company builds its network at each location out to an edge access point, usually a
gateway or router. At which point it is connected to the carrier’s facilities with a
leased line to the carrier’s nearest point of presence.
All of the logical connections within the company’s network connect between
individual satellite locations and the main corporate headquarters.(fig a)
There are no direct connections between the branches. Figure 12.22(b) shows a
more typical partial-mesh configuration.
VRINDA KN,AP,CSE,CETKR
WAN - Wide Area Networks
VRINDA KN,AP,CSE,CETKR
Questions
Describe at least three ways in which networking is important to modern
organizations.?
What is the major difference in implementation between a LAN and MAN or
WAN?
Draw a bus topology. Draw a star topology.
State at least three reasons why messages are broken into packets for transmission
through a network.?
VRINDA KN,AP,CSE,CETKR
Client-Server computing
Client are devices or programs that makes request for services while server is
powerful machine or software that fulfills these request.
It is important to understand that the client–server model does not require any
special computer hardware. Networking software within the operating system of each
computer provides basic communication capabilities.
VRINDA KN,AP,CSE,CETKR
Client server computing
That there is a link between the client and the server. The link can be a network
connection, an intranet or Internet connection, some sort of direct connection, or even
within the same computer.
Consider an example : The HTTP request message sent to a Web server by a Web
browser requesting a Web page consists of the word get followed by a URL. If the
request is successful, the message returned by the server contains the HTML text for
the page.
The communication between client and server follows a request response protocol
such as HTTP/HTTPS for web services.
VRINDA KN,AP,CSE,CETKR
Client server computing
A typical use of the client–server concept within an organization
VRINDA KN,AP,CSE,CETKR
Client server computing
number of clients are sharing a number of servers, showing both the shared server
nature of client–server computing, as well as showing that there may be multiple servers
offering different services on the same network.
the server computer labeled S2 in the figure is running two different server
applications. Since computers are capable of running multiple tasks concurrently,
there is a multiple–multiple relationship between clients and servers: a server can serve
multiple clients, and a client can request services from multiple servers.
Advantages
Centralized management.
Better security :Centralized authentication and access management makes security
management more effective.
Efficient data backup : Data stored on the server can be regularly backed up reducing
data loss.
Scalability : additional users and offices can connect easily
VRINDA KN,AP,CSE,CETKR
Client server computing -Advantages
[Link] Management: Providing services on a single computer or on a small
number of computers in a central location makes the resources and services easy to
locate and available to everyone who needs them, but also allows the IT administrators
to protect the resources and control and manage their use. The consistency of files and
data can be managed and assured.
[Link]–server technology can ensure that every user requesting a particular program
from a server will receive the same version of the program
[Link] amount of data to be stored, processed, and managed may be extremely large. It is
more efficient to equip a small number of computers with the power needed than to
require powerful computers at every station. As an example, the limited memory on a
smartphone would not be adequate to store all of the map data required to support a
global positioning system (GPS) application.
This approach centralizes computing power and improve efficiency.
VRINDA KN,AP,CSE,CETKR
Client server computing
The most familiar example of the use of client–server technology is the Web
browser Web server model used ,this model is an example of two-tier architecture.
separate the database and page processing into a third computer system is called a
three-tier architecture.
The most general case is known as an n-tier architecture.
VRINDA KN,AP,CSE,CETKR
Peer to Peer computing
Peer-to-peer architecture treats the computers in a network as equals, with the ability
to share files and other resources and to move them between computers.
Each and every node itself client and server.
Peer-to-peer computing can be adequate, appropriate, and useful for the movement of
files between personal computers within a small office network, a home network.
VRINDA KN,AP,CSE,CETKR
Peer to Peer computing
Suited for small networks ,small companies... Devices communicate directly without a
central server.
Common uses include file sharing, direct messaging, content distribution etc
Each device in the network has the same responsibilities and capabilities.
Advantage is that the heavy loads and network traffic associated with a server are
eliminated.
VRINDA KN,AP,CSE,CETKR
IP Address
IP (Internet Protocol) Address is a unique string of numbers assigned to each
device connected to a computer network that uses the Internet Protocol for
communication.
It serves as an identifier that allows devices to send and receive data over the network,
ensuring that this data reaches the correct destination.
IP addresses are the standard for locating resources on the Internet.
Types of IP Address :
1) IPv4 (IP Version4)
VRINDA KN,AP,CSE,CETKR
IPv4
This is the most common form of IP Address. It consists of four sets of numbers
separated by dots.
For example [Link]
An IPv4 address is 32 bits long. The 32 bits are divided into four octets.
The octets are separated by dots for easier reading. Each octet is a number in the range
0–255.
IPv4 accommodates about four billion (232) different addresses.
Internet Service Providers (ISPs) make it possible for individuals and small groups to
obtain IP addresses so that they may access the Internet.
IPv4 network the address structure consists of three key components Network
address, Host address and Subnet address.
VRINDA KN,AP,CSE,CETKR
IPv4
Network address identifies a specifies network. Here all host bits are set to zero.
Host address identifies a device (host) within a network.
Subnet is a division of a large network ([Link]/28)
Subnet address is always the first address in a subnet.
Subnet mask is used to identify network part and host part.
VRINDA KN,AP,CSE,CETKR
NAT – Network Address Translation
There can be 4 billion IPv4 addresses which is very less considering the number of
devices. NAT gives solution to this ,multiple devices to use same IP address and access
the internet.
NAT is a process in which one or more private IP address are translated into one
or more Public IP address.
Computers isolated on a local network access the Internet using a technique
called network address translation (NAT).
A NAT-enabled router passes messages from the isolated network to the Internet,
replacing the private address with the router’s IP address. (there might be multiple
addresses available for this purpose.)
Traffic passing through the NAT-enabled router to the outside.
For example, Web requests, must be carefully tracked by the router, so that responses
from the outside are routed to the correct private address on the inside.
VRINDA KN,AP,CSE,CETKR
NAT
.Even with the challenges of managing a private network, NAT is often implemented
as a security measure.
NAT-enabled router is the only computer visible to the Internet, computers on the
private network are not addressable from outside the local network, and are essentially
invisible to the public networks, providing extra protection to an organization’s
internal network. Indeed, most home networks are implemented with private IP
addresses controlled by the router
VRINDA KN,AP,CSE,CETKR
NAT
Difficulties with this approach:
.For a small network, NAT is relatively manageable. The task becomes far more
challenging when the number of privately addressed computers is large and traffic
through the interface is substantial..
VRINDA KN,AP,CSE,CETKR
DHCP
Static IP : Is a fixed address that is manually assigned to a device for a long period of
time.
Dynamic IP: Changes frequently usually each time the device is connected is
automatically assigned.
VRINDA KN,AP,CSE,CETKR
DHCP
When a computer is connected to a network, the DHCP client broadcasts a query to
every computer on the network, in order to locate the DHCP server.
The DHCP server responds with a lease, which includes an IP address, and other
configuration parameters, including the domain name of the network, the IP
address of a local DNS server, a subnet mask to identify other nodes on the local
area network, and the default IP address of the Internet gateway. Some DHCP
servers also include the addresses of other useful services, such as a time server.
The lease is issued for a fixed period of time. Most systems allow the DHCP client to
renew the lease before it expires. This allows the client computer to maintain the same IP
address while it is actively connected to the network.
VRINDA KN,AP,CSE,CETKR
DHCP
DHCP Messages :
DHCP Discover , DHCP Offer , DHCP Request and DHCP Acknowledgement.
The IP address is allocated at the time of connection, most computers connected using
DHCP are not used to provide services to other computers on the network because there
is no consistent domain name-IP address link for the computer.
A companion protocol, Dynamic Domain Name Service, DDNS, can provide this link
by updating the local DNS server. DDNS is a documented part of the DNS protocol and
is used in network administration to automate updates to the domain name servers.
However, DDNS is rarely made available as a service to home computing environments.
VRINDA KN,AP,CSE,CETKR
Network Security - Firewall
Network security is defined as the activity created to protect the integrity of your
network and data.
Network-related security issues are :
Intrusion (Unauthorized Access) —keeping network and system resources intact and
free from the results of intrusion. Intrusion includes the ability of an intruder to modify
the system for future access, destroying system data and program files, injecting viruses,
and more.
Confidentiality —keeping the content of data traversing the network and information
about the communication taking place private. Encryption measures are required for this
purpose.
Authentication —Verifying the identity of a source of data being received. This is
similar to the concept of electronic signatures. Special encryption features are used for
this purpose.
VRINDA KN,AP,CSE,CETKR
Network Security - Firewall
Data integrity and nonrepudiation —Protecting the content of data communication
against changes and verifying the source of a message. Special encryption features are
also used for this purpose.
Assuring network availability and access control —Restricting access to network
resources to those permitted to use them and keeping network resources operational and
available
VRINDA KN,AP,CSE,CETKR
Network Security - Firewall
Firewall is a network security device either hardware or software based which monitor
incoming and outgoing traffic based on a defined set of security rules.
It act like a security guard.
Firewall examines data packets based on IP, ports, protocols and packet content.
If the packets meets security rules it allowed through otherwise it is blocked. It may
alert administrators about suspicious activity.
Intelligent firewall design includes making port numbers that are not in active use
unavailable, evaluating every packet according to a set of acceptability criteria, blocking
or hiding local IP addresses and computers from the Internet, and more.
VRINDA KN,AP,CSE,CETKR
Network Security - Firewall
It helps keep your digital world safe from unwanted visitors and potential threats
Helps to control network access.
VRINDA KN,AP,CSE,CETKR
VPN
Virtual Private Network (VPN):Is a technology that enhance online privacy, protects
sensitive data and enables secure access to the internet.
When you have an account with a VPN provider, then you can use the software provided
by that VPN to connect to one of their servers (and later disconnect).
This connection is made via an encrypted connection (sometimes called a VPN tunnel )
so that all traffic back and forth between your device and that server is encrypted.
The VPN server assigns a unique IP address to your device. For subsequent data traffic
from your device, your ISP sends that traffic through the Internet to the VPN server for
further processing, but that traffic is encrypted.
Therefore, the ISP can neither read that data nor know what subsequent service you are
asking the VPN server to perform, such as connecting you to some website. All traffic
between the VPN server and the rest of the Internet sees only your assigned IP address.
VRINDA KN,AP,CSE,CETKR
VPN
The advantages of using a VPN:
1. Your device’s IP address is “hidden” behind the IP address assigned by the VPN
server, so web traffic cannot easily be connected directly to you, that is, to the device
you are using.
2. All network traffic between you and the VPN server is encrypted, so at least that leg
of the journey is secure.
VRINDA KN,AP,CSE,CETKR
VPN
One of the disadvantages of using a VPN is that your Internet traffic may be a bit
slower , because it goes through the VPN server.
The idea of a VPN originally was to allow employees of a business to securely connect
to corporate networks while away from the office. This usage is still in effect, but often
goes hand-in-hand with another software tool called a Remote Desktop Protocol
(RDP).
RDP allows an employee at some other location to see and utilize the desktop of a
specific computer, including using files and software applications available on that
computer.
VRINDA KN,AP,CSE,CETKR
DNS
Domain Name System translates human readable domain names
(eg : [Link]) to machine readable IP addresses (eg : [Link]) .
VRINDA KN,AP,CSE,CETKR
DNS
The directory system that is used to translate domain names into IP addresses is
organized as a tree structure.
At the top of the tree is the root directory, called the DNS root server.
The DNS root servers have entries for all the top-level domains. There are country-
code top-level domain name servers (ccTLDs) for every identifiable country in the
world plus a number of authorized commercial and noncommercial generic top-level
domain name servers (gTLDs)
The generic domains include .com, .edu, .org, .net …
This server is called an authoritative domain name server. In the simplest case
there are no subdomains. simple domains usually rely on the authoritative domain name
service of the Internet Service Provider.
VRINDA KN,AP,CSE,CETKR
DNS
The name must, of course, be unique; there can be no duplicates anywhere in the
world.
Domain names are read left to right, from the lowest subdomain to the top-level
domain
VRINDA KN,AP,CSE,CETKR
DNS
step-by-step description of the translation process that takes place when a user types a
URL into her Web browser application. The translation process is known as domain
name resolution.
VRINDA KN,AP,CSE,CETKR
DNS
1. The HTTP application extracts the domain name from the URL and requests
resolution of the name from the DNS support application. The DNS support application
is a client program residing on the same host as the HTTP application, so this is a simple
program call. The DNS client issues a query packet with the name to a local DNS
server for resolution.
2. The local DNS server table contains the addresses for various root servers. It also
stores in a cache, on a short-term basis, the names and IP addresses resulting from other
recently issued requests. This has the benefit of simplifying the search for commonly
used domain names, such as [Link] and [Link]. If the
information is in the local DNS table, the information is returned to the DNS client . The
DNS client passes the IP address to the HTTP application
3. If the local DNS server does not have the information in its own table, the process
continues. Unless the local server already has an IP address for the appropriate top level
DNS server, it must query one of the DNS root servers seeking that address. In that case,
the root server responds with the IP address of a nearby top-level server
VRINDA KN,AP,CSE,CETKR
DNS
. 4. Next, the local DNS server issues a query to the DNS top-level server, requesting
the IP address of the authoritative DNS server associated with the requested domain
name.
5. Finally, the authoritative DNS server responds with the requested IP address. The
local DNS server returns the address to the DNS client on the host machine making the
original request. The IP address is delivered to the HTTP application. We’re done!
VRINDA KN,AP,CSE,CETKR
History of Internet
Internet is a global network of interconnected computers and servers that allow data
exchange.
1969: Launch of ARPANET, the first operational packet-switching network.
The development of the Advanced Research Projects Agency Network (ARPANET),
which was funded by the US Department of Defense.
1980s, TCP/IP was being used all around the world. Even networks that internally used
other communication protocols implemented TCP/IP to exchange information with
nodes outside their own community.
VRINDA KN,AP,CSE,CETKR
History of Internet
all networks need to communicate in a standardized fashion. developed the concept of
internetworking,
It shows four WANs called A, B, C, and D interconnected by a device called a gateway
that makes the internetwork connections and provides routing between different WANs.
TCP/IP protocols that are the “common language” spoken by networks around the
world.
VRINDA KN,AP,CSE,CETKR
History of Internet
1980s, TCP/IP was being used all around the world. Even networks that internally
used other communication protocols implemented TCP/IP to exchange information with
nodes outside their own community.
VRINDA KN,AP,CSE,CETKR
WWW
WWW (world wide web)it is a service on the internet that consists of WebPages linked
through hyperlinks and accessed via web browsers. It operates using HTTP/HTTPS
protocols and relies on the internet for connectivity.
Beginning in 1990, Tim Berners-Lee designed and built a system using the concept of
hypertext, a collection of documents interconnected by pointers, called links,
VRINDA KN,AP,CSE,CETKR
WWW
users of hypertext documents (called pages in web parlance) are free to
navigate the collection in what ever order they want, using the links to move
freely from page to page.
Hypertext documents could be stored on the machines of the Internet, and a
link would be the name of a page along with the IP address of the machine
where that page is stored. He called his hypertext link a URL, an acronym for
Uniform Resource Locator, and it is the worldwide identification of a webpage
located on a specific host computer on the Internet.
A powerful graphical web browser, called Mosaic, was developed in late 1993
and made available to the general public so that they could begin to use this
new service.
Other browsers soon appeared in the marketplace, including Netscape
Navigator (1994), Microsoft Inter net Explorer (1995), Apple Safari (2003),
Mozilla Firefox (2004), Google Chrome (2008), and Microsoft Edge (2015).
VRINDA KN,AP,CSE,CETKR
Web servers - Web based computing
The widespread success of the World Wide Web has resulted in a large base
of computer users familiar with Web techniques, powerful development tools
for creating websites and Web pages and for linking them with other
applications,
The organization’s internal network, commonly called an intranet, is
implemented using Web technology
Web technology can even extend the reach of these applications to
employees in other parts of the world, using the Internet as the
communication channel.
Webser playes an important role in delivering web applications to users. Web server is
a system that stores and deliver web pages to users.
VRINDA KN,AP,CSE,CETKR
Web servers - Web based computing
system architecture to implement Web-based e-mail
VRINDA KN,AP,CSE,CETKR