Sei sulla pagina 1di 225

Azure Skynet

Apex of Learning

Networking
CCNA
Definition : = An interconnected or interrelated chain,
group, or system.
Basic connectivity
Living in a Network Centric World
Chapter 01
• Network Fundamental

• if an employee want to send a message to


Pune office from Gurgaon Office ?
Types of Network
1. Local Area Network
2. Campus Area Network
3. Metropolitan Area Network
4. Personal Area Network (e.g. Bluetooth)
5. Storage Area Network (e.g. Gmail)
6. Wide Area Network
Local Area Network
• IT Department
IT Department
•ECE Department
ECE Department
•CSE
CSE Department
Department
ME Department
•ME Department
Administration
• Administration
Campus Area Network

Canteen ENGG. Stadium


Block

MGMT. Hostel
Block
Metropolitan Area Network

Delhi West
Delhi East

Delhi North

Delhi South
Wide Area Network

Delhi Pune

Indore

Assam
Types of Communication

• Unicast

When you talk to your gf /bf in private. The conversation takes places only
between two persons. “”
Unicast messaging is used for all network processes in which a private or
unique resource is requested.
Unicasting in terms of Network
Multicast

Multicast is the delivery of a message or information to a


group of destination computers simultaneously in a single
transmission from the source.
Multicasting in terms of Network
Broadcast

A FM or RADIO channel Broadcasts its data to all the users available


in the frequency zone.
Broadcasting in terms of
Network
Networking Devices
Chapter-2
HUB
• A central device that connects different
nodes together for communication purpose.
• It works on HALF DUPLEX, works on
PHYSICAL LAYER.
• Hub is a DUMB DEVICE.
Switch is Preferred over HUB.
Collision Domain
Collision Domain

• More the number of collision domain better it


is.
• All device in same collision domain always
have accidents.
Switch
• It’s used to make LAN works effectively.
• Works on FULL DUPLEX, LAYER-2 device
because it uses MAC Address for
Sending/Receiving Information.
• Every port has a collision domain.
Broadcast Domain
Broadcast Domain
• Bigger size will be bad.
• All device fall in a broadcast domain but they
can be in different collision domain.

Internet: Is it a Broadcast Domain?


Router
• Used to connect different Networks Together.
• LAYER-3 Device, Send/Receive PACKETS:
contains info about IP Networks.
FIREWALL
• A firewall is a computer program & a device,
as well.
• Simply put, to control all information/data
traveling into and out of a computer via a
network.
IPS
Network IPS sit inline on the network, state fully
analyzing packet content and blocking certain
packets that match a signature and alerting on
others.
IDS

It is an Intrusion Detection
System, attempts to discover
unauthorized access to
a computer network by analyzing
traffic on the network for signs
of malicious activity.
LOAD BALANCER

A load balancer is a device that distributes network


or application traffic across a number of servers.

Load balancers are used to increase capacity


and reliability of applications.
Networking Topologies –
Chapter-3
NETWORK TOPOLOGIES
• Network topology defines the structure of the
network.
• One part of the topology definition is the
Physical Topology, which is the actual
layout of the wire or media.
• The other part is the Logical Topology,
which defines how the media is accessed by
the hosts for sending data.
TOPOLOGIES
BUS TOPOLOGY
A bus topology uses a
single backbone cable
that is terminated at
both ends.

All the hosts connect


directly to this
backbone.
RING TOPOLOGY
A ring topology
connects one host to
the next and the last
host to the first.

This creates a physical


ring of cable.
STAR TOPOLOGY

A star topology
connects all cables to
a central point of
concentration.
EXTENDED STAR TOPOLOGY

An extended star
topology links
individual stars
together by
connecting the
hubs and/or switch.
This topology can
extend the scope
and coverage of
the network.
MESH TOPOLOGY

A mesh topology is
implemented to provide as
much protection as possible
from interruption of service.

Each host has its own


connections to all other
hosts.
HIERARCHICAL TOPOLOGIES

A hierarchical
topology is similar
to an extended
star.
OSI Layers
Chapter-4
Communication???

SOUTH INDIAN NORTH INDIAN


He knows Tamil. He knows Hindi.

But still they cant communicate because they don’t


know a common language
Open System Interconnection
• OSI is not a physical model but a
guidelines to be followed by Application
Developer for proper communication.
• Before this Apple and IBM devices were not
able to communicate with each other.
• Created by ISO(International Organization for
Standardization) in 1984.
OSI Layers
Layer - 7 Application
Upper Layer
Layer - 6 Presentation or
Software Layer
Layer - 5 Session

Layer - 4 Transport Heart of OSI

Layer - 3 Network
Lower Layer
Layer - 2 Data Link or
Hardware Layer
Layer - 1 Physical
Application Layer
• It deals with Networking Application.
• It acts as an interface between the actual
application program.

Protocol Data Unit (PDU)-DATA


How Data Flows in Application
Layer
Application Data

Presentation

Session

Transport

Network

Data Link

Physical
Presentation Layer
• It ensures that data transferred from application layer of one
system can be read by application layer of other system.
• The presentation layer determines how data is transmitted and
represented to the user.
• It’s responsible for converting data into standard format which
may include:
JPEG, MPEG, BMP, MIDI, WAV, MP3
Tasks which can be performed:
a) Compression >< Decompression
b) Encryption >< Decryption
PDU- Formatted DATA
How Data Flows in Presentation
Layer
Application Data

Presentation Data

Session

Transport

Network

Data Link

Physical
ENCAPSULATION & DECAPSULATION IN OSI
MODEL
Session Layer
• This layer establishes, manages, and terminates sessions
between Peer to Peer.
• It keep different application’s data separate from other
applications.

PDU- Formatted DATA


How data flow in Session Layer
Application Data

Presentation Data

Session Data

Transport

Network

Data Link

Physical
Transport Layer
• Efficient guaranteed delivery is provided through
sequencing, acknowledgement & flow control.
SEGMENT = TCP/UDP Header + DATA
• It provides error correction before transmitting thus
insure reliable data transport .
a) UDP Protocol - unreliable & connectionless, used in
LIVE SCENARIOS.
b ) TCP Protocol - Reliable because of 3-way
handshake

PDU- SEGMENTS
TCP vs UDP
• Transmission Control • User Datagram
Protocol Protocol

• Connection Oriented • Connection Less

• Acknowledgement • No Acknowledgement

