ccna-r&s short notes book

73

Upload: rahul-khokhar

Post on 20-Jul-2015

563 views

Category:

Documents


53 download

TRANSCRIPT

Page 1: CCNA-R&S SHORT NOTES BOOK
Page 2: CCNA-R&S SHORT NOTES BOOK

Cisco Certified Network Associate –Routing & Switching (CCNA-R&S)

Introduction to CCNA-R&S

Covered Some Basic Topics

OSI Layer Model

Introduction to switching & Switching Protocols:

VLAN

VTP

STP Basic

STP Lab

RSTP

Difference between STP & RSTP

Introduction to Routing & Routing Protocols:

IPV4 Classes

SUBNETTING

VLSM

RIP

RIP V2

EIGRP

OSPF

NAT

ACL

IPV6

Covered Rest pending topics & Lab with troubleshooting

Page 3: CCNA-R&S SHORT NOTES BOOK

Introduction to CCNA-R&S:

The Cisco Certified Network Associate - Routing and Switching (CCNA - Routing and Switching) certification

title has become the leading entry level network certification available today. The Cisco Certified Network

Associate - Routing and Switching (CCNA - Routing and Switching) certification was developed by Cisco to

test a candidate's knowledge of networking at entry level. The Cisco Certified Network Associate - Routing

and Switching (CCNA - Routing and Switching) certification analyzes the candidate's ability to install,

configure, operate, and troubleshoot medium-size routed and switched networks.

The CCNA - Routing and Switching certification is recognized by IT employers when considering a fresher's

profile for a vacancy or for a salary hike/promotion for experienced employees. The Cisco Certified

Network Associate - Routing and Switching (CCNA - Routing and Switching) exam covers a broad range of

networking concepts to prepare candidates for the technologies they are likely to work with in today’s

network environments.

Please visit Cisco official CCNA Routing and Switching web page for more information.

CCNA exam syllabus includes TCP/IP, IP Addressing and Subnetting, Routing Information Protocol (RIP),

Routing Information Protocol V2 (RIPv2), IGRP (Interior Gateway Routing Protocol), Enhanced Interior

Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), Serial Line Interface Protocol, Frame

Relay, VLANs, Ethernet, access control lists (ACLs) etc.

Thorough knowledge in Basic Networking and TCP/IP is required to continue CCNA Routing and Switching

learning. If you are new to networking, we request you to click the following links to learn Basic

Networking and TCP/IP.

What is a Network?

A network is a group of computers or computer like devices connected together to share the resources like

file, printer, services etc.A typical network contains users working in workstations (also known as a client),

running client operating systems like Windows XP and store their files on a central server. The server

computer has more resources like memory, disk space and more processing power compared to client

computers. The server machine has also an Operating System, which has more processing capabilities

compared with the client machine. The server may be installed with special software, which is helping it to

function as a server. The special software allows file and print services, serve web pages, transfer emails etc.

LAN, MAN and WAN:

Local Area Network (LAN) is a network, which is limited to a small office, single building, multiple buildings,

college, campus etc.A Wide Area Network (WAN) spans over multiple geographic locations, which is

Page 4: CCNA-R&S SHORT NOTES BOOK

composed of multiple LANs. A Metropolitan Area Network (MAN) refers to a network, which is located in a

city or metropolitan area. If an organization has multiple offices in a city, the term that refers the network is

called MAN.

Internet, Intranet, Extranet:

• Internet. The Internet is a worldwide, publicly accessible network of interconnected computer networks

that transmit data using the standard Internet Protocol (IP). The terms World Wide Web (WWW) and

Internet are not the same. The Internet is a collection of interconnected computer networks, linked by

copper wires, fiber-optic cables, wireless connections, etc. Web is a collection of interconnected documents

and other resources, linked by hyperlinks and URLs. The World Wide Web is one of the services accessible via

the Internet, along with various others including email, file sharing, online gaming etc.

• Intranet. An intranet is a private network that is contained within an enterprise. It may consist of many

interlinked local area networks and also use leased lines in the wide area network. The main purpose of an

intranet is to share company information and computing resources among employees.

• Extranet. An extranet can be viewed as part of a company's intranet that is extended to users outside the

company like suppliers, vendors, partners, customers, or other businesses.

Logical Classification of Network:

A network can be divided into two categories. 1) Peer-to-Peer 2) Client-Server

1) Peer-to-Peer. A Peer-to-Peer network has no dedicated servers. Here a number of workstations are

connected together for the purpose of sharing information or devices. All the workstations are considered as

equal. Any one computer can act as client or server at any instance. This network is ideal for small networks

where there is no need for dedicated servers, like home network or small business establishments or shops.

The Microsoft term for peer-to-peer network is “Workgroup”. Typically a Workgroup contain less than 10

workstations. Normal workstation operating systems are Windows 95/98 (obsolete), Windows ME (obsolete),

NT Workstation (obsolete), Windows 2000 professional (obsolete), Windows XP, Vista, Windows 7, Windows

8, RHEL Workstation etc.

2) Client-Server. The client/server model consists of high-end servers serving clients continuously on a

network, by providing them with specific services upon request.

The classifications for servers are

File Server, can be used to store the client documents and files centrally. An ideal file server should

have a large amount of memory, fast hard-disks, multiple processors, fast network adapters,

redundant power supplies etc.

Page 5: CCNA-R&S SHORT NOTES BOOK

Print server, which redirects print jobs from clients to specific printers.

Application server, which allows clients to run certain programs on the server, and enables

multiple users to common applications across the network. Typically Application Servers run

business logic. Which means, every business is different and theApplication Server is the Server

Software which controls the business process. Examples for Application Servers are SAP BASIS,

WebLogic, WebSphere etc.

Database server, which allows authorized clients to view, modify and/or delete data in a common

database. Examples of Database Management Systems are Oracle 8i/9i/10g, MS SQL Server

2000/2005/2008/2012, IBM DB2, MySQL etc.

Directory Servers, which allows the central administration of users and resources. Examples of

Directory Servers are Active Directory, NDS (Novell Directory Services), Fedora Directory Server,

OpenLDAP etc.

The server needs a Network Operating System to function. The most popular NOSs are Windows NT

(obsolete), Windows 2000 (obsolete), Windows 2003 (obsolete), Windows 2008, Windows 2008 R2,

Windows 2012, Windows 2012 R2, Unix, GNU/Linux, Novell Netware etc. These Server Operating Systems

will provide the services, which are requested by the client computers

Explanation of different -2 types of topologies use in Network with theirs advantages & disadvantages

A network topology is the physical layout of computers, cables, and other components on a network. There

are a number of different network topologies, and a network may be built using multiple topologies. The

different types of network layouts are Bus topology, Star topology, Mesh topology, Ring topology, Hybrid

topology and Wireless topology. This lesson explains what is bus topology.

Bus Topology:

A bus topology consists of a main run of cable with a terminator at each end. All nodes like workstations,

printers, laptops, servers etc., are connected to the linear cable. The terminator is used to absorb the signal

when the signal reaches the end, preventing signal bounce. When using bus topology, when a computer

sends out a signal, the signal travels the cable length in both directions from the sending computer. When

the signal reaches the end of the cable length, it bounces back and returns in the direction it came from. This

Page 6: CCNA-R&S SHORT NOTES BOOK

is known as signal bounce. Signal bounce will create problem in the network, because if another signal is sent

on the cable length at the same time, the two signals will collide.

Advantages of Bus Topology

• Easy to connect a computer or peripheral to a linear bus.

• Requires less cable length than a star topology.

Disadvantages of Bus Topology

• Entire network shuts down if there is a break in the main cable.

• Terminators are required at both ends of the backbone cable.

• Difficult to identify the problem if the entire network shuts down.

• Not meant to be used as a stand-alone solution.

Page 7: CCNA-R&S SHORT NOTES BOOK

Star Topology:

A star topology is designed with each node (like workstations, printers, laptops, servers etc.) connected

directly to a central device called as a network switch. Each workstation has a cable that goes from its

network card to a network switch.

Most popular and widely used LAN technology Ethernet currently operates in Star Topology.

Advantages of Star Topology

• Easy to install and wire.

• No disruptions to the network then connecting or removing devices.

• Easy to detect faults and to remove parts.

Disadvantages of Star Topology

• Requires more cable length than a linear bus topology.

Page 8: CCNA-R&S SHORT NOTES BOOK

• If the connecting network device (network switch) fails, nodes attached are disabled and cannot

participate in network communication.

• More expensive than linear bus topology because of the cost of the connecting devices (network

switches).

Mesh Topology:

In Mesh topology, every network device is connected to other network devices. Mesh topology is costly

because of the extra cables needed and it is very complex and difficult to manage.

The main advantage of mesh topology is multiple paths to the destination computer. If one link is down, we

have another path to reach the destination.

Mesh Topology is not commonly used these days.

Ring Topology:

In a ring topology, all computers are connected via a cable that loops in a ring or circle. A ring topology is a

circle that has no start and no end and terminators are not necessary in a ring topology. Signals travel in one

direction on a ring while they pass from one computer to the next, with each computer regenerating the

signal so that it may travel the distance required.

The main advantage of Ring topology is that the signal degeneration is low since each workstation

participating in the network is responsible for regenerating the weak signal. The disadvantage of ring

topology is, if one workstation fails, the entire network will fail.

Page 9: CCNA-R&S SHORT NOTES BOOK

Hybrid Topology:

Hybrid topology is a mixture of different topologies. Example is star-bus topology.

What is Hub?

Hubs were the common network infrastructure devices used for Local Area Network (LAN) connectivity

but network switches are rapidly replacing hubs. These days it is very difficult to spot a Network Hub

functioning in a live Local Area Network (LAN). Hubs function as the central connection point for Local

Area Network (LAN). Hubs are designed to work with Twisted pair cabling and normally use RJ45 jack to

connect the devices. Network devices (Servers, Workstations, Printers, Scanners etc) are attached to the hub

by individual network cables. Hubs usually come in different shapes and different numbers of ports.

When a hub receives a packet of data (an Ethernet frame) at one of its ports from a network device, it

transmits (repeats) the packet to all of its ports to all of the other network devices. If two network devices

on the same network try to send packets at the same time a collision is said to occur.

Hubs are considered to operate at Physical Layer (Layer 1) of OSI model. An 8 port hub is shown below.

Points:

All ports of Hub come under one collision domain.(mean any port of data can collide to any port of

traffic)

All ports of Hub come under one broadcast domain (broadcast traffic (Sent by any port of hub) will

be received on all ports of HUB)

Hub work on half duplex mode ( one time only one device(either sender or receiver ) can send data)

Page 10: CCNA-R&S SHORT NOTES BOOK

Switch & Bridge:

A Bridge/Switch is a network device that typically operates at the Data Link layer (Layer 2) of the OSI model. A

bridge or switch performs the its job by examining the Data Link Layer (Layer 2) data packet (Ethernet

Frame) and forwarding the packet to other devices based on Layer 2 addresses (MAC Addresses). Both switches

and bridges function using Data Link Layer (Layer 2) addressing system, also known as MAC addresses.

Each port of a network switch is in a separate collision domain and therefore Switches are used to divide a

bigcollision domain into multiple smaller collision domains.

Bridge has only few ports and connect only a few collision domains, or Hosts. A Bridge has comparatively less

ports than a Switch. A Switch has usually 24 ports or 48 ports. Brides and Switches are considered to operate

at the Data Link Layer (Layer 2) of the OSI model. Click the following link to learn the exact differences

between Bridges and Switches.

Following picture shows a 24 port, 10/100, Cisco 2950 Catalist Switch.

Page 11: CCNA-R&S SHORT NOTES BOOK

Important Points of Switch:

1. Switch come under one broadcast domain by default and it would be under one broadcast domain

only until and unless we don’t make different broadcast domains on switch with the help of VLAN

2. Switch each port come under unique segment by default mean each port has it unique collision

domain but this feature will not work if you are connecting switch through HUB

Router:

A router is another network infrastructure device that directs packets through the network based on

information from Network Layer (Layer 3) of OSI model. A router uses a combination of hardware and

software to "route" data from its source to its destination. A router can be configured to route data packets

from different network protocols, like TCP/IP (industry standard), IPX/SPX, and AppleTalk.

Routers segment large networks into logical segments called subnets. The division of the network is based on

the Layer 3 addressing system, like IP addresses. If the Network Layer (Layer 3) Data packet (IP Datagram) is

addressed to another device on the local subnet, the packet does not cross the router and create a traffic

congestion problem in another network. If data is addressed to a computer outside the subnet, the router

forwards the data to the addressed network. Thus routing of network data helps conserve network

bandwidth. The following picture shows a Cisco 2800 Series Router.

Types of Cables used in the Network:

Cables are commonly used to carry communication signals within LAN. There are three common types of cable media

that can be used to connect devices to a network and they are coaxial cable, twisted-pair cable, and fiber-optic cable.

Coaxial cable

Coaxial cable looks similar to the cable used to carry TV signal. A solid-core copper wire runs down the middle of the

cable. Around that solid-core copper wire is a layer of insulation, and covering that insulation is braided wire and metal

foil, which shields against electromagnetic interference. A final layer of insulation covers the braided wire.

Page 12: CCNA-R&S SHORT NOTES BOOK

There are two types of coaxial cabling: thinnet and thicknet. Thinnet is a flexible coaxial cable about ¼ inch thick. Thinnet

is used for short-distance. Thinnet connects directly to a workstation’s network adapter card using a British Naval

