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

Ccna 2 Router and Routing Basics: 5-Managing Cisco IOS Software

The document discusses the boot sequence and file system management for Cisco routers. It describes how the router loads the Cisco IOS software through a series of steps including checking hardware, loading IOS from various sources like NVRAM, flash memory, network server or ROM. It also explains how to troubleshoot boot failures and manage files on the Cisco file system, which provides a common interface for accessing files stored in different memory types. The naming convention for Cisco IOS images includes the hardware platform, feature set, software version and file format details.

Uploaded by

Amit
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Ccna 2 Router and Routing Basics: 5-Managing Cisco IOS Software

The document discusses the boot sequence and file system management for Cisco routers. It describes how the router loads the Cisco IOS software through a series of steps including checking hardware, loading IOS from various sources like NVRAM, flash memory, network server or ROM. It also explains how to troubleshoot boot failures and manage files on the Cisco file system, which provides a common interface for accessing files stored in different memory types. The naming convention for Cisco IOS images includes the hardware platform, feature set, software version and file format details.

Uploaded by

Amit
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

CCNA 2

Router and Routing Basics

5- Managing Cisco IOS Software

1
5.1 Router Boot Sequence and Verification
5.1.1 Stages of the router power-on boot sequence

• The goal of the startup routines for Cisco IOS software is to start the router operations.

A router must reliably connect any configured networks. To do this, the startup routines
must :
• Test the router hardware
• Find and load the Cisco IOS software
• Find and apply configuration statements such as protocol functions and interface
addresses

the sequence and services that are used to initialize a router:

2
5.1 Router Boot Sequence and Verification
5.1.2 How a Cisco device locates and loads IOS

• Most routers use the boot system


commands saved in NVRAM.
– Cisco IOS software allows several
alternatives to be used. Other sources can
be specified for the software, or the router
can use its own fallback sequence to load
the software.

The settings in the configuration register


enable the following alternatives:
• Global configuration mode boot system
commands can be specified to enter fallback
sources for a router to use in sequence. The
router will use these commands as needed
when it restarts.

• If NVRAM lacks boot system commands that a
router can use, the system will use the Cisco
IOS software in flash memory by default.

• If flash memory is empty, a router will try to use TFTP to load an IOS image from the network. The
router will use the configuration register value to form a filename from which to boot a default
system image that is stored on a network server.

• If a TFTP server is unavailable, the router will load the limited version Cisco IOS software image
stored in ROM. 3
5.1 Router Boot Sequence and Verification
5.1.3 Using the boot system command
Cisco IOS software image will load sequentially
from

• Flash memory Information stored in flash


memory is not vulnerable to network failures
that can occur when system images are
loaded from TFTP servers.
• Network server - If flash memory is
corrupted, a system image can be loaded
from a TFTP server.
• ROM - The final bootstrap option is to boot
from ROM. However, a system image in
ROM is usually a subset of the Cisco IOS
that lacks the protocols, features, and
configurations of the full Cisco IOS. Also, if
the software has been updated, a router
may have an older version stored in ROM.

• The command copy running-config


startup-config saves the commands in
NVRAM.

• E-lab , lab

4
5.1 Router Boot Sequence and Verification
5.1.4 Configuration register

• The configuration register is a 16-bit register in NVRAM that is represented as 4 hexadecimal digits.
• The lowest four bits of the configuration register form the boot field. To ensure that the upper 12
bits are not changed.
• first use the show version command to retrieve the current values of the configuration register.
• Then use the config-register command and change only the value of the last hexadecimal digit.

To change the boot field in the configuration register:


(nnn represents the previous value of the non-boot field digits)
• set the configuration register value to 0xnnn0 ( enter the ROM monitor mode)
– This value sets the boot field bits to 0000 binary. After a reload or power cycle, the device will
boot to ROM monitor prompt. Use the b command to boot the operating system manually.

• To boot from the first image in Flash or to boot to the IOS in ROM (platform dependant),
set the configuration register to 0xnnn1
– This value sets the boot field bits to 0001 binary.
– Older platforms, such as Cisco 1600 and 2500 routers, will boot to a limited IOS in ROM. Newer
platforms, such as Cisco 1700, 2600 and high end routers, will boot from the first image in Flash.

