0% found this document useful (0 votes)
332 views143 pages

CCNA Tutorial

This document provides an overview of networking fundamentals including network components, network segments, network backbones, data transmission modes, and physical topologies. It describes common network devices like routers and switches, networking protocols like TCP/IP and routing protocols, and networking concepts like subnetting, routing, switching, VLANs, and redundancy protocols. The document serves as a study guide for the CCNA certification which covers these essential networking topics.

Uploaded by

Suresh Patel
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)
332 views143 pages

CCNA Tutorial

This document provides an overview of networking fundamentals including network components, network segments, network backbones, data transmission modes, and physical topologies. It describes common network devices like routers and switches, networking protocols like TCP/IP and routing protocols, and networking concepts like subnetting, routing, switching, VLANs, and redundancy protocols. The document serves as a study guide for the CCNA certification which covers these essential networking topics.

Uploaded by

Suresh Patel
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/ 143

Network Fundamentals, CCNA, CCNS

CCNA

NETWORKING ................................................................................................ 1
OSI Reference Model ...................................................................................... 9
TCP/IP Protocol ............................................................................................ 14
IP Address .................................................................................................... 16
IP Headers.................................................................................................... 19
TCP Header .................................................................................................. 21
UDP Header ................................................................................................. 22
SUBNETTING ................................................................................................ 23
Routers ........................................................................................................ 29
Understanding the Connectivity ................................................................... 37
Basic IP configuration .................................................................................. 38
WAN Protocols ............................................................................................. 42
Routing ........................................................................................................ 44
Routing Information Protocol V1 (RIP V1) .................................................... 54
Enhanced Interior Gateway Routing Protocol (EIGRP) .................................. 58
OSPF ............................................................................................................ 67
Access Control List (ACL) ............................................................................... 76
Network Address Translation (NAT) ............................................................. 85
Static NAT Practical ...................................................................................... 88
Dynamic NAT Practical ................................................................................. 91
Port Address Translation Practical ............................................................... 94
Password Reset of Router ............................................................................ 97
Backing Up and Restoring the Cisco OS ...................................................... 100
Switching ................................................................................................... 104
Trunking .................................................................................................... 111
DTP (Dynamic Trunking Protocol) ............................................................... 115

Aashka Infocom Pvt. Ltd., M: 9376007676 0


Network Fundamentals, CCNA, CCNS

Inter-vlan Routing ...................................................................................... 116


Spanning Tree Protocol .............................................................................. 119
First Hop Redundancy Protocols ................................................................. 122
Hot Standby Router Protocol (HSRP) Tutorial ............................................. 124
Virtual Router Redundancy Protocol .......................................................... 128
Gateway Load Balancing Protocol .............................................................. 128
HSRP Configuration .................................................................................... 131
VRRP Configuration ................................................................................... 134
GLBP Configuration .................................................................................... 138

Aashka Infocom Pvt. Ltd., M: 9376007676 1


Network Fundamentals, CCNA, CCNS

NETWORKING
 Networks
A network is a group of devices that are connected together to communicate and
share network resources such as files and peripheral devices. No two networks
are alike in size or in configuration. Each network, however, includes common
components that provide the resources and communications channels necessary
for the network to operate.

 Network Segments
A segment is a subdivision of a network that links a number of devices or serves
as a connection between two nodes. A segment is bounded by physical
internetworking devices such as switches and routers. All nodes attached to a
segment have common access to that portion of the network.

Aashka Infocom Pvt. Ltd., M: 9376007676 1


Network Fundamentals, CCNA, CCNS

 The Network Backbone


The network backbone is a very-high-speed transmission path that carries
the majority of network data. It connects either small networks into a larger
structure or server nodes to a network where the majority of client devices are
attached. Network backbones can take many different forms, such as a bus,
cloud, or mesh. The technology in use on a backbone network can be different
from that used on client network sections. Since the backbone cabling connects
switches and routers on a network, it can carry more traffic than other types of
cabling on the network.

In a local area network (LAN), a typical network backbone is one or more


core level switches, or several switches connected together by trunk links. In a
wireless area network (WAN), a typical backbone is an asynchronous transfer
mode (ATM) or frame relay cloud.

Aashka Infocom Pvt. Ltd., M: 9376007676 2


Network Fundamentals, CCNA, CCNS

 DATA TRANSMISSION MODES


Communication between two devices can be simplex, half-duplex, or full-duplex.

Simplex:
In simplex mode, the communication is unidirectional, as on a one-way
street. Only one of the two devices on a link can transmit; the other can only
receive. Keyboards and traditional monitors are examples of simplex devices. The
keyboard can only introduce input; the monitor can only accept output. The
simplex mode can use the entire capacity of the channel to send data in one
direction.

Half-Duplex:
In half-duplex mode, each station can both transmit and receive, but not
at the same time. When one device is sending, the other can only receive, and
vice versa. In a half-duplex transmission, the entire capacity of a channel is taken
over by whichever of the two devices is transmitting at the time. Walkie-talkies
and CB (citizens band) radios are both half-duplex systems. The halfduplex mode
is used in cases where there is no need for communication in both directions at
the same time; the entire capacity of the channel can be utilized for each direction.

Full-Duplex:
In full-duplex both stations can transmit and receive simultaneously. The
full-duplex mode is like a two way street with traffic flowing in both directions at
the same time. In full-duplex mode, signals going in one direction share the
capacity of the link: with signals going in the other direction. One common
example of full-duplex communication is the telephone network. When two people
are communicating by a telephone line, both can talk and listen at the same time.

The full-duplex mode is used when communication in both directions is required

Aashka Infocom Pvt. Ltd., M: 9376007676 3


Network Fundamentals, CCNA, CCNS

all the time. The capacity of the channel, however, must be divided between the
two directions.

 PHYSICAL TOPOLOGY:
The term physical topology refers to the way in which a network is laid out
physically. One or more devices connect to a link; two or more links form a
topology. The topology of a network is the geometric representation of the
relationship of all the links and linking devices (usually called nodes) to one
another. There are four basic topologies possible: mesh, star, bus, and ring.

1. Mesh:
In a mesh topology, every device has a dedicated point-to-point link to every
other device. The term dedicated means that the link carries traffic only between
the two devices it connects. To find the number of physical links in a fully
connected mesh network with n nodes, we first consider that each node must be
connected to every other node. Node 1 must be connected to n - I nodes, node 2
must be connected to n – 1 nodes, and finally node n must be connected to n - 1
nodes. We need n(n - 1) physical links. However, if each physical link allows
communication in both directions (duplex mode), we can divide the number of
links by 2. In other words, we can say that in a mesh topology, we need n(n -1)
/2 duplex-mode links. To accommodate that many links, every device on the
network must have n – 1 input/output ports to be connected to the other n - 1
stations.

 Advantages:
 The use of dedicated links guarantees that each connection can carry its own
data load, thus eliminating the traffic problems that can occur when links
must be shared by multiple devices.
 A mesh topology is robust. If one link becomes unusable, it does not
incapacitate the entire system.
 There is the advantage of privacy or security. When every message travels
along a dedicated line, only the intended recipient sees it. Physical
boundaries prevent other users from gaining access to messages.

Aashka Infocom Pvt. Ltd., M: 9376007676 4


Network Fundamentals, CCNA, CCNS

Point-to-point links make fault identification and fault isolation easy. Traffic
can be routed to avoid links with suspected problems. This facility enables
the network manager to discover the precise location of the fault and aids in
finding its cause and solution.
 Disadvantages:
 Disadvantage of a mesh are related to the amount of cabling because every
device must be connected to every other device.
 Installation and reconnection are difficult.
 The sheer bulk of the wiring can be greater than the available space (in walls,
ceilings, or floors) can accommodate.
 The hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive.

2. Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub. The devices are not directly linked to one another.
Unlike a mesh topology, a star topology does not allow direct traffic between
devices. The controller acts as an exchange: If one device wants to send data to
another, it sends the data to the controller, which then relays the data to the other
connected device.

 Advantages:
 A star topology is less expensive than a mesh topology. In a star, each device
needs only one link and one I/O port to connect it to any number of others.
 Easy to install and reconfigure.

Aashka Infocom Pvt. Ltd., M: 9376007676 5


Network Fundamentals, CCNA, CCNS

 Far less cabling needs to be housed, and additions, moves, and deletions
involve only one connection: between that device and the hub.
 Other advantage include robustness. If one link fails, only that link is
affected. All other links remain active. This factor also lends itself to easy
fault identification and fault isolation. As long as the hub is working, it can
be used to monitor link problems and bypass defective links.

 Disadvantages:
 One big disadvantage of a star topology is the dependency of the whole
topology on one single point, the hub.
 If the hub goes down, the whole system is dead. Although a star requires far
less cable than a mesh, each node must be linked to a central hub.
 For this reason, often more cabling is required in a star than in some other
topologies (such as ring or bus).

3. BUS:
A bus topology is multipoint. One long cable acts as a backbone to link all the
devices in a network. Nodes are connected to the bus cable by drop lines and
taps. A drop line is a connection running between the device and the main cable.
A tap is a connector that either splices into the main cable or punctures the
sheathing of a cable to create a contact with the metallic core. As a signal
travels along the backbone, some of its energy is transformed into heat.
Therefore, it becomes weaker and weaker as it travels farther and farther. For
this reason there is a limit on the number of taps a bus can support and on the
distance between those taps.

Aashka Infocom Pvt. Ltd., M: 9376007676 6


Network Fundamentals, CCNA, CCNS

 Advantages:
 Advantages of a bus topology include ease of installation.
 Backbone cable can be laid along the most efficient path, then connected to
the nodes by drop lines of various lengths. In this way, a bus uses less cabling
than mesh or star topologies.
 In a star, for example, four network devices in the same room require four
lengths of cable reaching all the way to the hub. In a bus, this redundancy is
eliminated. Only the backbone cable stretches through the entire facility.
Each drop line has to reach only as far as the nearest point on the backbone.

 Disadvantages:
 Disadvantages include difficult reconnection and fault isolation.
 A bus is usually designed to be optimally efficient at installation. It can
therefore be difficult to add new devices. Signal reflection at the taps can
cause degradation in quality. This degradation can be controlled by limiting
the number and spacing of devices connected to a given length of cable.
 Adding new devices may therefore require modification or replacement of the
backbone.
 In addition, a fault or break in the bus cable stops all transmission, even
between devices on the same side of the problem. The damaged area reflects
signals back in the direction of origin, creating noise in both directions.

4. RING: In a ring topology, each device has a dedicated point-to-point connection


with only the two devices on either side of it. A signal is passed along the ring in
one direction, from device to device, until it reaches its destination. Each device
in the ring incorporates a repeater. When a device receives a signal intended for
another device, its repeater regenerates the bits and passes them along.

Aashka Infocom Pvt. Ltd., M: 9376007676 7


Network Fundamentals, CCNA, CCNS

 Advantages:
 A ring is relatively easy to install and reconfigure.
 Each device is linked to only its immediate neighbors (either physically or
logically). To add or delete a device requires changing only two connections.
The only constraints are media and traffic considerations (maximum ring
length and number of devices).
In addition, fault isolation is simplified. Generally in a ring, a signal is
circulating at all times. If one device does not receive a signal within a
specified period, it can issue an alarm. The alarm alerts the network
operator to the problem and its location.

 Disadvantages:
 Unidirectional traffic can be a disadvantage.
 In a simple ring, a break in the ring (such as a disabled station) can disable
the entire network. This weakness can be solved by using a dual ring or a
switch capable of closing off the break.
 Ring topology was prevalent when IBM introduced its local-area network
Token Ring. Today, the need for higher-speed LANs has made this topology
less popular.

Aashka Infocom Pvt. Ltd., M: 9376007676 8


Network Fundamentals, CCNA, CCNS

OSI Reference Model


OSI was developed by the International Organization for Standardization (ISO)
and introduced around 1980.

It is a layered architecture (consists of seven layers) which define and explains


how the communication happens in between two or more network devices within
the internet.

Each layer define set of function in data communication.

Application

Presentation

Session

Transport

Network

Data Link
Physical

 Physical layer (Layer 1)


 It deals with physical transmission of binary data on the given media (copper,
fiber, wireless…).
 It also deals with electrical, mechanical and functional specifications of the
devices, media etc.
 The major functions described at this layer are:
Encoding/decoding: It is the process of converting the binary data into signals
based on the type of the media.
 Copper media : Electrical signals of different voltages
 Fiber media : Light pulses of different wavelengths
 Wireless media : Radio frequency waves.

Mode of transmission of signals: Signal communication happens in three


different modes Simplex, Half-duplex and Full-duplex.
 Devices works at physical layer are Hub, Modems, Repeater and Transmission
Media.

 Data-link Layer (Layer 2)


 It is responsible for end-to-end delivery of data between the devices on a LAN
network segment. Data link layer comprises of two sub-layers.
1) MAC (Media Access Control)
2) LLC (Logical Link Control)

Aashka Infocom Pvt. Ltd., M: 9376007676 9


Network Fundamentals, CCNA, CCNS


It deals with hardware addresses (MAC addresses).

MAC addresses are 12 digit Hexa-decimal identifiers used to identify the
devices uniquely on the network segment.
 It also provides ERROR DETECTION using CRC (Cycle Redundancy
Check) and FRAMING (Encapsulation).
 Examples: Ethernet, Token ring etc.
 It deals with Layer 3 (Network layer).
 Device works at data link layer are Switch, Bridge, NIC card.

 Network Layer (Layer 3)


 It is responsible for end-to-end transporting of data across multiple networks.
 Logical addressing & path determination (Routing) are described at this layer.
 The protocols works at network layer are:
1) Routed Protocols
 Routed protocols acts as data carriers and define logical addressing.
 IP, IPX, AppleTalk etc.
2) Routing Protocols:
 Routing protocols performs path determination (Routing).
 RIP, IGRP, EIGRP, OSPF etc.
 Device works at Network layer are Router, Multilayer switch etc.

 Transport Layer (Layer 4)


 It is responsible for end-to-end transportation of data between applications.
 The major functions described at the Transport Layer are:
 Identifying Service
 Multiplexing & De-multiplexing
 Segmentation
 Sequencing & Reassembling
 Error Correction
 Flow Control
 Identifying a Service: Service are identified at this layer with the help of Port
No’s. The major protocols which takes care of data transportation at transport
layer are TCP and UDP.

TCP UDP
 Transmission Control Protocol  User Define Protocol
 Connection Oriented  Connection Less
 Reliable Communication (With  Unreliable communication (no Ack’s)
Ack’s)  Faster data transportation
 Slower data Transportation  Protocol No is 17
 Protocol No is 6  DNS, DHCP, TFTP
 HTTP, FTP, SMTP

Aashka Infocom Pvt. Ltd., M: 9376007676 10


Network Fundamentals, CCNA, CCNS

 Session Layer (Layer 5)


 It is responsible for establishing, maintaining and terminating the sessions.
 It deals with session of interaction between the applications.
 Session ID is used to identify a session or interaction ex. RPC, SQL, NFS.

 Presentation Layer (Layer 6)


 Presentation Layer is responsible for defining a standard format for the data.
 It deals with data presentation.
 The major function described at this layer are:
 Encoding – Decoding