• Reliable • Unreliable

• Slower • Faster
Segmentation

Hello! Hello! How are you ?


How are
you ?

Hello! How Are You ?

A B
Sequencing & Reassembling

you
Hello!
How ?
are

A B
Sequencing & Reassembling

Hello!
How are
you ?

A B
Error Correction

Hello!
How are
you ?

A B
How data flow in Transport Layer
Application Data

Presentation Data

Session Data

Transport Segment

Network

Data Link

Physical
Protocols
• Set of rules & Regulations for devices to
communicate.
• Ex. ENGLISH LANGUAGE.
Network Layer
• It use Logical Addressing(IP Addressing).
• Makes “Best Path Determination”
decisions based on Logical Addressing.
PACKET = S. IP + D. IP + TCP/UDP +
DATA
• Packet size is from 64 bytes to 1500 bytes.
PDU- PACKETS
Network Layer Protocols
• IP Address
• Routing
 It is a medium for communication
between two different Networks.
How data flow in Network Layer
Application Data

Presentation Data

Session Data

e.g. Router Transport Segment

Network Packet

Data Link

Physical
Data-Link Layer
• Its responsible for PHYSICAL
ADDRESSING(MAC ADDRESSING).
• It perform Error Detection & not
correction.
• Receives PACKETS from upper layer &
convert it into FRAMES.
FRAME = S. MAC + D. MAC + S. IP + D.
IP + TCP/UDP + DATA
PDU- FRAMES
Data-Link Layer Protocols
• MAC Address
 It’s a 48 bits Hexadecimal address.
 Switch learns MAC Address and store it
in MAC Address TABLE on ASIC CHIP.
 Switch's First attempt is Broadcast and
then Unicast, till the time MAC TABLE
didn’t FLUSH OUT.
• Address Resolution Protocol (ARP)
 Its used to get the MAC Address of
unknown device with the help of
IP Address when two devices are
communicating for the First Time.

FOR FIRST TIME COMMUNICATION


destination MAC Address would be
FF:FF:FF:FF:FF:FF
How data flow in Data-Link Layer
Application Data

Presentation Data

Session Data

Transport Segment

e.g. Switch Network Packet

Data Link DH Frame


Packet DT

Physical
Physical Layer

• This is the physical media through which the data,


represented as electronic signals, is sent from
the source host to the destination host.
• Data will be converted in Binary that is 0’s & 1’s.

PDU-
BITS
How data flow in Physical Layer
Application Data

Presentation Data

Session Data

Transport Segment

Network Packet

Data Link Frame

Physical Bits
A B

Data
Application Data Application

Presentation Data Data Presentation

Session Data Data Session

Transport TH
Segment
Data TH
Segment
Data Transport TH

Network NHPacket
Segment NHPacket
Segment Network NH

Data Link DH
Packet
DTFrame
Packet Data LinkDH
DT
PacketDT
Packet
DHFrame

Physical Bits Physical


Bits
ENCAPSULATION & DECAPSULATION
IN OSI MODEL
IP Addressing
Chapter-5
Objective

• Structure of an IP address
• Subnetting
• CIDR
• IP Version 6 addresses
What’s an IP Address..??
• An IP address is a 32 bit long, Logical Address
for a network interface.
• If a computer is communicating with
the Internet, then, actually its using an
IP address.
Example: 176.156.2.1
Dotted Decimal Notation

• IP addresses are written in a so-called dotted


decimal notation.
• Each byte is identified by a decimal number in
the range [0-255].
1st Byte 2nd Byte 3rd Byte 4th Byte
128 143 137 144

10000000 10001111 10001001 10010000

128.143.137.144
Decimal to Binary Conversion
• Example : 192.168.10.2
128 64 32 16 8 4 2 1
• For the first octet: 192 we have to add = 128 + 64 = 192
so we get in binary = 1 1 0 0 0 0 0 0
similarly
For 2nd octet = 1 0 1 0 1 0 0 0
For 3rd octet = 0 0 0 0 1 0 1 0
For 4th octet = 0 0 0 0 0 0 1 0
So IP address in binary is

1 1 0 0 0 0 0 0. 1 0 1 0 1 0 0 0. 0 0 0 0 1 0 1 0. 0 0 0 0 0 0 1 0
Binary to Decimal Conversion
IP Address’s Uniqueness
• Example: abhijit.eie.azureskynet.Braintech

128.143 137.144

• Network id is: 128.143.0.0


• Host number is: 137.144
• Subnet mask is: 255.255.0.0
Prefix notation: 128.143.137.144/16
Network prefix is 16 bits long
Subnet Mask
• It defines how many bits are network & how
many of them are hosts, in an IP.
• It’s of 32 bits.
• Represent
All Network bits with 1 & N=1
All Host bits with 0. H=0
Class A : N.H.H.H

11111111.00000000.00000000.00000000

Default Subnet Mask for Class A is 255.0.0.0

Class B : N.N.H.H

11111111.11111111.00000000.00000000

Default Subnet Mask for Class B is 255.255.0.0

Class C : N.N.N.H

11111111.11111111.11111111.00000000

Default Subnet Mask for Class C is 255.255.255.0


Version of IP Addressing Scheme
• IPv4 (Internet Protocol version 4 uses 32 bit addressing.)
e.g. 192.168.10.1
• IPv6 (Internet Protocol version 6 uses 128 bit
addressing).
– e.g. fe80::74f3::38d5:d634:58ec/14

Types of IP Address
 Public IP Address: Its used for connectivity with WAN.
 Private IP Address: non routable, cant travel without
NAT. There are certain addresses in
each class of IP address that are
reserved for LAN.
Range of Private IP Address

Class A

10.0.0.0 to
10.255.255.255

Class B

172.16.0.0 to 172.31.255.255

Class C

192.168.0.0 to 192.168.255.255
IP Address Classes
Chapter-6
Classes of IP Addresses
Total IP Addressing Scheme is divided into 5 Classes.

CLASS A LAN & WAN

CLASS B LAN & WAN

CLASS C LAN & WAN

CLASS D Multicasting & Newsgroups

CLASS E Research & Development by DOD


Net ID and host ID
Finding the class in decimal notation
The old way: Internet Address Classes
bit # 0 1 7 8 31

Class A 0
Network Prefix Host Number
8 bits 24 bits

bit # 0 1 2 15 16 31

Class B 10 network id host

Network Prefix Host Number


