0% found this document useful (0 votes)
18 views

CCNA Day1 Note 11th Nov 2023

A computer network connects multiple computers together to share information. Networking is the process of designing and implementing a network to allow secure communication. Key advantages of networks include increased speed, cost effectiveness, reliability, and scalability. Networks can be divided based on area into LANs, WANs, MANs, CANs, and PANs. Components of a network include senders, receivers, media, data, protocols, and networking devices like NICs, hubs, switches, and routers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

CCNA Day1 Note 11th Nov 2023

A computer network connects multiple computers together to share information. Networking is the process of designing and implementing a network to allow secure communication. Key advantages of networks include increased speed, cost effectiveness, reliability, and scalability. Networks can be divided based on area into LANs, WANs, MANs, CANs, and PANs. Components of a network include senders, receivers, media, data, protocols, and networking devices like NICs, hubs, switches, and routers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

What is a Computer Network ?

A computer network is a group of computers which are


connected together so that they can share information.

What is Networking ?

The process of design and construction of a network so


that they can communicate in a secured enviroment is
known as networking
Advantage of network ?

1. Speed
2. Cost effective
3. Reliability
4. Scaleabe( A network size can be inscrease
accourding to the demand. )
Types of Network

Network is divided on the basis of area.


1. LAN (Local area network)
2. WAN (Wide area network)
3. MAN (Metropolitan area network)
4. CAN (Campus area network)
5. PAN (Personal area network)
Components of Network

1. Sender.
2. Receiver.
3. Media.
4. Data.
5. Protocol.
Types of communication

1. Unicast: It is one to one communication.


2. Multicast: It is one to many communication.
3. Broadcast: It is one to all communication in a network
Modes of communication
1. Simplex:- In this mode of communication only one
device can send the traffic and other device can only
receive the traffic.(keybord,mouse,radio)
2. Half Duplex:- In this mode of communication both
devices can transmit and rececived the traffic but not at
same instant of time.(hub)
3. Full Duplex:- In this mode of communication both device
can transmit and receive the traffic at same instant of time.
(Switches and Routers)
Networking Devices
1. Network Interface Card(NIC) :-
A network interface card is a computer hardware
component that use to connects a computer to a
computer network.
2. Hub :-
HUB is a networking device which is use to connect
multiple computer together.
It is a physical layer device.
It is a dummy device.
It works on half duplex.
3. Switch :-
Switch is a layer 2 device.
Switch are use to connect multiple devices in LAN Network.
Switch works on full duplex.
Switch can be unicast, multicast and broadcast a traffic.
Switch is a intelligent device.
4. Router :-
Router is a layer 3 device.
Router works on full duplex mode.
Router are use to connect two or more defferent
network together.
Collisin Domain and Broadcast Domain
1.Collisin Domain:-
A collision domain is a domain where collisions can
occur.
A Collision occurs when two devices send a packet at the
same time on the shared network segment.

Hub is having one collision domain means one guys


can send and all other can receive only.---CSMA/CD
Switch and Router have per port collision domain.
1. Broadcast Domai:-
Broadcast means one to all and domain means area.
An area in which a broadcast message can travel is known as
broadcast domain.

All port of Switches and Hub are in one broadcast


domain.
Router have per port broadcast domain.4
Router can't pass broadcast message from one
network to other.
How Switch will make forwarding table

Switch always learn source mac-address from data and on


the basis of destination mac-address switch will take
forwarding decision.
How we identify devices in a network

I can identify you by using your name or by using


your address.

But the same name can be use by multiple people that's


why we need physical address.
Types of Addresses
1. IP Address
2. MAC-Address
MAC-Address
It is a 48 bits address.
Represented in hexa-decimal.
it is divided into two part:
OUI Vender assigned
24 Bits 24 Bits

1111.2222.3333.4444

11.11.22.22.33.33.44.44
IP Address
It is a 32 bits address.

CLASS A: 0-127
CLASS B: 128-191
CLASS C: 192-223
CLASS D: 224-239
CLASS E: 240-255
Router
A router is used to connect two or more different networks.
Router work on full-duplex.
A router has per post B.D and per port C.D.
Router maintains routing table where they kept best path to
reach from one network to another network
Memory of router
1. RAM:-

RAM Stands for random access memory.


It is volatile in nature.
When power goes off from the device the content of
RAM will lost.
In RAM we can read and write the content.
2. ROM:-

ROM Stands for read only memory.


It is non-volatile in nature.

3. NVRAM:-

It Stands for non-volatile random access memory.