o ASCII, EBCDIC (text)
o JPEG, GIF, TIFF (Graphics)
o MIDI, WAV (Voice)
o MPEG, DAT, AVI (Video)
 Encryption – Decryption
o DES, 3-DES, AES
 Compression – Decompression
o Predictor, Stacker, MPPC

 Application Layer (Layer 7)


 Application Layer is responsible for providing an interface for the user to interact
with Application services or Networking services.
 Identifying of services is done using port numbers.
 Port is a logical communication channel.
 Port number is a 16 bit identifier.
 Total Ports : 0 – 65535
 Reserved Ports : 1 – 1023
 Unreserved Ports : 1024 – 65535

Service Port No.


HTTP 80

FTP 21

SMTP 25

TELNET 23

TFTP 69

Aashka Infocom Pvt. Ltd., M: 9376007676 11


Network Fundamentals, CCNA, CCNS

 How to travels through the layers of the OSI model

 Summarize all the important functions of each Layer.


Protocol
N
Layer Popular Protocol Data Device
o
Unit
7 Application User support HTTP, FTP TFTP, Telnet Data -
Layers
6 Presentation or WMV, JPG, GIF, WAV Data -
Software
5 Session Layers SQL, RPC Data -
Core Layer of
4 Transport TCP, UDP Segment -
OSI
3 Network Network IP, IPX, AppleTalk Packet Router
support Layers
2 Data Link or LAN, WAN Frame Switch
Hardware
1 Physical Layers Ethernet Bit (0, 1) Hub

Aashka Infocom Pvt. Ltd., M: 9376007676 12


Network Fundamentals, CCNA, CCNS

Original Data

Application Data

Presentation Data

Session Data

Segment
Transport

Packet
Network

Frame
Data Link
Bits
Physical
Header Data

Aashka Infocom Pvt. Ltd., M: 9376007676 13


Network Fundamentals, CCNA, CCNS

TCP/IP Protocol
The transmission Control Protocol / Internet Protocol (TCP/IP) suit was created by
the Department of Defense (DoD).

The DoD Model is divided in 4 layers:-

 The Process / Application Layer


 The Transport Layer
 The Internet Layer
 The Network-access Layer

Application

Presentation Application

Session

Transport Transport

Network Internet

Data Link
Network Access
Physical

 Process/Application Layer
 TCP/IP application layer protocols provide service to the application software
running on a computer. The application layer does not define the application itself
but it defines services that applications need.
 For example application protocol HTTP define how web browsers can pull the
content of a webpage from a web server.
 Examples for this layer are: Telnet, FTP, TFTP, SNMP, NFS, DNS, DHCP etc.
HTTP
 Allow to access webpage
Telnet
 Telnet is used for Terminal Emulation.
 To allows a user sitting on remote machine to access the resources of
another machine.
FTP (File Transfer Protocol)
 It allows you to transfer files from one machine to another.
 It also allows access to both directories and files.
TFTP
 This is stripped down version of FTP.
 It has no directory browsing abilities.
 It can only send and receive files.

Aashka Infocom Pvt. Ltd., M: 9376007676 14


Network Fundamentals, CCNA, CCNS

SNMP (Simple Network Management Protocol)


 SNMP enable a central management of network.
 Using ANMP an administrator can watch the entire network.
 It uses UDP for transportation of the data.
DNS (Domain Name Service)
 DNS resolves FQDN with IP address.
 DNS allow you to use a domain name to specify and IP address.
 It maintain a database for IP address and Hostnames.
DHCP (Dynamic Host Configuration Protocol)
 Dynamically assign IP address to host.

 Transport Layer

TCP UDP
 Transmission Control Protocol  User Define Protocol
 Connection Oriented  Connection Less
 Reliable Communication (With  Unreliable communication (no
Ack’s) Ack’s)
 Slower data Transportation  Faster data transportation
 Protocol No is 6  Protocol No is 17
 HTTP, FTP, SMTP  DNS, DHCP, TFTP

 The Internet Layer Protocol


Internet Protocol (IP)
 Provide connectionless, best-effort delivery routing of datagram’s.
 IP is not connection with the content of the datagram’s.
 It looks for a way to move the datagram’s to their destination.
Internet Control Message Protocol (ICMP)
 ICMP message are carried in IP datagram’s and used to send error and
control message.
 The following are some common events and messages that ICMP relates
to:
o Destination Unreachable
o Ping
Address Resolution Protocol (ARP)
 ARP works at internet layer of DoD model.
 It is used to resolve MAC address with the help of a known IP address.
RARP (Reserve ARP)
 This also works at Internet Layer.
 It works exactly opposite of ARP.
 It resolves an IP address with the help of a known MAC address.
 DHCP is the example of an RARP implementation.

Aashka Infocom Pvt. Ltd., M: 9376007676 15


Network Fundamentals, CCNA, CCNS

IP Address
 IP Address is logical Address. It is network layer address (Layer 3).
 IP address is given to every device in the network and it is used to identify the
device with in the network.
 Two version of IP:
IP version 4 is a 32 bit address

IP version 6 is a 128 bit address

 IP Version 4
 Bit is represented by 0 or 1 (Binary)
 32 bit IP address are divided into 4 Octets:
01010101.00000101.10111111.00000001

 IP address in decimal form: 85.5.191.1

 IP version 6
 128 bit address is divided along 16 bit boundaries and each 16 bit block is
converted to a 4 digit hexadecimal number and separated by colons.

FD00:0DB8:7654:3210:2C4C:BA17:7124:0032

 Binary to decimal conversion


 Taking example of first octet:
 Total 8 bits, value will be 0 or 1
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 = 0 Total IP Address
Range
0 0 0 0 0 0 0 1 = 1
0 0 0 0 0 0 1 0 = 2 0.0.0.0
0 0 0 0 0 0 1 1 = 3
To
0 0 0 0 0 1 0 0 = 4
. . . . . 255.255.255.255
. . . . .
. . . . .
1 1 1 1 1 1 1 1 = 255

Aashka Infocom Pvt. Ltd., M: 9376007676 16


Network Fundamentals, CCNA, CCNS

 IPv4 address classifications


 Total IP address range of IPv4 is 0.0.0.0 to 255.255.255.255.255
 IP addresses are divided into 5 classes

Network Range of Private IP


IP Class Subnet mask CIDR
& Host Network (free to use)
10.0.0.0 to
Class A N.H.H.H 0 to 127 255.0.0.0 /8
10.255.255.255
128 to 172.16.0.0 to
Class B N.N.H.H 255.255.0.0 /16
191 172.31.255.255
192 to 192.168.0.0 to
Class C N.N.N.H 255.255.255.0 /24
223 192.168.255.255
224 to
Class D Multicast -
239
Class E Reserved

 Host:- a specific device in the network


 Network:- set of device
 CIDR:- Classless Inter Domain Routing

 No of Network and Host


 Class A: - 126 Networks & 16777214 Host per Network
 Class B: - 16384 Networks & 65534 Hosts per Network
 Class C: - 2097152 Networks & 254 Hosts per Network

 Network Address
 First IP address of the range.
 It represents the complete network and cannot be assigned to any device.
 The network address is represented with all bits as zero in the host portion of
the address.

 Broadcast Address
 The last IP address of the range.
 Used to send the broadcast with the network and cannot be assigned to any device
in the network.
 The broadcast address is represented with all bits as ones in the host portion of
the address.

 Valid addresses
 Valid IP addresses lie between the network address and the broadcast address.
 Only valid IP address are assigned to hosts/clients or any other device in the
network.

Aashka Infocom Pvt. Ltd., M: 9376007676 17


Network Fundamentals, CCNA, CCNS

 Subnet mask
 It’s an address which is used to identify the network and host portion of an IP
address.

Class A N.H.H.H 255.0.0.0

Class B N.N.H.H 255.255.0.0

Class C N.N.N.H 255.255.255.0

 Subnet mask differentiates network portion and Host portion.


 Subnet mask is been given for network identification of a host ID.
 Represented with all 1’s in the network portion and with all 0’s in the host portion.

Private IP Public IP
 Used with the LAN or within the  Used on public network (INTERNET).
organization.
 Not recognized by the administrator.  Recognized on internet.
 Unique within the network or  Given by the service provider (from
organization. IANA)
 Globally unique.
 Free.  Pay to service provider (or IANA).
 Unregistered IP.  Registered.

 Default Gateway
 The IP address of the router Ethernet address connecting to the LAN.
 It is an entry and exit point of the network.

Aashka Infocom Pvt. Ltd., M: 9376007676 18


Network Fundamentals, CCNA, CCNS

IP Headers
Unlike a post office, a router or computer cannot determine the size of a package
without additional information. Therefore, additional information is required at the
internet layer, in addition to the source and destination IP addresses.

Figure is a logical representation of the information that is used at the internet


layer to enable the delivery of electronic data. This information is called a Header.

0 15 16 31
Version Length Type of Service Total Length
(4-bit) (4-Bit) (8-bit) (16-bit)
Identification Flag Fragment
(16-bit) (3-bit) (13-bit)

20 byte
Time to Live Protocol Checksum
(8-bit) (8-bit) (16-bit)

Source IP address (32-bit)

Destination IP address (32-bit)

Data

 Time to Live (TTL)


 The TTL field is initially set to a number and decremented by every router that is
passed through. When TTL reaches 0 the packet is discarded.
 Its limit the datagram’s live. If the packet doesn’t gets to its destination the TTL
expires.
 It uses a HOP count and at every routers the HOP count will decreases by one.

 Total Length
 Specifies the length of the IP packet that includes the IP header and the user data.
 The length field is 2 bytes, so the maximum size of an IP packet is 65,535 bytes.

 Fragment
 Used to fragmentation and reassembly if the packet is too large to put in frame.
 Example consider 3980 Bytes of data and one fragment is about 1500 byte.

Aashka Infocom Pvt. Ltd., M: 9376007676 19


Network Fundamentals, CCNA, CCNS

For 1st fragment:-


 Byte => 1480 byte + 20 byte (Header size)
=> 1500 byte (Total Length of fragment)
 Offset => 0
 Flag => 1 (Meaning there is more data)
 Identification => 777 (random number given to all packet)
For 2nd fragment:-
 Byte => same
 Offset => 8 X ? = 1480 (Here, ? = 185). So, offset = 185
 Flag => 1
 ID => 777
For 3 fragment:-
rd

 Byte => 3980-2960


 Offset => 8 X ? = 2960 (Here, ? = 370). So, offset = 370
 Flag => 0 (No more remaining data)
 ID => 777

 Version
 A 4-bit field that identifies the IP version being used. The current version is 4, and
this version is referred to as IPv4.

 Type of service & Priority


 Type of data and priority of data.

 Length
 A 4-bit field containing the length of the IP header in 32-bit increments.

Aashka Infocom Pvt. Ltd., M: 9376007676 20


Network Fundamentals, CCNA, CCNS

TCP Header
0 15 16 31

Source Port (16-bit) Destination Port (16-bit)

Sequence Number (32-bit)

Acknowledgement Number (32-bit)

Offset Reserved Code


Window Size (16-bit)
(4-bit) (6-bit) (6-bit)

Check Sum (16-bit) Urgent Pointer (16-bit)

Data

 Source and Destination Port


 Source and destination TCP port numbers are the communication endpoints for
sending and receiving devices.

Service Port No.

HTTP 80
FTP 21
SMTP 25

TELNET 23

TFTP 69

 Sequence and acknowledgement number


 Message senders use sequence numbers to mark the ordering of a group of
messages. Both senders and receivers use the acknowledgment numbers field to
communicate the sequence numbers of messages that are either recently received
or expected to be sent.

 Code
 TCP uses a set of six standard and three extended control flags (each an individual
bit representing on or off) to manage data flow in specific situations

Aashka Infocom Pvt. Ltd., M: 9376007676 21


Network Fundamentals, CCNA, CCNS

 Window
 TCP senders use a number called window size to regulate how much data they
send to a receiver before requiring an acknowledgment in return.

UDP Header
0 15 16 31

Source Port (16-bit) Destination Port (16-bit)

UDP Length (16-bit) Checksum (16)

Data

Aashka Infocom Pvt. Ltd., M: 9376007676 22


Network Fundamentals, CCNA, CCNS

SUBNETTING
 Subnetting is the process of dividing a Single network into multiple smaller
networks.
 Converting host bits into network bits i.e. converting 0’s into 1’s.
 Subnetting helps in minimizing the wastage of IP address.
 Subnetting can be performing in two ways.
1. FLSM (Fixed Length Subnet Mask)
2. VLSM (Variable Length Subnet Mask)
 Subnetting can be done based on requirement.
 Requirement of Hosts. (2h - 2 = requirement)
 Requirement of Networks. (2n = requirement)

21 = 2 29 = 512
22 = 4 210 = 1024
23 = 8 211 = 2048
24 = 16 212 = 4096
25 = 32 213 = 8192
26 = 64 214 = 16384
27 = 128 215 = 32768
28 = 256 216 = 65536

Value in Subnet Mask


Mask
Bit Value
128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0 0 128
2 1 1 0 0 0 0 0 0 192
3 1 1 1 0 0 0 0 0 224
4 1 1 1 1 0 0 0 0 240
5 1 1 1 1 1 0 0 0 248
6 1 1 1 1 1 1 0 0 252
7 1 1 1 1 1 1 1 0 254
8 1 1 1 1 1 1 1 1 255

Aashka Infocom Pvt. Ltd., M: 9376007676 23


Network Fundamentals, CCNA, CCNS

 FLSM Examples

(1) Class C: - 192.168.1.0 /24, 255.255.255.0.

Borrow one bit from host to network then,

IP: - 192.168.1.0 /25


Subnet: - 255.255.255.128

Now, Sub network = 2n = 21 = 2


Host = 2h – 2 = 27 – 2 = 126 Host per network
Range = 256 – 128 = 128

Network – 1 Network - 2
192.168.1.0 Network IP 192.168.1.128 Network IP
192.168.1.1 192.168.1.129
. . . . . . . .
Host IP Host IP
. . . . . . . .
192.168.1.126 192.168.1.254
192.168.1.127 Broadcast IP 192.168.1.255 Broadcast IP

(2) 192.168.1.0 /27


255.255.255.224

Now, Sub network = 2n => 23 => 8


Host = 2h – 2 => 25 – 2 => 30 Host per network
Range = 256 – 224 => 32

Network – 1 Network - 2
192.168.1.0 Network IP 192.168.1.32 Network IP
192.168.1.1 192.168.1.33
. . . . . . . .
Host IP Host IP
. . . . . . . .
192.168.1.30 192.168.1.62
192.168.1.31 Broadcast IP 192.168.1.63 Broadcast IP

Network – 3 = 192.168.1.64 to 192.168.1.95


Network – 4 = 192.168.1.95 to 192.168.1.127
Network – 5 = 192.168.1.128 to 192.168.1.159
Network – 6 = 192.168.1.160 to 192.168.1.191
Network – 7 = 192.168.1.192 to 192.168.1.223
Network – 8 = 192.168.1.224 to 192.168.1.255

Aashka Infocom Pvt. Ltd., M: 9376007676 24