16 bits 16 bits

bit # 0 1 2 3 23 24 31

Class C 110 network id host

Network Prefix Host Number


24 bits 8 bits
The old way: Internet Address Classes
bit # 0 1 2 3 4 31

Class D 1110 multicast group id

bit # 0 1 2 3 4 5 31

Class E 11110 (reserved for future use)

• We will learn about multicast addresses later in


this course.
Class A
• Range: 0 - 127 0 & 127 are reserved
for Loopback.
• N.H.H.H
• 8 bits reserved for network & 24 for Hosts.
• N part can’t be changed but H can be.
Class A Number of networks & Hosts

Class A Octet Format is N.H.H.H

Network bits : 8 Host bits : 24

No. of Networks
•= 2^7
•= 128 – 2 (-2 is for 0 & 127 Network)
•= 126 Networks

No. of Host
•= 224 – 2 (-2 is for Network ID & Broadcast ID)
•= 16777216 - 2
•= 16777214 Hosts/Network
Class B
• Range: 128 to 191
• N.N.H.H
• 16 bits reserved for Network & 16 for Hosts.
Class B Number of networks & Hosts

Class B Octet Format is N.N.H.H

Network bits : 16 Host bits : 16

No. of Networks
•= 2^(16)
•= 65536 - 2 Networks
•= 65534 Network

No. of Host
•= 216 – 2 (-2 is for Network ID & Broadcast ID)
•= 65536 - 2
•= 65534 Hosts
Class C
• Range: 192 to 223
• N.N.N.H
• 24 bits reserved for Network & 8 for Hosts.
• Most Commonly used because wastage of
IP Addresses is Avoided.
Class C Number of networks & Hosts

Class C Octet Format is N.N.N.H

Network bits : 24 Host bits : 8

No. of Networks
•= 224
•= 16777216- 2 Networks
•= 1,67,77,214 Networks

No. of Host
•= 28 – 2 (-2 is for Network ID & Broadcast
ID)
•= 256 - 2
•= 254 Hosts
Valid IP Addresses
• It lies between the Network Address and the
Broadcast Address.
eg: 192.168.1.0/24

192.168.1.0 • Network Address

192.168.1.1 to
192.168.1.254
• Valid IP Addresses

192.168.1.255 • Broadcast Address


Subnetting
Chapter-7
Subnetting

• It breaks Larger network into Smaller parts.


• Its used to reduce wastage of IP Addresses.
Subnetting
• Problem: Organizations
have multiple networks University Network
which are independently
Engineering
managed School
Medical
School
– Solution 1: Allocate one or more
addresses for each network
• Difficult to manage Library
• From the outside of the
organization, each network
must be addressable.
– Solution 2: Add another
level of hierarchy to the
Subnetting
IP addressing structure
Advantages of Subnetting
• With Subnetting, IP addresses use a 3-layer
hierarchy:
» Network
» Subnet
» Host

• Improves efficiency of IP addresses by


not consuming an entire address space for
each physical network.
Steps for Subnetting
 192.200.200.0 & make 4 sub-networks.
1) Find Network Value. Based on
11111111.11111111.11111111.11000000

N = 2^2 = 4
2) Find Subnet Mask. 255.255.255.192
3) Find Block Size. 256 - 192 = 64
4) Find Number of Host. 2^6 - 2 = 64 - 2 = 62

192.200.200.0 192.200.200.64
192.200.200.128 192.200.200.192
For Class B

172.200.0.0 & make 120 subnets.

1) N = 7,
2) S.M. = 255.255.254.0,
3) B.S.=2,
4) H=2^9 - 2= 512-2=510
Variable Length Subnet Mask
• It’s used to reduce number of IP Addresses.
• In VLSM, we calculate number of IP Addresses
based on the nodes, which means
Based on Number of Host Bits.
Steps for VLSM
1) Find the largest segment in the area.
2) Follow all the 4 steps of Subnetting.
192.200.200.0/24 192.200.200.64
LAN 1 to
30 Devices 192.200.200.95
LAN 4
6 Devices

192.200.200.112
to
192.200.200.120

R1 R2 R3

192.200.200.96 LAN 3 LAN 2 192.200.200.1


to 14 Devices 60 Devices to
192.200.200.11 192.200.200.63
Router’s Mode

Global
Configuration
Enable/ Mode
User Mode
Privilege Mode • Interface Configuration
Mode
• Sub-Interface Mode
• Router Mode
• Its used for user login.
User Mode • Very basic commands can be used here.
“Router>” • It’s a default mode.

• Troubleshooting is done in this scenario.


Enable/Privilege • Type Router>”enable” to enter this mode.
Mode “Router#” • This mode defines user privilege level by "show $ privilege"

• Router & Switch configuration is done here, eg:


Global Configuration IP Addressing,
Mode Password Setting
Routing Protocols configuration etc
“Router(config)#” • Type Router#” configure terminal” to enter.
Router’s Command Modes
• Default mode ends with “>”
• Displays commands that change terminal settings, perform basic tests, and
USER MODE display system information.

• “Privileged Mode ends with “#”, using “enable” keyword


ENABLE MODE
• Troubleshooting steps is done in this mode.

• Enter the mode by using “ configure terminal”.


GLOBAL
CONFIGURATION
• Router configuration is done in this mode.
MODE
Dynamic Host Configuration Protocol
(DHCP)
• It’s used to assign IP Address through DORA Process.

Acknowledgement

Request

Offer
Discover
DHCP Configuration
int $ f0/0 Router

ip $ add $ <ABCD> $ <Subnet-Mask> f0/0


no $ shutdown
ip $ dhcp $ pool $ Network-Bulls Switch
network $ <ABC0> $ <Subnet-Mask>
default-router $ <ABCD>
dns-server $ <12.34.56.78>
ip $ dhcp $ excluded-address $ <ABCD> $ <WXYZ>
1 2 3 4
Now apply DHCP on computers.
Internetwork OS
Chapter-8
Fundamentals
• Created by Cisco to manage Cisco Devices, like
Switches & Routers.
• Cisco devices uses ".bin" extension.
Cisco IOS Versions
Version 10
10.1, 10.2 10.3, 10.4

Version 11
11.1, 11.2 11.3, 11.4

Version 12
12.1, 12.2 12.3, 12.4
• Version 15 (LATEST)
Fundamental Terminologies

• Serial
• Clock Rate
• Fast-Ethernet
• Console
• Auxilliary
Serial