It is a type of RAM in which the content will remain
same if power goes off.
4. Flash:-
Its is a electrical erasible programmable read only
memory.
It is a type of ROM in which the content can be read as
well as write several time.
Content in memory of router
RAM:- Routing table,ARP table,Running-configuration and
interface buffer memmory.

ROM:- POST , Mini-IOS, bootstrap program ,ect

NVRAM:- Startup configuration file,configuration register


value.

Flash:-IOS Image of Router.


Booting process of router

When the device will power on POST process will run.


post stands for power on self test.
in post process device will check that the all hardware
component are working or not.
bootstarp will run and it will try to load IOS image
inRAM.
The bootstrap program is sequence of small code.
Configuration register value is used to load IOS,
bydefault register value is 0x2102.
The IOS Image will be checked from flash, if ios is found then
it load in ram, If ios is not found then ios image will checked
from TFTP server.
if ios is found then it will be loaded in ram.
if ios is not found then router will load mini-IOS from ROM.
From here we can load in flash.
once the IOS image is loaded in the RAM,router will check
NVRAM to get start-up configuration file, if start-up
configuration file is found then it will loaded in ram.
if start-up configuration file is not founded in nvran then
router will start from setup-mode.
Modes of a router

User mode
privilage/enable mode
global configuration mode
interface mode
rommon mode
Basic command of a router
Command to change hostname of router
router(config)#hostname ----

command to set banner on router


#banner motd #-------#

command to set password in privilege mode


#enable password ------
#enable secret -----
command to set password on consol port
#line console 0
#password 123
#login

command to encrypt all password on the router


#service password encryption
command to bring and interface up
#interface fastethernet 0/0
if-)#no shutdown

command to see running configuration


#show running-config

command to save configuration


#copy running-config starup-config
#write
command to give ip address on the interface of router
#interface fastethernet 0/0
#ip address --------- ---------

command to verify IP addresses on the interface of router


#show IP interface brief

command to see layer 2 information of router


#show interface fastethernet 0/0
command to verify layer 3 information of an interface of router
#show IP interface fastethernet 0/0

command to erase startupconfiguration of a device


#write erase
#reload

command to take backup of configuration on TFTP Server


#copy startup-------
How to break password of router
Password saved in NVRAN
What is Configuration register ?
It is a 16 bit value,represented in the form of hexadecimal.
It is stored in the NVRAM.
Bydefault Configuration register value:- 0x2102,
it tells the booting behaviour of router.
types of register value 0x2102,0x2100,0x2142...

Rommon>confreq 0x2142
OSI Model
Open system interconnection model
ISO( International standard organization ) developed
OSI Model in 1980.

After OSI Model:-


Now different vendor's devices are able to communicate
with each other.

It acts as a blue print.


.
OSI is a Layer approach model and it have seven-layer

APPLICATION LAYER
PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER
Application layer:-
Application layer acts as an interface between user and
the actual application.
This layer tell us that an application is internet based or
not.
There are various services like wave service, file
service,remote access service,time service,mail
service,etc are used at this layer.
These services are access with the help of some
protocols like http,tftp,https,telnet,ssh,smtp,ftp,DNS ect
App developer degin these protocol.
Presentation Layer

At this layer, data is presented in the standard format.


The data can encryted and decrypted, Compression
and decompression at this layer.
123----ABC(Encrypted) ABC----123(Decrypted)
Session Layer

This layer creates, maintains and terminates a session.


This is done with the help of session ID.
It keep data different session seperate.
Port Number
It is a 16 bits value, represented in decimal.
Range 0-65535
Port number is a unique ID of the protocol in computer
networking.

Server
https 443
ftp 21

Computer
https-443
Well known (0-1024)
Unknown (1025-65535)
Transport Layer

This layer provides reliable or unreliable delivery.


Perform error correction before transmit.
Two protocols are work on this layer that is TCP and
UDP.
TCP Stands for transmission control protocol and UDP
Stands for User datagram protocol.
TCP is a connection-oriented protocol and UDP is a
connectionless protocol.
TCP UDP
It is a connection-oriented It is a connectionless protocol.
protocol. We can't arrange the receiving
We can arrange the receiving traffic in a sequence.
traffic in a sequence. Data retransmission can't be
Data retransmission can be done.
done. It is an unreliable protocol.
It is a reliable protocol. Flow control can't be achieved
Flow control can be achieved in in TCP.
TCP. Windowing is not used in UDP.
Windowing is used in TCP. 4-way handshake is not done in
4-way handshake is done in UDP.
TCP.
TCP is a slow protocol. UDP is a Fast protocol.
Default header size of Default header size of
TCP is 20 Bytes. UDP is 8 Bytes.
http,https,telnet,ssh,etc DHCP,NTP,DNS,etc are
are used TCP at layer-4. used UDP at layer-4.
Segmentation is done in Segmentation is not
TCP. done in UDP.
Connection-oriented communication:-