Network Fundamentals, CCNA, CCNS

(3) Class B:- 130.5.0.0 /16


255.255.0.0

Find subnet for 130.5.0.0 /17, 255.255.128.0

N = 21 = 2 Network
H = 215 -2 = 32766 Host per network
Range = 256-128 = 128

Network – 1 Network - 2
130.5.0.0 Network IP 130.5.128.0 Network IP
130.5.0.1 130.5.128.1
. . . . . . . .
130.5.0.255 130.5.128.255
130.5.1.0 Host IP 130.5.129.0 Host IP
130.5.1.1 130.5.129.1
. . . . . . . .
. . . . . . . .
130.5.127.255 Broadcast IP 130.5.255.255 Broadcast IP

(4) Class B:- 130.5.0.0 /20


255.255.240.0

N = 24 = 16 Network
H = 212 -2 = 4094 Host per network
Range = 256-240 = 16

(5) Class A:- 11.0.0.0 /9


255.128.0.0

N = 21 = 2 Network
H = 223 -2 = 8388606 Host per network
Range = 256-128 = 128

Network – 1 Network - 2
11.0.0.0 Network IP 11.128.0.0 Network IP
11.0.0.1 11.128.0.1
. . . . . . . .
Host IP Host IP
11.1.0.0 11.129.0.0
. . . . . . . .

Aashka Infocom Pvt. Ltd., M: 9376007676 25


Network Fundamentals, CCNA, CCNS

11.2.0.0 11.130.0.0
. . . . . . . .
. . . . . . . .
11.127.255.255 Broadcast IP 11.255.255.255 Broadcast IP

(6) Class A:- 11.0.0.0 /13


255.2488.0.0

N = 25 = 32 Network
H = 219 - 2 = 524286 Host per network
Range = 256 - 248 = 8

 VLSM
 VLSM is used for proper implementation of IP addresses which allows more than
one subnet mask for a given network according to the individual needs.
 Logically dividing one network into smaller networks is called as Subnetting or
VLSM.
 Efficient use of IP addresses.

 VLSM Examples

(1) 200.10.10.0 /24


255.255.255.0
Find subnet for 100 Host and 60 Host.

First we calculate subnet for 100 Host:-

 H = 2h - 2 = 100 Host required. So, here we can select h = 7 and we are getting
H = 126 (Nearer to 100)
 N = 2n = 21 = 2 Network
 Subnet mask = 255.255.255.128
 Range = 256 - 128 = 128
 200.10.10.0 to 200.10.10.127

Now, we calculate subnet for 60 Host:-

 H = 2h - 2 = 60 Host required. So, here we can select h = 6 and we are getting H


= 62 (Nearer to 60)
 N = 2n = 22 =4 Network
 Subnet mask = 255.255.255.192
 Range = 256 - 192 = 64
 200.10.10.128 to 200.10.10.191

Aashka Infocom Pvt. Ltd., M: 9376007676 26


Network Fundamentals, CCNA, CCNS

(2) Find subnet on above example for 30 Host and 2 Host.

First we calculate subnet for 30 Host:-

 H = 2h - 2 = 30 Host required. So, here we can select h = 5 and we are getting H


= 30
 N = 2n = 23 = 8 Network
 Subnet mask = 255.255.255.224
 Range = 256 – 224 = 32
 200.10.10.192 to 200.10.10.223

Now, we calculate subnet for 2 Host:-

 H = 2h - 2 = 2 Host required. So, here we can select h = 2 and we are getting H


= 2.
 N = 2n = 26 = 64 Network
 Subnet mask = 255.255.255.252
 Range = 256 - 252 = 4
 200.10.10.224 to 200.10.10.227

(3) Find sub network for 500 Host and 1000 Host.

Here host are in the range of thousands so we can use class B.

First we calculate subnet for 500 Host:-

 H = 2h - 2 = 500 Host required. So, here we can select h = 9 and we are getting
H = 510 (Nearer to 500).
 N = 2n = 27 = 128 Network
 Subnet mask = 255.255.254.0
 Range = 256 – 254 = 2
 122.16.0.0 to 122.16.1.255

Now, we calculate subnet for 1000 Host:-

 H = 2h - 2 = 1000 Host required. So, here we can select h = 10 and we are getting
H = 1022 (Nearer to 1000).
 N = 2n = 26 = 64 Network
 Subnet mask = 255.255.252.0
 Range = 256 - 252 = 4
 122.16.2.0 to 122.16.5.255

Aashka Infocom Pvt. Ltd., M: 9376007676 27


Network Fundamentals, CCNA, CCNS

(4) Find sub network for 100000 Host and 200000 Host.

Here host are in the range of lac so we can use class A.

First we calculate subnet for 100000 Host:-

 H = 2h - 2 = 100000 Host required. So, here we can select h = 17 and we are


getting H = 131070 (Nearer to 100000).
 N = 2n = 27 = 128 Network
 Subnet mask = 255.254.0.0
 Range = 256 – 254 = 2
 4.0.0.0 to 4.1.255.255

Now, we calculate subnet for 200000 Host:-

 H = 2h - 2 = 200000 Host required. So, here we can select h = 18 and we are


getting H = 262142 (Nearer to 200000).
 N = 2n = 26 = 64 Network
 Subnet mask = 255.252.0.0
 Range = 256 - 252 = 4
 4.2.0.0 to 4.5.255.255

Aashka Infocom Pvt. Ltd., M: 9376007676 28


Network Fundamentals, CCNA, CCNS

Routers
 Router is a device which makes communication possible between two or more
different networks present in same or different geographical locations.
 It is an internetworking device used to connect two or more different networks.
 It works on layer 3 (Network layer).
 It does two basic things:
 Select the best path from the routing table.
 Forward the packet on that path.
 Other vendors apart from Cisco
 Nortel
 Multicom
 Juniper
 Dlink
 Linksys

 Router Classification
Fixed Router Modular Router
 None upgradable, cannot add or Upgradable can add and remove as
remove the Ethernet or serial per the requirements.
interfaces.  Number of slot available depend on
 Doesn’t have any slot. the series of the router.

 Example of Modular Router

Aashka Infocom Pvt. Ltd., M: 9376007676 29


Network Fundamentals, CCNA, CCNS

 Example of Fixed Router

 External ports of router


 LAN interface – Ethernet
 AUI (Attachment Unit Interface) (E0) – 15 pin
 Wan Interfaces
 Series interface (S0, S1, s0/0, s0/1, s0/0/0 etc.) – 60 pin / 26 pin
 ISDN interface – Rj45
 Administration Interfaces
 Console – Rj45 – Local Administration
 Auxiliary – Rj45 – Remote Administration

 2621 Model Router (Modular Router)

Aashka Infocom Pvt. Ltd., M: 9376007676 30


Network Fundamentals, CCNA, CCNS

 Console Port
 It is known as Local Administrative Port.
 It is generally used for Initial Configuration, password recovery and Local
administration of the Router. It is Rj45 port.

 Console connectivity
 Connect a rollover cable to the router console port (Rj45 connector)
 Connect the other end of the rollover cable to the rj45 to DB9 converter.
 Attach the female DB9 converter to a PC serial port.

 Serial Port
 Serial pin configuration is 60 pin configuration female (15 pins and 4 rows) and
Smart serial pin configuration is 26 pin configuration female.
 It is known as WAN port.
 It is used for connecting to Router locations.

Aashka Infocom Pvt. Ltd., M: 9376007676 31


Network Fundamentals, CCNA, CCNS

 Auxiliary Port
 It is known as Remote Administrative Port.
 Used for remote administration.
 It’s an RJ45 port
 A console or a rollover cable is to be used.

 Internal Components of the Router


 Rom
 It is a chip integrated on the mother board which contains a Bootstrap
program which tells how to load the IOS.
 Used to start and maintain the router. Holds the POST and the bootstrap
program, as well as the mini-IOS.

 POST (Power On Self-Test):


 Stored in the microcode of the ROM, the POST is used to check the basic
functionality of the router hardware and determines which interface are
present.

 Mini-IOS:
 Also called the boot loader by Cisco, the mini-IOS is a small IOS in ROM that
can be used to bring up an interface and load a Cisco IOS into flash memory.
 The mini-IOS can also perform a few other maintenance operations.

 RAM (Random Access Memory)


 Used to hold the temporary configuration, recent packet buffers information,
ARP cache, routing table, and also the software and data structures that allow
the router to function.
 Also called running config.
 The IOS is loaded in to the RAM from the Flash at the time of booting.

Aashka Infocom Pvt. Ltd., M: 9376007676 32


Network Fundamentals, CCNA, CCNS

 Flash Memory:
 Stores the Cisco IOS by default. Flash memory is not erased when the router
is reloaded.

 NVRAM (nonvolatile RAM):


 Used to hold the router and switch configuration. NVRAM is not erased or
switch is reloaded.
 The configuration register is stored in NVRAM.
o 0X2102 – Normal Boot
o 0X2142 – Load only OS without configuration.
o 0X2120 – Network boot (Boot from Server)

 Router Startup Sequence


 Performing the POST and Loading the Bootstrap Program.
 Locating and Loading the IOS Software.
 Locating and Executing the Startup Configuration File or Entering Setup Mode.

 Modes of Routers
 Setup Mode
 The router enters in to a setup mode if the NVRAM is blank.
 User Mode
 Only some basic monitoring
 Limited show commands, ping, trace route
 Router>
 Privileged Mode
 Monitoring and some troubleshooting
 All show commands, ping, trace, copy, erase
 Router#

Aashka Infocom Pvt. Ltd., M: 9376007676 33


Network Fundamentals, CCNA, CCNS

 Global Configuration Mode


 To make any changes that affect the router like hostname, routing
configurations.
 All configuration that affect the router globally.
 Router(config)#
 Interface Mode
 Configuration done on the specific interface
 Router(config-if)#
 Rommon Mode
 Reverting Password.

 Basic Commands
 User Mode:
Router>

Router>show flash

Router>show ip interface brief

Router>ping 1.1.1.1

Router>enable

 Privilege Mode:
Router#show running-config

Router#show startup-config (show NVRAM data)

Router#show flash

Router#show run (show RAM data)

Router#show version

Router#show tp interface brief

Router#config terminal

 Global Configuration Mode:


Router(config)#hostname CCNA

 Assigning ip address to Ethernet interface:


Router(config)#interface <interface type> <interface no>

Router(config-if)#ip address <ip address> <subnet mask>

Router(config-if)#no shutdown

Aashka Infocom Pvt. Ltd., M: 9376007676 34


Network Fundamentals, CCNA, CCNS

 Assigning console password


Router(config)#line con 0

Router(config-line)#password <password>

Router(config-line)#login

Router(config-line)#exit

Router(config)#exit

Router>

 Assigning Auxiliary password


Router(config)#line aux 0

Router(config-line)#password <password>

Router(config-line)#login

Router(config-line)#exit

Router(config)#exit

Router>

 Assigning Telnet password


Router(config)#line vty 0 4

Router(config-line)#password <password>

Router(config-line)#login

Router(config-line)#exit

Router(config)#exit

Router>

 Assigning enable password


Router(config)#enable password <password>

 Commands to save the configuration


Router#copy running-config startup-config

OR Router#write memory

OR Router#write

Aashka Infocom Pvt. Ltd., M: 9376007676 35


Network Fundamentals, CCNA, CCNS

 To erase NVRAM configuration


Router#erase strtup-config

 To set the Router Clock


Router#show clock

Router# clock set 11:33:15 March 1 2019

Aashka Infocom Pvt. Ltd., M: 9376007676 36


Network Fundamentals, CCNA, CCNS

Understanding the Connectivity

Aashka Infocom Pvt. Ltd., M: 9376007676 37


Network Fundamentals, CCNA, CCNS

Basic IP configuration

 On Router 1
Router>enable

Router#config terminal

Router(config)#interface fa0/0

Router(config-if)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#interface se0/0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Aashka Infocom Pvt. Ltd., M: 9376007676 38


Network Fundamentals, CCNA, CCNS

Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down

Router(config-if)#exit

Router(config)#do show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.1.1 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 10.0.0.1 YES manual down down

Vlan1 unassigned YES unset administratively down down

Router(config)#

 On Router 2
Router>enable

Router#config terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#interface fa0/0

Router(config-if)#ip address 192.168.2.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#interface se0/0/0

Router(config-if)#ip address 10.0.0.2 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

Aashka Infocom Pvt. Ltd., M: 9376007676 39


Network Fundamentals, CCNA, CCNS

Router(config-if)#exit

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0,


changed state to up

Router(config)#do show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.2.1 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 10.0.0.2 YES manual up up

Vlan1 unassigned YES unset administratively down dow

Router(config)#

 On Router 1
Router(config)#do show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.1.1 YES manual up up

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 10.0.0.1 YES manual up up

Vlan1 unassigned YES unset administratively down down

Router(config)#

 Trouble Shooting on Connectivity


 Router#show ip interface brief
(1) Serial is up, line protocol is up
 Connectivity is Fine
(2) Serial is down, line protocol is down
 Remote device turned off
 Remote port is in shutdown state.
o Interface on the remote router has to be configured.
 Problem with connectivity.
(3) Serial is administratively down, line protocol is down
 Local port is in shutdown state.
o No shut down has to be given on the local router interface.
(4) Serial is up, line protocol is down
 Encapsulation mismatch.
 Clock rate command not given on serial interface.

Aashka Infocom Pvt. Ltd., M: 9376007676 40


Network Fundamentals, CCNA, CCNS

 Example

 Router 1:-
Fast Ethernet: 192.168.1.1

Serial 0: 10.0.0.1

 Router 2:-
Fast Ethernet: 192.168.2.1

Serial 1: 20.0.0.1

 Router 3:-
Fast Ethernet: 192.168.3.1

Aashka Infocom Pvt. Ltd., M: 9376007676 41


Network Fundamentals, CCNA, CCNS

WAN Protocols
 There are mainly two types of WAN encapsulation protocols:
1. High Data Link Protocol (HDLC)
2. Point to Point Protocol (PPP)

HDLC PPP
 Higher level data link  Point to Point protocol.
Control
protocol.
 Default on serial links.
 Doesn’t support Authentication.  Support authentication.
 Doesn’t support compression and  Support error correction.
error correction.

 PPP supports two authentication protocols:


 PAP (Password Authentication Protocol)
 CHAP (Challenge Handshake Authentication Protocol)

 PAP
 PAP provides a simple method for a remote node to establish its identity using a
two-way handshake.
 PAP is done only upon initial link establishment
 PAP is not a strong authentication protocol.
 Password are sent across the link in clear text.

 CHAP
 After the PPP link establishment phase is complete, the local router sends a unique
“challenge” message to the remote node.
 The remote node responds with a value.
 The local router checks the responds against its own calculation of the expected
hash value.
 If the values match, the authentication is acknowledged. Otherwise, the
connection is terminated immediately.

 Configuration of HDLC:
Router(config)#interface serial0/0

Router(config-if)#encapsulation hdlc

 Configuration of PPP:
Router(config)#interface serial0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 42


Network Fundamentals, CCNA, CCNS

Router(config-if)#encapsulation ppp

 To Enable CHAP Authentication:


Router(config)#interface serial0/0