Connector (BNC). The maximum length of thinnet is 185 meters. Thicknet coaxial is thicker cable than thinnet. Thicknet

cable is about ½ inch thick and can support data transfer over longer distances than thinnet. Thicknet has a maximum

cable length of 500 meters and usually is used as a backbone to connect several smaller thinnet-based networks.

The bandwidth for coaxial cable is 10 Mbps (Mega bits per second).

These days Local Area Networks (LAN) use Twisted Pair cable. It is extremely difficult to find a live business network using

coaxial cable.

Twisted Pair Cable

Twisted-pair cable is the most common type of cabling you can see in today's LAN networks. A pair of wires forms a

circuit that can transmit data. The pairs are twisted to provide protection against crosstalk, the noise generated by

adjacent pairs. When a wire is carrying a current, the current creates a magnetic field around the wire. This field can

interfere with signals on nearby wires. To eliminate this, pairs of wires carry signals in opposite directions, so that the two

magnetic fields also occur in opposite directions and cancel each other out. This process is known as cancellation. Two

Types of Twisted Pairs are Shielded Twisted Pair (STP) and Unshielded Twisted Pair (UTP).

Unshielded twisted-pair (UTP) cable is the most common networking media. Unshielded twisted-pair (UTP) consists of

four pairs of thin, copper wires covered in color-coded plastic insulation that are twisted together. The wire pairs are then

covered with a plastic outer jacket. The connector used on a UTP cable is called a Registered Jack 45 (RJ-45) connector.

UTP cables are of small diameter and it doesn’t need grounding. Since there is no shielding for UTP cabling, it relies only

on the cancellation to avoid noise.

UTP cabling has different categories. Each category of UTP cabling was designed for a specific type of communication or

transfer rate. The most popular categories in use today is 5, 5e and 6, which can reach transfer rates of over 1000 Mbps

(1 Gbps).

The following table shows different UTP categories and corresponding transfer rate.

UTP Category Purpose Transfer Rate

Category 1 Voice Only

Category 2 Data 4 Mbps

Category 3 Data 10 Mbps

Page 13: CCNA-R&S SHORT NOTES BOOK

Category 4 Data 16 Mbps

Category 5 Data 100 Mbps

Category 5e Data 1 Gbps

Category 6 Data 1/10 Gbps

Optical Fiber Cabling

Optical Fiber cables use optical fibers that carry digital data signals in the form of modulated pulses of light. An optical

fiber consists of an extremely thin cylinder of glass, called the core, surrounded by a concentric layer of glass, known as

the cladding. There are two fibers per cable—one to transmit and one to receive. The core also can be an optical-quality

clear plastic, and the cladding can be made up of gel that reflects signals back into the fiber to reduce signal loss.

There are two types of fiber optic cable: Single Mode Fibre (SMF) and Multi Mode Fibre (MMF).

1. Single Mode Fibre (SMF) uses a single ray of light to carry transmission over long distances.

2. Multi Mode Fibre (MMF) uses multiple rays of light simultaneously with each ray of light running at a different

reflection angle to carry the transmission over short distances

Difference b/w straight-through cables & cross over cables

Straight-Through Cables

CAT 5 UTP cabling usually uses only four wires when sending and receiving information on the network. The four wires,

which are used, are wires 1, 2, 3, and 6. When you configure the wire for the same pin at either end of the cable, this is

known as a straight-through cable.

From the figure we can see that the wires 1 and 2 are used to transmit the data from the computer and 3 and 6 are used

to receive data on the computer. The transmit wire on the computer matches with the receive wire on the switch. For

the transmission of data to take place, the transmit pins on the computer should match with the receive pins on

the switch and the transmit pins on the switch should match to receive pins on the computer. Here we can see that the

pins 1, 2, 3 and 6 on the computer matches with pins 1, 2, 3 and 6 on theswitch. Hence we use the term Straight-through.

Page 14: CCNA-R&S SHORT NOTES BOOK

Cross-Over Cables

If we want to connect two computers together with a straight-through cable, we can see that, the transmit pins will be

connected to transmit pins and receive pins will be connected to receive pins. We will not be able to directly connect two

computers or two switches together using straight through cables.

To connect two computers together without using a switch (or two switches directly), we need a crossover cable by

switching wires 1 and 2 with wires 3 and 6 at one end of the cable. If we shift the pins, we can make sure that the

transmit pins on Computer A will match with the receive pins on Computer B and the transmit pins on Computer B will

match with the receive pins on Computer A.

Unicast:

Page 15: CCNA-R&S SHORT NOTES BOOK

Unicast is a type of communication where data is sent from one computer to another computer.

In Unicast type of communication, there is only one sender, and one receiver.

Example:

1) Browsing a website. (Webserver is the sender and your computer is the receiver.)

2) Downloading a file from a FTP Server. (FTP Server is the sender and your computer is the receiver.)

Multicast

Multicast is a type of communication where multicast traffic addressed for a group of devices on the

network. IP multicast traffic are sent to a group and only members of that group receive and/or process the

Multicast traffic.

Devices which are interested in a particular Multicast traffic must join to that Multicast group to receive the

traffic. IP Multicast Groups are identified by Multicast IP Addresses (IPv4 Class D Addresses)

In Multicast, the sender transmit only one copy of data and it is delivered and/or processed to many devices

(Not as delivered and processed by all devices as in Broadcast) who are interested in that traffic.

Example: Multicast Windows Deployment Services (WDS) OS deployment traffic, IP TV etc

Broadcast is a type of communication where data is sent from one computer once and a copy of that data

will be forwarded to all the devices.

Broadcast:

In Broadcast, there is only one sender and the data is sent only once. But the Broadcast data is delivered to

all connected devices.

Switches by design will forward the broadcast traffic and Routers by design will drop the broadcast traffic. In

other words, Routers will not allow a broadcast from one LAN to cross the Router and reach another Network

Segment. The primary function of a Router is to divide a big Broadcast domain to Multiple smaller Broadcast

domain.

Example: ARP Request message, DHCP DISCOVER Message

Page 16: CCNA-R&S SHORT NOTES BOOK

Collision Domain:

“The collection of ports (either one device ports or many devices ports) whose traffics can collide to

each other, called one collision domain “

For example: Hub all ports come under one collision domain because theirs traffics can collide to any

port traffics

But Switch each port has it unique collision domain because one port data will not collide to another

port data until and unless we are not using Hub in the middle as connectivity with switch then those

switch’s ports (which are connected to hub) will come under one collision domain because theirs traffics

can collide to each other due to Hub in the middle.

Explanation :

A term collision is described as an event that usually happens on an Ethernet network when we use a "Shared

Media" to connect the devices in an Ethenrnet network. A "Shared Media" is a type of connecting media

which is used to connect different network devices, where every device share the same media. Example:

1) Ethernet Hubs, 2) Bus Topology

In a "Shared Media" there are no separate channels for sending and recieving the data signals, but only one

channel to send and recieve the data signals.

We call the media as shared media when the devices are connected together using Bus topology, or by

using an Ethernet Hub. Both are half-duplex, means that the devices can Send OR Recieve data signals at

same time. Sending and recieving data signals at same time is not supported.

Collisions will happen in an Ethernet Network when two devices simultaneously try to send data on the

Shared Media, since Shared Media is half-duplex and sending and recieving is not supported at same time.

Please refer CSMA/CD to learn how Ethernet avoid Collision.

Collisions are a normal part of life in an Ethernet network when Ethernet operates in Half-duplex and under

most circumstances should not be considered as a problem.

A Collision Domain is any network segment in which collisions can happen (usually in Ethernet networks). In

other words, a Collision Domain consists of all the devices connected using a Shared Media (Bus Topolgy or

using Ethernet Hubs) where a Collision can happen between any device at any time.

Ethernet Collision Domains

A collision domain is a portion of a network where all nodes receive every frame transmitted by all other nodes, and compete for access to the shared medium. For example, in a small, one-hub 10-megabits-per-second (Mbps) Ethernet network, every node in the network receives every frame transmitted by any other node. Thus, all nodes attached to the hub share the same 10-Mbps bandwidth. The Ethernet Collision Domain Diagram illustrates this principle.

Page 17: CCNA-R&S SHORT NOTES BOOK

Ethernet Collision Domain

In this diagram, Node A wants to send information to Node G. A frame is sent from Node A to the hub. The hub, which is essentially a multiport repeater, repeats the frame out every port. Each node attached to the hub receives the frame. However, only the node that has a NIC address (in this case, Node G) that matches the frame address will process the frame and pass its contents to the next highest layer.

Hub-to-Hub Connectivity

After an Ethernet hub fills to capacity, additional computers cannot be connected to the hub. As a network grows and more nodes are needed, hubs can be added to provide more physical ports to connect additional devices. The Ethernet Hub-to-Hub Diagram illustrates this principle.

Page 18: CCNA-R&S SHORT NOTES BOOK

Ethernet Hub-to-Hub

In this diagram, Node H is removed from the first hub and a connection is made to another hub. Many hubs provide the ability to use one of the hub ports for either device connectivity or hub connectivity. A switch is normally mounted under this port for switching between computer connectivity and hub connectivity. (Another method used to connect hubs built without a switch is to use an Ethernet crossover cable.) The switch is put in one position for attaching a computer, and the opposite position when attaching to another hub.

As noted on the diagram, the port that was used to attach to Node H is now used to attach to the hub. Node H now resides on the second Ethernet hub. Once again this configuration represents a single collision domain. If a frame is generated from Node A to the hub, the hub will repeat the frame out each port. This includes the uplink port that attaches to the second hub. The second hub will then take this frame and repeat it out each of its ports as well.

As networks grow, more and more hubs may be added to increase the number of nodes attached to a network. At some point, servers must be added to provide options not available in a strictly peer-to-peer network. However, when hubs are interconnected, all of their nodes are still in the same collision domain. Regardless of where the information is going to or coming from, each node receives the frame transmission.

As traffic increases in the network, there will be a point where performance is unacceptable. In other words, the 10-Mbps bandwidth shared by all devices in this broadcast network will no longer be adequate. To correct this problem, other devices can be used to divide the network into separate collision domains. We will learn about these devices in upcoming lessons.

Broadcast Domain:

“ The collection of the ports who will receive that broadcast traffic which has been sent by any port in

network come under one broadcast domain”

Broadcast is a type of communication, where the sending device send a single copy of data and that copy of

data will be delivered to every device in the network segment. Broadcast is a required type of communication

and we cannot avoid Broadcasts, because many protocols (Example: ARP and DHCP) and applications are

dependent on Broadcast to function.

A Broadcast Domain consists of all the devices that will receive any broadcast packet originating from any

device within the network segment.

Please see below diagram:

Every switch will flood the broadcast packet to all the ports & Router also will get a copy of broadcast packet,

but the Router will not forward the packet to the next network segment.

Page 19: CCNA-R&S SHORT NOTES BOOK

As the number of devices in the Broadcast Domain increases, number of Broadcasts also increases and the

quality of the network will come down because of the following reasons.

1) Decrease in available Bandwidth: Large number of Broadcasts will reduce the available bandwidth of

network links for normal traffic because the broadcast traffic is forwarded to all the ports in a switch.

2) Decrease in processing power of computers: Since the computers need to process all the broadcast

packets it receive, a portion of the computer CPU power is spent on processing the broadcast packets.

Normally a Broadcast packet is relevant to a particular computer and for other computers that broadcast

packet is irrelevant (For example, DHCP DISCOVER message is relevant only for a DHCP Server. For other

computers DHCP DISCOVER is irrelevant and they will drop the packet after processing). This will reduce the

processing power of computers in a Broadcast domain.

By design, Routers will not allow broadcasts from one of its connected network segment to cross the router

and reach another network segment. The primary function of a Router is to segment (divide) a big broadcast

domain in to multiple smaller broadcast domains.

Cisco IOS Command Lines Modes:

Cisco IOS has a Command Line Interface (CLI) and it has three command line modes. Each mode has access to

different set of IOS commands.

Page 20: CCNA-R&S SHORT NOTES BOOK

User mode (User EXEC mode):

User Mode is the first mode a user has access to after logging into the router. The user mode can be

identified by the > prompt following the router name. This mode allows the user to execute only the basic

commands, such as those that show the system's status. The router cannot be configured or restarted from

this mode.

The user mode can be identified as shown below

Router>

Privileged mode (Privileged EXEC Mode):

Privileged mode allows users to view the system configuration, restart the system, and enter router

configuration mode. Privileged mode also allows all the commands that are available in user mode. Privileged

mode can be identified by the # prompt following the router name. From the user mode, a user can change

to Privileged mode, by running the "enable" command. Also we can keep a enable password or enable secret

to restrict access to Privileged mode. An enable secret password uses stronger encryption when it is stored in

the configuration file and it is more safe

The Privileged mode can be identified as shown below

Router#

Global Configuration mode:

Global Configuration mode allows users to modify the running system configuration. From the Privileged

mode a user can move to configuration mode by running the "configure terminal" command from privileged

mode. To exit configuration mode, the user can enter "end" command or press Ctrl-Z key combination.

The Global Configuration mode can be identified as shown below.

Router(config)#

Global Configuration mode has various sub modes, starting with global configuration mode, which can be

identified by the (config)# prompt following the router name. Following are the important Global

Configuration sub modes.

Page 21: CCNA-R&S SHORT NOTES BOOK

• Interface mode (Router physical interface configuration mode)

Router(config-if)#

• Subinterface mode (Router sub-interface configuration mode)

Router(config-subif)#

• Line mode (Router line configuration mode - console, vty etc.)