• To configure the system to use the boot system commands in NVRAM, set the
configuration register to any value from 0xnnn2 to 0xnnnF,
– These values set the boot field bits to a value between 0010 and 1111 binary.
– The router sequentially processes each boot system command in NVRAM until the process is
successful or the end of the list is reached.
– If there are no boot system commands in the startup configuration file, the router attempts to
boot the first file in flash memory. 5
E-lab
5.1 Router Boot Sequence and Verification

5.1.5 Troubleshooting IOS boot failure


reasons that a router may not boot properly:
• Configuration file has missing or incorrect boot system statement
• Incorrect configuration register value
• Corrupted flash image
• Hardware failure

• When a router boots, it looks in the startup configuration file for a boot system
statement. This boot system statement can force the router to boot from another image
instead of the IOS in flash. Use the show version command to look for the line that
identifies the boot image source .FIG1

• Use the show running-config command and look for a boot system statement near the
top of the configuration. If the boot system statement points to an incorrect IOS image,
use the no version of the command to delete the statement.

• If the configuration register setting is incorrect, the IOS cannot load from flash. The value
in the configuration register tells the router where to get the IOS.
• To confirm this, use the show version command and look at the last line for the
configuration register. The correct value varies for different hardware platforms. A part of
the documentation of the internetwork should be a printed copy of the show version
output.
• If that documentation is not available, there are resources on the Cisco documentation CD or Cisco website to identify
the correct configuration register value. To correct this, change the configuration register and save this as the start-up
configuration.
6
5.1 Router Boot Sequence and Verification
5.1.5 Troubleshooting IOS boot failure

If there is still a problem, the router may have a corrupted flash image file.
 an error message should be displayed during boot. That message may take one of
several forms :
– open: read error...requested 0x4 bytes, got 0x0
– trouble reading device magic number
– boot: cannot open "flash:"
– boot: cannot determine first file name on device "flash:"

• If the flash image is corrupt, a new IOS should be uploaded into the router.