• It is used to make Peer to Peer connections


between two Routers.

Types of Serial
 DCE: Data Communication Equipment
Clock-Rate is to be given here.
 DTE: Data Terminal Equipment

2013 © NETWORK BULLS


Clock rate
• It’s used to tell how many bits to be sent per
second.
Fast Ethernet
 It’s used to connect LAN Devices.

Console
 It’s used to configure Cisco device viz Router or Switch.
Auxiliary
• It’s used for MODEM's connectivity. Can be used
as a Console cable for configuration purpose.
Flash
 It’s used to store IOS.
 It can be said that its Router's HDD.

Normally a Router doesn’t have more than 2


Fast-Ethernet Ports but in HIGH SERIES
ROUTERS it can be 5 or 6.
How to connect with a Router for configuration?

Step-1) Connect router’s console port with PC


serial, through CONSOLE
CABLE.
Step-2) Use any third party application:
 Hyper Terminal
 Secure.CRT
 Putty.exe
Router's Boot Process
• Step 1) POST test

• Step 2) Load IOS from:


 Flash (transfer)
 TFTP (backup)

Step 3) Load Startup-config from:


 NVRAM, if startup-config is present.
 If not present then it would ask:
(Would you like to enter setup mode ?Y/N)
SAY NO.
Router’s Mode

Global
Configuration
Enable/ Mode
User Mode
Privilege Mode • Interface Configuration
Mode
• Sub-Interface Mode
• Router Mode
• Its used for user login.
User Mode • Very basic commands can be used here.
“Router>” • It’s a default mode.
• Use basic commands, Ping, tracert, Telnet

• Troubleshooting is done in this scenario.


Enable/Privilege • Type Router>”enable” to enter this mode.
Mode “Router#” • This mode defines user privilege level by "show $ privilege“ – 15
By default & Every Show Command.

• Router & Switch configuration is done here, eg:


Global Configuration IP Addressing,
Mode Password Setting
Routing Protocols configuration etc
“Router(config)#” • Type Router#”configure terminal” to enter.
Router’s Command Modes
• Default mode ends with “>”
• Displays commands that change terminal settings, perform basic tests, and
USER MODE display system information.

• “Privileged Mode ends with “#”, using “enable” keyword


ENABLE MODE
• Troubleshooting steps is done in this mode.

• Enter the mode by using “ configure terminal”.


GLOBAL
CONFIGURATION
• Router configuration is done in this mode.
MODE
Global Configuration Mode
• Interface mode:
Router(config-if)#
 It’s used to put information on an interface.

• Sub-Interface Mode:
Router(config-subif)#
 It’s used to make logical interfaces.

• Router Mode:
Router(config-router)#
 It’s used for Routing Protocols
RIP, EIGRP OSPF
• Line Mode
– Router(config-line)#
–  In this mode, Console, Telnet & Auxiliary password can be set.
Password Setting
• Simple Text Password:
#enable $ password $ pune

• Encrypted Password:
#enable $ secret $ pune123
• Telnet Password
#conf $ t
#line $ vty $ 0 $ 2
#password $ pune
#login
#exit
 Enable Password is “MUST” for
configuring Telnet Password.
• Console Password
#conf $ t
#line $ console $ 0
#password $ pune
#login

Line Console “0” is given because one


user/admin can connect through
console.
Routing
Chapter-9
Fundamentals
• It’s a process to move packets from one LAN
to another LAN.
• Routing Process generates a Routing Table,
Routing Information Base(RIB).
• If RIB don’t have information, then, Packet
Failure.
• A knowledge based method to create Routing
Information Base is Routing Table.
Administrative Distance (AD)
• It’s a unique value from 0 to 255.
• AD is used by Routing Protocols to rate the
trustworthiness of routing information
received.
Routing Protocols AD Value
Lower
AD value Connected 0
Static Routing 1
EIGRP 90
More
OSPF 110
Preferred
RIP 120
Types of Routing Protocols

Static RIP
Distance
Routing vector

OSPF Link State


Default
Routing Dynamic
Routing EIGRP
Hybrid
Protocol
Static Routing
• In Static routing we define routes manually and we always define Indirectly
Connected network.
Advantage
• There is no overhead on the router CPU .
• It adds security because the administrator can chose to
allow routing access to certain network only.
Disadvantage
• The administrator must really understand the internetwork and how each
router connected in order to configure routers correctly.
• If a network is added to the internetwork ,the administrator has to add a
route to it on all routers –by hand.
• It is not feasible networks because maintaining it would be a full-time job it
self.
Configuration in Static Routing

R(config)# ip $ route $ Indirect-Network $


Subnet- -Mask $ next hop-ip-address

To See the Routing Table:


R# show ip route
To See the Static Route :
R# show ip route static
Default Routing
• Default routing is basically used on stub router or stub
network.
Stub Router :
 A router which has only one entry or exit point.
Configuration in Default Routing
R(config)# ip $ route $ 0.0.0.0 $ 0.0.0.0 $ next-
-hop-ip-address

To Verify:
R# show ip route
Dynamic Routing Protocol
• It dynamically learn about route and do send
route information to the neighbor router.
• In dynamic routing we always define
directly connected network.
Dynamic Routing Protocol Types

RIP
Distance
vector
Dynamic
Routing OSPF Link State

EIGRP
Hybrid
Protocol
Distance Vector Routing
• It selects the route based on distance i.e. hop
count.
• When a packet cross a router i.e. called hop.
• It will select the route, which provides a
network after crossing least hop.
eg: RIP
Routing Information Protocols(RIP)
• RIP is a true distance-vector routing protocol.
• RIP only use the hop count to determine the best path to
a remote network.
• RIP sends the complete routing table out to all active interface
every 30 sec.
• RIP maximum allowable hop count of 15 by default.
• It has two version.
Version 1
Version 2
Configuration for RIP Routing
R(config)# router rip
R(config-router)# network<connected network>

For RIPv2
R(config)#router rip
R(config-router)#version $ 2
R(config-router)#network <connected network>

To Verify:
R# show ip route
R# show ip protocol
R#debug ip rip
RIP version 1 RIP version 2

Distance vector Distance-vector

Maximum hop Count 15 Maximum hop Count 15

Class full Class less

Broadcast Based Uses Multicast 224.0.0.9

No Authentication Allow MD5 Authentication


Summary