Router(config-line)#

• Router configuration mode (Routing protocols configuration mode.)

Router(config-router)#

Basic Router Configuration Commands:

Configure hostname of Router:

To configure a name for router, use hostname command from Global Configuration mode.

Router>enable

Router#configure terminal

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

Router(config)#hostname Rahul Khokhar

Rahul Khokhar(config)#exit

Rahul khokhar#

Configure a MOTD Banner for Router:

Users will be presented with a MOTD (Message of the DAY) banner every time they attempt a connection via

the console port, auxiliary port, or a telnet session to router. Use the following commands to configure a

Page 22: CCNA-R&S SHORT NOTES BOOK

MOTD message. Here the "#" character is known as a delimiting character. The banner message should be

surrounded by delimiting character and the message should not contain the delimiting character.

Rahul Khokhar>enable

Rahul Khokhar#configure terminal

Rahul Khokhar (config)#banner motd #Welcome to Rahul Khokhar router #

Rahul Khokhar(config)#exit

Rahul Khokhar#

Enable DNS lookup:

To configure a DNS server for your router, follow these steps.

Rahul Khokhar>enable

Rahul Khokhar#configure terminal

Rahul Khokhar(config)#ip name-server 10.0.0.1

Rahul Khokhar(config)#exit

Rahul Khokhar#

Turn off the automatic name resolution:

The router is set by default to try to resolve any word that is not a command to a DNS server at address

limited broadcast IP Address 255.255.255.255. We can turn off this by using the following command.

Rahul Khokhar>enable

Rahul Khokhar#configure terminal

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

Rahul Khokhar(config)#no ip domain-lookup

Rahul Khokhar(config)#exit

Rahul Khokhar#

Assign a Local Name to an IP address

Following command assigns a host name to an IP address. Once this is completed, we can use the configured

host name for telnet or ping.

Rahul Khokhar>enable

Rahul Khokhar>configure terminal

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

Page 23: CCNA-R&S SHORT NOTES BOOK

Rahul Khokhar(config)#ip host PC001 10.0.0.2

Rahul Khokhar(config)#exit

Rahul Khokhar#

Turn on synchronous logging:

If the router sends a message to the console while you're entering a command, by default the router will

interrupt your work to show the message.

If you want the information sent to console not interrupt the command you are typing, turn on synchronous

logging.

Rahul Khokhar>enable

Rahul Khokhar#configure terminal

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

Rahul Khokhar(config)#line console 0

Rahul Khokhar(config-line)#logging synchronous

Rahul Khokhar(config-line)#exit

Rahul Khokhar(config)#exit

Rahul Khokhar#

Configure an inactivity time-out for automatic log-off:

Sets time limit when console automatically logs off. Set to 0 0 (minutes seconds) means console never logs

off.

Rahul Khokhar>enable

Rahul Khokhar#configure terminal

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

Rahul Khokhar(config)#line console 0

Rahul Khokhar(config-line)#exec-timeout 3 0

Rahul Khokhar(config-line)#exit

Rahul Khokhar(config)#exit

Rahul Khokhar#

Configure Console Password:

Page 24: CCNA-R&S SHORT NOTES BOOK

To configure the console password, follow these steps.

Router(config)# line console 0

Router(config-line)# password CISCO

Router(config-line)# login

Router(config-line#Ctrl-Z

Router#

Configure password to protect Auxilary (AUX Port) Port:

To configure the auxilary password, follow these steps.

Router#config t

Router(config)#line aux 0

Router(config-line)#password cisco

Router(config-line)#login

Router(config-line)# Ctrl-Z

Router#

Configure password to protect VTY Ports (Telnet Ports)

Configuring the VTY password is very similar to doing the Console and Aux ones. The only difference is that

there are 5 VTY virtual ports, which are named 0, 1, 2, 3, and 4. You can use the shortcut 0 4 (a zero, a space,

and 4) to set all 5 passwords at the same time. To configure the VTY password, follow these steps.

Router#config t

Router(config)#line vty 0 4

Router(config-line)#password cisco

Router(config-line)#login

Router(config-line)# Ctrl-Z

Router#

Page 25: CCNA-R&S SHORT NOTES BOOK

Configure password to protect Privileged Mode:

The Enable Password is the old form of the password for "Privileged Mode". Here the password is stored un-encrypted.

Router#config t

Router(config)#enable password cisco

Router(config-line)# Ctrl-Z

Router#

Enable Secret provides better security since password is kept encrypted using irreversible encryption algorithm.

Router#config t

Router(config)#enable secret cisco

Router(config-line)# Ctrl-Z

Router#

Show Commands Of Router:

Cisco IOS Show Command Description

Rahul Khokhar#show interfaces Displays statistics for all interfaces

Rahul Khokhar #show interface fa0/0 Displays statistics of fa0/0 interface.

You may use other interface also.

Rahul Khokhar #show ip interface brief Displays a summary of all IPv4 interfaces, including

status and IPv4 address assigned in router " Rahul Khokhar "

Rahul Khokhar #show ipv6 interface brief Displays a summary of all IPv6 interfaces, including

status and IPv6 address assigned in router " Rahul Khokhar"

Rahul Khokhar #show controllers serial 1/0

Displays statistics for interface hardware serial 1/0.

Statistics display if the clock rate is set and

if the cable is DCE, DTE, or not attached

Page 26: CCNA-R&S SHORT NOTES BOOK

Rahul Khokhar #show clock Displays the system clock of the router " Rahul Khokhar ".

Rahul Khokhar #show hosts Displays the configured hostnames and their

corresponding IP addresses of the router " Rahul Khokhar "

Rahul Khokhar #show users Displays all users connected to the router

" Rahul Khokhar "

Rahul Khokhar #show history Displays history of Cisco IOS commands used

Rahul Khokhar#show flash Displays info about Flash memory

Rahul Khokhar #show version Displays info about loaded Cisco IOS software

Rahul Khokhar #show arp

Displays the ARP table of the router " Rahul Khokhar ".

ARP table is the table which contains the

resolved IPv4 address to MAC address mappings.

Rahul Khokhar #show protocols Displays status of configured Layer 3 protocols

Rahul Khokhar #show startup-config Displays configuration saved in NVRAM

Rahul Khokhar #show running-config Displays configuration currently running in RAM

Rahul Khokhar #show ip route Displays the IPv4 routing table of the router " Rahul Khokhar "

Rahul Khokhar #show ipv6 route Displays the IPv6 routing table of the router " Rahul Khokhar "

CDP: The Cisco Discovery Protocol (CDP) is a Cisco proprietary Layer 2 (Data Link Layer) network protocol developed by

Cisco to share information about other directly connected Cisco devices, such as the operating system version and IP

address.

Cisco Discovery Protocol (CDP) messages received from a neighbor Cisco device are not forwarded to any other devices

Page 27: CCNA-R&S SHORT NOTES BOOK

by default. This means that Cisco Discovery Protocol (CDP) is passed only to directly connected Cisco devices. Each Cisco

device (which supports Cisco Discovery Protocol (CDP)) stores the messages received from neighbor devices in a table

that can be viewed using the show cdp neighbors command.

Cisco devices send Cisco Discovery Protocol (CDP) messages to the multicast destination address 01:00:0C:CC:CC:CC. CDP

messages are sent every 60 seconds on interfaces that support Subnetwork Access Protocol (SNAP) headers. The support

for Subnetwork Access Protocol (SNAP) is not available with every data link layer media type. The media types which are

supported for Cisco Discovery Protocol (CDP) are Ethernet, Token Ring, FDDI, PPP, HDLC, ATM, and Frame Relay.

Cisco Discovery Protocol (CDP) message contain information about

• IOS software version

• Name of the device (configured with hostname command)

• Hardware capabilities (routing/switching)

• Hardware platform

• The IP addresses of the device

• The interface which generated the Cisco Discovery Protocol (CDP) message

1) VTP in detail

2) STP in detail

VLAN Trunking Protocol (VTP) is a Cisco proprietary protocol that propagates the definition of Virtual

Local Area Networks (VLAN) on the whole local area network. To do this, VTP carries VLAN information

to all the switches in a VTP domain. VTP advertisements can be sent over ISL, 802.1Q, IEEE

802.10 and LANE trunks. VTP is available on most of the Cisco Catalyst Family products. Using VTP, each

Catalyst Family Switch advertises the following on its trunk ports:

Management domain

Configuration revision number

Known VLANs and their specific parameters

There are three versions of VTP, namely version 1, version 2, version 3.

Page 28: CCNA-R&S SHORT NOTES BOOK

Or We Can say:

VTP: we use this protocol to configure (ADD or Delete) VLANS on Server & dynamically synchronize

these VLANS data base with other clients & servers in same domain. You just need to create or delete

VLANS on one Switch called Server and this information will be synchronized to all switches (Server &

Client) in the same domain and other switches (servers & clients) will only synchronized if coming VLANS

data base advertisement has higher configuration revision number .If you are doing any changes with

VLANS on Server then with each change its configuration revision number will increase by 1.But

Transparent switch configuration revision number will never increase and it would be always zero so if

you are going to add any switch in domain and you want to decrease this switch configuration revision

number then make this switch mode to transparent and then back to in mode whatever you want .

Importance of VTP: On Cisco Devices, VTP (VLAN Trunking Protocol) maintains VLAN configuration

consistency across the entire network. VTP uses Layer 2 trunk frames to manage the addition, deletion,

and renaming of VLANs on a network-wide basis from a centralized switch in the VTP server mode. VTP

is responsible for synchronizing VLAN information within a VTP domain and reduces the need to

configure the same VLAN information on each switch.

VTP minimizes the possible configuration inconsistencies that arise when changes are made. These

inconsistencies can result in security violations, because VLANs can cross connect when duplicate names

are used.

VTP Modes of Operation:-

VTP has three different modes of operation within a domain: Server, Client and Transparent.

VTP Server

Every catalyst switch is a server by default. Every network or domain requires a server to propagate VLAN information throughout the network or domain.

As a server switch, it will be able to create, add and delete VLANs in the domain.

VTP server controls any change that’s to be made in the entire domain. When a change is made in the server, it will be advertised throughout the entire VTP domain. VTP server configurations are saved in vlan.dat in flash

VTP Client

Page 29: CCNA-R&S SHORT NOTES BOOK

Switches in a client mode receive information from VTP servers.

VTP client switches also sends and receives updates, but one difference between clients and server is that; VTP client switches can’t create, change and delete VLANs. In other words, none of the ports on the client switch can be added to a new VLAN without the authorization or notification from the server switch.

Switches in client mode processes and forwards VLAN information. VLAN information on client switches is saved in vlan.dat in flash

VTP Transparent:

Switches in a transparent mode receive VTP information from one port and pass to other port without

synchronize with its own VLAN data base.

Mean by using this mode on switch, it helps to disable VTP so you can configure VLANS on this Switch

without dependent on VTP VLANS (mean configured VLANS on Server)

This feature also helps to provide Security & flexibility because you can disable VTP on edge Switches.

IF VTP version is configured 1 then transparent switch will not pass coming information from one

switch to another switch until both switches are not in same domain & don’t have same password

If configured Version is 2 then transparent Switch would not bother about checking switches domain

and password mean it will pass coming information from one switch to another without checking

passwords and domains And VLANS will be saved in both NVRAM and Flash

Upside

VTP provides the following benefits:

VLAN configuration consistency across the network

Mapping scheme that allows a VLAN to be trunked over mixed media

Accurate tracking and monitoring of VLANs

Dynamic reporting of added VLANs across the network

Plug-and-play configuration when adding new VLANs

Downside

As beneficial as VTP can be, it does have disadvantages that are normally related to the spanning tree

protocol (STP) as a bridging loop propagating throughout the network can occur. Cisco switches run an

Page 30: CCNA-R&S SHORT NOTES BOOK

instance of STP for each VLAN, and since VTP propagates VLANs across the campus LAN, VTP effectively

creates more opportunities for a bridging loop to occur.

Before creating VLANs on the switch that will propagate via VTP, a VTP domain must first be set up. A

VTP domain for a network is a set of all contiguously trunked switches with the same VTP domain name.

All switches in the same management domain share their VLAN information with each other, and a

switch can participate in only one VTP management domain. Switches in different domains do not share

VTP information.

Another, even greater concern with VTP is the issue known colloquially as the "VTP Bomb". When a new

switch is added to the network, by default it is configured with no VTP domain name or password, but in

VTP server mode. Since a new switch has a VTP version of 0, it will accept any larger version number as

newer and add that VLAN information to its configuration as long as the other switches have the same

VTP domain and password. However, if you were to accidentally connect a switch to the network with

the correct VTP domain name and password but a higher VTP version number than what the network

currently has, then the entire network would adopt the VLAN configuration of the new switch - likely

bringing down your entire network, or at least that VTP domain.

USE LINK: http://upload.wikimedia.org/wikipedia/commons/c/c7/VLAN_Trunking_Protocol.gif

Require points to make VTP work well:

1) Switches should be in same domain if you want both Switches(Server & Client) to synchronized

Configured VLANS on Server

2) Switches must have configured Trunk so that one switch can send the VLANS through trunk to

another switch

3) All switches must have same VTP version configured

4) All switches must have same Password

5) And of course there must be at least one Server so that you can configure VLANS on this Switch

.FYI- by default all VTP configured switches are Server only so we need to configure VTP Mode

Client or Transparent to change their mode

Understand VTP in detailed with VTP Messages:

Note: This document does not cover VTP Version 3. VTP Version 3 differs from VTP V1 and V2 and is only available on CatOS 8.1(1) or later. Refer to one of these sections of VLAN Trunking Protocol (VTP) for more information:

Page 31: CCNA-R&S SHORT NOTES BOOK

VTP Messages in Detail

VTP packets are sent in either Inter-Switch Link (ISL) frames or in IEEE 802.1Q (dot1q) frames. These packets are sent to the destination MAC address 01-00-0C-CC-CC-CC with a logical link control (LLC) code of Sub network Access Protocol (SNAP) (AAAA) and a type of 2003 (in the SNAP header). This is the format of a VTP packet that is encapsulated in ISL frames:

Of course, you can have a VTP packet inside 802.1Q frames. In that case, the ISL header and cyclic redundancy check (CRC) is replaced by dot1q tagging.

Now consider the detail of a VTP packet. The format of the VTP header can vary, based on the type of VTP message. But, all VTP packets contain these fields in the header:

VTP protocol version: 1, 2, or 3

VTP message types:

o Summary advertisements

o Subset advertisement

o Advertisement requests

o VTP join messages

Management domain length

Management domain name

Configuration Revision Number

The configuration revision number is a 32-bit number that indicates the level of revision for a VTP packet. Each VTP device tracks the VTP configuration revision number that is assigned to it. Most of the VTP packets contain the VTP configuration revision number of the sender.

This information is used in order to determine whether the received information is more recent than the current version. Each time that you make a VLAN change in a VTP device, the configuration revision is incremented by one. In order to reset the configuration revision of a switch, change the VTP domain name, and then change the name back to the original name.

Page 32: CCNA-R&S SHORT NOTES BOOK

Summary Advertisements

By default, Catalyst switches issue summary advertisements in five-minute increments. Summary advertisements inform adjacent Catalysts of the current VTP domain name and the configuration revision number.

When the switch receives a summary advertisement packet, the switch compares the VTP domain name to its own VTP domain name. If the name is different, the switch simply ignores the packet. If the name is the same, the switch then compares the configuration revision to its own revision. If its own configuration revision is higher or equal, the packet is ignored. If it is lower, an advertisement request is sent.

This list clarifies what the fields means in the summary advertisement packet:

The Followers field indicates that this packet is followed by a Subset Advertisement packet.

The Updater Identity is the IP address of the switch that is the last to have incremented the configuration revision.

The Update Timestamp is the date and time of the last increment of the configuration revision.

Message Digest 5 (MD5) carries the VTP password, if MD5 is configured and used to authenticate the validation of a VTP update.

Page 33: CCNA-R&S SHORT NOTES BOOK

Subset Advertisements

When you add, delete, or change a VLAN in a Catalyst, the server Catalyst where the changes are made increments the configuration revision and issues a summary advertisement. One or several subset advertisements follow the summary advertisement. A subset advertisement contains a list of VLAN information. If there are several VLANs, more than one subset advertisement can be required in order to advertise all the VLANs.

This formatted example shows that each VLAN information field contains information for a different VLAN. It is ordered so that lowered-valued ISL VLAN IDs occur first:

Most of the fields in this packet are easy to understand. These are two clarifications:

Code—The format for this is 0x02 for subset advertisement.

Sequence number—This is the sequence of the packet in the stream of packets that follow a summary advertisement. The sequence starts with 1.

Page 34: CCNA-R&S SHORT NOTES BOOK

Advertisement Requests

A switch needs a VTP advertisement request in these situations:

The switch has been reset.

The VTP domain name has been changed.

The switch has received a VTP summary advertisement with a higher configuration revision than its own.

Upon receipt of an advertisement request, a VTP device sends a summary advertisement. One or more subset advertisements follow the summary advertisement. This is an example:

Code—The format for this is 0x03 for an advertisement request.

Start-Value—This is used in cases in which there are several subset advertisements. If the first (n) subset advertisement has been received and the subsequent one (n+1) has not been received, the Catalyst only requests advertisements from the (n+1)th one.

Other VTP Options

VTP Modes

You can configure a switch to operate in any one of these VTP modes:

Server—In VTP server mode, you can create, modify, and delete VLANs and specify other configuration parameters, such as VTP version and VTP pruning, for the entire VTP domain. VTP servers advertise their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links. VTP server is the default mode.

Client—VTP clients behave the same way as VTP servers, but you cannot create, change, or delete VLANs on a VTP client.

Transparent—VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements, but transparent switches do forward VTP advertisements that they receive out their trunk ports in VTP Version 2.

Page 35: CCNA-R&S SHORT NOTES BOOK

Off (configurable only in CatOS switches)—In the three described modes, VTP advertisements are received and transmitted as soon as the switch enters the management domain state. In the VTP off mode, switches behave the same as in VTP transparent mode with the exception that VTP advertisements are not forwarded.

VTP V2

VTP V2 is not much different than VTP V1. The major difference is that VTP V2 introduces support for Token Ring VLANs. If you use Token Ring VLANs, you must enable VTP V2. Otherwise, there is no reason to use VTP V2. Changing the VTP version from 1 to 2 will not cause a switch to reload.

VTP Password

If you configure a password for VTP, you must configure the password on all switches in the VTP domain. The password must be the same password on all those switches. The VTP password that you configure is translated by algorithm into a 16-byte word (MD5 value) that is carried in all summary-advertisement VTP packets.

VTP Pruning

VTP ensures that all switches in the VTP domain are aware of all VLANs. However, there are occasions when VTP can create unnecessary traffic. All unknown unicasts and broadcasts in a VLAN are flooded over the entire VLAN. All switches in the network receive all broadcasts, even in situations in which few users are connected in that VLAN. VTP pruning is a feature that you use in order to eliminate or prune this unnecessary traffic.

Broadcast traffic in a switched network without pruning

This figure shows a switched network without VTP pruning enabled. Port 1 on Switch A and Port 2 on Switch D are assigned to the Red VLAN. If a broadcast is sent from the host connected to Switch A, Switch A floods the broadcast and every switch in the network receives it, even though Switches C, E, and F have no ports in the Red VLAN.

Broadcast traffic in a switched network with pruning

Page 36: CCNA-R&S SHORT NOTES BOOK

This figure shows the same switched network with VTP pruning enabled. The broadcast traffic from Switch A is not forwarded to Switches C, E, and F because traffic for the Red VLAN has been pruned on the links shown (Port 5 on Switch B and Port 4 on Switch D).

When VTP pruning is enabled on a VTP server, pruning is enabled for the entire management domain. Making VLANs pruning-eligible or pruning-ineligible affects pruning eligibility for those VLANs on that trunk only (not on all switches in the VTP domain). VTP pruning takes effect several seconds after you enable it. VTP pruning does not prune traffic from VLANs that are pruning-ineligible. VLAN 1 and VLANs 1002 to 1005 are always pruning-ineligible; traffic from these VLANs cannot be pruned. Extended-range VLANs (VLAN IDs greater than 1005) are also pruning-ineligible.

Use VTP in a Network

By default, all switches are configured to be VTP servers. This configuration is suitable for small-scale networks in which the size of the VLAN information is small and the information is easily stored in all switches (in NVRAM). In a large network, the network administrator must make a judgment call at some point, when the NVRAM storage that is necessary is wasteful because it is duplicated on every switch. At this point, the network administrator must choose a few well-equipped switches and keep them as VTP servers. Everything else that participates in VTP can be turned into a client. The number of VTP servers should be chosen in order to provide the degree of redundancy that is desired in the network.

Notes:

If a switch is configured as a VTP server without a VTP domain name, you cannot configure a VLAN on the switch.

Note: It is applicable only for CatOS. You can configure VLAN(s) without having the VTP domain name on the switch which runs on IOS.

If a new Catalyst is attached in the border of two VTP domains, the new Catalyst keeps the domain name of the first switch that sends it a summary advertisement. The only way to attach this switch to another VTP domain is to manually set a different VTP domain name.

Dynamic Trunking Protocol (DTP) sends the VTP domain name in a DTP packet. Therefore, if you have two ends of a link that belong to different VTP domains, the trunk does not come up if you

Page 37: CCNA-R&S SHORT NOTES BOOK

use DTP. In this special case, you must configure the trunk mode as on or no negotiate, on both sides, in order to allow the trunk to come up without DTP negotiation agreement.

If the domain has a single VTP server and it crashes, the best and easiest way to restore the operation is to change any of the VTP clients in that domain to a VTP server. The configuration revision is still the same in the rest of the clients, even if the server crashes. Therefore, VTP works properly in the domain.

Note: If a domain name is not assigned to the switches and the default name of “NULL” is used, a password can’t be assigned. The “VTP Password” command can be entered in global configuration mode, privilege configuration mode or in the VLAN database mode. The password command must be configured statically on both switches because this change will not get propagated via VTP messages.

VTP Configuration Guidelines

This section provides some guidelines for the configuration of VTP in the network.

All switches have the same the VTP domain name, unless the network design insists for different VTP domains.

Note: Trunk negotiation does not work across VTP domains.

All switches in a VTP domain must run the same VTP version.

All switches in a VTP domain has the same VTP password, if there is any.

All VTP Server switch (es) should have the same configuration revision number and it should also be the highest in the domain.

When you move a VTP mode of a switch from Transparent to Server, VLANs configured on the VTP Transparent switch should exist on the Server switch.

Configuration of VTP:

To configure the VLAN Trunking Protocol (VTP) device mode, use the vtp mode command. To revert to the default server mode, use the no form of this command.

vtp mode { client | off | server | transparent }

no vtp mode

Syntax Description

Client Specifies the device as a client.

Off Specifies the device mode as off.

Server Specifies the device as a server.

Page 38: CCNA-R&S SHORT NOTES BOOK

transparent Specifies the device mode as transparent.

Command Default

Server

Command Modes

Global configuration mode:

In global configuration mode:

In Cisco IOS Software global configuration mode, you can configure all VTP parameters with Cisco IOS Software commands. This is the command format:

Router(config)#vtp ? domain Set the name of the VTP administrative domain. file Configure IFS filesystem file where VTP configuration is stored. interface Configure interface as the preferred source for the VTP IP updater address. mode Configure VTP device mode password Set the password for the VTP administrative domain pruning Set the administrative domain to permit pruning version Set the administrative domain to VTP version

Usage Guidelines

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain. Without VTP, you must configure VLANs in each device in the network. Using VTP, you configure VLANs on a VTP server and then distribute the configuration to other VTP devices in the VTP domain.

In VTP transparent mode, you can configure VLANs (add, delete, or modify) and private VLANs. VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. The VTP configuration revision number is always set to zero (0). Transparent switches do forward VTP advertisements that they receive out their trunk ports in VTP version 2.

A VTP device mode can be one of the following:

server —You can create, modify, and delete VLANs and specify other configuration parameters, such as VTP version, for the entire VTP domain. VTP servers advertise their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links. VTP server is the default mode.

Note You can configure VLANs 1 to 1005. VLANs 1002 to 1005 are reserved for token ring in VTP version 2.

Page 39: CCNA-R&S SHORT NOTES BOOK

client —VTP clients behave the same way as VTP servers, but you cannot create, change, or delete VLANs on a VTP client.

transparent —You can configure VLANs (add, delete, or modify) and private VLANs. VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. Because of this, the VTP configuration revision number is always set to zero (0). Transparent switches do forward VTP advertisements that they receive out their trunk ports in VTP version 2.

off —In the above three described modes, VTP advertisements are received and transmitted as soon as the switch enters the management domain state. In the VTP off mode, switches behave the same as in VTP transparent mode with the exception that VTP advertisements are not forwarded. You can use this VTP device to monitor the VLANs.

Note If you use the no vtp mode command to remove a VTP device, the device will be configured as a VTP server. Use the vtp mode off command to remove a VTP device.

Examples

This example shows how to configure a VTP device in transparent mode and add VLANs 2, 3, and 4:

switch(config)# vtp mode transparent switch(config)# vlan 2-4

This example shows how to remove a device configured as a VTP device:

switch(config)# vtp mode off switch(config)#

This example shows how to configure a VTP device as a VTP server and adds VLANs 2 and 3:

switch(config)# vtp mode server

switch(config)# vlan 2,3

switch(config-vlan)#

This example shows how to configure a VTP device as a client:

switch(config)# vtp mode client

switch(config)#

Related Commands

Command Description

feature vtp Enables VTP on the switch.

show vtp status Displays VTP information.

Page 40: CCNA-R&S SHORT NOTES BOOK

Vlan Configures VLANs.

Spanning Tree Protocol (STP):

STP is used by switches to prevent loops occurring on a network, this process is implemented by using spanning tree algorithm in disabling unwanted links and blocking ports that could cause loop.

Loops and duplicate frames can have severe consequences on a network. Most LANs are designed to provide redundancy so that if a particular link fails another one can take over the forwarding of frame across the LAN.

Remark: STP is layer 2 Protocol which is used to remove the layer 2 loop in redundant network.

Question: Some beginner students ask usually one question: why we are using redundant link if we already know that it can lead to loop in network?

Either this question would be very funny for expert and experienced Network Engineer but for beginner this is not. Okay I tell you if you have same question as I can understand some of you also beginner

Answer: We use redundant link in network to increase availability of network and how availability will be increase because if one link will go down then automatically another link will come up and still network would accessible .And whole idea is to reduce the time & human effort to make network available each time.

And second question: okay if we are using redundant link then why we require STP to block some port so that loop would not occur in network: Answer: If we don’t use STP and using redundant link in network then what would happen .Loop will occur in case of broadcast, multicast & unknown unicast because in all cases each switch will flood the frame to all its ports so what would happen in last loop will occur Okay we see in example:

Note: switch by default flood for multicast traffic because does not understand multicast by default.

Page 41: CCNA-R&S SHORT NOTES BOOK

In Unknown Unicast case also switch flood traffic. Unknown unicast mean if switch does not have any information save about destination Mac address of frame in Mac address table. Switch A is connected to -> Server A & switch B and switch C Switch B is connected to -> server B & switch A and switch C Switch C is connected to -> Server C & switch B and switch A Okay what will happen when server A will send any frame with broadcast destination .Switch A will flood it to both switches B and C instead of same port (traffic coming from) connected to server A because switch always flood the broadcast traffic SO now what will happen Switch B & switch C will also flood this traffic to all of theirs ports instead of that port from where frame is coming And now again frame (traffic) will go back to switch A with again broadcast destination because switch B & switch C will flood back to switch A so switch A will again do the same thing so broadcast storm will occur in network and network will be get down or can crash . Remark: if broadcast storm occurs in network then we will have to shut down any port in loop to stop this broadcast storm. Second as we can see that again and again same frame going to each port so authorized server (the server who really need that data or who is only authorized to see data) will receive multiple copies of same frame. And as we know that switch creates its Mac address table based on source Mac address. Due to flooding of frame, the Mac address instability will also happen because switch will wrongly add different port with this source Mac address because when frame will come back from switch B or switch C then switch A would add that port with this source Mac address at which frame is coming due to flooding from another switches but actually correct port was connected to Server A. But by using STP we can solve this problem because STP will block redundant link temporary so that loop will not occur STP Standards / Types

STP ensures that there is only one logical path between all destinations on the network by intentionally blocking redundant paths that could cause a loop.

When a switch port detects a loop in the network, it blocks (A port is considered blocked when network traffic is prevented from entering or leaving that port) one or more redundant paths to prevent a loop forming.

To stop a loop from forming, STP chooses one switch to be ‘Root Bridge’ on the network. Then other switches selects one of its ports as ‘Root Port’ then, a ‘designated port’ is chosen on each segment and all other ports are closed down.

Page 42: CCNA-R&S SHORT NOTES BOOK

STP outline of Process

Cisco switches runs STP by default, no configuration needed. STP continually monitors the network for failures, be it switch ports or changes in the network topology. STP acts quickly in making redundant ports available if there is a failure on a link. Root Bridge: this must be fastest switch and in to central .root bridge would be select based on lower bridge id .bridge id is combination of priority & Mac address of switch so If two switches have same priority then root bridge selection would happen based on lower Mac address and we already know that Mac address cannot be same inside the same broadcast domain. Root Port: This is the port which will send the lowest cost (lowest cost to reach root bridge) BPDU. There can be only one RP at each switch. RP selection criteria: 1) lowest cost from this port to root bridge 2) If cost is tie then based on lowest Sender bridge id of switch 3) If bridge id also tie then based on lowest sender switch port priority 4) if port priority also same then based on lowest sender switch port id Designated Port: This is the port which will send the lowest cost BPDU in a segment (collision domain). DP selection criteria: 1) lowest cost from this port to root bridge 2) If cost is tie then based on lowest Sender bridge id of switch 3) If bridge id also tie then based on lowest sender switch port priority

Page 43: CCNA-R&S SHORT NOTES BOOK

4) if port priority also same then based on lowest sender switch port id Other Ports will be in the blocking state. Only RP & DP ports will be in forwarding state mean only those ports can send and receive the traffic. STP uses two kinds of messages: BPDU configuration & BPDU TCN BPDU configuration message use as hello message where BPDU TCN use for topology change notification

Bridge Protocol Data Units

The above rules describe one way of determining what spanning tree will be computed by the algorithm, but

the rules as written require knowledge of the entire network. The bridges have to determine the root bridge

and compute the port roles (root, designated, or blocked) with only the information that they have. To

ensure that each bridge has enough information, the bridges use special data frames called Bridge Protocol

Data Units (BPDUs) to exchange information about bridge IDs and root path costs.

A bridge sends a BPDU frame using the unique MAC address of the port itself as a source address, and a

destination address of the STP multicast address 01:80:C2:00:00:00.

There are two types of BPDUs in the original STP specification[6]:63 (the Rapid Spanning Tree (RSTP) extension

uses a specific RSTP BPDU):

Configuration BPDU (CBPDU), used for Spanning Tree computation

Topology Change Notification (TCN) BPDU, used to announce changes in the network topology

BPDUs are exchanged regularly (every 2 seconds by default) and enable switches to keep track of network

changes and to start and stop forwarding at ports as required.

When a device is first attached to a switch port, it will not immediately start to forward data. It will instead go

through a number of states while it processes BPDUs and determines the topology of the network. When a

host is attached such as a computer, printer or server the port will always go into the forwarding state, albeit

after a delay of about 30 seconds while it goes through the listening and learning states (see below). The time

spent in the listening and learning states is determined by a value known as the forward delay (default 15

seconds and set by the root bridge). However, if instead another switch is connected, the port may remain in

blocking mode if it is determined that it would cause a loop in the network. Topology Change Notification

(TCN) BPDUs are used to inform other switches of port changes. TCNs are injected into the network by a

non-root switch and propagated to the root. Upon receipt of the TCN, the root switch will set a Topology

Page 44: CCNA-R&S SHORT NOTES BOOK

Change flag in its normal BPDUs. This flag is propagated to all other switches to instruct them to rapidly age

out their forwarding table entries.

STP Switch port states:

Blocking - A port that would cause a switching loop if it were active. No user data is sent or received

over a blocking port, but it may go into forwarding mode if the other links in use fail and the spanning

tree algorithm determines the port may transition to the forwarding state. BPDU data is still received in

blocking state. Prevents the use of looped paths.

Listening - The switch processes BPDUs and awaits possible new information that would cause it to

return to the blocking state. It does not populate the MAC address table and it does not forward frames.

Learning - While the port does not yet forward frames it does learn source addresses from frames

received and adds them to the filtering database (switching database). It populates the MAC Address

table, but does not forward frames.

Forwarding - A port receiving and sending data, normal operation. STP still monitors incoming BPDUs

that would indicate it should return to the blocking state to prevent a loop.

Disabled - Not strictly part of STP, a network administrator can manually disable a port

To prevent the delay when connecting hosts to a switch and during some topology changes, Rapid STP was

developed, which allows a switch port to rapidly transition into the forwarding state during these situations.

Bridge Protocol Data Unit fields

IEEE 802.1D and IEEE 802.1aq BPDUs have the following format:

1. Protocol ID: 2 bytes (0x0000 IEEE 802.1D)

2. Version ID: 1 byte (0x00 Config & TCN / 0x02 RST / 0x03 MSTP / 0x04 SPT BPDU)

3. BPDU Type: 1 byte (0x00 Config BPDU, 0x80 TCN BPDU, 0x02 RST BPDU)

4. Flags: 1 byte

bits : usage

1 : 0 or 1 for Topology Change

2 : 0 (unused) or 1 for Proposal in RST/MST/SPT BPDU

3-4 : 00 (unused) or

01 for Port Role Alternate/Backup in RST/MST/SPT BPDU

10 for Port Role Root in RST/MST/SPT BPDU

11 for Port Role Designated in RST/MST/SPT BPDU

Page 45: CCNA-R&S SHORT NOTES BOOK

5 : 0 (unused) or 1 for Learning in RST/MST/SPT BPDU

6 : 0 (unused) or 1 for Forwarding in RST/MST/SPT BPDU

7 : 0 (unused) or 1 for Agreement in RST/MST/SPT BPDU

8 : 0 or 1 for Topology Change Acknowledgement

5. Root ID 8 bytes (CIST Root ID in MST/SPT BPDU)

bits : usage

1-4 : Root Bridge Priority

5-16 : Root Bridge System ID Extension

17-64 : Root Bridge MAC Address

6. Root Path Cost: 4 bytes (CIST External Path Cost in MST/SPT BPDU)

7. bridge id: 8 bytes (CIST Regional Root ID in MST/SPT BPDU)

bits : usage

1-4 : Bridge Priority

5-16 : Bridge System ID Extension

17-64 : Bridge MAC Address

8. Port ID 2 bytes

9. Message Age: 2 bytes in 1/256 secs

10. Max Age: 2 bytes in 1/256 secs

11. Hello Time: 2 bytes in 1/256 secs

12. Forward Delay: 2 bytes in 1/256 secs

13. version 1 Length: 1 byte (0x00 no ver 1 protocol info present. RST, MST, SPT BPDU only)

14. version 3 Length: 2 bytes (MST, SPT BPDU only)

The TCN BPDU includes fields 1-3 only.

Summary: Spanning Tree Protocol Few Points 1. Used by switches to turn a redundant topology into a spanning tree 2. Disables unwanted links by blocking ports 3. It Is defined by IEEE 802.1d 4. Switches run STP by default - configuration needed. 5. Choose one switch to be Root Bridge 6. Choose a Root Port on each other switch 7. Choose a Designated Port on each segment 8. Intentionally closes down all other ports

Page 46: CCNA-R&S SHORT NOTES BOOK

The ways to communicate with Router & Switch (Ways to get platform to configure Router or

Switch):

As we know that there are no input devices for router and Switch like a monitor, a keyboard, or a

mouse. An administrator can choose any of the following methods to communicate with the router.

1. Console

2. Auxiliary

3. Telnet

4. SSH

5. HTTP

6. HTTPS

Console Port:

The console port is the management port which is used by administrators to log into a router

directly that’s mean we just need to use workstation to connect this port by using rollover cable and

can access router. WE require a terminal emulator application like hyper

terminal or PUTTY installed in workstation(PC which we are going to use to connect with router

by using rollover cable).

Console port connection is a way to connect to the router when a router cannot be accessed

over the network. “It depends on which way you want to select to configure but this is the

last option and engineer only use it if they can’t access router through network (different

terms of network is secure internet) because you will not go physically to each geographic

area to just configure one device”.

The console port must be used to initially to install routers onto because there is no network

connection initially to connect using SSH, HTTP or HTTPS. Normally router console port is a RJ45

port. The following picture shows a console port on a router.

Page 47: CCNA-R&S SHORT NOTES BOOK

A special type of cable, known as roll over cable is used to connect the Serial/COM port of the

computer to the router or switch console port. One end of the cable is RJ49 type and a DB9 to RJ45

converter is molded on the other end. A picture of the console cable is shown below.

Remark: Different types of model of switch or router can use different-2 types of cables to

connect to console port

If you have a new computer or laptop, there is a chance that you may not have a serial port in your

computer. The new computers or laptops sold today do not include serial or printer ports. The

serial ports have been replaced by Universal Serial Bus (USB) ports.

If you want to connect to the console port of your router or switch, you will need to use a USB to

Serial Adapter. The USB to Serial adapter may not be plug-and-play. You need to install the

corresponding drivers also for these adapters. A typical USB to Serial adapter with console cable is

shown below.

Page 48: CCNA-R&S SHORT NOTES BOOK

Auxiliary Port (AUX Port):

By using a remote computer through a modem that calls another modem connected to the router

with a cable using the Auxiliary Port on the router. Auxiliary Port (AUX Port) allows a direct,

non-network connection to the router, from a remote location. The Auxiliary Port (AUX Port) uses a

connector type to which modems can plug into, which allows an administrator from a remote

location to access the router like a console port.

TELNET, SSH, HTTP or HTTPS:

The routers can be managed over the network by using standard TCP/IP protocols like Telnet, SSH,

HTTP or HTTPS. Telnet was developed in the early days of the UNIX operating system to manage

computers remotely. A Telnet client and server application ships with Cisco's IOS software and

most computer operating systems. SSH is a more secure way to configure routers, since the SSH

communication is encrypted. Cisco IOS also has a HTTP server to managed web based

communication with the router.

Benefits of using router to segment the network:

Bu using router we can divide a big network (we can consider a network as a broadcast domain)

into sub networks, each being a network segment or network layer.

“A big network can be segmented to smaller subnets using a Router”

And what would happen if we don’t split big network into segment: AS the number of devices in the

broadcast domain increases, number of broadcast also increases and the quality of the network will

come down because of the following reasons

1) Decrease in available Bandwidth: Large number of Broadcasts will reduce the available

Page 49: CCNA-R&S SHORT NOTES BOOK

bandwidth of network links for normal traffic because the broadcast traffic is forwarded to all the

ports in a switch. Every device in the broadcast domain will receive the broadcast.

2) Decrease in processing power of computers: Since all the computers need to process

all broadcast packets, a huge portion of the computer CPU power is spent on processing

the broadcast packets. This will reduce the processing power of computers.

By default, routers don't pass broadcasts from one network segment to another network segment

and therefore restrict the broadcast within the Broadcast Domain.

By segmenting a big broadcast domain into smaller smaller broadcast domains, we can keep the

local broadcast traffic local. Routers drop unwanted traffic originating from one network to pass

through the router to reach another network, thus increasing the bandwidth available to each

user.

Another benefits of network segmentation using Routers include

Media Transition: Routers are used to connect networks of different media types. For example, one

of your network segment may be using Token ring as LAN Standard (just as an example, Token

ring is out from industry long way back) and other network segment is using Ethernet as the LAN

Standard. A Router can be used to connect these different LAN Standards.

Routable protocol

A Routable protocol is a network protocol which can carry data from one network and can pass

through the router to reach another network and be delivered to a computer in that remote

network.