Router(config-if)#encapsulation ppp

Router(config-if)#ppp authentication chap

 To Enable PAP Authentication:


Router(config)#interface serial0/0

Router(config-if)#encapsulation ppp

Router(config-if)#ppp authentication pap

Aashka Infocom Pvt. Ltd., M: 9376007676 43


Network Fundamentals, CCNA, CCNS

Routing
 Routed protocol enables to forward packet from one router to another.
 Routing protocol sends and receives routing information packets to and from
other routers.
 Forwarding of packets from one network to another network choosing the best
path from the routing table.
 Routing makes possible for two or more different networks to communicate with
each other.
 Routing table consist of only best routes for every destinations.
 Types of Routing
1) Static Routing
2) Default Routing
3) Dynamic Routing

 Static Routing
 It is configured manually by the Administrator.
 For every destination routing has to be done manually.
 Used for small organization.

Advantages Disadvantages
 No overhead on router CPU  Used for small networks
 No bandwidth usages between  Every network has to be manually
routers. configured.
 Add security because the admin  Admin must understand the n/w and
choose to allow routing access to how each router is connected with
certain networks only. each other.

 Static Default Routing


 It is used when destination is unknown (internet).
 Also can be used at end location where there is only one exit path for any
destination.
 If the routers do not found an entry for the destination network in a routing table,
the router will forward the packet to its default route.

Aashka Infocom Pvt. Ltd., M: 9376007676 44


Network Fundamentals, CCNA, CCNS

 Static Routing Practical

 Router 1 (Basic IP Interface)


R1(config)#interface f0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shut

Aashka Infocom Pvt. Ltd., M: 9376007676 45


Network Fundamentals, CCNA, CCNS

R1(config)#interface s0/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

 Router 2 (Basic IP Interface)


R2(config)#interface f0/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#int s0/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config)#interface s0/1
R2(config-if)#ip address 40.0.0.1 255.0.0.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown

 Router 3 (Basic IP Interface)


R3(config)#interface f0/0
R3(config-if)#ip address 50.0.0.1 255.0.0.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface s0/0
R3(config-if)#ip address 40.0.0.2 255.0.0.0
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown

 Router 1 (Routing)
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Aashka Infocom Pvt. Ltd., M: 9376007676 46


Network Fundamentals, CCNA, CCNS

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2


E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2
R1(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.2
R1(config)#ip route 50.0.0.0 255.0.0.0 20.0.0.2

R1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
S 30.0.0.0/8 [1/0] via 20.0.0.2
S 40.0.0.0/8 [1/0] via 20.0.0.2
S 50.0.0.0/8 [1/0] via 20.0.0.2

 Router 2 (Routing)
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Aashka Infocom Pvt. Ltd., M: 9376007676 47


Network Fundamentals, CCNA, CCNS

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2


E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 20.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0
C 40.0.0.0/8 is directly connected, Serial0/1
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 50.0.0.0 255.0.0.0 40.0.0.2

R2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
S 10.0.0.0/8 [1/0] via 20.0.0.1
C 20.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0
C 40.0.0.0/8 is directly connected, Serial0/1
S 50.0.0.0/8 [1/0] via 40.0.0.2

 Router 3 (Routing)
R3#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

Aashka Infocom Pvt. Ltd., M: 9376007676 48


Network Fundamentals, CCNA, CCNS

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2


E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 40.0.0.0/8 is directly connected, Serial0/0
R3#conf t
R3(config)#ip route 10.0.0.0 255.0.0.0 40.0.0.1
R3(config)#ip route 20.0.0.0 255.0.0.0 40.0.0.1
R3(config)#ip route 30.0.0.0 255.0.0.0 40.0.0.1

R3#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
S 10.0.0.0/8 [1/0] via 40.0.0.1
S 20.0.0.0/8 [1/0] via 40.0.0.1
S 30.0.0.0/8 [1/0] via 40.0.0.1
C 40.0.0.0/8 is directly connected, Serial0/0
C 50.0.0.0/8 is directly connected, FastEthernet0/0

 On PC1 (IP configure)


IP Address: 10.0.0.2
Subnet Mask: 255.0.0.0
Default Gateway: 10.0.0.1

 Configure IP in all PCs connected with switch as given in fig.

Aashka Infocom Pvt. Ltd., M: 9376007676 49


Network Fundamentals, CCNA, CCNS

 Example for Practice

 Router 1:-
Fast Ethernet: 192.168.1.1

Serial 0: 10.0.0.1

 Router 2:-
Fast Ethernet: 192.168.2.1

Serial 1: 20.0.0.1

 Router 3:-
Fast Ethernet: 192.168.3.1

 Default Routing
In default routing configure ip route as shown below after configure all ip .

 Router 1
R-1(config)#ip route 0.0.0. 0.0.0. 20.0.0.2

 Router 2
R-2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1

Aashka Infocom Pvt. Ltd., M: 9376007676 50


Network Fundamentals, CCNA, CCNS

R-2(config)#ip route 50.0.0.0 255.0.0.0 40.0.0.2

 Router 3
R-3(config)#ip route 0.0.0.0 0.0.0.0 40.0.0.1

 Dynamic Routing
 Advantage
 There is no need to know the destination network.
 Need to advertise the directly connected networks.
 Updates the topology changes dynamically.
 Administrator work is reduced.
 Used for large organization.
 Neighbor routers exchange routing information and build the routing table
automatically.
 This is easier than using static or default routing.

 Types of dynamic routing protocols


 Distance Vector Protocol
 Link State Protocol
 Hybrid Protocol

Distance Vector Link State Hybrid


 Works with Bellman Ford
 Works with Dijkstra  Works with DUAL
algorithm. algorithm. algorithm.
 Periodic updates.  Incremental updates.  Incremental updates.
 Full Routing tables are  Missing routes are  Missing routes are
exchanged. exchanged. exchanged.
 
Classful routing protocol. Classless routing  Classless routing
 Updates are through protocol. protocol.
broadcast  Updates are through  Updates are through
 Example: RIP V1, RIP multicast. multicast.
V2, IGRP  Example: OSPF, IS-IS. Example: EIGRP
 Less overhead.  More overhead.  Also called as advanced
 Easy configure.  Difficult to configure. distance vector protocol.
Less overhead.
 Easy to configure.

 Classful routing protocol


 Classful routing protocols do not carry the subnet mask with the route
updates.
 Which means that all devices in the network must use the same subnet
mask (FLSM).

Aashka Infocom Pvt. Ltd., M: 9376007676 51


Network Fundamentals, CCNA, CCNS

 Classless routing protocol


 Classless routing protocols include the subnet mask with the route
advertisement.
 Classless routing protocols support sub networks variable-length subnet
masking (VLSM) and FLSM.

 Autonomous System Number


 An autonomous system is a collection of networks under a common
administrative domain.
 A unique number identifying the routing domain of the routers.
 Range from 1 to 65535
 Public:- 1 – 64512 (used in between multiple service providers)
 Private:- 64513 – 65535 (used within the same service providers)

 Routing Protocol Classification

IGP EGP
 Interior Gateway Protocol  Exterior Gateway Protocol
 Routing protocols used within the  Routing protocol used between
same autonomous system different autonomous systems.
number  Routers in different AS need an
 All routers will be routing within EGP.
the same Autonomous boundary.  Example: Border Gateway
 Example: RIP, IGRP, EIGRP, Protocol.
OSPF, IS-IS

Aashka Infocom Pvt. Ltd., M: 9376007676 52


Network Fundamentals, CCNA, CCNS

Routing

Routing Protocol Routed Protocol


IP, IPX, Apple Talk...

Dynamic Route Default Route Static Route

IGP EGP
Interior Getway Protocol Exterior Gateway Protocol

Distance Vector Link State Hybrid BGP EGP


Border Group Exterior Group
RIP, IGRP OSPF EIGRP Protocol Protocol

Aashka Infocom Pvt. Ltd., M: 9376007676 53


Network Fundamentals, CCNA, CCNS

Routing Information Protocol V1 (RIP V1)


 Open standard protocol (Cisco and non-Cisco)
 Classful routing protocol.
 Updates are broadcast via 255.255.255.255
 Metric: Hop count (least hops is the best). Max hop count is 15.
 16th hop is unreachable.
 Periodic updates and exchange entire routing table for every 30 seconds.

 Rip Timers
 Update timer: 30 sec
 Time between consecutive updates.
 Invalid timer: 180 sec
 Time a router to waits hear updates.
 The router is marked unreachable if there is no update during the interval.
 Flush timer: 240 sec
 Time before the invalid route is removed from the routing table.
 Hold down timer: 180 sec
 Stabilizes routing information and helps preventing routing loops during
periods when the topology is converting on new information.
 Once a route is marked as unreachable, it must stay in hold down long enough
for all routers in the topology to learn about the unreachable network.
 Convergence time
 It is the time taken by the router to use alternate route if the best route is
down.

 RIP Version 2
 Classless routing protocol (support default and sub networks)
 Support VLSM.
 Uses multicast address 224.0.0.9

 Advantages of RIP
 Easy to configure
 No complexity
 Less overhead

 Disadvantages of RIP
 Bandwidth utilization is very high as broadcast for every 30 second.
 Works only on hop count (not consider the Bandwidth).
 Slow convergence.

Aashka Infocom Pvt. Ltd., M: 9376007676 54


Network Fundamentals, CCNA, CCNS

 Example RIP V2 (Dynamic Routing Protocol)

 R1
Router#conf t
Router(config)#int f0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shut
Router(config-if)#int s0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

 R2
Router>en
Router#conf t
Router(config)#int s0/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0

Aashka Infocom Pvt. Ltd., M: 9376007676 55


Network Fundamentals, CCNA, CCNS

Router(config-if)#clock rate 64000


Router(config-if)#no shut
Router(config-if)#int f0/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shut

 R1
Router#conf t
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0

 R2
Router# conf t
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 20.0.0.0
Router(config-router)#network 30.0.0.0

 R2
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
R 10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:21, Serial0/0
C 20.0.0.0/8 is directly connected, Serial0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 56


Network Fundamentals, CCNA, CCNS

C 30.0.0.0/8 is directly connected, FastEthernet0/0

 R1
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
R 30.0.0.0/8 [120/1] via 20.0.0.2, 00:00:09, Serial0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 57


Network Fundamentals, CCNA, CCNS

Enhanced Interior Gateway Routing Protocol


(EIGRP)
 Cisco proprietary protocol.
 Classless routing protocol.
 Includes all feature of IGRP.
 Updates are through Multicast (224.0.0.10)
 Max hop count is 255.
 Hello packets are sent every 5 seconds.
 Convergence rate is very fast.

 EIGRP maintains three tables


 Neighbor table
 Contains list of directly connected routers.
 #show ip eigrp neighbor

 Topology table
 List of all the best routes learned from each neighbor.
 #show ip eigrp topology

Aashka Infocom Pvt. Ltd., M: 9376007676 58


Network Fundamentals, CCNA, CCNS

 Routing table
 The route to the destination
 #show ip route
 The neighbor and topology tables are stored in RAM and maintained through the
use of Hello and update packets. The routing table is also stored in RAM, but that
information is gathered only from the topology table.

 Successor
 It is the best route used to forward packet to destination network.
 Present in Routing table and Topology table.

 Feasible successor
 A feasible successor is a second best route to a destination network.
 It is considered a backup route.
 Present in Topology table.
 Used when the successor route goes down.
 EIGRP used Diffusing Update Algorithm (DUAL) for selecting and maintaining the
best path to each remote network. This algorithm allows for the following:
 Backup route determination if one in available.
 Support of VSLM.
 Dynamic route recoveries.
 Queries for an alternate route if no route can be found.

 Disadvantages of EIGRP
 Works only on Cisco Routers

Aashka Infocom Pvt. Ltd., M: 9376007676 59


Network Fundamentals, CCNA, CCNS

 Example EIGRP

 R1
Router>enable
Router# configure terminal
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#clock rate 64000
Router(config-if)#exit
Router(config)#interface Serial0/1
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shutdown

Aashka Infocom Pvt. Ltd., M: 9376007676 60


Network Fundamentals, CCNA, CCNS

Router(config-if)#clock rate 64000

 R2
Router>enable
Router# configure terminal
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#clock rate 64000
Router(config-if)#exit
Router(config)#interface Serial0/1
Router(config-if)#ip address 40.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

 R3
Router>enable
Router# configure terminal
Router(config)#interface Serial0/0
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1
Router(config-if)# ip address 50.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

 R4
Router>enable
Router# configure terminal
Router(config)#interface Serial0/1

Aashka Infocom Pvt. Ltd., M: 9376007676 61


Network Fundamentals, CCNA, CCNS

Router(config-if)#ip address 40.0.0.2 255.0.0.0


Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 50.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 60.0.0.1 255.0.0.0
Router(config-if)#no shutdown

 R1
Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, Serial0/1
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 22
Router(config-router)#network 10.0.0.0 255.0.0.0
Router(config-router)#network 20.0.0.0 255.0.0.0

Aashka Infocom Pvt. Ltd., M: 9376007676 62


Network Fundamentals, CCNA, CCNS

Router(config-router)#network 30.0.0.0 255.0.0.0


Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, Serial0/1
D 40.0.0.0/8 [90/2681856] via 20.0.0.2, 00:03:44, Serial0/0
D 50.0.0.0/8 [90/2681856] via 30.0.0.2, 00:02:37, Serial0/1
D 60.0.0.0/8 [90/2684416] via 30.0.0.2, 00:01:13, Serial0/1
[90/2684416] via 20.0.0.2, 00:01:13, Serial0/0

 R2
Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 20.0.0.0/8 is directly connected, Serial0/0
C 40.0.0.0/8 is directly connected, Serial0/1
Router# conf t

Aashka Infocom Pvt. Ltd., M: 9376007676 63


Network Fundamentals, CCNA, CCNS

Router(config)#router eigrp 22
Router(config-router)#network 20.0.0.0 255.0.0.0
Router(config-router)#network 40.0.0.0 255.0.0.0
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
D 10.0.0.0/8 [90/2172416] via 20.0.0.1, 00:04:38, Serial0/0
C 20.0.0.0/8 is directly connected, Serial0/0
D 30.0.0.0/8 [90/2681856] via 20.0.0.1, 00:04:38, Serial0/0
C 40.0.0.0/8 is directly connected, Serial0/1
D 50.0.0.0/8 [90/2681856] via 40.0.0.2, 00:01:56, Serial0/1
D 60.0.0.0/8 [90/2172416] via 40.0.0.2, 00:01:51, Serial0/1

 R3
Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 30.0.0.0/8 is directly connected, Serial0/0
C 50.0.0.0/8 is directly connected, Serial0/1

Aashka Infocom Pvt. Ltd., M: 9376007676 64


Network Fundamentals, CCNA, CCNS

Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router eigrp 22
Router(config-router)#network 30.0.0.0 255.0.0.0
Router(config-router)#network 50.0.0.0 255.0.0.0
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
D 10.0.0.0/8 [90/2172416] via 30.0.0.1, 00:03:49, Serial0/0
D 20.0.0.0/8 [90/2681856] via 30.0.0.1, 00:03:49, Serial0/0
C 30.0.0.0/8 is directly connected, Serial0/0
D 40.0.0.0/8 [90/2681856] via 50.0.0.2, 00:02:24, Serial0/1
C 50.0.0.0/8 is directly connected, Serial0/1
D 60.0.0.0/8 [90/2172416] via 50.0.0.2, 00:02:20, Serial0/1

 R4
Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set

Aashka Infocom Pvt. Ltd., M: 9376007676 65


Network Fundamentals, CCNA, CCNS

C 40.0.0.0/8 is directly connected, Serial0/1


C 50.0.0.0/8 is directly connected, Serial0/0
C 60.0.0.0/8 is directly connected, FastEthernet0/0
Router# conf t
Router(config)#router eigrp 22
Router(config-router)#network 40.0.0.0 255.0.0.0
Router(config-router)#network 50.0.0.0 255.0.0.0
Router(config-router)#network 60.0.0.0 255.0.0.0
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
D 10.0.0.0/8 [90/2684416] via 40.0.0.1, 00:02:55, Serial0/1
[90/2684416] via 50.0.0.1, 00:02:50, Serial0/0
D 20.0.0.0/8 [90/2681856] via 40.0.0.1, 00:02:55, Serial0/1
D 30.0.0.0/8 [90/2681856] via 50.0.0.1, 00:02:50, Serial0/0
C 40.0.0.0/8 is directly connected, Serial0/1
C 50.0.0.0/8 is directly connected, Serial0/0
C 60.0.0.0/8 is directly connected, FastEthernet0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 66


Network Fundamentals, CCNA, CCNS

OSPF
 OSPF stand for Open Shortest Path First.
 It is an open standard routing protocol that’s been implement by a wide variety
of network vendor, including Cisco.
 It’s a link state protocol.
 OSPF works by using the Dijkstra algorithm, first, a shortest path tree is
constructed, and then the routing table is populated with the resulting best paths.
 Unlimited hop count.
 It is a classless routing protocol.
 Metric is cost. (Cost=10^8/B.W.)
 Supports authentication.
 Updates are sent through multicast address 224.0.0.5
 Faster convergence.
 Sends Hello packet every 10 seconds.
 Router’s send only changes in updates and not the entire routing tables in periodic
updates.

 Router ID
 The highest IP address of the active physical interface of the router is Router ID.
 If logical interface is configured, the highest IP address of the logical interface is
router ID

Aashka Infocom Pvt. Ltd., M: 9376007676 67


Network Fundamentals, CCNA, CCNS

 OSPF Process
(1) Establishing Bidirectional Communication

(2) Discovering the Network Routes

Aashka Infocom Pvt. Ltd., M: 9376007676 68


Network Fundamentals, CCNA, CCNS

(3) Adding the Link-State Entries

 OSPF maintains three tables:


 Neighbor Table
 Contain list of directly connected routers (neighbors).
 #show ip ospf neighbor
 Distance Table
 Typically reference to as LSDB (link state database).
 Consists information about all the possible routes to the network with in the
area.
 #show ip ospf database
 Routing Table
 Contain list of best paths to each destination.
 #show ip route

 List-State Data Structure:


 Link-state routing can have hierarchical network
 This two-level hierarchical consists of the following:
 Transit area (backbone or area 0)
 Regular areas (non-backbone areas)

Aashka Infocom Pvt. Ltd., M: 9376007676 69


Network Fundamentals, CCNA, CCNS

 Issue of Maintaining of large OSPF network

 The solution: OSPF Hierarchical Routing

 OSPF is supposed to be designed in a hierarchical fashion, which basically means


that you can separate the larger internetwork into smaller internetworks called
areas.
 The following are reasons for creating OSPF in a hierarchical design:
 To decrease routing overhead.
 To speed up convergence.
 To confine network instability to single areas of the network
 This does not make configuring OSPF easier, but more elaborate and difficult.

Aashka Infocom Pvt. Ltd., M: 9376007676 70


Network Fundamentals, CCNA, CCNS

 Types of OSPF Routers

 OSPF Networking Hierarchy:


 OSPF is a hierarchical routing protocol. It enables better administration and
smaller routing tables due to segmentation of entire network into smaller areas.
 OSPF consists of a backbone (Area 0) network that links all other smaller areas
within the hierarchy.
 The following are the important components of OSPF network:
 Areas: An area consists of routers that have been administratively grouped
together. Usually, an area as a collection of continuous IP sub netted
networks.
 Area Border Routers: Routers that belong to more than one area are called
area border routers (ABRs). ABRs maintain a separate topological database
for each area to which they are connected.
 Backbone Area: An OSPF backbone area consists of all routers in area 0,
and all area border routers (ABRs). The backbone distributes routing
information between different areas.
 Autonomous System Boundary Routers (ASBRs): Routers that
exchange routing information with routers in other Autonomous System are
called ASBRs.
 Internal Routers: Internal routers are routers whose interfaces all belong
to the same area. These routers have a single Link State Database.

 Advantages of OSPF
 Open standard
 No hop count limitations
 Faster coverage

Aashka Infocom Pvt. Ltd., M: 9376007676 71


Network Fundamentals, CCNA, CCNS

 Disadvantages of OSPF
 Consume more CPU resources
 Complex to design and implement

 Example (OSPF Protocol)

 R1 (ip assign)
Router>enable
Router# configure terminal
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0

Aashka Infocom Pvt. Ltd., M: 9376007676 72


Network Fundamentals, CCNA, CCNS

Router(config-if)#clock rate 64000


Router(config-if)#no shutdown

 R2 (assign)
Router>enable
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0,
changed state to up
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
This command applies only to DCE interfaces
Router(config-if)#no shutdown

 R1 (ospf configuration )
Router(config)#router ospf 22
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 20.0.0.0 0.255.255.255 area 0
Router# sh ip ro
Router# sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

Aashka Infocom Pvt. Ltd., M: 9376007676 73


Network Fundamentals, CCNA, CCNS

* - candidate default, U - per-user static route, o - ODR


P - periodic downloaded static route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial0/0
O 30.0.0.0/8 [110/65] via 20.0.0.2, 00:01:15, Serial0/0

 R2 (ospf configuration )
Router(config)#router ospf 22
Router(config-router)#network 20.0.0.0 0.255.255.255 area 0
Router(config-router)#network 30.0.0.0 0.255.255.255 area 0
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
O 10.0.0.0/8 [110/65] via 20.0.0.1, 00:00:56, Serial0/0
C 20.0.0.0/8 is directly connected, Serial0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 74


Network Fundamentals, CCNA, CCNS

Aashka Infocom Pvt. Ltd., M: 9376007676 75


Network Fundamentals, CCNA, CCNS

Access Control List (ACL)


 ACL is a set of rules which will allow or deny the specific traffic moving through
the router.
 It is a Layer 3 security which controls the flow of traffic from one router to another.
 It is also called as Packet filtering Firewall.

Standard Access List Extended Access List


 The access list number range is 1 –  The access list number range is 100 –
99. 199.
 Can block a Network, Host and  We can allow or deny a Network, Host,
Subnet. Subnet and Service.
 All services are blocked.  Selected services can be blocked.
 Implemented closest to the  Implemented closest to the source.
destination.
 Filtering is done based on only  Filtering is done based on source IP,
source IP address. destination IP, protocol, port no.

 Three things are very important to know before writing any ACL
statement
1) Selecting appropriate router to configure ACL.
2) Decide who is source and destination.
3) Understand In / Out and decide the right direction to implement ACL.

 Rules of Access List


 Works in sequential order. (it will always start with the first line of the access list,
then go to the second line)
 All deny statement have to be given first.
 There should be at least one permit statement (mandatory).
 An implementation deny blocks all traffic by default when there is no match.
 Can have one access-list per interface per direction. Two access-list per interface,