Routing Distance Classless Uses Use of Max Auto Support Supports Uses
Protocol Vector Routing Hold- Split Hop Summary CIDR VLSM Authen-
Protocol Down Horizon count tication
Timers or = 15
Split
Horizon
w/
Poison
Reverse

RIPv1 Yes No Yes Yes Yes Yes No No No

RIPv2 Yes Yes Yes Yes Yes Yes Yes Yes Yes
Link-State Routing Protocols

 Build around Dijkstra Algorithm, which is also


known as Shortest Path First (SPF) algorithm.
Hello Protocol in Link-State Routing

• Purpose- To discover neighbors (that use the


same Link-State Routing Protocol) on it’s link.
Hello Protocol in Link-State Routing
• Connected interfaces which uses
same Link-State Routing
Protocols will exchange Hello
Packet.
• Adjacency is formed once a
Router learn about neighbors &
start exchanging Hello Packets.
 These packets will serve as a
Keep Alive function.
– If a Router stops receiving Hello
Packets from a Router, the
neighbor is considered either
unreachable or in an Adjacency
Broken State.
Link State Packets (LSPs)
• Each Router has its own
LSPs.

• Contents of LSP:
 State of each Directly
Connected Network.
 Includes information
about neighbors such as
Neighbor ID, Link-Type &
Bandwidth.
Open Shortest
Path First
Protocol Number-
88
Introduction to OSPF
• It’s an Interior Gateway, Classless, Link-State
Routing Protocol.
• It only sends the information or change in
Network Topology which the other device
requires.
• It work on the Metric of COST.
Introduction to OSPF
• It’s an Open Standard, classless(VLSM) Protocol.
• It uses Virtual-Link, Router ID, Process ID (1-65535),
Wild-Card Mask with Unlimited Hop-Count,
Designated Router(DR) & Backup Designated
Router(BDR).
• It’s working is based on Areas, namely: Backbone
Area, Area Border Router (ABR) & Autonomous
Synchronous Border Router (ASBR).
• It uses 224.0.0.5 for Multicast for all Routers in OSPF
& 224.0.0.6 for Designated Router (DR).
OSPF Terms: DR & BDR
Process ID
It defines that how many Networks or Routers are connected in
same Administrative Unit.
Range: 1-65535 Given by IANA.
OSPF Routing Tables
Link Cost
• The value assigned to a Link, rather than Hope.
• Link-State protocol assigns a cost to a link,
which is based on the Bandwidth of the LINK
(Transmission Speed).
Routing Table/Forwarding Database
• Routing Table for each Router is unique.
• It’s generated when an algorithm starts
running on the Link-State Database.
DR Requirements

1) Higher Priority
Default Priority is 1 & max. can be 255.
If Priority is zero then Router will not
participate in DR & BDR Election.
2) Router ID
• It’s based on
Highest Loopback
Highest Physical Interface IP
It can be Manually configured
OSPF Metric
• OSPF metric is COST.
Formula for Cost: 100 Mbps
Bandwidth
Link Cost
• The value assigned to a Link, rather than Hope.
• Link-State protocol assigns a cost to a link,
which is based on the Bandwidth of the LINK
(Transmission Speed).
OSPF Routers
Backbone Router
R3
Area 0

R4
Area 2
R2

Area 1 Area Border Router R5


EIGRP 100
R1
Internal
R6
Router Autonomous Synchronous
Border Router
Internal Router
• It’s the Router which is in a Regular Area or All
interfaces of the Router are in a Regular Area.
Backbone Router
• It’s the Router which is in Area 0.
Area Border Router (ABR)
• It’s a Router which connects Backbone Area to
Regular Area.

Autonomous System Border Router (ASBR)


• It’s a Router which connects OSPF Routing Domain
with Another Routing Domain.
Commands
Router $ ospf $ Process ID
network $ A.B.C.0 $ W.W.W.W $ Area no
Enhanced Interior
Gateway Routing
Protocol
Protocol Number-
88
Chapter-11
EIGRP Fundamentals
 EIGRP is also called Advanced Distance Vector Routing Protocol.
 Converted to Open Standard, which uses
Multicast-Address:224.0.0.10
 EIGRP doesn’t form neighbour-ship over Secondary IPs.
 It’s composed of METRIC Value, which contains:

LOAD DELAY RELIABILITY MTU


(K2) (K3) (K4) (K5)

BANDWIDTH
(K1)
Metric Calculation

107 Sum Of Delay


256
Lowest Bandwidth 10
Lowest Bandwidth in kbps & Delay is in ms.

Note: Although EIGRP has 5 metrics but basically it works on


Bandwidth & Delay.
Lower Metric value is more preferred.
EIGRP Functions
Neighbor-ship Discovery &
Maintenance
(NDM)

Protocol InDependent
Module (PDM)

Reliable Transport
Protocol (RTP)
Types of Routing Table

RT
• Routing Table Diffusing Update
Algorithm (DUAL)

NT
• Neighbor-ship Table

TT
• Topology Table
• Hello Dead Timer: 15 sec for Broadcast & Point-Point
– 180 sec for Broadcast

Protocol inDependent Module (PDM)


• EIGRP supports:
 IP
 IPx
 AppleTalk Protocols
• It also creates different types of Routing Tables, as well
Neighbour-ship Requirements
 Things should be matched between two Routers:
 Authentication
 Metric (it should be same)
 Autonomous Synchronous (AS) Number

Autonomous Synchronous (AS) Number


It defines that how many Networks or Routers are connected in
same Administrative Unit.
Range: 1-65535 Given by IANA.
Diffusing Update Algorithm (DUAL)
 It provides fast convergence & unequal load balancing.
EIGRP Supports MD5 Authentication.

Terms Associated with DUAL


 Feasible Distance (FD)
 Advertised Distance/Reported Distance (AD/RD)
 Successor (S)
 Feasible Successor (FS)
Configuration in EIGRP Routing
R(config)# router $ eigrp $ AS number
R(config-router)# network $ A.B.C.D $ W.W.W.W
R(config-router)# no $ auto-summary

To Verify:
R# show ip eigrp neighbor
R# show ip eigrp topology (won’t show FS)
Switching
Chapter-12
• Switch provides
Reliable & Manageable Network.
• Good network design will improve performance and
also reduce the difficulties associated.
Switches

• Layer 2 Switches
 Performs only Switching.

• Layer 3 Switches
 Switching as well as Routing can be