• If none of the above appears to be the problem, the router could have a hardware
failure. ( contact the Cisco Technical Assistance Center (TAC).

• The value of the configuration register is not displayed by the show running-config or
show startup-config commands.

• Lab
• E-lab

7
5.2 Managing the Cisco File System
5.2.1 IOS file system overview

Routers and switches depend on software for their operation.


• operating systems (cisco IOS- mbyyes) ,
• configuration. (a few hundred to a few thousand bytes)

Each software component is stored in different types of memory as separate files.


• RAM-running configuration; NVRAM, startup configuration; Flash, IOS image

Cisco IOS File System (IFS).


• provides a single method to perform all the file system management for a router.
– This includes the flash memory file systems, the network file systems (such as TFTP and FTP),
and read or write data, such as NVRAM, the running configuration, and ROM.
• The IFS uses a common set of prefixes to specify file system devices. FIG2

The IFS uses the URL convention to specify files on network devices and the network.
• The URL convention identifies the location of the configuration files following the colon
as [[[//location]/directory]/filename].
• The IFS also supports FTP file transfers. FIG3

8
5.2 Managing the Cisco File System

5.2.2 The IOS naming convention


The fields include the hardware platform
identification, the feature set identification,
and the numerical release.

The second part:


• features are packaged in software images.
• Each feature set contains a specific subset of Cisco IOS features. some feature-set
categories:
– Basic : A basic feature set for a hardware platform such as IP and IP/FW
– Plus : Basic + IP Plus, IP/FW Plus, and Enterprise Plus
– Encryption - A 56-bit data encryption feature set, such as Plus 56, that is combined with a
basic or plus feature set. Examples include IP/ATM PLUS IPSEC 56 or Enterprise Plus 56.
• The encryption designators for Cisco IOS Release 12.2 or later are k8 and k9:
• k8 - Less than or equal to 64-bit encryption in IOS version 12.2 and later
• k9 - Greater than 64-bit encryption in IOS version 12.2 and later

3th part : file format


• It specifies if the IOS is stored in flash in a compressed format and whether the IOS is
relocatable.
– If the flash image is compressed, the IOS must be expanded during boot as it is copied to RAM. A relocatable
image is copied from flash into RAM to run. A non-relocatable image is run directly from flash.
9
5.2 Managing the Cisco File System
5.2.3 Managing configuration files using TFTP

• In a Cisco router or switch, the active configuration is in RAM and the default
location for the startup configuration is NVRAM.

• The startup configuration should be backed up in case the configuration is lost. copy
running-config tftp
– Then, Enter the IP address of the TFTP server to store the configuration file.
– Enter the name to assign to the configuration file or accept the default name. Type yes .

• The backup configuration file can be loaded from a TFTP server to restore the router
configuration. copy tftp running-config.
– Select a host or network configuration file at the prompt.
– Enter the IP address of the TFTP server where the configuration file is located.
– Enter the name of the configuration file or accept the default name.
– Confirm the configuration filename and the server address that the system supplies.

• Lab

10
5.2 Managing the Cisco File System
5.2.4 Managing configuration files using copy and paste

Using HyperTerminal to copy a configuration:

• from the terminal session, copy output of the show running-config command, paste it
into a text file, and then save the text file. FIG1-2
– Select Transfer > Capture Text.
– Specify a name for the text file to capture the configuration.  Select Start to start capturing text.
– Use the show running-config command to display the configuration on the screen.
– Press the Spacebar when each "-More -" prompt appears.
To stop
– Select Transfer > Capture Text. > Stop.

• After the capture is complete, the configuration file needs to be edited to remove extra
text.
– Comments may also be added to explain the various parts of the configuration. To add a comment,
begin a line with an exclamation mark (!).
– The configuration file can be edited from a text editor such as Notepad.

• The lines that need to be deleted contain the following information:


– show running-config
– Building configuration...
– Current configuration:
– - More -
– Any lines that appear after the word "End"

• Add the no shutdown command to the end of each interface section. Click File > Save to save a 11
clean version of the configuration.
5.2 Managing the Cisco File System
5.2.4 Managing configuration files using copy and paste

• The backup configuration can be restored from a HyperTerminal session.


• Before the configuration is restored any remaining configuration should be removed
from the router.
– enter the erase startup-config command at the privileged EXEC prompt
– enter the reload command to restart the router.

• HyperTerminal can be used to restore a configuration. steps to copy a clean backup


of the configuration into a router:
– Enter router global configuration mode.
– Click on Transfer > Send Text File in HyperTerminal.
– Select the name of the file for the saved backup configuration.
– Watch as the lines of the file are entered into the router.
– Observe any errors.
– Press Ctrl-Z to exit global configuration mode after the configuration is entered.
– Restore the startup configuration with the copy running-config startup-config command.

12
5.2 Managing the Cisco File System
5.2.5 Managing IOS images using TFTP

to store IOS images on a TFTP server:


• When a router first arrives, the IOS should be backed up to a central server
• from the privileged EXEC mode with the copy flash tftp command.
– This server should have a TFTP service running. The router will prompt the user to enter the IP
address of the TFTP server and to specify a destination filename.

To restore or upgrade the IOS from the server


• copy tftp flash command . FIG .
– enter the IP address of the TFTP server, filename of the IOS image on the server.
– erase flash. ( if there is not sufficient flash available ). As the image is erased from flash, a
series of e’s will appear to show the erase process.

• As each datagram of the IOS image file is downloaded, an exclamation mark (!) will be
displayed. This IOS image is several megabytes and may take a long time to download.
• The new flash image will be verified after it is downloaded.
• The router is now ready to be reloaded to use the new IOS image.

• LAB

13
5.2 Managing the Cisco File System
5.2.6 Managing IOS images using ROMmon and Xmodem

• the IOS image in flash has been erased or corrupted, the IOS may need to be restored
from the ROM monitor mode (ROMmon). (RAMmon prompt rommon 1>)
• identify why the IOS image did not load from flash. (due to a corrupt or missing image).
• The flash should be examined with the dir flash: command.
• If an image is located that appears to be valid, usethat image. boot flash: command.
– e.i. if the image name is c2600-is-mz.121-5, the command is as follows: rommon 1>boot
flash:c2600-is-mz.121-5

• If the router boots properly, the user should check two items to determine why the
router did not use the IOS image from flash and booted to the ROMmon instead.
– First, use the show version command to check the configuration register to ensure that it is
configured for the default boot sequence.
– If the configuration register value is correct, use the show startup-config command to see if there is
a boot system command that instructs the router to use the IOS for ROMmon.

• If the router will not properly boot from the image or there is no IOS image, a new IOS
will need to be downloaded.

• To recover the IOS file, a user can use Xmodem to restore the image through the
console or use TFTP to download the image from the ROMmon mode.

14
5.2 Managing the Cisco File System
5.2.6 Managing IOS images using Xmodem
Download with Xmodem from ROMmon (To restore the IOS through the console)

• The IOS can be restored with the default console speed of 9600 bps. The baud rate can
be changed to 115200 bps to speed up the download.
– Use the confreg command to change the console speed from ROMmon mode. >
– the router will prompt for the parameters that can be changed. FIG1

• “change console baud rate? y/n [n]:” y  the router will prompt the user to select the new
speed. After the console speed is changed, restart the router into ROMmon mode. The terminal
session at 9600 bps is terminated and a new session is started at 115200 bps to match the console
speed.

• The xmodem command can be used from the ROMmon mode to restore an IOS
software image from the PC. xmodem -c image_file_name.
– to restore an IOS image file named c2600-is-mz.122-10a.bin  use xmodem -c c2600-is-
mz.122-10a.bin
– The -c instructs the Xmodem process to use cyclic redundancy check (CRC) for error checking
during the download. FIG2
– The warning message will inform the user that the bootflash will be erased and will ask for
confirmation to continue.

• In HyperTerminal, select Transfer > Send File.


– In the Send File popup specify the image name and location, select Xmodem as the protocol,
and start the transfer.
– After the transfer is complete, messages: flash is erased.- “Download Complete!”
• Before the router is restarted, set the console speed back to 9600 and the config register back to
0x2102. (config-register 0x2102 at the privileged EXEC prompt.) 15
• While the router reboots, end the 115200 bps terminal session and begin a 9600 bps session.
5.2 Managing the Cisco File System
5.2.7 Environment variables

The fastest way to restore an IOS image to the router is to use TFTP from ROMmon to
download the image. ( set the environmental variables and then use the tftpdnld command)

• no configuration file is loaded during boot.  the router has no IP or interface


configuration.
• The environmental variables provide a minimal configuration to allow for the TFTP of
the IOS.
• The ROMmon TFTP transfer works only on the first LAN port so a simple set of IP
parameters are set for this interface.
• To set a ROMmon environment variable : variable name = value for the variable
– to set the IP address to 10.0.0.1, type IP_ADDRESS=10.0.0.1 at the ROMmon prompt. FIG1

The minimum variables required to use tftpdnld :


– IP_ADDRESS , IP_SUBNET_MASK, DEFAULT_GATEWAY
(about the LAN interface)
– TFTP_SERVER - The IP address of the TFTP server
– TFTP_FILE - The IOS filename on the server

• Use the set command to check the ROMmon environment variables.


• Once the variables are set for the IOS download, the tftpdnld command is entered with
no arguments.
– The ROMmon will echo the variables and then a confirmation prompt will appear with a warning that this will
erase the flash.
• ! each datagram of the IOS file is received,. When the complete IOS file has been received, the
flash will be erased and the new IOS image file written.
• When the new image is written into flash and the ROMmon prompt is displayed, the router can be16
restarted by entering the reset command or typing i. The router should now boot from the new IOS
image in flash.
5.2 Managing the Cisco File System
5.2.8 File system verification

review of the commands used to verify the router file system.

show version command: used to check the current image and the total amount of flash.
– also verifies two other items that relate to how the IOS is loaded. It identifies the source of the
IOS image that the router used to boot and displays the configuration register.
– Check the boot field setting of the configuration register to determine the location from which
the router will load the IOS. If these do not agree, there may be a corrupt or missing IOS image
in flash or there may be boot system commands in the startup configuration.

show flash command : used to verify the file system.


– used to identify IOS images in flash and the amount of flash that is available.
– often used to confirm that there is ample space to store a new IOS image.

• As previously mentioned, the configuration file may contain boot system commands.
These commands can be used to identify the source of the desired IOS boot image.
Multiple boot system commands may be used to create a fallback sequence to discover
and load an IOS. These boot system commands will be processed in the order of their
appearance in the configuration file.

17
CCNA 2
Router and Routing Basics

6- Routing and Routing Protocols

18
6.1 Introduction to Static Routing
6.1.1 Introduction to routing

• Routing : the process that a router uses to forward packets toward the destination network.

To learn the information “how to reach remote networks” , routers use :


• dynamic routing: this information is learned from other routers.
• static routing : a network administrator configures information about remote networks manually.

6.1.2 Static route operation


• Network administrator configures the route
• Router installs the route in the routing table
• The static route is used to route packets.

• use the ip route to manually configure a static route.

• FIG2 specifies the outgoing interface. …..


• FIG3 specifies the next-hop IP address of the adjacent router. ….

19
6.1 Introduction to Static Routing
6.1.2 Static route operation
• The administrative distance is an optional parameter that indicates the reliability of a
route.
– A lower value for the administrative distance indicates a more reliable route.
– A route with a lower administrative distance will be installed before a similar route with a higher
administrative distance.
– The default administrative distance when using a static route is 1. In the routing table, it will
show the static route with the outgoing interface option as being directly connected. This is
sometimes confusing, since a true directly connected route has an administrative distance of 0.
– To verify the administrative distance of a particular route, use the show ip routeaddress
command, where the ip address of the particular route is inserted for the address option. If an
administrative distance other than the default is desired, a value between 0 and 255 is entered
after the next-hop or outgoing interface as follows:
• waycross(config)#ip route 172.16.3.0 255.255.255.0 172.16.4.1 130
– If the router cannot reach the outgoing interface that is being used in a route, the route will not
be installed in the routing table. This means if that interface is down, the route will not be placed
in the routing table.

• Sometimes static routes are used for backup purposes. A static route can be
configured on a router that will only be used when the dynamically learned route has
failed. To use a static route as a backup, set a higher administrative distance than
the dynamic routing protocol.

• E-lab1, e-lab2
20
6.1 Introduction to Static Routing
6.1.3 Configuring static routes
steps to configure static routes:
1. Determine all desired prefixes, masks, and addresses. The address can be either a local
interface or a next hop address that leads to the desired destination.
2. Enter global configuration mode.
3. ip route command with a prefix and mask followed by the corresponding address from
Step 1. The administrative distance is optional.
4. Repeat Step 3 for all the destination networks that were defined in Step 1.
5. Exit global configuration mode.
6. copy running-config startup-config command to save the active configuration to
NVRAM.

The example network


FIG1 ………..
FIG2 ………
FIG3 ……

E-lab

21
6.1 Introduction to Static Routing
6.1.4 Configuring default route forwarding

• Default routes are used to route packets with destinations that do not match any of the
other routes in the routing table.
• Routers are typically configured with a default route for Internet-bound traffic, A default
route is actually a special static route that uses this format:
– ip route 0.0.0.0 0.0.0.0 [next-hop-address | outgoing interface ]
– If the packet does not match a more specific route in the routing table, it will be routed to the 0.0.0.0
network.

steps to configure default routes:


1. Enter global configuration mode.
2. ip route command with 0.0.0.0 for the prefix and 0.0.0.0 for the mask. The address option for
the default route can be either the local router interface that connects to the outside networks or the IP address of the
next-hop router.
3. Exit global configuration mode.
4. copy running-config startup-config command to save the active configuration to NVRAM.

• FIG1 -2 …………….
• E-lab

22
6.1 Introduction to Static Routing
6.1.5 Verifying static route configuration

• After static routes are configured it is important to verify that they are present in the
routing table and that routing is working as expected.

steps to verify static route configuration:

• Enter the show running-config command in privileged mode to view the active
configuration in RAM to verify that the static route was entered correctly.
– If the route is not correct, it will be necessary to go back into global configuration mode to
remove the incorrect static route and enter the correct one. FIG1
• Enter the command show ip route to make sure that the static route is present in the
routing table. FIG2

• E-lab

23
6.1 Introduction to Static Routing
6.1.6 Troubleshooting static route configuration
• FIG1: nodes on the Sterling 172.16.1.0 network cannot reach nodes on the Waycross
172.16.5.0 network. FIG2

From privileged EXEC mode on the Sterling router,


• ping to a node on the 172.16.5.0 network. The ping fails. FIG3
• Now use the traceroute command from Sterling to the address that was used in the
ping statement. Note where the traceroute fails.
• The traceroute indicates that the ICMP packet was returned from Hoboken but not
from Waycross. This implies that the trouble exists either on Hoboken or Waycross.

• Telnet to the Hoboken router. FIG4


• Try again to ping the node on the 172.16.5.0 network connected to the Waycross
router. This ping should succeed because Hoboken is directly connected to Waycross.

• LAb
• E-lab

24
6.2 Dynamic Routing Overview
6.2.1 Introduction to routing protocols

• routing protocol is the communication used between routers.


– allows routers to share information about networks and their proximity to each other.
– Routers use this information to build and maintain routing tables.
– Examples of routing protocols are as follows:
• Routing Information Protocol (RIP)
• Interior Gateway Routing Protocol (IGRP)
• Enhanced Interior Gateway Routing Protocol (EIGRP)
• Open Shortest Path First (OSPF)

• A routed protocol is used to direct user traffic.


– provides enough information in its network layer address
to allow a packet to be forwarded from one host to
another based on the addressing scheme.
– Examples of routed protocols are as follows:
• Internet Protocol (IP)
• Internetwork Packet Exchange (IPX)

25
6.2 Dynamic Routing Overview
6.2.2 Autonomous systems (AS)
• AS is a collection of networks under a common administration that share a common routing strategy.

• The American Registry of Internet Numbers (ARIN), a service provider, or an administrator assigns a
16-bit identification number to each AS.
• This autonomous system number is a 16 bit number.
• Routing protocols, such as Cisco IGRP, require the assignment of a unique, AS number.

6.2.3 Purpose of a routing protocol and autonomous systems


• The goal of a routing protocol is to build and maintain a routing table.
• it learns all available routes, places the best routes into the routing table, and removes routes when
they are no longer valid.
– The router uses the information in the routing table to forward routed protocol packets.

• The routing algorithm is fundamental to dynamic routing.


– Whenever the topology of a network changes because of growth, reconfiguration, or failure, the network
knowledgebase must also change.
– When all routers in an internetwork operate with the same knowledge, the internetwork is said to have
converged. Fast convergence is desirable because it reduces the period of time in which routers would
continue to make incorrect routing decisions.

• Autonomous systems divide the global internetwork into smaller and more manageable networks.
Each AS has its own set of rules and policies and an AS number that will distinguish it from all other
autonomous systems.
26
6.2 Dynamic Routing Overview
6.2.4 Identifying the classes of routing protocols
two classes of routing protocols :

1. Distance vector : this approach determines the direction, or vector, and distance to any link in an
internetwork.
2. Link-state : recreates the exact topology of an entire internetwork.

6.2.5 Distance vector routing protocol features


• passes periodic copies of a routing table from router to router.
– These regular updates between routers communicate topology changes. The distance vector routing
algorithm is also known as the Bellman-Ford algorithm.

• Each router receives a routing table from its directly connected neighbor routers. FIG1
– Router B receives information from Router A. Router and adds a distance vector number, such as a number
of hops. Then it passes this new routing table to its other neighbor, Router C. This same step-by-step process
occurs in all directions between neighbor routers.

• the distance vector algorithm does not allow a router to know the exact topology of an
internetwork since each router only sees its neighbor routers.

27
6.2.5 Distance vector routing protocol features
• Each router that uses distance vector routing
first identifies its neighbors.

• The interface that leads to each directly connected


network has a distance of 0.
– As the distance vector discovery process proceeds,
routers discover the best path to destination
networks based on the information they receive
from each neighbor.
Router A learns about other networks based on
the information that it receives from Router B.

• Routing table updates occur when the topology changes.


– FIG3 :Distance vector algorithms call for each router to send its entire routing table to each of its adjacent
neighbors.
– The routing tables include information about the total path cost as defined by its metric and the logical
address of the first router on the path to each network contained in the table.
– Metrics : internetwork delay, bandwidth, reliability, load

• An analogy of distance vector could be the signs found at a highway intersection.


– A sign points toward a destination and indicates the distance to the destination.
– Further down the highway, another sign points toward the destination, but now the distance is shorter.
– As long as the distance is shorter, the traffic is on the best path.

28
6.2.6 Link-state routing protocol features
(Dijkstra's algorithm or shortest path first (SPF) algorithm.)

Link-state routing uses the following features: FIG1


– Link-state advertisement (LSA) - a small packet of routing information that is sent between routers
– Topological database - a collection of information gathered from LSAs
– SPF algorithm - a calculation performed on the database that results in the SPF tree
– Routing table - a list of the known paths and interfaces

• Each router constructs a topological database that consists of all the exchanged LSAs.
• SPF algorithm: router uses SPF to sort all possible paths to each network in the link-state protocol
internetwork. The router lists the best paths and the interfaces to these destination networks in the
routing table.
• The first router that learns of a link-state topology change forwards the information so that all other
routers can use it for updates.
• Common routing information is sent to all routers in the internetwork. FIG3.
– To achieve convergence, each router learns about its neighbor routers. This includes the name of each
neighbor router, the interface status, and the cost of the link to the neighbor in a LSA packet.
– When a router receives an LSA, it updates the routing table with the most recent information.

3 concerns related to link-state protocols: Processor overhead, Memory requirements , Bandwidth consumption

• Routers that use link-state protocols: require more memory and process more data than routers
that use distance vector routing protocols.
• Initial link-state packet flooding consumes bandwidth.
– In the initial discovery process, all routers that use link-state routing protocols send LSA packets to all other
routers. After this initial flooding, link-state routing protocols generally require minimal bandwidth to send
infrequent or event-triggered LSA packets that reflect topology changes.
29
6.3 Routing Protocols Overview
6.3.1 Path determination

two basic functions:


• path determination : FIG1-4
– occurs at the network layer.
– enables a router to evaluate the paths to a destination and to establish the preferred way to
handle a packet.
– The router uses the routing table to determine the best path and then uses the switching
function to forward the packet.

• switching function :
– the internal process used by a router to accept a packet on one interface and forward it to a
second interface on the same router.
– A key responsibility of the switching function of the router is to encapsulate packets in the
appropriate frame type for the next data link.

• FIG5 : how routers use addressing for these routing and switching functions.
– The router uses the network portion of the address to make path selections to pass the packet
to the next router along the path.

30
6.3 Routing Protocols Overview
6.3.2 Routing configuration
• To enable an IP routing protocol on a router, global and routing parameters need to be set.
• Global tasks : selection of a routing protocol (RIP, IGRP, EIGRP, or OSPF).
• The major task in the routing configuration mode is to indicate IP network numbers. Dynamic routing
uses broadcasts and multicasts to communicate with other routers. FIG1

• The router command starts a routing process. FIG2-3


• The network command enables the routing process to determine which interfaces send and receive
routing updates. FIg2-4

example
• GAD(config)#router rip GAD(config-router)#network 172.16.0.0

• For RIP and IGRP, the network numbers are based on the network class addresses, not subnet
addresses or individual host addresses.

• E-lab

31
6.3 Routing Protocols Overview
6.3.3 Routing protocols

6.3.4 IGP versus EGP

32
33

You might also like