one in inbound direction and one in outbound direction.
 Any time a new entry is added to the access list, it will be placed at the bottom of
the list.
 You cannot remove one line from an access list. If you try to do this, you will
remove the entire list.

 Wild Card Mask (WCM)


 Tells the router which portion of the bits to match or ignore.
 It’s the reverse of the subnet mask. Hence is also called as Inverse mask.
 A bit value of 0 indicates MUST MATCH (Check Bits).
 A bit value of 1 indicates IGNORE (Ignore Bits).
 Wild card mask for a host will be always 0.0.0.0

Aashka Infocom Pvt. Ltd., M: 9376007676 76


Network Fundamentals, CCNA, CCNS

 A wild card mask can be calculated using formula:


=> (Global Subnet Mask) – (Customized Subnet Mask) = Wild Card Mask

Ex. 1:- 255.255.255.255 Global Subnet Mask

- 255.255.255.0 Customized Subnet Mask

0 . 0 . 0 .255 Wild Card Mask

 Wild cards are used with the host or network address to tell the router a range of
available address to filter.

 Creation of Subnet Access List


 Router(config)#access-list <acl no> <permit/deny> <source address>
<source WCM>

 Implementation of Standard Access List


 Router(config)#interface <interface type> <interface no>
 Router(config-if)#ip access-group <number> <in/out>
To verify:

 Router#show access-list
 Router#show access-list <no>

 Creation of Extended Access List


 Router(config)#access-list <acl no> <permit/deny> <protocol> <source
address> <source WCM> <destination address> <destination WCM>
<operator> <service>

 Implementation of Extended Access List


 Router(config)#interface <interface type> <interface no>
 Router(config-if)#ip access-group <number> <out/in>

 Operators:
 eq (equal to)
 neq (not equal to)
 lt (less than)
 gt (greater than)

Aashka Infocom Pvt. Ltd., M: 9376007676 77


Network Fundamentals, CCNA, CCNS

IP

TCP UDP ICMP

HTTP DNS PING

TELNET TFTP TRANCEROUTE

FTP DHCP

SMTP NNTP

 If you want to filter by application layer protocol, you have to choose the
appropriate layer 4 transport protocol after the permit or deny statement.
 For example, to filter Telnet or FTP, you choose TCP since both Telnet and FTP
use TCP at the Transport layer.

Aashka Infocom Pvt. Ltd., M: 9376007676 78


Network Fundamentals, CCNA, CCNS

 Example 1 (Standard Access List)

 R1 (IP assign)
Router>enable
Router# configure terminal
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

 R2 (IP assign)
Router>enable
Router# configure terminal

Aashka Infocom Pvt. Ltd., M: 9376007676 79


Network Fundamentals, CCNA, CCNS

Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

 R1 (Routing)
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0

 R2 (Routing)
Router(config)#router rip
Router(config-router)#network 20.0.0.0
Router(config-router)#network 30.0.0.0

Configure Standard Access-list


Router(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
Router(config)#access-list 22 ?
deny Specify packets to reject
permit Specify packets to forward
remark Access list entry comment
Router(config)#access-list 22 permit ?
A.B.C.D Address to match
any Any source host
host A single host address
Router(config)#access-list 22 permit host 10.0.0.2

Aashka Infocom Pvt. Ltd., M: 9376007676 80


Network Fundamentals, CCNA, CCNS

Router(config)#access-list 22 deny host 10.0.0.3


Router(config)#interface f0/0
Router(config-if)#ip access-group 22 ?
in inbound packets
out outbound packets
Router(config-if)#ip access-group 22 out

 Example 2 (Standard Access List)

 Router 1:-
Fast Ethernet: 192.168.1.100
Serial 0: 10.0.0.1
PC6: 192.168.1.1
PC0: 192.168.1.2
PC1: 192.168.1.3
 Router 2:-
Fast Ethernet: 192.168.2.100
Serial 1: 11.0.0.1
PC2: 192.168.2.1
PC3: 192.168.2.2

Aashka Infocom Pvt. Ltd., M: 9376007676 81


Network Fundamentals, CCNA, CCNS

 Router 3:-
Fast Ethernet: 192.168.3.100
PC4: 192.168.3.1
PC5: 192.168.3.2

 Task: Configure the appropriate router as per the rules given


 Deny the host 192.168.1.1 communicating with 192.168.2.0
 Deny the host 192.168.1.2 communicating with 192.168.2.0
 Deny the host 192.168.3.0 communicating with 192.168.2.0
 Permit all the remaining traffic.

Ans:-

 Router 2:-
Router(config)#access-list 22 deny host 192.168.1.1
Router(config)#access-list 22 deny host 192.168.1.2
Router(config)#access-list 22 deny 192.168.3.0 0.0.0.255
Router(config)#access-list 22 permit any

Router(config)#interface f0/0
Router(config-if)#ip access-group 22 out

Aashka Infocom Pvt. Ltd., M: 9376007676 82


Network Fundamentals, CCNA, CCNS

 Example 3 (Extended Access List)

 Task: - Configure the appropriate router as per the rule given below
 Deny the user on LAN 192.168.2.0 should not access 192.168.1.3 HTTP service.
 Deny the user on LAN 192.168.3.0 should not access 192.168.1.4 FTP service.
 Deny the user on LAN 192.168.3.1 should not access 192.168.1.3 HTTP service.
 Deny the user on LAN 192.168.2.0 should not get DNS service from DNS server
192.168.1.4
 Deny the user from the host between 192.168.3.2 and 192.168.1.2 should not
be able to send ICMP (ping / Trace) message.
 Remaining hosts and services should be permitted.

 R1
R-1(config)#access-list 145 deny tcp 192.168.2.0 0.0.0.255 host 192.168.1.3
eq www
R-1(config)#access-list 145 deny tcp 192.168.3.0 0.0.0.255 host 192.168.1.4
eq ftp
R-1(config)#access-list 145 deny tcp host 192.168.3.1 host 192.168.1.3 eq
www
R-1(config)#access-list 145 deny udp 192.168.2.0 0.0.0.255 host 192.168.1.4
eq ?

Aashka Infocom Pvt. Ltd., M: 9376007676 83


Network Fundamentals, CCNA, CCNS

R-1(config)#access-list 145 deny udp 192.168.2.0 0.0.0.255 host 192.168.1.4


eq domain
R-1(config)#access-list 145 deny icmp host 192.168.3.1 host 192.168.1.1 ?

R-1(config)#access-list 145 deny icmp host 192.168.3.1 host 192.168.1.1 echo


R-1(config)#access-list 145 deny icmp host 192.168.3.1 host 192.168.1.1 echo-
reply

 Implementation:

R-1(config)#interface f0/0
R-1(config-if)#ip access-group 145 out

OR

R-1(config)#interface se0/0
R-1(config-if)#ip access-group 145 in

Aashka Infocom Pvt. Ltd., M: 9376007676 84


Network Fundamentals, CCNA, CCNS

Network Address Translation (NAT)


 NAT is the method of Translation of private IP address into public IP address.
 In order to communicate with internet we must have registered public IP address.
 Address translation was originally developed to solve two problems:
1. To handle a shortage of IPv4 addresses.
2. Hide network addressing schemes.
 Small companies typically get their public IP addresses directly from their ISPs,
which have a limited number.
 Large companies can sometimes get their public IP addresses from a registration
authority, such as the Internet Assigned Number Authority (IANA).
 Common devices that can perform address translation include firewalls, routers
and servers.
 There are certain addresses in each class of IP address that are reserved for
private networks. These address are called private addresses.

Class A 10.0.0.0 to 10.255.255.255

Class B 172.16.0.0 to 172.21.255.255

Class C 192.168.0.0 to 192.168.255.255

 Here’s a list of situations when it’s best to have NAT on your side:
 You need to connect to the internet and your hosts don’t have globally unique IP
addresses.
 You change to a new ISP that requires you to remember your network.
 You need to merge two intranets with duplicate addresses.

 Advantages
 Conserve legally registered addresses.
 Reduce address overlap occurrence, increase flexibility when connecting to
Internet.

 Disadvantages
 Translation introduces switching path delays.
 Loss of end-to-end IP traceability.

 NAT Terminology
 Inside Local Addresses:- Name of inside source address before translation
(private IP)
 Inside Global Address:- Name of inside host after translation (public IP)
 Outside local address:- Name of destination host before translation
 Outside Global Address:- Name of outside destination host after translation

Aashka Infocom Pvt. Ltd., M: 9376007676 85


Network Fundamentals, CCNA, CCNS

 Types of NAT
1) Dynamic NAT
2) Static NAT
3) PAT

 Static NAT
 This type of NAT is designed to allow one-to-one mapping between local and global