performed.
Layer-1 (Physical Layer) Layer-2 (Data-Link Layer) Layer-3 (Multi-layer)

Hub & Repeaters Switches Multi-Layer Switches

Non Manageable because Manageable Manageable


of No Console availability
No MAC-Address Table MAC-Address Table MAC-Address Table
because of ASIC Chips because of ASIC Chips
No Switching Switching Available Switching as well as Routing
is available
No Series Series Series
1900 & 2950 available 3500, 3700, 6500 available
Only Hardware Hardware + Software Hardware + Software
Fundamentals
• Once the power cable is connected, the switch initiates a
series of tests called the power-on self test (POST).
• The System LED indicates the success or failure of POST.
Switch’s Mode

Global
Enable/ Configuration
User Mode Privilege Mode
• Interface
Mode Configuration Mode
• VLAN Mode
• Line Mode
• Its used for user login.
User Mode • Very basic commands can be used here.
“Switch>” • It’s a default mode.

• Troubleshooting is done in this scenario.


Enable/Privilege • Type Switch>”enable” to enter this mode.
Mode “Switch#” • This mode defines user privilege level by "show $
privilege"

Global Configuration • Router & Switch configuration is done here, eg:


SVI Addressing,
Mode Password Setting
“Switch(config)#” • Type Switch#”configure terminal” to enter.
Switch Command Modes
• Default mode ends with “>”
• Displays commands that change terminal settings,
USER MODE perform basic tests, and display system information.

• “Privileged Mode ends with “#”, using “enable” keyword


ENABLE MODE
• Troubleshooting steps is done in this mode.

• Enter the mode by using “ configure terminal”.


GLOBAL
CONFIGURATION
• Switch configuration is done in this mode.
MODE
Global Configuration Mode
• Interface mode:
Switch(config-if)#
 It’s used to put information on an
interface.

• VLAN Mode:
Switch(config-VLAN)#
 It’s used to enter into VLAN mode.
Virtual LAN (VLAN)

• By default, Layer-2 Switches creates, single Broadcast Domain.


• It can be broken through VLAN. So, it’s a Logical
Broadcast domain.
• By default, all ports of L-2 Switch are in VLAN-
1.
• Same VLAN users can communicate
with each other.
VLAN RANGE
• VLAN Range: 0 to 4095.
• Reserved VLANs: 0 & 4095.

VLAN

NORMAL RANGE DEFAULT VLANs


2 -1001 1, 1002 - 1005

EXTENDED RANGE
1006 - 4094
Configuration for VLAN
Switch#configure $ terminal
Switch(config)# vlan $ vlan-number
Switch(config-vlan)# Name $ name
Trunk
• Trunk is the link which carries
all the VLAN Traffic.
• Trunk ports are configured when:
 Two Switches OR
Switch & Router are connected.
Types of Trunk
• Static Trunk
It’s to be configured by the Network Admin
Manually.
Switch(c0nfig)#interface $ int-number
Switch(config-if)#switchport $ mode $
trunk

• Dynamic Trunk
By Default, it’s created on a Switch through DTP
Packets.
By Default, all Switch ports are in Dynamic Mode.
Inter-VLAN Routing
• It’s used in communication between different
VLANs.
• A Layer- 3 Device is required.
Eg: Router
• Sub-interfaces need to be configured, on
Router.
It’s tough to create VLAN on each & every port of
Switch, That’s why
VLAN Trunking Protocol ( VTP)
 All switches can be managed through a single switch,
through VTP.
VTP Versions:
 VTP Version 1
 VTP Version 2
 VTP Version 3
Administrator have to define each & every VLAN
individually, for Security Purpose.
VTP Modes

Server Mode Client Mode Transparent Mode


• Default configurated. • To be configured • Doesn’t participate in
• Sends/Receive Manually on Sw. VTP Domain.
information. • Receives configuration • Receives info and
• VLAN info can be from VTP Server. forward to all Sw.
Created, • VLAN info can’t be • Local Database can be
Deleted or Created, created.
Modified. Deleted or • Revision Number is
Modified ZERO, so , NO
INCREMENT can be
done.
VTP Configuration Requirements
• Domain Name should be configured.
• VTP password to be created, on every Switch for Security
Purpose.
• One Switch to be configured in Server Mode.

Revision Number Revision


Number
 Switch with Higher Revision Number
will send VTP info.
Changes in VLAN
VTP Configuration Vlan1

SWITCH3
Transparent Client
Server
SWITCH1 SWITCH2 Vlan 2 Vlan 3

SWITCH4
Vlan1 Client
Vlan1
Vlan 2
Vlan 3
Vlan 3 Vlan 2 Vlan1
 If two or more Switches are connected with each other then
loops can occur.

Spanning Tree Protocol (STP)


• ALayer-2 protocol,
used to prevent loops.
• First STP, created by Digital Equipment
Corporation, followed by:
802.1W Rapid Per VLAN Spanning Tree (RPVST) by
CISCO

802.1D Open standard by IEEE


 STP Process is based on
Bridge Protocol Data Unit(BPDU)
• BPDU contains information sent by Root Bridge.

 Configuration  Topology Change


BPDU’s Notification BPDU’s
STP Terminology
• Root Bridge Election (RB)
• Root Port Election (RP)
• Designated Port Election (DP)
• Non-Designated Port Election/ Blocked Port
Election (NDP/BP)
Root Bridge Election
• Every Switch participate in BPDU election.
• Decided through a combination of Priority &
MAC Address.
Priority
By DEFAULT, Priority is 32768, which keeps
on increasing as number of VLANs increase.
MAC Address Lower
Priority/
Lower MAC Address is preferred. Address
MAC

More
Preferred
Root Port (RP)
• Lowest Best Path to Root-Bridge will be elected
as RP.
Root Port Election
 Lowest Path Cost (depend on Link Band-Width)
 Lowest Neighbor Sender Bridge ID
 Lowest Neighbor Port Priority(Default 128, increases by 16)
 Lowest Neighbor Port ID Speed Cost
10 mbps 100
100 mbps 19
1 GB 4
10 GB 2
Designated Port (DP)
• It’s used to transmit the BPDUs.
Designated Port Election
 It’s same as the Election of Root Port (RP).
 All ports of Root Bridge Switch, will be DP because it’s
used to communicate, as a head starter.
Switch B has DP because:
 Cost is same.
 Priority is same as 32768.
 Switch B is preferred over Switch C because it has
