Professional Documents
Culture Documents
Cloud Prerequisite
Basic Networking + Windows and Linux Server
Basic networking
1) Introduction
2) NIC (Network Interface Card)
3) Transmission media
4) Networking Devices
5) Topology
6) OSI Layer
7) TCP/IP
8) IP Addressing
9) Subnetting
10) Firewall
11) Port Number
Windows Server
Linux Server
1) Linux Server Introduction
2) Basic Commands
3) User and Group account
4) fdisk HD partition
5) shell scripting, crontab, chmod
6) SCP,SSH
7) NFS
8) HTTP
9) FTP
P age |2
Networking Introduction
Definition: Networking is the interconnection of two or more devices that makes inter
communication among them to share the resource.
Advantages
Disadvantages
Classification of Network
On the basis of distance
COMPUTERS
WINDOWS
CLIENT O.S SERVER O.S LINUX O.S
DOS (1980s) Windows NT Server Redhat Linux
Windows 1.0 Windows Server 2000 Fedora
Windows 3.0 Windows Server 2003 Centos
Windows 95 Windows Server 2008 Ubuntu
Windows 98 Windows Server 2012 Mandriva
Windows ME Windows Server 2016 Kali linux
Windows NT Debian
Windows 2000 Arch Linux
Windows XP (2000) Free Linux
Windows Vista Scientific Linux
Windows 7 Mint Linux
Windows 8/8.1
Windows 10
Client computers:
End devices that users use to access the shared resources.
Usually they run desktop version of OS such as Window 10, Window 7 etc.
Client computers are also known as workstations.
Server computers:
Computers that provide shared resources.
Usually they run sever version of OS such as Window Server 2008, Linux etc.
Server computers run many specialized services to control the shared resources.
Server Type
P age |7
Transmission Media
UTP STP
(Unshielded Twisted Pair) (Sheilded Twisted Pair)
Cheaper Costly
Normally used everywhere Used in sensitive places only
Having 8 wires of different colours same
Only one outer shield Outer shield as well as separate shield in
each pair
To protect from electromagnetic disturbance
in common wiring STP will be used.
P age |9
Coaxial Cable
Coaxial cable is an electrical cable consisting of a round conducting wire, surrounded by an
insulating spacer, surrounded by a cylindrical conducting sheath, and usually surrounded by a
final insulating layer.
Most common use of coaxial cable today is in standard cable TV. A copper conductor lies in the
center of the cable, which is surrounded by insulation. A braided or mesh outer covering
surrounds the insulation. This is also a conductor.
P a g e | 10
2) ThinNet or RG-59:
It is far more flexible than ThickNet and much easier to work with.
P a g e | 11
Advantages:
Sufficient frequency range to support multiple channels, which allows for much
greater throughput.
Lower error rates. because the inner conductor is in a Faraday shield
Disadvantages:
A technology that uses glass (or plastic) threads (fibers) to transmit data.
Fiber optic cables provide higher bandwidth and can transmit data over longer distances.
Fiber optic cables support much of the world's internet, cable television and telephone systems.
Fiber cables rated at 10 Gbps, 40 Gbps and even 100 Gbps are standard.
Fiber optic cables carry communication signals using pulses of light generated by small lasers
In sender side Electrical signal is converted in light signal by the help of transducer and at
receiver side light signal is again converted into electrical signal by using transducer.
2.) Multimode:
Multi-mode optical fiber is a type of optical fiber mostly used for communication over
short distances, such as within a building or on a campus. Typical multi-mode links have data
rates of 10 Mbit/s to 10 Gbit/s over link lengths of up to 600 meters (2000 feet).
P a g e | 13
Wireless Media
Microwaves:
Microwave link. A microwave link is a communications system that uses a beam of radio waves in the
microwave frequency range to transmit video, audio, or data between two locations, which can be
from just a few feet or meters to several miles or kilometers apart.
Radio wave:
P a g e | 15
Radio waves are a type of electromagnetic radiation with wavelengths in the electromagnetic
spectrum longer than infrared light. Radio waves have frequencies as high as 300 GHz to as low as 3
kHz.
A wireless network uses radio waves, just like cell phones, televisions and radios.
Infrared wave:
Method of transferring data without the use of wires. A common example of an infrared (Ir) device is
a TV remote. However, infrared is also used with computers and devices like a cordless keyboard or
mouse, wifi routers.
Bluetooth:
P a g e | 16
Bluetooth is a wireless technology standard for exchanging data over short distances (using short-
wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile devices,
and building personal area networks(PANs).
Bluetooth refers to a wireless technology which allows digital devices to easily transfer files at high
speed. Bluetooth is common in many portable devices such as laptops, PDAs, mobile phones,
smartphones and tablets.
P a g e | 17
Networking devices
1. Repeater: This is used to convert weak signals into strong signals.
HUB SWITCH
1. It is layer 1 device of OSI mode. 1. It is layer 2 device of OSI mode. Some
switch are layer 3 devices.
Transmission Modes:
1) Simplex:- In this mode, the communication between sender and receiver occur only in one
direction.
That means only the sender can transmit the data to receiver but receive can’t.
2) Half- Duplex:- In this mode, the communication between sender and receiver occurs in both the
directions but, one at a time.
The sender and receiver both can transmit and receive the information but, only one is allowed to
transmit at a time.
3) Full-Duplex:- In this mode, the communication between sender and receiver can occur
simultaneously.
Sender and receiver both can transmit and receive simultaneously at the same time.
P a g e | 19
4. Bridge:
It is same as switch but have two or three port only.
5. Router:
It is used to connect from two different networks.
6. Brouter:
7. Gateway:
OSI Layer
Open System Interconnect (OSI) developed by ISO in 1970.
Defines a networking framework to implement protocols in seven layers.
Communication over network is understandable through this OSI model.
OSI having 7 layers and each layers has its own responsibilities.
Hardware and software work together.
Troubleshooting is easier by separate networks.
IP ADDRESSING
It is a unique address used to identify a device (like computer, smart phone, router, IP based phone,
network printer etc) in network.
IP Address
IP v4 IP v6
IPv1, 2, & 3 would actually be part of the TCP/IP protocols, of which there were 3 versions.
IPv5 is an experimental TCP/IP protocol called the Internet Stream Protocol that never really
went anywhere because increases in bandwith made streaming over IPv4 feasible. So IPv5 was
never finalized and they skipped to IPv6.
IP V4
Example:-
192 . 168 . 1. 1
11 00 00 00 .10 10 10 00 .00 00 00 01 . 00 00 00 01
8 8 8 8
32 bits
Network ID Host ID
8 bits = 28= 256
Therefore the value we can write in each octet is from 0 – 255 only.
IP v4
Classful Classless
Range of IPv4
A 1.0.0.0 126.255.255.255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255
Note : 127.0.0.1 is reserved for local host and called loopback address.
Range: 127.0.0.1 – 127.255.255.254
To Remember
Class Range
A 1 - 126
B 128 – 191
C 192 – 223
D 224 – 239
E 240 – 255
P a g e | 25
Subnet Mask
Subnet Mask
Subnet Mask
Types of IP Address:
Unicast Address
Multicast Address
Broadcast Address
Loop-back Address:
It is a special class A IP address (127.0.0.1-127 255.255.255.0),reserved for loopback or
diagnostic functions.
P a g e | 26
Calculation of IP Address:
Formula:-
Reserved bits:
1) Class - A :
n = 8, h = 24, r = 1
No. of network = 2n-r = 28-1 = 27 = 128
No. of host network = 2h-2 = 224-2 = 16,777,214
2) Class – B :
n = 16, h = 16, r = 2
No. of network = 2n-r = 216-2 = 214 = 16384
No. of host network = 2h-2 = 216-2 = 65,536-2 = 65,534
3) Class – C :
n = 24, h = 8, r = 3
No. of network = 2n-r = 224-3 = 221 = 2,097,152
No. of host network = 2h-2 = 28-2 = 256-2 = 254
P a g e | 27
Ans:
192.168.1.0 Network ID
192.168.1.1
192.168.1.2
. Valid host = 254
.
192.168.1.254
192.168.1.255 Broadcast ID
192.168.2.0 Network ID
192.168.2.1
192.168.2.2
. Valid host = 254
.
192.168.2.254
192.168.2.255 Broadcast ID
192.168.3.0 Network ID
192.168.3.1
192.168.3.2
. Valid host = 92
.
192.168.3.92
192.168.2.255 Broadcast ID
Private IP Range:
0.5 billions used by Private IP, Lookback address and APIPA address.
P a g e | 29
SUBNETTING
Subnetting enables the network administrator to further divide the host part of the address
into two or more subnets.
Subnetting advantages
Reduces the network traffic by reducing the volume of broadcasts
Saving unused IP addresses
Enables users to access shared data within their network.
Security can be maintained
Easy to troubleshoot network problems.
Firewall
A firewall is a network security system designed to prevent unauthorized access to or from a
private network.
A hardware firewall is more secure, can protect A software firewall will protect your computer
more computers and runs on its own processing from outside attempts to control or gain access
power and so does not affect a computer's your computer, and, depending on your choice of
performance. software firewall.
Firewall Rule
Inbound rules: These are to do with other things accessing your computer. If you are running a
Web Server or RD server on your computer then you will have to tell the Firewall that outsiders
are allowed to connect to it.
Outbound rules: These are so that you can let some programs use the Internet, and Block
others. You will want to let your Web Browser (Internet Explorer, Firefox, Safari, Chrome,
Opera...) have access to the Internet, so you will tell Windows Firewall that it's allowed.
P a g e | 31
Port Numbers
Port numbers are processed by network hardware and the software automatically.
Network ports are provided by the TCP or UDP protocols at the Transport layer.
Port numbers are used to determine what protocol incoming traffic should be directed to.
3389 RDP
2049 NFS
1433 MSSQL
3306 MySQL
P a g e | 32
Different OS Family
1) Windows
2) Unix/Linux
3) Mac OS
4) Android
5) IBM OS/2
6) BSD
7) HP-UX
Microsoft
Client OS Server OS
DOS ( Disk Operating System) Windows NT Server
Windows 1.1 Windows 2000 Server
Windows 3.1 Windows Server 2003
Windows 95 Windows Server 2003 R2
Windows 98 Windows Server 2008
Windows ME Windows Server 2008 R2
Windows NT Windows Server 2012
Windows 2000 Windows Server 2012 R2
Windows XP Windows Server 2016
Windows Vista Windows Server 2019
Windows 7
Windows 8, 8.1
Windows 10
P a g e | 33
Elements of AD
Logical Elements Physical Elements
Domain Domain Controller
Users Sites
Organizational Unit
Forest
1) Domains:
It is the administrative boundary for the active directory objects.
It a logical group of network objects (computers, users, printers, etc.) that share the
same Active Directory database.
A single domain can span upto multiple physical locations or sites.
A domain is managed by a physical machine known as Domain Controller.
All domain controller hold a copy of the domain database, this domain database is
continuously synchronized.
P a g e | 34
2) Domain Controller:
a) A Machine which hold AD Database.
b) A machine where ADDS is installed.
c) DC uses Kerberos KDC ( key Distribution Center) service to perform authentication.
d) For security of DC, we can implement DC on server core for remote office.
Storing the most commonly searched attributes of all domain objects in the global catalog
makes searches more efficient for users without affecting network performance, thus
preventing unnecessary.
When you install AD DS, the global catalog for a new forest is created automatically on the first
domain controller in the forest
7) AD DS Schema
8) Tree :
Domain trees are collections of domains that are grouped together in hierarchical structures.
9) Forest :
It is the highest level in the AD.
It shares single database and single global address list.
It contain one or more domain container objects like Directory structure, global catalog and
directory schema.
It contain multiple domain trees.
The first domain in the forest is called as Forest Root domain.
By default, a user or administrator of one forest cannot access another forest.
P a g e | 37
11) Objects : It is the main resource which need to manage or control. Eg: users, computers, group,
Organisational unit, Printer, contact etc.
Forest
Domain
Organisational Unit
User, Computer, Group
Installation Process
1) Open server Manager –Add role sand Features – Roles-based or feature based installation –
After completing it close the window and open Server manager – click on notification area and
click on promote this server to a domain controller-
P a g e | 39
Select Add a new forest and type your domain name ( corp.contoso.com)
P a g e | 40
Ans: 1) Check proper connectivity with server and having same DNS address as server.
2) Right Click on Computer – Properties – Change setting – change – select domain and type domain
name – ok – Type Server user name ( administrator) and password – ok – ok --------Restart the PC
P a g e | 41
Group Policy
Group Policy allows administrators to define options for what users can do on a network –
including what files, folders and applications they can access. The collections of user and
computer settings are referred to as Group Policy Objects
We can apply GP for users and computers only.
GP is applied through Local, Site, domain and OU.
Exercise
1) Block “Task manager” option for all users of Account department OU.
In server:
Open AD Users & computers create OU named “Account” and create some Users in
it.
Start Administrative tools Group policy managementExpand Forest Expand
Domains
Expand Yahoo.com (Domain Name).
(a) Right click on Account OU create a GPO Type "Task manager Disabled"
OK
(b) Expand Account OU click on “Task Manager disabled” ok R.C. on “Task
manager disable” edit
User configuration Policies Administrative Templates system Ctrl +Alt
+Del options
Double click “Remove Task manager” Select “enable” Apply ok.
Start Run type as “gp update” OK
In client PC:
Log on with any user of account OU and check “Task manager”.
(a) R.c on Sales OU Create a GPO Type "Disable All Programs from start menu" OK
P a g e | 45
(b) Expand Sales OU R.c on created GPO "Disable All Programs from start menu" edit
User configuration Admin templates Start menu & Task bar select “Remove all
programs list from the start menu select “Enable” Apply Ok
In client PC:
In client PC:
• Stands for "Internet Information Services." IIS is a web server software package
designed for Windows Server. It is used for hosting websites and other content on
the Web.
Port no :- 21
We can keep all important data or software in one centralized server and it is
available for all user in the network.
Any user can download FTP server data by using its web browser.
Additionally winscp software can be install to transfer data from one pc to other.
For FTP configuration IIS service is required.
IIS (Internet Information Service).
Process:-
click on sites Add ftp sites give ftp site name Select Physical path of
created folder Next Give server IP Address Select No SSL Next
Authentication (select Anonymous) Allow access to (All users) Permission
(Read) Finish.
P a g e | 49
Now right click on created FTP link Edit permission Security Edit Add
Advanced Find now Everyone OK OK Full control Apply OK.
In other PC open any browser and type ftp://192.168.5.2/
1) Same as normal FTP but while accessing FTP from web browser a usrname and
password will be asked.
2) Generally created for WAN users.
Process:-
1) Open active directory users and computer create some users like delhi, Mumbai,
Chennai etc.
2) Create a group (FTP-User) and add all above three users.
3) Open IIS manager Right click on sites Add FTP sites Name Address
Next IP address No SSL Next Authentication (Basic) Authorization:
allow access to (Specified roles or users groups) FTP-User name of group
Permission (Read) Finish.
4) In client PC open any browser and type ftp://192.168.5.1/ (server IP).
5) Type user name and Password.
1) Install IIS
2) After Installing IIS . It create a default path in “c:/” drive.
P a g e | 50
2) FAT 32:
Storage System
Basic Disks
Basic disks are the storage types most often used with Windows.
The term basic disk refers to a disk that contains partitions, such as primary partitions and
logical drives,
Dynamic Disks
Dynamic disks provide features that basic disks do not, such as the ability to create volumes
that span multiple disks (spanned and striped volumes) and the ability to create fault-tolerant
volumes (mirrored and RAID-5 volumes).
Like basic disks, dynamic disks can use the MBR or GPT partition styles on systems that
support both.
Remote Desktop
2) Open Active Directory Users and Computer and Select any authorize use
and add it to “Administrators and remote desktop users” group.
In client PC
1) Start- Remote desktop connection – type Server IP- then authorize user-
name and password .
INTRODUTION TO LINUX
1. LINUX:
It is developed by Linus Torvalds.
Linux were publicly released later that year (1991)
Based on UNIX OS, C language and Assembly level language.
It is open source Operating system.
2. DISTRIBUTIONS:
Red hat Linux, Fedora, Cent OS, Mandriva, Debian, Slackware Linux, Scientific Linux, Arch Linux,
/proc/ - Virtual file system documenting kernel and process status as text files.
DIFFERENT DESKTOP:
Administrative (Root).
Regular.
Service.
Regular: Regular users have the necessary privileges to perform standard tasks on a Linux
computer such as running word processors, databases, and Web browsers. They can store files
in their own home directories. Since regular users do not normally have administrative
privileges, they cannot accidentally delete critical operating system configuration files.
Service: Services such as Apache, Squid, mail, games, and printing have their own individual
service accounts. These accounts exist to allow each of these services to interact with your
computer.
P a g e | 58
Windows vs Linux
Basic Commands
To check system configuration
# df -h
eg: # du /home/deepak
# df /home/deepak
or
# ifdown eno16777736
# ifup eno16777736
# ifconfig eno16777736
22)#su - : to switch to super user but getting /root as home directory bydefault
P a g e | 61
30) # bc : calculator
# mkdir -p /india/delhi/chandni
...................
# cat file1; cat fil2; cat file3 : To see the content of multiple file at a time.
# echo “ tiger” > file1 : to insert content in a file without opening it but old content will be removed
# echo “ tiger” >> file1 : to insert content in a file without opening it.
# cat file1 file2 > file3 : To combine content of two file and insert in new file
Eg:
# sort filename : to show from a-----z
#sort -r filename : to show from z-----a
# sort file1 file 2 : show sorting content from both file
# sort file1 >sort.txt : saving the sorted result in a new file.
s - substitute
g - global ( changes to be done in all lines)
To replace test with example in myfile.txt and print the output in a new file
Syntax:
# sed 'nd' filename.txt
Example:
# sed '5d' filename.txt
# wc -c file-name
# wc -w file-name
# wc -l file-name
Aliasing
Finding
1) locate
Note: Sometime locate command do not show anything then use # updatedb and use locate
command again
ls command examples
#ls –a : To show all
USER ACCOUNT:
#useradd username : To add a user
#userdel –r username : To delete the user as well as his saved data or his entire profile
GROUP ACCOUNT:
#groupadd groupname : To add a group
Q-* How to see all created user/group in a file or Where these all created users and group are stored
?
# cat /etc/gshadow
2) # visudo
or
newusername2 ALL=(ALL) NOPASSWD: ALL
For group
Using fdisk you can create a new partition, delete an existing partition, or change existing
partition.
Using fidsk you are allowed to create a maximum of four primary partition, and any number of
logical partitions, based on the size of the disk.
# echo "- - -" > /sys/class/scsi_host/host0/scan
# fdisk -l | grep sd
d delete a partition
press n
# mkfs.ext4 /dev/sdb1
To unmounts
# cd ..
# umount /dev/sda
PC-1 PC-2
Ssh server:
# useradd deepak
# passwd deepak
Ssh client:
#ssh root@serverIP
or
#ssh deepak@192.168.5.1
In client PC
# ssh-keygen
# ssh-copy-id deepak@server-IP
P a g e | 70
How to check
# ssh deepak@192.168.5.1
# vi /etc/ssh/sshd_config
AllowUsers deepak deepak1 :- these users are allowed only remaining are denied
or
or
You can do it by modifying the content of /etc/issue.net file and adding the following line inside the
sshd configuration file.
banner /etc/issue.net
# Add below content to allow password based login from node2 (10.0.2.31)
Match Address 10.0.2.31
PasswordAuthentication yes
[root@node3 ~]# systemctl restart sshd
P a g e | 71
# Add below content to allow password based login from subnet 10.0.2.*
Match User deepak Address 10.0.2.*
PasswordAuthentication yes
# Add below content to password based login for all users part of group 'techteam'
Match Group techteam
PasswordAuthentication yes
3) # exportfs -a
# exportfs -v
# vi /etc/fstab
# cd /var/www/html/
#ls
<html>
</html>
# apt-get update
# cd /var/www/html/
#ls
P a g e | 73
# nano mobile.html
<html>
</html>
# ufw disable
http://instance-public-ip or http://instance-public-ip/mobile.html
# cd /var/ftp
# cd data
ftp://instance-public-ip
P a g e | 74
Shell File
Writing a script
To create a shell script, you use a text editor. A text editor is a program, like a word processor, that reads and
writes ASCII text files.
# sh test.sh
3) To display my username and home directory
# vi test.sh
echo $USERNAME
echo $HOME
4) Ececute date, cal, id and ls command at a time.
# vi test.sh
date
cal
id
ls
5) # vi test.sh
mkdir india
cd india
touch file1 file2 file3
mkdir dir1 dir2 dir3
# vi test.sh
rm –f /home/john/song/*.jpg
rm –f /home/john/song/*.mp3
P a g e | 75
• The crontab (short for "cron table") is a list of commands that are scheduled to run at regular time
intervals on your computer system.
• The crontab command opens the crontab for editing, and lets you add, remove, or modify scheduled
tasks.
• The daemon which reads the crontab and executes the commands at the right time is called cron.
• Crontab executes jobs automatically in backend on specified time interval. For scheduling one time
tasks you can use at command in Linux.
• Each user on your system can have a personal crontab.
• Linux crontab have six fields. 1-5 fields denotes time and 6’th fields are used for command/script
chmod
To change the permissions of a file or directory. Use ls -l to see the permission settings.
Permission group:
1. Owner
2. Group
3. All Other Users
Permissions representation:
Permission types
Read – 4
Write – 2
Execute – 1
# ls –l file1 or ls –l dir1