Examples of routable protocols: Internet Protocol (IP -IPv4 and IPv6), IPX, AppleTalk, VINES

Internetwork Protocol (VIP), DECnet

Non-routable protocols:

A non-routable protocol’s data cannot be passed through a router to reach a remote network. This

is mainly because of the lack of capability of protocol (almost all non-routable protocols are

designed long back which will not fit well in current networks) and the addressing scheme the

non-routable protocol is using.

Non-routing protocols reach ability limit is its own network and they are designed in such a way to

think that all computers they communicate are on the same network as the source computer.

Autonomous system:

Page 50: CCNA-R&S SHORT NOTES BOOK

Within the Internet, an autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators that presents a common, clearly defined routing policy to the Internet. “An Autonomous System (AS) is a group of networks under a single administrative control which could be an Internet Service Provider (ISP) or a large Enterprise Organization. An Interior Gateway Protocol (IGP) refers to a routing protocol that handles routing within a single autonomous system. IGPs include RIP, IGRP, EIGRP, and OSPF. An Exterior Gateway Protocol (EGP) handles routing between different Autonomous Systems (AS). Border Gateway Protocol (BGP) is an EGP. BGP is used to route traffic across the Internet backbone between different Autonomous Systems “

Autonomous system number:

An ISP must have an officially registered autonomous system number (ASN). A unique ASN is

allocated to each AS for use in BGP routing. AS numbers are important because the ASN uniquely

identifies each network on the Internet

“When BGP (Border Gateway Protocol) was at development and standardization stage, a 16-bit

binary number was used as the Autonomous System Number (ASN) to identify the Autonomous

Systems. 16-bit Autonomous System Number (ASN) is also known as 2-Octet Autonomous System

Number (ASN). By using a 16 bit binary number, we can represent (2 16) numbers, which is equal to

65536 in decimals. The Autonomous System Number (ASN) value 0 is reserved, and the largest ASN

value 65,535, is also reserved. The values, from 1 to 64,511, are available for use in Internet routing,

and the values 64,512 to 65,534 is designated for private use “

IGP (Interior Gateway Protocol):

An Interior Gateway Protocol (IGP) is a type of protocol used for exchanging routing information

between gateways (commonly routers) within an Autonomous System (for example, a system of

corporate local area networks)

“Interior Gateway Protocol (IGP) is a Routing Protocol which is used to find network path

information within an Autonomous System.

Known Interior Gateway Protocol (IGP) Routing Protocols are Routing Information Protocol

(RIP), Interior Gateway Routing Protocol (IGRP), Open Shortest Path First (OSPF) and Intermediate

System to Intermediate System (IS-IS)”

EGP (Exterior gateway protocol):

“Exterior Gateway Protocol (EGP) is a Routing Protocol which is used to find network path

information between different Autonomous Systems. Exterior Gateway Protocol (EGP) is commonly

Page 51: CCNA-R&S SHORT NOTES BOOK

used in the Internet to exchange routing table information. There is only one Exterior Gateway

Protocol (EGP) exists now and it is Border Gateway Protocol (BGP)”

How Router choose best path:

1. First router will always go with longest prefix if prefix is same then go to option 2

2. Then router will select lowest Administrative Distance Routing protocols and if

selection was among routes of different -2 protocols then router can select here

based on lowest AD value but if both routes were from same routing protocols only

then go to option 3

3. Then router will select best path based on lowest metric where metric is a

mechanism to select best path inside any routing protocols and different-2 routing

protocols have different -2 types of metric like OSPF metric is cost and RIP is hop

counts. If metric also same then go to option 4

4. Then do the load balancing mean save both routes in routing tables and send half -2

traffics over them.

Administrative Distance:

Administrative Distance (AD) is a value that routers use in order to select the best path when there

are two or more different routes to the same destination from two different routing protocols.

Administrative Distance counts the reliability of a routing protocol. Administrative Distance (AD) is

a numeric value which can range from 0 to 255.

A lower Administrative Distance (AD) is more trusted by a router, therefore the best Administrative

Distance (AD) being 0 and the worst, 255

Administrative distance of different types of route:

Directly Connected interface - 0

Static Route - 1

Internal EIGRP - 90 (within same autonomous system)

IGRP Route - 100

RIP - 120

Page 52: CCNA-R&S SHORT NOTES BOOK

OSPF - 110

EIGRP External - 170(for external routes coming from different AS

through redistribution)

Unknown Routes - 255

Types of interface in Cisco Router:

Following are the important physical interfaces in a Cisco Router.

•Ethernet - Ethernet IEEE 802.3 standard based physical interface, which operates at 10 Mbps

speed. The media standard used is 10BaseT.

•Fast Ethernet -Fast Ethernet is typically Ethernet IEEE 802.3u standard based physical interface

which operates at 100 Mbps speed. The media standard used is 100BaseT.

•Gigabit Ethernet -Gigabit Ethernet is typically Ethernet IEEE 802.3ab standard based physical

interface which operates at 1000 Mbps speed. The media standard used is1000BASE-T

•Serial: Serial interfaces are typically used for WAN connections from ISP (Internet Service

Providers) for connectivity types like Frame Relay, T1, T3, etc

Note: Only 10Mbps Ethernet interface has a name "Ethernet" in a Cisco Router. A 100Mbps

Ethernet interface is called a "Fast Ethernet" interface and a 1000Mbps Ethernet interface is called

a "Gigabit Ethernet" interface.

Virtual interfaces are also available in a Cisco Router. Examples of virtual interfaces

are Loopback interface and Null interface.

Loopback Interface:

A loopback interface is a virtual interface that resides on a router. It is not connected to any other device. Loopback interfaces are very useful because they will never go down, unless the entire router goes down. This helps in managing routers because there will always be at least one active interface on the routers, the loopback interface.

To create a loopback interface, all you need to do is enter configuration mode for the interface:

Router (config) interface loopback {number}

The only option on this command is to specify a number between 0 and 2,147,483,647.

Loopback interfaces are treated similar to physical interfaces in a router and we can assign IP addresses to them. The command syntax to create a loopback interface is shown below.

Page 53: CCNA-R&S SHORT NOTES BOOK

Router(Config)#int loopback {Number} Router(Config-if)#ip address <ip_address> <subnet_mask> To create a loopback interface, use the following command in a Cisco Router. Router(Config)#int loopback 2 Router(Config-if)#ip address 200.0.0.10 255.255.255.0

Null Interface:

Null interfaces are virtual interfaces and are always up. A virtual interface is not a physical interface

like Fast Ethernet interface or Gigabit Ethernet interface.

Null interfaces never forward or receive traffic; packets routed to a null interface are dropped. Null

interface is a logical interface absorbs packets without forwarding them to another interface or

destination. Null interface is also known as bit bucket because the IP datagram reaching Null

interface are dropped as soon as they are received.

The Null interface in a Cisco Router is a mechanism for preventing routing loops. Enhanced

Interior Gateway Routing Protocol (EIGRP) creates a route to the Null0 interface when it

summarizes a group of routes

Router Serial Interface:

When connecting a serial cable to the serial interface of the router, clocking is provided by an

external device, such as a CSU/DSU device. A CSU/DSU (Channel Service Unit/Data Service Unit) is a

digital-interface device used to connect a router to a digital circuit. The router is the DTE (Data

Terminal Equipment) and the external device is the DCE (Data Communications Equipment), where

the DCE provides the clocking. However, in some cases we might connect two routers back-to-back

using the routers’ serial interfaces (Example: Inside the router labs). Each router is a DTE by

default. The cable decides which end to be DCE or DTE and it is usually marked on the cable.

If is not marked, we can use the Cisco IOS show command "show controller" command to

determine the interface is DTE or DCE. Since clocking is required to enable the interface, one of the

Page 54: CCNA-R&S SHORT NOTES BOOK

two routers should function as DCE and should provide clocking. This can be done by using the

"clock rate" command, from the interface configuration mode.

To find the possible clock rate values, get the command help by using a question mark after the

"clock rate" from the serial interface configuration mode, as shown below.

Router(config-if)# clock rate ?

The output for above command is shown below.

R1>

R1>enable

R1#configure terminal

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

R1(config)#interface serial 2/0

R1(config-if)#clock rate ?

With the exception of the following standard values not subject to rounding,

1200 2400 4800 9600 14400 19200 28800 38400

56000 64000 128000 2015232

Accepted clock rates will be best fitted (rounded) to the nearest value

Supportable by the hardware

<246-8064000> DCE clock rate (bits per second)

These values are in bites per second. You can find the possible values by using help.

Router(config)#interfaces0/1 Router(config-if)# clock rate 64000

Note: If you configure clock rate on DTE port then it can show a message in some model of router

like

Router(config-if)#clock rate 64000

This command applies only to DCE interfaces

Page 55: CCNA-R&S SHORT NOTES BOOK

Static Route:

A static route is a route that is created manually by a network administrator. Static routes

are typically used in smaller networks. In static routing, the Router's routing table entries

are populated manually by a network administrator.

The opposite of a static route is a dynamic route. In dynamic routing, the routing table entries are

populated with the help of routing protocols.

The major advantages of static routing are reduced routing protocol router overhead and reduced

routing protocol network traffic. The major disadvantages of static routing are network changes

require manual reconfiguration in routers and network outages cannot be automatically routed

around. Also it is difficult to configure static routing in a complex network.

Static Route can be configured by the following IOS commands.

• Router(config)#ip route destination_network subnet_mask default_gateway

[administrative_distance] [permanent]

OR

• Router(config)# ip route destination_network subnet_mask interface_to_exit

[administrative_distance] [permanent]

The permanent keyword will keep the static route in the routing table even when the interface the

router uses for the static route fails.

Default Route:

A Default Route (also known as the gateway of last resort) is a special type of static route. Where a

static route specifies a path a router should use to reach a specific destination, a default route

specifies a path the router should use if it doesn’t know how to reach the destination.

Default Route is the network route used by a router when there is no other known route exists for a

given IP datagram's destination address. All the IP data grams with unknown destination address

are sent to the default route.

Default Route can be configured by the following IOS commands.

• Router(config)#ip route 0.0.0.0 0.0.0.0 default_gateway [administrative_distance] [permanent]

OR

Page 56: CCNA-R&S SHORT NOTES BOOK

• Router(config)# ip route 0.0.0.0 0.0.0.0 interface_to_exit [administrative_distance] [permanent]

Dynamic Routings:

Static routing allows routing tables in specific routers to be set up by the network administrator.

Dynamic routing use Routing Protocols that dynamically discover network destinations and how to

get to them. Dynamic routing allows routing tables in routers to change if a router on the route goes

down or if a new network is added

In Dynamic Routing, Routing Protocols running in Routers continuously exchange network status

updates between each other as broadcast or multicast. With the help of routing updates messages

sent by the Routing Protocols, routers can continuously update the routing table whenever a

network topology change happens.

Examples of Routing Protocols are Routing Information Protocol (RIP), Enhanced Interior Gateway

Routing Protocol (EIGRP) and Open Shortest Path First (OSPF).

There are three basic types of routing protocols.

Distance-vector Routing Protocols: Distance-vector Routing Protocols use simple algorithms that

calculate a cumulative distance value between routers based on hop count.

Example: Routing Information Protocol Version 1 (RIPv1) and Interior Gateway Routing Protocol

(IGRP)

Link-state Routing Protocols: Link-state Routing Protocols use sophisticated algorithms that

maintain a complex database of internetwork topology.

Example: Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (IS-IS)

Hybrid Routing Protocols: Hybrid Routing Protocols use a combination of distance-vector and

link-state methods that tries to incorporate the advantages of both and minimize their

disadvantages.

Example: Enhanced Interior Gateway Routing Protocol (EIGRP), Routing Information Protocol

Version 2 (RIPv2)

Routing Metric:

As I told you already that metric is a mechanism to select the best route among the routes for same

destination under same domain of that routing protocol. I said it in general way here but metric is a

mechanism to calculate the distance from one router to the destination router and distance can be

here cost or hop counts etc

Page 57: CCNA-R&S SHORT NOTES BOOK

And router will select best route based on lowest metric

Rip uses Hop count as metric and maximum hop counts metric can be 15 because 16 would be use

as infinity so in Rip traffic can reach maximum 15 routers in one vector side.

EIGRP use the composite metric which is combination of Bandwidth, delay, reliability, load and

MTU.

EIGRP Metric = 256*((K1*Bandwidth) + (K2*Bandwidth)/(256-Load) + K3*Delay)*(K5/(Reliability

+ K4)))

By default, the values of K1 and K3 are set to 1, and K2, K4 and K5 are set to 0.

Hence the above equation is deduced to

EIGRP Metric = 256*(Bandwidth + Delay)

OSPF use cost as metric

The formula used to calculate the cost is 100000000 (Auto reference Bandwidth 100 Mbps

converted to Bps)/Actual Bandwidth of the link in Bps.

Remark: lowest metric -route always prefer on higher metric route during route selection for any

routing protocols.

And metric is nothing just a way to calculate the cost (distance) to destination route and

parameters of calculation can be changed in different -2 protocols but motive is same to calculate

the total distance to destination

Convergence of routing protocols:

In dynamic routing, routing tables are created dynamically by obtaining the network information

from other routers. Routers in the network must be constantly updated to changes in the network

topology. Routes may be added or removed, or routes may fail due to a break in the physical link.

Page 58: CCNA-R&S SHORT NOTES BOOK

When a new link is added or a link fails or changes, updates are sent by routers across the network

that describe changes in the network topology. Other routers in the network then runs a routing