Lower MAC-Address.
Blocked Port
• It only receive BPDUs & doesn’t transmit.
• It’s Temporarily Blocked it’s blocked only till
the time the port against it is DP.
SPANNING TREE TIMERS

Hello Time Max-Age Forward-


• 2-second. time Delay time
• In this time • 20 seconds. • 30 seconds.
switch • This time is for • It’s the time
broadcast it's outdated spent by a port
hello message. message. in learning and
listening states.
Spanning Tree Port States

Disable state: port is in down state

Blocking state: port only receives BPDU. (


20 Seconds)

Listening state: port moves from blocking


state if the switch think that port can be selected as
RP or DP. data frames cannot send/receive.
Learning state: This state is after
listening, the port moves into the learning
state.
The port cannot send the data frames, but
MAC addresses can be learned. ( 15-
Seconds)

Forwarding state: port can


send /receive data frames.
After listening & learning state, the
port enter into the forwarding state .
30 sec is total time for forwarding
data-frames.
PORT-FAST
• It decreases the conversion time for host port.
• This feature, bypass the port-state & change
the port-state into forwarding.
PORT-FAST
● It decreases the convergence time for host port.
● This feature, bypass the port-state & change the
port-state into forwarding.
● Two ways to enable this:
● -in global mode
● -on interface
CONFIGURING PORT-FAST
● On global mode
#spanning-tree $ portfast $ default
● On interface
#int <int no.>
#spanning-tree $ portfast
Network Address
Translation
Chapter-13
Need of NAT
• Shortage of IPv4 Addresses.
• Application of Host IPv4 has been forecasted in
2005.
• Although Addresses classes were replaced by usage
of CIDR but, it’s not sufficient.
Long Term Solution
• IPv6 or IPng (IP Next Generation), which provides an
extended Range of IP Addresses.
Short Term Solution
Network Address Translation (NAT)
What is NAT & Use
• It’s used to translate Private IP Addresses to Public IP
Addresses and vice versa.
• Whenever we need to connect to the Internet and
our hosts don’t have globally unique IP addresses.
• Both Cisco IOS devices and PIX/ASA firewalls support
NAT.
• NAT is not restricted to just public-to-private address
translations but:
public-to-public address translation, or
private-to-private address translation.
What does NAT Provide
• NAT provides Security.
• NAT really decreases the overwhelming amount of
public IP addresses required in the networking
environment. It saves COST.
NOTE: The most obvious advantage associated
with NAT is that it allows us to conserve our
legally registered address scheme.
That is why we haven’t run out of IPv4
addresses yet.
Private IPs vs. Public IPs
Private IPs Public IPs

It uses Private Address Range. It uses Public Address Range.

Local Addresses may not be used Public Addresses are Globally Unique.
externally.

192.168.1.0/24 172.168.1.0/24
Inside Global Outside Global
R1 ISP R3
10.1.1.0/24 30.1.1.0/24

SW1 SW3 Outside Local


Inside Local

1 2 3 7 8 9
NAT Terminology
INSIDE LOCAL

The term “inside” refers to an address used for a host inside an enterprise.
It is the actual IP address assigned to a host in the private enterprise network.
It is a Private Address.

INSIDE GLOBAL
NAT uses an “Inside Global” address to represent the inside host as the packet is
sent through the outside network, typically the Internet.

A NAT router changes the source IP address of a packet sent by an inside host from
an inside local address to an inside global address as the packet goes from the inside
to the outside network.
NAT Terminology
OUTSIDE GLOBAL
The term “Outside” refers to an address used for a host outside an enterprise, the
Internet.
An outside global is the actual IP address assigned to a host that resides in the
outside network, typically the Internet.

OUTSIDE LOCAL
NAT uses an outside local address to represent the outside host as the packet is
sent through the private enterprise network.

A NAT router changes a packet’s destination IP address, sent from an outside


global address to an inside host, as the packet goes from the outside to the inside
network.
TYPES OF NAT

• It’s used in One to One (Private to Public


Static NAT Address Translation).

• It matches Private IPs to a Pool of Public IPs but


Dynamic NAT Address Translation is still One to One. Example:
DHCP.

• NAT Translation is done with Port


Port Address
Number. It uses Public Address to
Translation translate many Private Addresses.
STATIC NAT
• It performs a static one-to-one translation between two addresses, or
between a portion one address to a port on another address.
• Static NAT is most often used to assign a public address to a device
behind a NAT-enabled firewall/router.
• Static version requires to have one real Internet IP address for every
host on your network.
Static NAT Configuration
1) Identify the Inside(usually Private) & Outside(Usually
Public) Interfaces:
interface $ f0/0 interface $ s2/0
Ip $ nat $ inside ip $ nat $ outside
2) Do the mapping:
ip $ nat $ inside $ source $ static $ Private-IP $ Public-IP
DYNAMIC NAT

• This version gives you the ability to map an


unregistered IP address to a registered IP
address from out of a pool of registered IP
addresses.
• But still we need registered IP addresses for
everyone who’s going to send packets to and
receiving them from the Internet at the same
time.
•1) The
IdentifyDynamic Entry
the Inside(usually in& the
Private) NAT Table
Outside(Usually Public) stays in, as
Interfaces:
long $as
interface f0/0traffic flows occasionally.
interface $ s2/0
Ip $ nat $ inside ip $ nat $ outside
Configuration Dynamic NAT
ip $ nat $ pool $ NB $ <200.168.13.1> $ <200.168.13.255> $
netmask $ 255.255.255.0
access-list $ 1 $ permit $ <inside local’s IP Add/Net> $
<Wild-Card Mask>
ip $ nat $ inside $ source $ list $ 1 $ pool $ NB
{We create access list to permit IP address <inside
local>}
• ip nat pool NB 170.168.2.1 192.168.2.254 netmask 255.255.255.0 command creates a
pool of addresses that will be distributed to those hosts that require global addresses.
• ip nat inside source list 1 pool NB command tells the router to translate IP addresses that
match access-list 1 to an address found in the IP NAT pool named NB.
Overloading
or PAT (Port Address Translation)
• We can have thousands of users connected to
the Internet using only one real global IP
address using port numbers.
 The only differences between this configuration and the
previous dynamic NAT configuration:
 The pool of addresses has shrunk to only one IP