addresses.
 The static version requires you to have one real Internet IP address for every host
on your network.

 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.
 You don’t have to statically configure your router to map an inside to an outside

address as you would use static NAT, but you have to enough real IP addresses
for everyone who’s going to be sending packets to and receiving them from the
Internet.

Aashka Infocom Pvt. Ltd., M: 9376007676 86


Network Fundamentals, CCNA, CCNS

 Dynamic NAT Overload


 This is the most popular type of NAT configuration. Understand that overloading
really is a form of dynamic NAT that maps multiple unregistered IP addresses to
a single registered IP address (many)-to-one by using different ports.
 It is also known as Port Address Translation (PAT) and by using PAT we get to
have thousands of users connect to the internet using only one real global IP
address.
 NAT overload is the real reason we haven’t run out of valid IP address on the
Internet.

Aashka Infocom Pvt. Ltd., M: 9376007676 87


Network Fundamentals, CCNA, CCNS

Static NAT Practical

Task: Configure Static NAT using the following translations

Private IP Public IP

192.168.1.1 50.1.1.1
192.168.1.2 50.1.1.2
192.168.1.3 50.1.1.3

 Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

Aashka Infocom Pvt. Ltd., M: 9376007676 88


Network Fundamentals, CCNA, CCNS

Router(config-if)#exit

Router(config)#int fa0/0
Router(config-if)#ip address 192.168.1.100 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2


Router(config)#exit

 ISP Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 200.1.1.100 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.1


Router(config)#exit

Aashka Infocom Pvt. Ltd., M: 9376007676 89


Network Fundamentals, CCNA, CCNS

 Router:- (Configuration of Static NAT)


Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip nat inside source static 192.168.1.1 50.1.1.1
Router(config)#ip nat inside source static 192.168.1.2 50.1.1.2
Router(config)#ip nat inside source static 192.168.1.3 50.1.1.3

 Router:- (Implementation of Static NAT)


Router(config)#interface fa0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface se0/1/0
Router(config-if)#ip nat outside
Router(config-if)#exit

Router#show ip nat translation


Pro Inside global Inside local Outside local Outside global
icmp 50.1.1.2:7 192.168.1.2:7 200.1.1.2:7 200.1.1.2:7
icmp 50.1.1.3:3 192.168.1.3:3 200.1.1.2:3 200.1.1.2:3
icmp 50.1.1.3:4 192.168.1.3:4 200.1.1.2:4 200.1.1.2:4
--- 50.1.1.1 192.168.1.1 --- ---
--- 50.1.1.2 192.168.1.2 --- ---
--- 50.1.1.3 192.168.1.3 --- ---

Aashka Infocom Pvt. Ltd., M: 9376007676 90


Network Fundamentals, CCNA, CCNS

Dynamic NAT Practical

Task: Configure Dynamic NAT and make sure that the inside LAN users
(192.168.1.0 /24) get translation to public IP with the range of 50.1.1.1 –
50.1.1.200

 Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

Router(config-if)#exit
Router(config)#int fa0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 91


Network Fundamentals, CCNA, CCNS

Router(config-if)#ip address 192.168.1.100 255.255.255.0


Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2


Router(config)#exit

 ISP Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 200.1.1.100 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.1


Router(config)#exit

Aashka Infocom Pvt. Ltd., M: 9376007676 92


Network Fundamentals, CCNA, CCNS

 Router:- (Configuration of Dynamic NAT)


Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#access-list 55 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat pool CCNA 50.1.1.1 50.1.1.200 netmask
255.255.255.0
Router(config)#ip nat inside source list 55 pool CCNA

 Router:- (Implementation of Dynamic NAT)


Router(config)#interface fa0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface se0/1/0
Router(config-if)#ip nat outside
Router(config-if)#exit

Router#show ip nat translation


Pro Inside global Inside local Outside local Outside global
icmp 50.1.1.2:7 192.168.1.2:7 200.1.1.2:7 200.1.1.2:7
icmp 50.1.1.3:3 192.168.1.3:3 200.1.1.2:3 200.1.1.2:3
icmp 50.1.1.3:4 192.168.1.3:4 200.1.1.2:4 200.1.1.2:4
--- 50.1.1.1 192.168.1.1 --- ---
--- 50.1.1.2 192.168.1.2 --- ---
--- 50.1.1.3 192.168.1.3 --- ---

Aashka Infocom Pvt. Ltd., M: 9376007676 93


Network Fundamentals, CCNA, CCNS

Port Address Translation Practical

Task: Configure the PAT (Dynamic NAT Overload) and make sure that the inside
LAN users (192.168.1.0 /24) get translated to single public IP (50.1.1.1) given
by the Service Provider.

 Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int fa0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 94


Network Fundamentals, CCNA, CCNS

Router(config-if)#ip address 192.168.1.100 255.255.255.0


Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2


Router(config)#exit

 ISP Router:-
Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 200.1.1.100 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int se0/1/0
Router(config-if)#ip address 100.1.1.2 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.1


Router(config)#exit

Aashka Infocom Pvt. Ltd., M: 9376007676 95


Network Fundamentals, CCNA, CCNS

 Router:- (Configuration of PAT)


Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#access-list 55 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat pool CCNA 50.1.1.1 50.1.1.1 netmask
255.255.255.255
Router(config)#ip nat inside source list 55 pool CCNA overload

 Router:- (Implementation of Static NAT)


Router(config)#interface fa0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface se0/1/0
Router(config-if)#ip nat outside
Router(config-if)#exit

Router#show ip nat translation


Pro Inside global Inside local Outside local Outside global
icmp 50.1.1.1:7 192.168.1.2:7 200.1.1.2:7 200.1.1.2:7
icmp 50.1.1.1:3 192.168.1.3:3 200.1.1.2:3 200.1.1.2:3
icmp 50.1.1.1:4 192.168.1.3:4 200.1.1.2:4 200.1.1.2:4
--- 50.1.1.1 192.168.1.1 --- ---
--- 50.1.1.2 192.168.1.2 --- ---
--- 50.1.1.3 192.168.1.3 --- ---

Aashka Infocom Pvt. Ltd., M: 9376007676 96


Network Fundamentals, CCNA, CCNS

Password Reset of Router


 Step 1: Set all the password
Router>
Router>en
Router# conf t
Router(config)#enable password CCNA1
Router(config)#enable secret CCNA2
Router(config)#line console 0
Router(config-line)#password CCNA3
Router(config-line)#login
Router# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
User Access Verification
Password:
Password:

 Step-2: Power cycle the router or power Off/On the router


initially. While the router is booting you’ll need to break the boot
sequence to boot the router into boot rom, you do this by holding
down CTRL and pressing PAUSE BREAK. Do this repeatedly till
you are placed at the boot rom prompt.
Self-decompressing the image :
################
monitor: command "boot" aborted due to user interrupt
rommon 1 >

Aashka Infocom Pvt. Ltd., M: 9376007676 97


Network Fundamentals, CCNA, CCNS

 Step-3: Change the configuration register so that the router will


ignore the contents of the NVRAM when booting into Cisco IOS.
Set the configuration register to 0×2142 and boot the router.
rommon 1 > confreg 0x2142
rommon 2 > reset

 Step-4: After the router has booted into Cisco IOS, you’ll be
prompted by the initial configuration dialog, type n here and
press enter and you’ll be placed into user mode
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: n

 Step-5: Now you’re able to place yourself into privileged mode


by typing enable
Router>enable

 Step-6: Once in privileged mode you can copy the start-up


configuration to the running configuration
Router# copy startup-config running-config
Destination filename [running-config]?
518 bytes copied in 0.416 secs (1245 bytes/sec)

 Step-7:Then change the passwords manually


 Remove old password
Router(config)#no enable password
Router(config)#no enable secret
Router(config)#line console 0
Router(config-line)#no password

Aashka Infocom Pvt. Ltd., M: 9376007676 98


Network Fundamentals, CCNA, CCNS

 Set new password


Router(config)#enable password ccna
Router(config)#enable secret ccnp
Router(config)#line console 0
Router(config-line)#password ccie
Router(config-line)#login

 Step-8: Check the register value


Router# sh version
Configuration register is 0x2142

 Step-9: Set Register value 0x2102


Router(config)#config-register 0x2102

 Step-10: At last copy all configuration to NVRAM


Router(config)#copy run start

 Step-11: Check Register value again


Router#sh version
Configuration register is 0x2142 (will be 0x2102 at next reload)

 Step-12: It will display massage that reload the router and the
register value set to again default.
Router#reload

 Step-13: Now Login with New Password


User Access Verification
Password: ccie
Router>enable
Password: ccnp

Aashka Infocom Pvt. Ltd., M: 9376007676 99


Network Fundamentals, CCNA, CCNS

Backing Up and Restoring the Cisco OS

 Step-1: Set IP Address


Router>enable
Router# configure terminal
Router(config)#interface f0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown

 Step-2: Check Flash File


Router# show flash:
System flash directory:
File Length Name/status
3 33591768 c1841-advipservicesk9-mz.124-15.T1.bin
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[33847587 bytes used, 30168797 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Aashka Infocom Pvt. Ltd., M: 9376007676 100


Network Fundamentals, CCNA, CCNS

 Step-3: Back up of Flash File display above


Router# copy flash: tftp:
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 10.0.0.2
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? CCNA
Writing c1841-advipservicesk9-mz.124-
15.T1.bin........!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]
33591768 bytes copied in 25.485 secs (1318000 bytes/sec)

 Step-4: Delete Flash file for Restoring Process


Router# delete c1841-advipservicesk9-mz.124-15.T1.bin
Delete filename [c1841-advipservicesk9-mz.124-15.T1.bin]?
Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]

 Step-5: Reload the Router and Restore Flash File


Router# reload
Proceed with reload? [confirm]
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.
Boot process failed...
The system is unable to boot automatically. The BOOT environment
variable needs to be set to a bootable image.

 Step-6: Without Flash File IOS can't Load so Booting Process Stop in
ROMMON Mode
rommon 1 >

Aashka Infocom Pvt. Ltd., M: 9376007676 101


Network Fundamentals, CCNA, CCNS

 Step-7: Now type tftpdnld command it will give you Error


rommon 1 > tftpdnld
Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.
usage: tftpdnld
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: "VARIABLE_NAME=value" and use "set" to show current
variables.)
"ctrl-c" or "break" stops the transfer before flash erase begins.
The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch

 Step-8 : Above Required variables must be set, So Set all the


variables
rommon 2 > IP_ADDRESS=10.0.0.1
rommon 3 > IP_SUBNET_MASK=255.0.0.0
rommon 4 > DEFAULT_GATEWAY=10.0.0.1
rommon 5 > TFTP_SERVER=10.0.0.2
rommon 6 > TFTP_FILE=CCNA
rommon 7 > set
DEFAULT_GATEWAY=10.0.0.1
IP_ADDRESS=10.0.0.1
IP_SUBNET_MASK=255.0.0.0
PS1=rommon ! >
TFTP_FILE=CCNA
TFTP_SERVER=10.0.0.2

Aashka Infocom Pvt. Ltd., M: 9376007676 102


Network Fundamentals, CCNA, CCNS

 Step-9: Now router ready for tftpdnld command


rommon 8 > tftpdnld
IP_ADDRESS: 10.0.0.1
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 10.0.0.1
TFTP_SERVER: 10.0.0.2
TFTP_FILE: CCNA
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!

 Step-10 : If this massage is appear then you are on Right Way - type
Y
Do you wish to continue? y/n: [n]: y
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 Step-11: After restore IOS type reset for Power cycle (POST) process
rommon 9 > reset
--- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: n
Press RETURN to get started!
Router>

 Step-12: Check Flash File which is restore


Router# show flash:
System flash directory:
File Length Name/status
4 33591768 CCNA
[33591768 bytes used, 30424616 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Aashka Infocom Pvt. Ltd., M: 9376007676 103


Network Fundamentals, CCNA, CCNS

Switching
 It is data-link layer device (Layer 2).
 It works with Physical addresses (MAC addresses).
 It uses broadcast and unicast.
 It has broadcast domain by default number of collision domains depends upon the
number of ports.
 It maintains a MAC address table.

 Broadcast Domain
 Set of all devices that broadcast frames originating from any device within the
set.

 Collision domain
 In Ethernet, the network area within which frames that have collided are
propagated is called a collision domain.
 A collision domain is a network segment with two or more devices sharing the
same bandwidth.

Aashka Infocom Pvt. Ltd., M: 9376007676 104


Network Fundamentals, CCNA, CCNS

 Types of Switches
 Unmanageable switches
 These switches are just plug and play.
 No configurations and verifications can be done.
 There is no console port.
 Manageable switches
 These switches are also plug and play.
 If has console port and CLI access.
 We can verify and modify configurations and can implement and test some
advance switching technologies (VLAN, trunking, STP).

 Hierarchical network design (Cisco) model


 This model involves dividing the network into discrete layers. Each layer provides
specific functions that define its role within the overall network.
 The typical hierarchical design model is broken up in to three layers:
1) Access
2) Distribution
3) Core

Aashka Infocom Pvt. Ltd., M: 9376007676 105


Network Fundamentals, CCNA, CCNS

(1) Access Layer


 Provide a means of connecting devices to the network and controlling which
devices are allowed to communicate on the network.
 Devices: PCs, printer, switches, bridges and wireless access point (AP).

(2) Distribution Layer


 Aggregates the data received from the access layer switches before it is
transmitted to the core layer for routing to its final destination.
 The distribution layer control the flow of network traffic using policies by
performing routing functions between virtual LANs define at access layer.
 Devices: high-performance switches to ensure reliability.

(3) Core layer


 High-speed backbone of the internetwork.
 Devices: Routers, switches capable of forwarding large amount of data quickly.

 Benefits of a Hierarchical Network


 Scalability / Hierarchical network scale very well.
 Redundancy / Double distribution and core switches.
 High-performance distribution and core switches guarantee wire speed between