Connection-oriented communication is a mode of


communication in computer networking, where a
connection will established with a remote device before
sending data that is known as three-way handshake.

When a connection will be established then


actual data will send to the remote device.
Three-way handshake:-
Sequencing:-

In TCP sequencing is done with the help of sequence


number so that receiving device can arrange the segment
in original order.
What is MTU ?

Before sending data, the sender device negotiates MTU of


all devices between sender and receiver.

choose minimum MTU for transferring data.


HELLO HOW ARE YOU
1 2 3 4

HELLO ARE YOU HOW


1 3 4 2

by the help of sequence nimber receiver will arrange this


data in original format.
Retransmision of data in TCP:-
Sender HELLO HOW ARE YOU
1 2 3 4

Receiver HELLO HOW ARE


1 2 3
remote device will request for missing segment

Retransmit YOU
TCP is Reliable protocol:-
TCP is a reliable protocol because every device which is
receiving traffic will send acknowledgment to the sender
that i had receive the traffic.

Flow control:-

Loosing of data can be tragic, we need safe solution in


place is known as flow control.
The segment delivered are acknowledged back to
the sender upon their reception.
Any segments not acknowledged are retransmitted.

Sender Receiver

But if receiver will send acknowledgement after every


segment then communication will be very slow.
Windowing:-

In windowing both the devices will negotiate their


buffer memory, The device will elect the least buffer
memory as the window size.
A sender will send data equivalent to window size and
then expect acknowledgment.
With the help of windowing we also achieve flow
control.
Windowing is use to reduce aknowledgement.
100 Bytes mtu Server
700 Bytes

Client
Least Buffer memory = window size =700 bytes
100 bytes

Acknowledgement
4 way handshake:-
It is used to terminate connection

Fin
Sender

Receiver
Ack

Fin

Ack
Network Layer

Network layer provides logical address.


Router and Layer-3 Switches work at this layer.
The main function of the router works at this layer.
Protocols used at this layer is IP,EIGRP,OSPF,ICMP and
many more.
Data-link layer
Data-link layer provides physical address.
At this layer error detection is done.
Switch and bridge are work at this layer.
This layer is responsible for forwarding data from one
device to another device in a network.
This is the only layer in which header as well as trailer
are added.
Protocol used at this layer is ARP,HDLC,etc.
Physical Layer

At this layer Hubs,repeater,access point transmission


media, etc are used.
at this layer data is converted in bits.
PDU at different layer :-
Protocol data unit

7 Data
6 Data
5 Data
4 Segment
3 Packet
2 Frame
1 Bits
Encapsulation and Decapsulation in OSI Model
TCP/IP Model

Application Layer
Transport Layer
Internet Layer
Data link Layer
Physical Layer
TCP Header :-
32 bits
Source Port Destination Port
Sequence Number
Acknowledgement Number
H.L RSV Flags Window Size
Checksum Urgent Point
Option
Source Port:- This is a 16 bits value that specifies the port number of
the sender.
Destination Port:-This is a 16 bits value that specifies the port number
of the receiver.
Sequence Number:- A number used by TCP that puts the data back in
in the correct order or retransmits missing data during a process called
sequencing.
Acknowledgment number:- The value is the TCP octet that is expected
next.
Header Length:- It is the size of TCP header,which indicates where the
data begins.(Bydefault size is 20 bytes).
Reserved:- it always set to zero.
Flags:- it is a control functions which is used to set up and terminate a
session.(There are 8 flags in TCP header)
Window Size:- This field negotiates the Buffer memory of
the interface.
Checksum:- This field is use to find error in the TCP
header.
Urgent Point:-It is used to send traffic urgently.
Option:- It is a optional field.
UDP Header :-
32 bit

Source Port Destination Port


Header Length Checksum
Data

IP Header :-
32 bit
Version Header Priority and
Total Length(16)
(4) Length(4) TOS(8)

Identification(16) Flags(3) Fragmented offet(13)

Time to live(8) Protocol(8) Header checksum(16)

Source ip address(32)

Destination Iip address(32)

Option