address and at the end of ip nat inside source
command we included the overload keyword.
Configuration PAT
ip $ nat $ pool $ NB $ <192.168.13.1> $
<192.168.13.255> $ netmask $ 255.255.255.0
access-list $ 1 $ permit $ 10.1.1.0 $ 0.0.0.255
ip $ nat $ inside $ source $ list $ 1 $ interface $ s2/0 $
overload

int f0/0 int S2/0


ip nat inside ip nat outside
Verification NAT
Router#show ip nat translations
It might show many translations from the same host to the same host at the
destination.
This is typical of many connections to the same server.
Router#debug ip nat
This output will show the sending address, the translation, and the
destination address on each debug line.
Router#clear ip nat translation *
To clear all entries from the NAT table, use an asterisk (*) at the end of the
command.
Access Control
List
Chapter-14
Access Control List
• It’s used to filter the Packet Traffic.
• ACL defines the set of rules that Routers use to
identify particular type of traffic.
• ACL can be used to filter both Incoming as well as
Outgoing traffic.
• ACL is widely used for Networking Security &
Traffic Control.
• Types of Filtering:
–  Traffic Filtering: Access Control List is used.
–  Route Filtering: Filter the Routes from the
Routing Table.
Rules for ACL
1) Create Access List in Global Configuration Mode
 Deny/Permit the traffic for particular
Host/Network.
 ACL Matchup with Sequence Number
(ACL 10 Default).
IMPLICITY OF DENY: By default Last statement
is of Deny in an ACL.
2) Apply Access List on Interface Configuration Mode.
 It’s applied on Inbound/Outbound traffic.
Types of ACL
ACL

Numbered Named
ACL ACL

Standard Extended Time Based


ACL ACL ACL
Standard ACL
• In it, we can Permit/Deny the traffic for whole TCP/IP
stack. Range: 1-99 & 1,300-1,999
• It uses Source Address.
• It should be placed close to the destination.
• It blocks Source to Destination or opposite’s access in
the Network.
Specific PC Deny: If only one computer has to be denied
Full Network Deny: If the whole network has to be
denied.
• Disadvantage:
–  It can’t filter the traffic for any particular protocol.
Configuration in Standard ACL
To Block one Specific Computer:
access-list $ <1-99> $ <permit/deny> $ host $ <N.N.N.H>
Access-list $ <1-99> $ permit $ any
To Apply:
int $ s0/0 OR int f0/0
ip $ access-group $ <1-99> $ <out> ip $ access-group $ <1-99> $ <out>
To Block one Whole Network:
access-list $ <1-99> $ <permit/deny> $ <N.N.N.H> $ <W.W.W.W>
Access-list $ <1-99> $ permit $ any
To Apply:
int $ s0/0 OR int $ f0/0
ip $ access-group $ <1-99> $ <in> ip $ access-group $ <1-99> $ <out>
Extended ACL
• In it, we can filter the traffic for any specific
Range: 100-199 & 2,000-2,699
Protocol from TCP/IP stack.
– Example: HTTP, DNS, DHCP, FTP, Telnet
• It uses both Source as well as Destination
Addresses.
Configuration in Extended ACL
To Create:
access-list $ <100-199> $ <permit/deny> $ <TCP> $ <N.N.N.N> $ <W.W.W.W> $
<N.N.N.N> $ <W.W.W.W> $ <eq/lt/gt> $ <telnet/ HTTP/ICMP>
Access-list $ <100-199> $ permit $ any $ any
access-list $ <100-199> $ deny $ ip $ <N.N.N.N.> $ <W.W.W.W>
$ <N.N.N.N> $ <W.W.W.W>
To Apply:
int $ s0/0
ip $ access-group $ <100-199> $ <in/out>

Instead of Writing Telnet we can write Port Number of Telnet-23


Port Number of HTTP-80 & so on…..
Internet Protocol
Version 6 (IPv6)
Chapter-15
• IPv6
128 bit hexadecimal
larger address space
more secure & faster than IPv4
Uses ICMP version 6
doesn’t use ARP

IPv6 contains 8 fields and each field contains 16


bits.
1stField: 2ndField: 3rdField: 4thField: 5thField:
6thField: 7thField: 8thField
• IPv6 Shortened expression:
1) Leading 0’s
IPv6 Address: 2001:abc0:0000:0090:0070:6c00:7a00:0090

Leading Zero Notation:


2001:abc0:0:0090:0070:6c00:7a00:0090

2) Double Colon [::]


IPv6 Address: 2001:0000:9c00:0000:0000:6c00:7a00:0090

Double Colon Notation:


2001:0:9c00::6c00:7a00:0090
Only one Double Colon can be used in an IPv6 Address.
• IPv6 Address Types:
Unicast: One to one
Multicast: One to many
Any-cast: One to any

Unicast is further divided:

Global Unicast: can be compared to Public IPs in


IPv4

Link-Local: APIPA (Range of APIPA: 169.254.0.0


to 169.254.255.255)

Unique-Local: can be compared to Private IPs in


IPv4
• Global Unicast:
Range: 2000 or 3
2001::/64

Link Local:
Range: FE80::/10

Unique Local:
Range: FC00::/8

Multicast:
Range: FF00::/8

Any-cast: NO RANGE DEFINED.


• Well Known IPv6 Addresses:
::1 for LOOP-BACK
::A:B:C:D IPv4 & IPv6 Compatible
Address.
::10 Default routing

IPv6 Address can be assigned in three ways:


a) Statically
b) Auto Configuration
c) DHCP version 6
• In IPv6 Routing
firstly, we enable Routing Process in Global-
Configuration Mode.
Secondly, its applied on Interface-Mode.

IPv6 Routing Types:


 Static Routing
 Dynamic Routing
Dynamic Routing has different sub-types:
 Distance Vector Routing Protocol RIPng
 Link State Routing Protocol OSPFv3
 Hybrid Routing Protocol EIGRPv6

RIPng: Routing Information Protocol, Next Generation


• RIPng:
– Works on 521-UDP port
– Multicast Address used is FF02::9
– All features are same as IPv4 RIPv2

• EIGRPv6:
– Works on 88-IP protocol Number
– Multicast Address used is FF02::A
– All features are same as IPv4, EIGRP.

• OSPFv3:
– Works on 89-IP protocol Number
– Multicast Address used is FF02::5( for broadcast to all) &
FF02::6(for multicast to Designated Router)
– All features are same as IPv4, OSPF.

Potrebbero piacerti anche