all devices.
 Manageability / Fast new deployment and simplified troubleshooting.
 Maintainability / Scale very easily.

 Access layer switch features:


 Port security
 VLAN’s
 Fast Ethernet / Gigabit Ethernet
 Link aggregation
 Quality of service (QoS)

 Distribution/Core layer switch features:


 High/Very High forwarding rate
 Gigabit Ethernet / Ten Gigabit Ethernet
 Redundancy components
 Access Control List (ACL)

Aashka Infocom Pvt. Ltd., M: 9376007676 106


Network Fundamentals, CCNA, CCNS

 Cisco’s Hierarchical Design Model


1) Access Layer Switches
a. Switches Series: 1900 & 2900

2) Distribution Layer Switches


a. Switch Series: 3550, 3560

3) Core Layer Switches


a. Switch Series: 4500, 6500

Aashka Infocom Pvt. Ltd., M: 9376007676 107


Network Fundamentals, CCNA, CCNS

 Virtual LAN
 Divides a single Broadcast domain into Multiple Broadcast domains.
 By default all ports of the switch are in VLAN1. This VLAN1 is known as
Administrative VLAN or Management VLAN.
 VLAN can be crated from 2 – 1001
 Can be configured on a Manageable switch only
 Two types of VLAN configuration
 Static VLAN
 Dynamic VLAN

 Static VLAN
 Static VLAN’s are based on port numbers.
 Need to manually assign a port on a switch to a VLAN.
 Also called Port-based VLAN.
 Open port can be a member of any one VLAN.

 Dynamic VLAN
 Dynamic VLAN’s are based on the MAC address of a PC.
 Switch automatically assigns the port to a VLAN.
 Each port can be a member of multiple VLAN’s.
 For Dynamic VLAN configuration, a software called VMPS (VLAN membership
Policy Server) is needed.

Aashka Infocom Pvt. Ltd., M: 9376007676 108


Network Fundamentals, CCNA, CCNS

 VLAN Practical

 Switch 1:
Switch>enable
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#name hr
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#name admin
Switch(config-vlan)#exit

Switch(config-if-range)#int range f0/1-2


Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config-if-range)#exit

Switch(config)#int range f0/3-4


Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 3
Switch(config-if-range)#exit

Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk

Aashka Infocom Pvt. Ltd., M: 9376007676 109


Network Fundamentals, CCNA, CCNS

Switch(config-if)#exit
 Switch 2:
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#name hr
Switch(config-vlan)#vlan 3
Switch(config-vlan)#name admin
Switch(config-vlan)#exit

Switch(config)#int range f0/1-2


Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2

Switch(config-if-range)#int range f0/3-4


Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 3
Switch(config-if-range)#exit

Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#exit

Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------
1 default active Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
2 hr active Fa0/1, Fa0/2
3 admin active Fa0/3, Fa0/4
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

Aashka Infocom Pvt. Ltd., M: 9376007676 110


Network Fundamentals, CCNA, CCNS

Trunking
 Types of link
 Access link
This type of link is only part of one VLAN.
Any device attached to an access link is unaware of a VLAN membership, the
device just assumes it’s a part of a broadcast domain.
 It has no understanding of the physical network.
 Trunk link
 Trunks can carry multiple VLANs traffic.
 A trunk link is a 100 or 1000 Mbps point-to-point link between two switches,
between a switch and router, or between a switch and server.
 These carry the traffic of multiple VLANs-from 1 to 1005 at a time.

 VLAN Identification Methods (Frame Tagging)


 Single VLAN can span over multiple switches.
 In order to make sure that same vlan users on different switches communicate
with each other there is a method of tagging happens on trunk links.
 Tag is added before a frame is send and removed once it is received on trunk link.

Aashka Infocom Pvt. Ltd., M: 9376007676 111


Network Fundamentals, CCNA, CCNS

 Trunking protocols
 Inter-Switch Link (ISL)
 IEEE 802.1Q

ISL IEEE 802.1Q


 It’s a Cisco proprietary.  Open standard. We can use on
different vendors switches.
 It works with Ethernet, Token ring.  It works only on Ethernet.
 It adds 30 byte of tag.
 Only 4 byte tag will added to original
 All VLAN traffic is tagged. frame.
 Frame is not modified.  It modifies the existing Ethernet
frame to include the VLAN ID.

 VLAN Trunking Protocol Practical

 Switch 0 (Server)
Server(config)#vtp domain ccna
Server(config)#vtp password 123
Server(config)#vtp mode server
Server(config)#interface f0/1
Server(config-if)#switchport mode trunk
Server(config)#vlan 2

Aashka Infocom Pvt. Ltd., M: 9376007676 112


Network Fundamentals, CCNA, CCNS

Server(config-vlan)#vlan 3
Server(config-vlan)#vlan 4
Server(config-vlan)#vlan 5
Server(config-vlan)#vlan 6
Server(config-vlan)#vlan 7
Server(config-vlan)#vlan 8
Server(config-vlan)#vlan 9

Server#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
8 VLAN0008 active
9 VLAN0009 active

 CLIENT1 Configuration
Client1(config)#vtp domain ccna
Client1(config)#vtp password 123
Client1(config)#vtp mode client
Client1(config)#interface range f0/1-2
Client1(config-if-range)#switchport mode trunk

Client1#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22

Aashka Infocom Pvt. Ltd., M: 9376007676 113


Network Fundamentals, CCNA, CCNS

Fa0/23, Fa0/24
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
7 VLAN0007 active
8 VLAN0008 active
9 VLAN0009 active

 TRANSPARENT Configuration
Trans(config)#vtp domain ccna
Trans(config)#vtp password 123
Trans(config)#vtp mode transparent
Trans(config)#interface range f0/1-2
Trans(config-if-range)#switchport mode trunk

Trans# show vlan

 CLIENT2 Configuration
Client2(config)#vtp domain ccna
Client2(config)#vtp password 123
Client2(config)#vtp mode client
Client2(config)#interface range f0/1-2
Client2(config-if-range)#switchport mode trunk

Client2#show vlan
 *Note: Only client can update vlan database.

Aashka Infocom Pvt. Ltd., M: 9376007676 114


Network Fundamentals, CCNA, CCNS

DTP (Dynamic Trunking Protocol)


 Trunking can be done dynamically through negotiation process.

 DTP Modes

 Desirable
 Desires to become trunk (always want to become trunk)
 Sends and reply to DTP message
 It becomes a trunk if the port on the other switch is set to tuunk, dynamic
desirable or dynamic auto mode.
 Auto
 Only reply to DTP messages (not send).
 Default mode on most of the modern switches.
 It becomes a trunk if the other end is set to trunk or dynamic desirable mode.
 Trunk
 Configuring trunk manually.
 The port still negotiates trunking with the port on the other end of the link.
 Access
 Configuring access manually.
 The port is a user port in a single VLAN.
 No-Negotiate
 Turn off DTP messages (disable DTP).
 The port is a trunk and does not do DTP negotiation with the other side of
the link.

Aashka Infocom Pvt. Ltd., M: 9376007676 115


Network Fundamentals, CCNA, CCNS

Inter-vlan Routing
 Network devices in different VLANs cannot communicate with one another without
a router to route traffic between the VLANs. In the most network environments,
VLANs are associated with individual network or sub networks.
 Configuring VLANs helps control the size of the broadcast domain and keeps local
traffic local.
 However, when an end station in one VLALN needs to communicate with an end
station in another VLAN, inter VLAN communication as required.
 This communication is supported by inter VLAN routing.

 Inter VLAN Routing Practical

 Switch
Switch>enable
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.

Aashka Infocom Pvt. Ltd., M: 9376007676 116


Network Fundamentals, CCNA, CCNS

Switch(config)#vlan 2
Switch(config-vlan)#exit

Switch(config)#vlan 3
Switch(config-vlan)#exit

Switch(config)#int range f0/1-2


Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2

Switch(config-if-range)#int range f0/3-4


Switch(config-if-range)#switchport access vlan 3
Switch(config-if-range)#exit

Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit

Switch#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
2 VLAN0002 active Fa0/1, Fa0/2
3 VLAN0003 active Fa0/3, Fa0/4
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

Aashka Infocom Pvt. Ltd., M: 9376007676 117


Network Fundamentals, CCNA, CCNS

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1
Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

 Router
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#int f0/0.1
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip address 10.0.0.1 255.0.0.0
Router(config-subif)#exit

Router(config)#int f0/0.2
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 20.0.0.1 255.0.0.0
Router(config-subif)#exit

Aashka Infocom Pvt. Ltd., M: 9376007676 118


Network Fundamentals, CCNA, CCNS

Spanning Tree Protocol


 Spanning Tree Protocol (STP) uses Spanning Tree Algorithm to avoid the
Switching loops in Layer-3 devices (Switches).
 STP works when multiple switches are used with redundant links avoiding
Broadcast Storms, multiple frame copies & database instability.
 STP is an open standard (IEEE 802.1Q).
 STP is enabled by default on all Cisco switches.

 STP process undergoes in three steps:


1) Selecting the Root bridge
2) Selecting the Root port
3) Selecting designated and Non-designated ports

(1) Selecting the Root Bridge


 Root Bridge
 The bridge with the Best (Lowest) Bridge ID.
o Each switch has a unique identifier called a Bridge ID or Switch ID.
o Bridge ID = Priority + MAC address of the switch
o When a switch advertises a BPDU, they place their switch id in these
BPDUs.
 Out of all the switches in the network, one is elected as a root bridge that
become the local point in the network.
 Every LAN will have only one Root Bridge and all the remaining switches will be
considered as non-root bridges.

(2) Selecting the Root Port


 Root Port
 The link directly connected to the root bridge, or the shortest path to the Root
Bridge.
 Every non-root bridge looks the best way to go Root-bridge.
 For every non-root bridge there is only one root port.

(3) Selecting Designated port & Non Designated port


 Designated Port
 A designated port will always in Forward mode.
 Non-designated Port
 All the ports which are blocked by STP to avoid switching loop.
 A non-designated port will always in blocked mode.

Aashka Infocom Pvt. Ltd., M: 9376007676 119


Network Fundamentals, CCNA, CCNS

 BPDU
 All switches exchange information through what is called as bridge protocol data
units (BPDUs).
 BPDUs contain a lot of information to help the switches determine the topology
and any loops that result from that topology.
 BPDUs are sent every 2 Sec.

 Spanning Tree Protocol Practical

 Switch 0:-
Switch>enable
Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.1718.218D
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0002.1718.218D
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- ----------------------------
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/1 Desg FWD 19 128.1 P2p

Aashka Infocom Pvt. Ltd., M: 9376007676 120


Network Fundamentals, CCNA, CCNS

 Switch 1:-
Switch>enable
Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.1718.218D
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0003.E414.5D1C
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- ----------------------------
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/1 Root FWD 19 128.1 P2p

 Switch 2:-
Switch>enable
Switch#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.1718.218D
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0009.7C2E.1058
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 P2p

Aashka Infocom Pvt. Ltd., M: 9376007676 121


Network Fundamentals, CCNA, CCNS

First Hop Redundancy Protocols


 Most of the company in the world has a connection to the Internet. The picture
below shows a most simple topology of such a company:

To make above topology work we need to:


 Configure IP addresses on two interfaces of the Router. Suppose the IP address
of Fa0/0 interface (the interface connecting to the switch) is 192.168.1.1.
 Assign the IP addresses, default gateways and DNS servers on all PCs. In this
case we have to set the default gateways to Fa0/0 interface (with the IP
address 192.168.1.1) of the router. This can be done manually or
automatically via DHCP.
 After some time, your boss wants to implement some redundant methods so
that even the Router fails, all PCs can still access the Internet without any
manual configuration at that time. So we need one more router to connect to
the Internet as the topology below:

Aashka Infocom Pvt. Ltd., M: 9376007676 122


Network Fundamentals, CCNA, CCNS

 But now we have a problem: There is only one default gateway on each host,
so if Router1 is down and we want to access the Internet via Router2, we have
to change the default gateway (to 192.168.1.2). Also, when Router1 comes
back we have to manually change back to the IP address on Router1. And no
one can access to the Internet in the time of changing the default gateway.
HSRP can solve all these problems!
 The first hop redundancy protocols are:
 Hot Standby Router Protocol
 Virtual Router Redundancy Protocol
 Gateway Load Balancing Protocol

Aashka Infocom Pvt. Ltd., M: 9376007676 123


Network Fundamentals, CCNA, CCNS

Hot Standby Router Protocol (HSRP) Tutorial


 HSRP Operation
 With HSRP, two routers Router1 and Router2 in this case will be seen as only
one router. HSRP uses a virtual MAC and IP address for the two routers to
represent with hosts as a single default gateway. For example, the virtual IP

address is 192.168.1.254 and the virtual MAC is 0000.0c07.AC0A. All the hosts
will point their default gateway to this IP address.
 One router, through the election process, is designated as active
router while the other router is designated as standby router. Both
active and standby router listen but only the active router proceeds and
forwards packets. Standby router is backup when active router fails by
monitoring periodic hellos sent by the active router (multicast to
224.0.0.2, UDP port 1985) to detect a failure of the active router.

Aashka Infocom Pvt. Ltd., M: 9376007676 124


Network Fundamentals, CCNA, CCNS

 When a failure on the active router detected, the standby router assumes the
role of the forwarding router. Because the new forwarding router uses the
same (virtual) IP and MAC addresses, the hosts see no disruption in
communication. A new standby router is also elected at that time (in the case
of there are more than two routers in a HSRP group).

 Note: All routers in a HSRP group send hello packets. By default, the hello
timer is set to 3 seconds.

 Note: The virtual MAC address of HSRP version 1 is 0000.0C07.ACxx, where


xx is the HSRP group number in hexadecimal based on the respective
interface. For example, HSRP group 10 uses the HSRP virtual MAC address of

Aashka Infocom Pvt. Ltd., M: 9376007676 125


Network Fundamentals, CCNA, CCNS

0000.0C07.AC0A. HSRP uses a MAC address range of 0000.0C9F.F000 to


0000.0C9F.FFFF. But please notice that the virtual MAC address can be
configured manually.
 By default, a hello packet is sent between the HSRP standby group devices
every 3 seconds, and the standby device becomes active when a hello packet
has not been received for 10 seconds (called hold time).

 HSRP States
 HSRP consists of 5 states:
State Description

Initial This is the beginning state. It indicates HSRP is not running. It


happens when the configuration changes or the interface is
first turned on
Listen The router knows both IP and MAC address of the virtual router
but it is not the active or standby router. For example, if there
are 3 routers in HSRP group, the router which is not in active
or standby state will remain in listen state.
Speak The router sends periodic HSRP hellos and participates in the
election of the active or standby router.
Standby In this state, the router monitors hellos from the active router
and it will take the active state when the current active router
fails (no packets heard from active router)
Active The router forwards packets that are sent to the HSRP group.
The router also sends periodic hello messages

Please notice that not all routers in a HSRP group go through all states above. In
a HSRP group, only one router reaches active state and one router reaches
standby state. Other routers will stop at listen state.
 Now let’s take an example of a router passing through these states.
 Suppose there are 2 routers A and B in the network; router A is turned
on first. It enters the initial state.

Aashka Infocom Pvt. Ltd., M: 9376007676 126


Network Fundamentals, CCNA, CCNS

 Then it moves to listen state in which it tries to hear if there are already
active or standby routers for this group.
 After learning no one take the active or standby state, it determines to