algorithm to recalculate routes and build new routing tables based on the update information.

After recalculation, all the routing tables have arrived at a common view of the network topology. A

converged network topology view means all the routers agree on which links are up, which links

are down, which links are running fastest etc.

Convergence time is the time which a group of routers reach the state of convergence. Optimally the

routing protocols must have fast convergence time.

Distance Vector Routing Protocol

Distance Vector protocols are the simplest among Routing Protocols. Distance vector routing

protocols use the distance and direction (vector) to find paths to destinations.

A router which is running a Distance Vector routing protocol informs its neighbours about the

network topology changes periodically, using limited broadcasts using destination IP address

255.255.255.255.

Distance Vector protocols use the Bellman-Ford algorithm for finding best paths to destinations.

Routers running Distance Vector protocols learn who their neighbours are by listening for routing

broadcasts on their interfaces. Distance Vector protocols periodically send local limited

broadcasts (255.255.255.255) to share routing information.

Distance Vector algorithms pass routing table updates to their immediate neighbors in all

directions. At each exchange,the router increments the distance value received for a route, thereby

applying its own distance value to it. The router who received this update again pass the updated

table further outward, where receiving routers repeat the process.

The Distance Vector protocols do not check who is listening to the updates which they sent and

Distance Vector protocols broadcast the updates periodically even if there is no change in the

network topology.

Distance Vector protocols are the simplest among three types of dynamic routing protocols. They

are easy to set-up and troubleshoot. They require less router resources. They receive the routing

update, increment the metric, compare the result to the routes in the routing table, and update the

routing table if necessary.

Examples of Distance Vector Routing protocols are Routing Information Protocol Version 1

(RIPv1) and Interior Gateway Routing Protocol (IGRP).

Page 59: CCNA-R&S SHORT NOTES BOOK

RIP(Routing Information Protocol):

IP RIP (Routing Information Protocol) comes in two different versions: 1 and 2. Version 1 is a

distance vector protocol (RFC 1058) and Version 2 is a hybrid protocol (RFCs 1721 and 1722).

RIPv1:

RIPv1 uses local broadcasts to share routing information. These updates are periodic in nature,

occurring, by default, every 30 seconds. To prevent packets from circling around a loop forever,

both versions of RIP solve counting to infinity by placing a hop count limit of 15 hops on packets.

Any packet that reaches the sixteenth hop will be dropped. RIPv1 is a classful protocol. RIP

supports up to six equal-cost paths to a single destination. Equal-cost path are the paths where the

metric is same (Hop count).

RIPv1 is a Distance-Vector Routing protocol.

RIPv1 is a Classful routing protocol. Classful routing protocols support only the networks

which are not subnetted. Classful routing protocols do not send subnet mask

information with their routing updates. In other words, if you have a subnetted network

in your RIPv1 routing domain, RIPv1 will announce that network to other as unsubnetted

network.

RIPv1 does not support VLSM (Variable Length Subnet Masking).

RIPv1 support maximum metric (hop count) value of 15. Any router farther than 15 hops

away is considered as unreachable.

RIPv1 send routing updates periodically every 30 seconds as broadcasts using destination

IP address aslimited broadcast IP adddress 255.255.255.255. Since the updates are sent

using the destination IP address oflimited broadcast IP adddress 255.255.255.255, every

router need to process the routing update messages (whether they are running

RIPv1 or not).

RIPv1 does not support authentication of update messages (plain-text or MD5).

Page 60: CCNA-R&S SHORT NOTES BOOK

(RIPv2):

RIPv2 is a distance vector routing protocol with routing enhancements built into it, and it is based

on RIPV1. Therefore, it is commonly called as hybrid routing protocol.

RIPv2 uses multicasts instead of broadcasts. RIPv2 supports triggered updates. when a change

occurs, a RIPv2 router will immediately propagate its routing information to its connected

neighbours. RIPv2 is a classless protocol and it supports variable-length subnet masking (VLSM).

Both RIPv1 and RIPv2 uses hop count as the metric.

RIPv2 is classless routing, which allows us to use subnetted networks also. RIPv2 has the option for

sending network mask in the update to allow classless routing.

RIPv2 support VLSM (Variable Length Subnet Masking).

RIPv2 support maximum metric (hop count) value of 15. Any router farther than 15 hops

away is considered as unreachable.

RIPv2 supports triggered updates.

RIPv2 routing updates are sent as Multicast traffic at destination multicast address of

224.0.0.9. Multicast updates reduce the network traffic. The Multicast routing updates also

helps in reducing routing update message processing overhead in routers which are not

running RIPv2. Only the routers running RIPv2 join to the multicast group 224.0.0.9. Other

routers which are not running RIPv2 can simply filter the routing update packet at Layer 2.

RIPv2 support authentication of RIPv2 update messages (plain-text or

MD5). Authentication helps in confirming that the updates are coming from authorized

sources.

Differences between RIPv1 and RIPv2

RIPv1

1. Supports only classful routing (Does not support VLSM).

2. No authentication.

3. RIPv1 uses Broadcast.

Page 61: CCNA-R&S SHORT NOTES BOOK

RIPv2

1. Supports classless routing (Supports VLSM). RIPv2 incorporates the addition of the network

mask in the update to allow classless routing advertisements.

2. Authentication is available.

3. RIPv2 uses multi-cast instead of broadcast. multicast communication reduces the burden on

the network devices that do not need to listen to RIP updates.

(RIP) Configuration:

Routing Information Protocol (RIP) can be configured in a router using the following IOS

commands. The "version 2" IOS command specifies that we are using RIPv2.

Router>enable

Router#configureterminal

Router(config)#router rip

Router(config-router)#version 2

Router(config-router)# network network-ID

Note: if we don’t use version 2 command that’s mean it will work as RIPV1 and RIPV1 is

class-ful routing protocol mean it will not support sub netting .we will see it in next module

during lab of RIP V1 .

Overview of RIP in depth:

Routing Updates

RIP sends routing-update messages at regular intervals and when the network topology changes.

When a router receives a routing update that includes changes to an entry, it updates its routing

table to reflect the new route. The metric value for the path is increased by 1, and the sender is

indicated as the next hop. RIP routers maintain only the best route (the route with the lowest

metric value) to a destination. After updating its routing table, the router immediately begins

transmitting routing updates to inform other network routers of the change. These updates are sent

independently of the regularly scheduled updates that RIP routers send.

Page 62: CCNA-R&S SHORT NOTES BOOK

RIP Routing Metric

RIP uses a single routing metric (hop count) to measure the distance between the source and a

destination network. Each hop in a path from source to destination is assigned a hop count value,

which is typically 1. When a router receives a routing update that contains a new or changed

destination network entry, the router adds 1 to the metric value indicated in the update and enters

the network in the routing table. The IP address of the sender is used as the next hop.

RIP Stability Features

RIP prevents routing loops from continuing indefinitely by implementing a limit on the number of

hops allowed in a path from the source to a destination. The maximum number of hops in a path is

15. If a router receives a routing update that contains a new or changed entry, and if increasing the

metric value by 1 causes the metric to be infinity (that is, 16), the network destination is considered

unreachable. The downside of this stability feature is that it limits the maximum diameter of a RIP

network to less than 16 hops.

RIP includes a number of other stability features that are common to many routing protocols. These

features are designed to provide stability despite potentially rapid changes in a network's topology.

For example, RIP implements the split horizon and holddown mechanisms to prevent incorrect

routing information from being propagated.

RIP Timers

RIP uses numerous timers to regulate its performance. These include a routing-update timer, a

route-timeout timer, and a route-flush timer. The routing-update timer clocks the interval between

periodic routing updates. Generally, it is set to 30 seconds, with a small random amount of time

added whenever the timer is reset. This is done to help prevent congestion, which could result from

all routers simultaneously attempting to update their neighbors. Each routing table entry has a

route-timeout timer associated with it. When the route-timeout timer expires, the route is marked

invalid but is retained in the table until the route-flush timer expires.

Packet Formats

The following section focuses on the IP RIP and IP RIP 2 packet formats. Each illustration is

followed by descriptions of the fields illustrated.

RIP Packet Format

Figure: An IP RIP Packet Consists of Nine Fields

Page 63: CCNA-R&S SHORT NOTES BOOK

The following descriptions summarize the IP RIP packet format fields illustrated in Figure: An IP

RIP Packet Consists of Nine Fields:

Command - Indicates whether the packet is a request or a response. The request asks that a

router send all or part of its routing table. The response can be an unsolicited regular routing

update or a reply to a request. Responses contain routing table entries. Multiple RIP packets are

used to convey information from large routing tables.

Version number - Specifies the RIP version used. This field can signal different potentially

incompatible versions.

Zero - This field is not actually used by RFC 1058 RIP; it was added solely to provide

backward compatibility with prestandard varieties of RIP. Its name comes from its defaulted

value: zero.

Address-family identifier (AFI) - Specifies the address family used. RIP is designed to

carry routing information for several different protocols. Each entry has an address-family

identifier to indicate the type of address being specified. The AFI for IP is 2.

Address - Specifies the IP address for the entry.

Metric - Indicates how many internetwork hops (routers) have been traversed in the trip to

the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable route.

Note: Up to 25 occurrences of the AFI, Address, and Metric fields are permitted in a single IP

RIP packet. (Up to 25 destinations can be listed in a single RIP packet.)

RIP 2 Packet Format

The RIP 2 specification (described in RFC 1723) allows more information to be included in RIP

packets and provides a simple authentication mechanism that is not supported by RIP.

Figure: An IP RIP 2 Packet Consists of Fields Similar to Those of an IP RIP Packet

The following descriptions summarize the IP RIP 2 packet format:

Page 64: CCNA-R&S SHORT NOTES BOOK

Command - Indicates whether the packet is a request or a response. The request asks that a

router send all or a part of its routing table. The response can be an unsolicited regular routing

update or a reply to a request. Responses contain routing table entries. Multiple RIP packets are

used to convey information from large routing tables.

Version - Specifies the RIP version used. In a RIP packet implementing any of the RIP 2

fields or using authentication, this value is set to 2.

Unused - Has a value set to zero.

Address-family identifier (AFI) - Specifies the address family used. RIPv2's AFI field

functions identically to RFC 1058 RIP's AFI field, with one exception: If the AFI for the first entry

in the message is 0xFFFF, the remainder of the entry contains authentication information.

Currently, the only authentication type is simple password.

Route tag - Provides a method for distinguishing between internal routes (learned by RIP)

and external routes (learned from other protocols).

IP address - Specifies the IP address for the entry.

Subnet mask - Contains the subnet mask for the entry. If this field is zero, no subnet mask

has been specified for the entry.

Next hop - Indicates the IP address of the next hop to which packets for the entry should be

forwarded.

Metric - Indicates how many internetwork hops (routers) have been traversed in the trip to

the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable route.

Note: Up to 25 occurrences of the AFI, Address, and Metric fields are permitted in a single IP

RIP packet. That is, up to 25 routing table entries can be listed in a single RIP packet. If

the AFI specifies an authenticated message, only 24 routing table entries can be

specified. Given that individual table entries aren't fragmented into multiple packets, RIP

does not need a mechanism to re sequence data grams bearing routing table updates

from neighboring routers.

Review Questions

Q - Name RIP's various stability features.

A - RIP has numerous stability features, the most obvious of which is RIP's maximum

hop count. By placing a finite limit on the number of hops that a route can take, routing

loops are discouraged, if not completely eliminated. Other stability features include its

various timing mechanisms that help ensure that the routing table contains only valid

routes, as well as split horizon and holddown mechanisms that prevent incorrect routing

information from being disseminated throughout the network.

Page 65: CCNA-R&S SHORT NOTES BOOK

Q - What is the purpose of the timeout timer?

A - The timeout timer is used to help purge invalid routes from a RIP node. Routes that

aren't refreshed for a given period of time are likely invalid because of some change in

the network. Thus, RIP maintains a timeout timer for each known route. When a route's

timeout timer expires, the route is marked invalid but is retained in the table until the

route-flush timer expires.

Q - What two capabilities are supported by RIP 2 but not RIP?

A - RIP 2 enables the use of a simple authentication mechanism to secure table updates.

More importantly, RIP 2 supports subnet masks, a critical feature that is not available in

RIP.

Q - What is the maximum network diameter of a RIP network?

A - A RIP network's maximum diameter is 15 hops. RIP can count to 16, but that value is

considered an error condition rather than a valid hop count.

EIGRP (Enhanced Interior Gateway Routing Protocol)

Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco proprietary enhanced Distance

Vector routing protocol. EIGRP is based on IGRP, hence the configuration is similar. Enhanced

Interior Gateway Routing Protocol (EIGRP) is considered as a Hybrid Routing Protocol because

EIGRP has characteristics of both Distance Vector and Link State Routing Protocols. Both EIGRP and

IGRP offer load balancing across six paths (equal or unequal), and they have

similar metric structures. EIGRP has faster convergence, and has less network overhead, since it

uses incremental updates. Another important features of Enhanced Interior Gateway Routing

Protocol (EIGRP) are routing loop-free topology, VLSM and route summarization, multicast and

incremental updates and routes for multiple routed protocols (IP, IPX and AppleTalk)

Enhanced Interior Gateway Routing Protocol (EIGRP) Uses Diffused Update Algorithm (DUAL) to

calculate the shortest path

The following formula is used to calculate the metric of Enhanced Interior Gateway Routing

Protocol (EIGRP).