Data
Version :- This field tells us which IP version we are using.
Header Length :- This 4 bits field tells us the length of the IP header.
Types of service:- This is used for QoS(Quality of service).
Total Length:-This field indicates the entire size of the IP Packet
include data and header.
Identification:-If the IP packet is fragmented then each fragmented
packet will use the same 16 bit identification number to identify to
which IP packet they belong to.
IP Flags:- These 3 bits are used for fragmentation.
The first bit is always 0.
The second bit is called the DF(Don't Fragment) bit.
The last bit is called the MF(More Fragments) bit and set on all
fragmented packets except the last one.
Fragment offset:- This 13 bit field specifies the position of
the original fragmented IP packet.
Time to Live:- Everytime an IP Packet passes through a
router, the time to live field is decremented by 1. Once it
hits 0 the router will drop the packet.
Protocol:- This field tells us which protocol is encapsulated
in the IP packet, for example TCP has value 6 and UDP has
value 17.
Segmentation Fregmentation

Dividing a big data into small part Dividing a big data into small part as
is known as segmentation. known as fregmentation.
It is done at layer-4. It is done at layer-3.
It is done with the help of MSS. It is done with the help of MTU.
MTU=1500.
MSS=1460.
Fragmentation is done for layer-3
Segmentation is done for layer-7
traffic.
or layer-4 traffic.
Application Layer Protocol:-
HTTP ( Hypertext transfer protocol )
Port number=80
use TCP at the transport layer
It is used to access wave page from the wave server
It is not a secure protocol

HTTPS ( Hypertext transfer protocol secure )


Port number=443
use TCP at the transport layer
It is also used to access wave page from the wave server
It is a secure protocol
Telnet protocol
Port number=23
use TCP at the transport layer
It is used to take remote access of networking device
It is not a secure protocol
SSH( Secure shell)
Port number=22
use TCP at the transport layer
It is also used to take remote access of networking device
It is a secure protocol because data is encrypted in ssh
FTP ( File transfer protocol)
Port number=20,21
use TCP at the transport layer
It is used to access file server
we can browse the file in FTP
TFTP ( Trivial file transfer protocol )
Port number=69
use UDP at the transport layer
It is also used to access file server
For TFTP services we have to provide the exect path of the
file ( we cant browse the file in TFTP )
TFTP is a fast protocol as compare to FTP.
NTP( Network time protocol)
Port number=123
use UDP at the transport layer
It is used to keep the device synchronize with time server

DHCP ( Dynamic host configuration protocol )


Port number=67,68
use UDP at the transport layer
It is used to provide IP address, subnet mast, default-
gateway and DNS server IP address to the client.
DNS ( Domain Name System )
Port number=53
use TCP and UDP at the transport layer
It is used to resolve a fully qualified domain name into IP
address.
IP Address :-
It is a 32 bits address.
it is represented in 4 octets.
We can provide IP Addresses from class D and E.
0.0.0.0 is reserved for unknown IP.
127.0.0.0-127.255.255.255 reserved for loopback
testing.
169.254.0.0-169.254.255.255 is reserved for APIPA(
Automatic private IP Addressing ).
Private IP Range :-
Class A : 10.0.0.0-10.255.255.255
Class B : 172.16.0.0-172.31.255.255
Class C : 192.168.0.0-192.168.255.255
Private Public
Free of cost. You have to buy public IP.
It is used in LAN. It is used in LAN as well as
These IP address are not in WAN.
routable on internet These IP address are
routable on internet
Subnet Mask :-
It is a 32 bits dotted decimal value which is use to specify
number of network bits and number of host bits in an IP
address.

CLASS Formate Subnet Mask


A N.H.H.H 255.0.0.0
B N.N.H.H 255.255.0.0
C N.N.N.H 255.255.255.0
Number of ON bit = Number of network bit
Number of OFF bit = Number of host bit
10.0.0.1 255.0.0.0
11111111.00000000.00000000.00000000

CIDR ( Classless inter-domain routing)

It is a slash rotation which tells us the number of network


bits in an IP address.
Bydefault CIDR value:-

CLASS
CIDR
A /8
B /16
C /24

Write subnet mask from /8 to /32


/8 255.0.0.0
/9
/10
.
.
Subnetting :-
Subnetting is a process of dividing a big network into small
network.

x
Number of network= 2
Where x is the number of network bits goes in host bit.

Block Size = 256-Subnet mask of that octet which have last 1s.

Block size tells us from where the next network will start.
H
No. of valid host = 2 -2

Where H is number of host bits

You might also like