take part in the election by moving tos peak state.
 Now it starts sending hello messages containing its priority. These
messages are sent to the multicast address 224.0.0.2 (which can be
heard by all members in that group). When it does not hear a hello
message with a higher priority it assumes the role of active router and
moves to active state. In this state, it continues sending out periodic
hello messages.
 Now router B is turned on.
 It also goes through initial and listen state.
 In listen state, it learns that router A has been already the active router
and no other router is taking standby role so it enters speak state to
compete for the standby router -> it promotes itself as standby router.
 Suppose router A is in active state while router B is in standby state.
 If router B does not hear hello messages from router A within the hold time
(10 seconds be default), router B goes into speak state to announce its priority
to all HSRP members and compete for the active state. But if at some time it
receives a message from the active router that has a lower priority than its
priority (because the administrator change the priority in either router), it can
take over the active role by sending out a hello packet with parameters
indicating it wants to take over the active router. This is called a coup hello
message.

 Quick summarization:
 HSRP is Cisco proprietary which allows several routers or multilayer switches
to appear as a single gateway IP address.
 HSRP has 5 states: Initial, learn, listen, speak, standby and active.
 HSRP allows multiple routers to share a virtual IP and MAC address so that the
end-user hosts do not realize when a failure occurs.
 The active (or Master) router uses the virtual IP and MAC addresses.

Aashka Infocom Pvt. Ltd., M: 9376007676 127


Network Fundamentals, CCNA, CCNS

 Standby routers listen for Hellos from the Active router. A hello packet is sent
every 3 seconds by default. The hold time (dead interval) is 10 seconds.
 Virtual MAC of 0000.0C07.ACxx , where xx is the hexadecimal number of HSRP
group.
 The group numbers of HSRP version 1 range from 0 to 255. HSRP does support
group number of 0 (we do check it and in fact, it is the default group number
if you don’t enter group number in the configuration) so HSRP version 1
supports up to 256 group numbers. HSRP version 2 supports 4096 group
numbers.

Virtual Router Redundancy Protocol


 VRRP router priority determines the role that each VRRP router plays. If the IP
address of the physical interface on a VRRP router is configured as the virtual
IP address, this router will function as the virtual router master. The same
priority also determines the likelihood of a router becoming the virtual router
master if the virtual router master fails. If there are multiple routers acting as
virtual router backup, the one with the highest priority becomes the virtual
router master if the original virtual router master fails. You can configure the
priority of each virtual router backup with a value of 1 through 254 using vrrp
priority command.

Gateway Load Balancing Protocol


 GLBP (Gateway Load Balancing Protocol) prevents a single point of failure, like
HSRP and VRRP, but also allows load-sharing among a group of redundant
routers. Multiple first-hop routers on the LAN form a group to offer a single
virtual router, also sharing the IP packet forwarding load.
 HSRP and VRRP also allow multiple routers to form a virtual router group with
a virtual IP address. But only one member of the group is elected as the active
router that forwards packets sent to the virtual IP address for the group. The

Aashka Infocom Pvt. Ltd., M: 9376007676 128


Network Fundamentals, CCNA, CCNS

other routers in the group stay idle until the active router fails. In other words,
the bandwidth of standby routers is not utilized and goes waste. Although it is
possible to configure multiple virtual router groups to achieve load balancing
in case of HSRP and VRRP, but it requires configuring different default
gateways on different hosts, which is an extra administrative burden.
 The advantage of GLBP is that it provides load balancing in addition to
redundancy without requiring configuration of different default gateways on
different clients.

 GLBP Operation
 The routers participating in GLBS communicate with each other through hello
messages sent every 3 seconds to the multicast address 224.0.0.102, UDP
port 3222 (both source and destination). GLBP supports up to 1024 GLBP
groups on each physical interface, and up to four active virtual forwarders per
group.
 Routers participating in GLBP form a group and elect one router as the AVG
(active virtual gateway) for that group. Other members of the group provide
backup for the AVG if it goes down. The AVG controls all members of the group
by assigning a virtual MAC address to each member. Each router takes
responsibility of forwarding packets sent to the virtual MAC address assigned
to it by the AVG. These routers are each called AVF (active virtual forwarder)
for their virtual MAC address. The AVG also responds to ARP (Address
Resolution Protocol) requests for the virtual IP address. This is the key to GLBP
operation as load balancing is actually achieved by the AVG replying to ARP
requests from different hosts with different virtual MAC addresses.
 When a client sends an ARP message for the IP address of its default gateway,
the AVG responds with the virtual MAC address of one of the AVFs. When
another client sends an ARP message for default gateway address resolution,
the AVG returns the virtual MAC address of the next AVF. So each client gets
a different virtual MAC address for the same virtual IP address of the default
gateway. As a result, each client will send its traffic to separate routers despite
the fact that they are configured with the same default gateway.

Aashka Infocom Pvt. Ltd., M: 9376007676 129


Network Fundamentals, CCNA, CCNS

 The table below rounds off our coverage of first-hop redundancy


protocols in this chapter by presenting a comparison of VRRP, HSRP,
and GLBP.

Feature VRRP HSRP GLBP


1 active1 standby
1 master1 (or 1 or more 1 AVG2 (or more)
Router Role
more) backup listening AVF

IP Address Real Virtual Virtual


1 – highest 1 – highest 1 – highest
Election priority2 – highest priority2 – highest priority2 – highest
IP (tiebreaker) IP (tiebreaker) IP (tiebreaker)

Load Balancing No No Yes


No (IEEE
Cisco proprietary Yes Yes
standard)

Aashka Infocom Pvt. Ltd., M: 9376007676 130


Network Fundamentals, CCNA, CCNS

HSRP Configuration
 The figure below shows a basic HSRP topology with two routers forming an HSRP
or standby group. The router R1 is configured with a priority 110 that is higher
than the default priority 100. The router R2 is configured with the default priority
100. The Ethernet interfaces of R1 and R2 are configured with IP addressed
192.168.1.1 and 192.168.1.2, respectively. The IP address assigned to the HSRP
group 10 is 192.168.1.10 that is configured on both group members using
the standby ip command.

 R1:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#standby version 2
R1(config-if)#standby 10 preempt
R1(config-if)#standby 10 priority 110
R1(config-if)#standby 10 ip 192.168.1.10
R1(config-if)#end

Aashka Infocom Pvt. Ltd., M: 9376007676 131


Network Fundamentals, CCNA, CCNS

 R2:
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#standby version 2
R2(config-if)#standby 10 preempt
R2(config-if)#standby 10 priority 100
R2(config-if)#standby 10 ip 192.168.1.10
R2(config-if)#end

 It is time for verification using the show standby command. You can see from
the output for R1 below that it is the active router.
 R1:
R1#show standby
FastEthernet0/0 – Group 10 (version 2)
State is Active
5 state changes, last state change 00:08:23
Virtual IP address is 192.168.1.10
Active virtual MAC address is 0000.0c9f.f00a
Local virtual MAC address is 0000.0c9f.f00a (v2 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.948 secs
Preemption enabled
Active router is local
Standby router is 192.168.1.2, priority 100 (expires in 9.412 sec)
Priority 110 (configured 110)
Group name is “hsrp-Fa0/0-10” (default)

 R2:
R2#show standby
FastEthernet0/0 – Group 10 (version 2)
State is Standby

Aashka Infocom Pvt. Ltd., M: 9376007676 132


Network Fundamentals, CCNA, CCNS

7 state changes, last state change 00:00:12


Virtual IP address is 192.168.1.10
Active virtual MAC address is 0000.0c9f.f00a
Local virtual MAC address is 0000.0c9f.f00a (v2 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.756 secs
Preemption enabled
Active router is 192.168.1.1, priority 110 (expires in 8.760 sec)
MAC address is c200.09ac.0000
Standby router is local
Priority 100 (default 100)
Group name is “hsrp-Fa0/0-10” (default)

Aashka Infocom Pvt. Ltd., M: 9376007676 133


Network Fundamentals, CCNA, CCNS

VRRP Configuration
 The figure below shows a basic topology in which VRRP is configured. In this
example, routers R1, R2, and R3 are VRRP routers that together form a virtual
router or VRRP group. The IP address of the virtual router is the same as that
configured on the Ethernet interface of R1 (192.168.1.1).

 Because the virtual router uses the IP address of the physical Ethernet interface
of R1, R1 assumes the role of virtual router master. The virtual router master is
also known as the IP address owner. There can be multiple virtual router
backups, though in the figure above routers R2 and R3 are virtual router
backups. If the virtual router master fails, the virtual router backup configured
with the highest priority will become the virtual router master. As a result, client
hosts on the LAN receive uninterrupted connectivity through their default
gateway (192.168.1.1).

 R1:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface FastEthernet0/0

Aashka Infocom Pvt. Ltd., M: 9376007676 134


Network Fundamentals, CCNA, CCNS

R1(config-if)#ip address 192.168.1.1 255.255.255.0


R1(config-if)#vrrp 10 ip 192.168.1.1
*Mar 1 00:29:06.095: %VRRP-6-STATECHANGE: Fa0/0 Grp 10 state Init
-> Master
R1(config-if)#end
 R2:
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#vrrp 10 priority 110
R2(config-if)#vrrp 10 ip 192.168.1.1
R2(config-if)#end
*Mar 1 00:32:02.859: %VRRP-6-STATECHANGE: Fa0/0 Grp 10 state Init
-> Backup
 R3:
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface FastEthernet0/0
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#vrrp 10 priority 100
R3(config-if)#vrrp 10 ip 192.168.1.1
R3(config-if)#end
R3#
*Mar 1 00:33:54.715: %VRRP-6-STATECHANGE: Fa0/0 Grp 10 state Init
-> Backup[OK]

 We can verify VRRP configuration using the show vrrp command.


 R1:
R1#show vrrp
FastEthernet0/0 – Group 10
State is Master
Virtual IP address is 192.168.1.1

Aashka Infocom Pvt. Ltd., M: 9376007676 135


Network Fundamentals, CCNA, CCNS

Virtual MAC address is 0000.5e00.010a


Advertisement interval is 1.000 sec
Preemption enabled
Priority is 255
Master Router is 192.168.1.1 (local), priority is 255
Master Advertisement interval is 1.000 sec
Master Down interval is 3.003 sec

 R2:
R2#show vrrp
FastEthernet0/0 – Group 10
State is Backup
Virtual IP address is 192.168.1.1
Virtual MAC address is 0000.5e00.010a
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 110
Master Router is 192.168.1.1, priority is 255
Master Advertisement interval is 1.000 sec
Master Down interval is 3.570 sec (expires in 2.806 sec)

 R3:
R3#show vrrp
FastEthernet0/0 – Group 10
State is Backup
Virtual IP address is 192.168.1.1
Virtual MAC address is 0000.5e00.010a
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 100
Master Router is 192.168.1.1, priority is 255
Master Advertisement interval is 1.000 sec
Master Down interval is 3.609 sec (expires in 2.633 sec)

Aashka Infocom Pvt. Ltd., M: 9376007676 136


Network Fundamentals, CCNA, CCNS

 R1:
R1(config)#interface FastEthernet0/0
R1(config-if)#shutdown
R1(config-if)#end

 R2:
R2#show vrrp
FastEthernet0/0 – Group 10
State is Master
Virtual IP address is 192.168.1.1
Virtual MAC address is 0000.5e00.010a
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 110
Master Router is 192.168.1.2 (local), priority is 110
Master Advertisement interval is 1.000 sec
Master Down interval is 3.570 sec

 R3:
R3#show vrrp
FastEthernet0/0 – Group 10
State is Backup
Virtual IP address is 192.168.1.1
Virtual MAC address is 0000.5e00.010a
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 100
Master Router is 192.168.1.2, priority is 110
Master Advertisement interval is 1.000 sec
Master Down interval is 3.609 sec (expires in 3.165 sec)

Aashka Infocom Pvt. Ltd., M: 9376007676 137


Network Fundamentals, CCNA, CCNS

GLBP Configuration
 The figure below shows a basic GLBP topology with R1 and R2 forming a GLBP
group. The router R1 is the AVG for the GLBP group and is responsible for the
virtual IP address 192.168.1.10. Router R1 is also the AVF for the virtual MAC
address 0007.b400.0a01. Router R2 is a member of the same GLBP group and
is the designated AVF for the virtual MAC address 0007.b400.0a02. Client 1
has a default gateway of 192.168.1.10 and a gateway MAC address of
0007.b400.0a01. Client 2 has the same default gateway 192.168.1.10 but
receives the gateway MAC address 0007.b400.0a02 because router R2 is
sharing the traffic load with R1.

 R1:
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#glbp 10 ip 192.168.1.10
R1(config-if)#end

Aashka Infocom Pvt. Ltd., M: 9376007676 138


Network Fundamentals, CCNA, CCNS

 R2:
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#glbp 10 ip
R2(config-if)#end
R2#

 R1:
R1#show glbp
FastEthernet0/0 – Group 10
State is Active
2 state changes, last state change 00:07:32
Virtual IP address is 192.168.1.10
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.488 secs
Redirect time 600 sec, forwarder timeout 14400 sec
Preemption disabled
Active is local
Standby is 192.168.1.2, priority 100 (expires in 9.888 sec)
Priority 100 (default)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members:
c200.140c.0000 (192.168.1.1) local
c201.140c.0000 (192.168.1.2)
There are 2 forwarders (1 active)
Forwarder 1
State is Active
1 state change, last state change 00:07:22
MAC address is 0007.b400.0a01 (default)
Owner ID is c200.140c.0000

Aashka Infocom Pvt. Ltd., M: 9376007676 139


Network Fundamentals, CCNA, CCNS

Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 100
Forwarder 2
State is Listen
2 state changes, last state change 00:00:10
MAC address is 0007.b400.0a02 (learnt)
Owner ID is c201.140c.0000
Redirection enabled, 598.188 sec remaining (maximum 600 sec)
Time to live: 14398.188 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.1.2 (primary), weighting 100 (expires in 8.188 sec)

 R2:
R2#show glbp
FastEthernet0/0 – Group 10
State is Standby
1 state change, last state change 00:05:21
Virtual IP address is 192.168.1.10 (learnt)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.740 secs
Redirect time 600 sec, forwarder timeout 14400 sec
Preemption disabled
Active is 192.168.1.1, priority 100 (expires in 7.468 sec)
Standby is local
Priority 100 (default)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members:
c200.140c.0000 (192.168.1.1)
c201.140c.0000 (192.168.1.2) local
There are 2 forwarders (1 active)
Forwarder 1

Aashka Infocom Pvt. Ltd., M: 9376007676 140


Network Fundamentals, CCNA, CCNS

State is Listen
MAC address is 0007.b400.0a01 (learnt)
Owner ID is c200.140c.0000
Time to live: 14397.456 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.1.1 (primary), weighting 100 (expires in 8.888 sec)
Forwarder 2
State is Active
1 state change, last state change 00:05:07
MAC address is 0007.b400.0a02 (default)
Owner ID is c201.140c.0000
Preemption enabled, min delay 30 sec
Active is local, weighting 100

Aashka Infocom Pvt. Ltd., M: 9376007676 141

You might also like