Metric = [K1*Bandwidth + (K2*Bandwidth)/ (256 - Load) + K3*Delay] * [K5/(Reliability + K4)]

Page 66: CCNA-R&S SHORT NOTES BOOK

The default values for K are K1 = 1, K2 = 0, K3 = 1, K4 = 0, K5 = 0. For default behaviour, the formula

can be simplified as metric = bandwidth + delay

Important things need to remind to make EIGRP neighbor successfully:

1. Routers must be in same AS

2. Routers should be in same subnet (there is an exception here and that we will see in

Lab)

3. Routers must have same authentication

4. Routers must have same metric weight (Mean K configured Value) Values

5. Routers must not be Passive routers (we will see during Lab )

Important terms related with Enhanced Interior Gateway Routing Protocol (EIGRP)

DUAL:

DUAL stands for Diffused Update Algorithm, the algorithm used by Enhanced Interior Gateway

Routing Protocol (EIGRP) to calculate the shortest path.

This is the algorithm which gives surety for solution in finite time. Here in EIGRP we use it to

calculate available next loop free route if we don’t have any feasible successor in topology table .If

we don’t have FS then we need something good collection of steps which can help EIGRP to find

next loop free route if available and we complete this process with the help of query and reply

messages of EIGRP and By using DUAL Algorithm characteristics .So Finally Main motive of using

Dual Algorithm is to make loop free EIGRP during above time.

Neighbor table:

Neighbor table contains a list of the EIGRP neighbours. Each routed protocol for EIGRP has its own

neighbour table.

Topology table:

Topology table contains a list of all destinations and paths the EIGRP router learned. There is a

separate topology table for each routed protocol.

Page 67: CCNA-R&S SHORT NOTES BOOK

Successor:

Successor is the best path to reach a destination within the topology table.

Feasible successor:

Feasible successor is the best backup path to reach a destination and there can be more than one

feasible successor at same time and router will select second best feasible successor in absent of

current successor by default and we can change this behavior of EIGRP by using unequal load

balancing mechanism of EIGRP. EIGRP has by default variance Value equal to one.

If we increase it and suppose make it two then All routes which are satisfying the feasibility

condition and whose FD are less than or equal to multiple of current successor FD and Variance

Value can be come in routing table at same time.

Notes: but here two points are important

1. First those should be Feasible successor routes mean those must be satisfying the

feasibility condition that’s mean those AD must be lower than current successor FD.

2. Then we need to Use MAXIMUM command under EIGRP to set how many exactly routes

with same metric and different metric (or through unequal load balancing method) can be

saved inside the routing table and can be used concurrently by doing load balancing.

Routing table:

Routing table contains all of the successor routes from the topology table. There is a separate

routing table for each routed protocol.

I already told you how router does select best Path or route.

1. As you know that we are using EIGRP routing protocol now so we talk based on it. First

router will check –does he has any longest prefix route and if he has then first priority

router will give to longest prefix route and he prefix are same then

2. Router will check –do routes are belonging different protocols mean router will select based

on AD because it is coded in router ‘s brain that lowest AD routing protocol is more

believable so router will select lowest AD route and if AD is also same mean routes are

belonging to same protocols then

3. Router will select best route based on lowest metric and as we know that EIGRP uses

compost metric (collection of bandwidth ,delay ,reliability ,Load and MTU)

Page 68: CCNA-R&S SHORT NOTES BOOK

4. And if metric are same for few number of routes then more than one route ,router can saved

inside the routing table based on configured Maximum command and router will do load

balancing of traffic .

5. We can do unequal load balancing also in EIGRP by using Variance command.

Advertised distance:

Advertised distance is the distance (metric) that a neighboring router will use to reach for a

particular route and he is advertising that distance for that specific route to your router

Feasible distance:

Feasible distance is the distance (metric) that your router will use to reach a specific route.

EIGRP in Depth:

Introduction

Enhanced Interior Gateway Routing Protocol (EIGRP) is an interior gateway protocol suited for

many different topologies and media. In a well designed network, EIGRP scales well and provides

extremely quick

Convergence times with minimal network traffic.

EIGRP Theory of Operation

Some of the many advantages of EIGRP are:

very low usage of network resources during normal operation; only hello packets are

transmitted on a stable network

when a change occurs, only routing table changes are propagated, not the entire routing

table; this reduces the load the routing protocol itself places on the network

rapid convergence times for changes in the network topology (in some situations

convergence can be almost instantaneous)

EIGRP is an enhanced distance vector protocol, relying on the Diffused Update Algorithm

(DUAL) to calculate the shortest path to a destination within a network.

Major Revisions of the Protocol

There are two major revisions of EIGRP, versions 0 and 1. Cisco IOS versions earlier than 10.3(11),

11.0(8), and 11.1(3) run the earlier version of EIGRP; some explanations in this paper may not

apply to that earlier version. We highly recommend using the later version of EIGRP, as it includes

many performance and stability enhancements.

Page 69: CCNA-R&S SHORT NOTES BOOK

Neighbor Discovery and Maintenance

To distribute routing information throughout a network, EIGRP uses non−periodic incremental routing Updates. That is, EIGRP only sends routing updates about paths that have changed when those paths change. The basic problem with sending only routing updates is that you may not know when a path through a Neighboring -router is no longer available. You can’t time out routes, expecting to receive a new routing table from your neighbors. EIGRP relies on neighbor relationships to reliably propagate routing table changes throughout the network; two routers become neighbors when they see each other's hello packets on a common network. EIGRP sends hello packets every 5 seconds on high bandwidth links and every 60 seconds on low bandwidth multipoint links. 5−second hello:

broadcast media, such as Ethernet, Token Ring, and FDDI point−to−point serial links, such as PPP or HDLC leased circuits, Frame Relay point−to−point sub interfaces, and ATM point−to−point subinterface high bandwidth (greater than T1) multipoint circuits, such as ISDN PRI and Frame Relay

60−second hello:

multipoint circuits T1 bandwidth or slower, such as Frame Relay multipoint interfaces, ATM multipoint interfaces, ATM switched virtual circuits, and ISDN BRIs

The rate at which EIGRP sends hello packets is called the hello interval, and you can adjust it per interface with the ip hello−interval eigrp command. The hold time is the amount of time that a router will consider a neighbor alive without receiving a hello packet. The hold time is typically three times the hello interval, by default, 15 seconds and 180 seconds. You can adjust the hold time with the ip hold−time eigrp command. OSPF (Open Shortest Path First):

The Open Shortest Path First (OSPF) protocol is a link state protocol that handles routing for IP

traffic. Its newest implementation, version 2, which is explained in RFC 2328, is an open standard.

Open Shortest Path First (OSPF) is an open standard (not proprietary) and it will run on most

routers independent of make. Open Shortest Path First (OSPF) uses the Shortest Path First (SPF)

algorithm, developed by Dijkstra, to provide a loop-free topology. Open Shortest Path First (OSPF)

provides fast convergence with triggered, incremental updates via Link State Advertisements

(LSAs). Open Shortest Path First (OSPF) is a classless protocol and allows for a hierarchical design

with VLSM and route summarization.

The main disadvantages of Open Shortest Path First (OSPF) are Open Shortest Path First (OSPF)

requires more memory to hold the adjacency (list of OSPF neighbors), topology (a link state

Page 70: CCNA-R&S SHORT NOTES BOOK

database containing all of the routers and their routes), and routing tables, Open Shortest Path First

(OSPF) requires extra CPU processing to run the SPF algorithm and Open Shortest Path First (OSPF)

is a complex routing protocol.

The two important concepts in case of OSPF are Autonomous Systems and Areas. Areas are used to

provide hierarchical routing, within an Autonomous System. Areas are used to control when and

how much routing information is shared across your network.

OSPF implements a two-layer hierarchy: the backbone (Area 0) and areas off of the backbone

(Areas 1–65,535). Here the two different areas can summarize routing information between

them. Route summerizationhelps to compact the routing tables. All areas should connect to Area 0

and all routers in an Area will have the same topology table.

OSPF is the recommended IGP for very large enterprise networks. Entire Open Shortest Path First (OSPF) network can be be divided up into small networks called OSPF Areas. Open Shortest Path First (OSPF) supports hierarchical network design. Open Shortest Path First (OSPF) allows the network to be designed in two layer hierarchies. Area 0 (backbone are ) at one layer and all other Areas at other layer An Open Shortest Path First (OSPF) Area must be configured as a group of contiguous IP networks. This allows Route Summarization at Area level. An OSPF Area is a collection of OSPF routers and networks that share the same Link State Database. A Router in one OSPF Area doesn't have detailed information about network topology outside of its area. Advantages of designing Multi-Area OSPF networks are listed below. The Routers in same OSPF Area share the same Link State Database (LSDB). The memory and processor requirement for Link State Database (LSDB) in Routers are less. Whenever a network topology change happens in a network then the Routers need to re-run the SPF algorithm to calculate best routes. The SPF algorithm is required to run when the topology change happens in the same area. Hence OSPF Routers within Area have to run SPF less often. Manual Route summarization can be configured only on ABR and ASBR, which allows the Areas to exchange, summarized routing tables between each other. Types of LSA: LSA TYPE 1: Each router sends its all interface and configured network for that area to all it connected neighbor router in that area. LSA TYPE 2: To reduce the numbers of LSA inside any area ,we use DR and BDR concept on multi-access network because on multi-access network each router will be neighbor of each router so if each router will share LSA then lot of LSA will flood and then each router will share this network info

Page 71: CCNA-R&S SHORT NOTES BOOK

outside of this area so to reduce this things ,they built a concept of DR and BDR and LSA 2 .here DR only will share this network info within this area so this LSA would be known as LSA 2. LSA Type 3 :ABR router will send all one area routes info in summary format to other area to reduce the memory size and build network reach ability .ABR will do this with the help of LSA Type 3 LSA Type 4: ABR will create to tell the router about cost of ASBR from that ABR LSA Type 5:When we will redistribute the routes of different domain inside the OSPF then ASBR(which router ,you are using for redistribution ) will create this LSA to provides the info about different domain routes LSA Type 6: If we are using multicast OSPF then configured MOSPF router will send this type of LSA to other MOSPF router in this area or domain to provide info about multicast tree.

LSA Type 7: If we have configured Not so Stubby area then ASBR inside this area will create LSA type 7

Instead of creating LSA type 5 and ABR of this area will convert LSA 7 back to LSA 5 when he will send

these routes outside of this area. We can change this behavior of ABR and ABR will not do it and will not

send routes outside of this are by doing manipulation with bit.

Remark: we will see these -STUB Area , totally stub area ,Not so Stub Area ,Totally Not so Stub Area in

next module during Lab.

We will cover Virtual Link and it Lab in Next Module

Required things to build OSPF Neighbor successfully:

1. Routers must be in same Area

2. Routers must be in same subnet

3. Routers must have unique router-ID

4. Routers must be in same Stub area

5. Routers must have same authentication

Important Terms related with Open Shortest Path First (OSPF)

Page 72: CCNA-R&S SHORT NOTES BOOK

Router ID

Every Router in an OSPF network needs a unique OSPF Router ID. The OSPF Router ID is used to

provide a unique identity to the OSPF Router.

What is a Loopback Interface

A loopback interface is a logical, virtual interface on a router. By default, the router doesn’t have any

loopback interfaces, but they can easily be created. These interfaces are treated as physical

interfaces on a router and we can assign ip addresses to them.

Router(Config)#intloopback2

Router(Config-if)#ip address 100.0.0.10 255.255.255.0

Area border router (ABR)

An Area border router (ABR) is a router that connects one or more OSPF areas to the main

backbone network. It is considered a member of all areas it is connected to.

Internal router

An Internal Router is a router that has only OSPF neighbour relationships with routers in the same

area.

Backbone router

Backbone Routers are part of the OSPF backbone. This includes all area border routers and also

routers connecting different areas.

Designated Router (DR) and Backup Designated Router (BDR)

A Designated Router (DR) is the router interface elected among all routers on a network segment,

and Backup designated (BDR) is a backup for the Designated Router (DR). Designated Routers

(DRs) are used for reducing network traffic by providing a source for routing updates. The

Designated Router (DR) maintains a complete topology table of the network and sends the updates

to the other routers via multicast. All routers in an area will form a slave/master relationship with

the Designated Router (DR).

Summary: Each Router in an OSPF network needs a unique OSPF Router ID. The OSPF Router ID is

used to provide a unique identity to the OSPF Router.

OSPF Router ID is an IPv4 address (32-bit binary number) assigned to each router running the

OSPF protocol.

Page 73: CCNA-R&S SHORT NOTES BOOK

OSPF Router ID should not be changed after the OSPF process has been started and the ospf

neighborships are established. If you change the OSPF router ID, we need to either reload the IOS or

use "clear ip ospf process" command, for OSPF Router ID change to take effect. Reloading the IOS or

using "clear ip ospf process" command can cause temporary network outage.

OSPF Router ID selection algorithm works as below.

a. Any manually configured OSPF Router ID in OSPF Process is selected as the OSPF

Router ID.

b. If there is no OSPF Router ID configured, the highest IP address on any of the

Routers Loopback Interfaces is selected as the OSPF Router ID.

c. If there is no Loopback Interfaces configured, the highest IP address on its active

interfaces is selected as the OSPF Router ID.

To configure OSPF Route ID in OSPF Process, follow these steps.

R1>enable

R1#configure terminal

R1(config)#router ospf 100

R1(config-router)#router-id 1.1.1.1

R1(config-router)#exit

R1(config)#exit

Rahul Khokhar CCIE Trainer