Categories
CCNA Study Guide

Procedure to install or upgrade Cisco IOS

This tutorial describes the procedure of installing and upgrading Cisco IOS software. Learn how to install or upgrade Cisco IOS software in detail with examples.

Just like Windows and Linux, the IOS is also an operating system. Cisco developed the IOS primarily for its routers. Gradually, Cisco started using IOS software on its other devices as well. Currently, Cisco uses IOS software to manage multiple devices such as routers, high-end switches, and firewalls.

Like other operating systems, Cisco does not release bug fixes and updates of the IOS as separate files. Instead of releasing bug fixes and updates separately, Cisco merges them into the original IOS file and releases that updated IOS file.

It means, if you want to upgrade an existing IOS, then you have to replace the existing IOS file with the newly released IOS file. In other words, for every update, you have to install a new IOS image file from scratch. Fortunately, installing a new IOS image file is not as difficult and complex as installing other operating systems.

You can install a new IOS or upgrade an existing IOS in three easy steps.

  1. Download the new IOS file that includes the updates and bug fixes.
  2. Use a file transfer protocol to copy the downloaded file into the flash memory of the router.
  3. Either delete the old IOS file or configure the router to use the new IOS file.

Although the procedure of installing a new IOS image file or upgrading the existing IOS image file is fairly simple, still you should be very careful when following this procedure on a real Cisco router. A little mistake in this process can cause serious problems. Your router may even stop working.

For practice, instead of using a real router, you should use simulator software such as the Packet Tracer. To download the latest version of the packet tracer, visit the following page.

Download the packet tracer

Setting up a packet tracer LAB for the practice



Open the Packet Tracer and click the \’End Devices\’ icon. Drag a Server and a PC-PT from the end devices and drop them in the workspace.

The following image shows these steps.

packet tracer lab setup 1

Click the \’Routers\’ icon. Drag an \’1841 series\’ router from the available routers and drop it in the workspace.

The following image shows these steps.

packet tracer lab setup 2

Click the \’Connections\’ icon. Connect the FastEthernet0/0 interface of the Router to the FastEthernet0 interface of the Server and the console port of the Router to the RS232 port of the PC-PT via a cross cable and a console cable, respectively.

The following image shows these steps.

packet tracer lab setup 3

Access the CLI prompt of the Router and assign an IP address to the FastEthernet0/0.

The following image shows this process step-by-step.

packet tracer assign ip to interface

Assign an IP address from the same subnet to the FastEthernet0 interface of the Server.

The following image shows this process step-by-step.

assign ip address to server

Click the PC-PT and click the Desktop menu and click the Terminal icon and click the OK button to accept the default settings.

terminal settings to connect with router

That\’s all the setup we need. Either create this LAB in your packet tracer or download this pre-created LAB and load it on the Packet Tracer.

Pre-built Packet Tracer LAB for the practice

Using a real Cisco router for practice



If you are doing or following this exercise on a real Cisco router, you have to take a few additional steps.

The following table lists these steps and the purpose of each step with a parallel step in the packet tracer.

Step for the real devices Purpose or reason The step that we took in the Packet Tracer to simulate the step
Connect the router with a PC or laptop via a console cable and access the CLI prompt of the router. During this producer, we will execute a few commands on the router. For this, we have to access the CLI prompt of the router. We connected the PC0 and the router via a console cable.
Connect the router with the same PC or another PC via an Ethernet cable. Routers do not allow the data connection on the console port. To transfer a new IOS image file from the TFTP server to the router, we have to connect the TFTP server to the router on the data port of the router such as Ethernet port. We connected the Server with the router on the Ethernet port.
Download and install a TFTP server program on the PC that you have connected with the router via an Ethernet cable. Routers support the TFTP protocol. TFTP protocol allows us to transfer files between a TFTP server and a TFTP client. Since the TFTP server is pre-installed on the Server that we connected to the router, we did nothing to replicate this step.
Download the IOS image file that you want to install form the Cisco\’ official site and copy or move the downloaded IOS file to the root directory of the TFTP server. TFTP protocol can only read from the root directory of the TFTP server. The Sever system already contains a few IOS image files in the root directory of the TFTP server. Same as the previous step, we did nothing to replicate this step, as it\’s already done.

Installing or updating the Cisco IOS software

Routers store IOS image files in the Flash memory. If there is only one IOS image file available in the flash memory, the router automatically uses it as the default IOS image. If multiple IOS image files are available, then the router uses the first accessible image file as the default IOS image file.

When a router starts, it loads its default IOS image file from the flash memory into the RAM. Once the default IOS image file is loaded into the RAM, the router uses it until the next boot. This means, when a router is running and you delete its default IOS image file from the flash memory, the router will not stop working. It will keep functioning until the next boot.

In other words, during the running state of the router, you can safely delete the existing IOS image file and install a new IOS image file. No matter whether you use a real Cisco router or use the packet tracer, commands for installing and updating Cisco IOS software are the same.

Access the privileged-exec mode of the router and run the \’show version\’ command. From the output, note down the name of the IOS file.

Run the \’show flash\’ command and note down the name of all available IOS image files.

The following image shows the output of both commands.

show flash and show vesion commands

To check and verify the connectivity between the router and the TFTP server, use the following command.

Router#ping 10.0.0.2

The following image shows the output of this command.

check connectivity between IOS and tftp server

To download the new IOS image file from the TFTP Server into the Flash memory, use the following command.

Router#copy tftp flash

This command requires three parameters.

Address or name of remote host: – Specify the IP Address of the TFTP Server.

Source filename: – Type the exact name of the IOS image file that you want to download from the root directory of the TFTP server.

Destination filename: – If you want to install this IOS image file with a different name, type the new name otherwise press the Enter key to use the default name. The default name is the source filename.

The following image shows this procedure step-by-step with the output.

copy tftp flash

Once the downloading is finished, you can use the \’show flash\’ command again to verify the installation of the new IOS image file.

The following image shows the output of the show flash command.

verify new IOS installation

To instruct the router to use the new IOS image file when it boots next time, we have two choices: either set the new IOS image file as the default IOS image file or delete the old IOS image file leaving only the new IOS image file available in the flash memory.

To set the new IOS image file as the default IOS image file, use the following privileged-exec mode command.

Router# boot system flash: [ name of the new IOS image file]

This command does not work on the packet tracer. If you execute this command on the packet tracer, you will get the \’command not found\’ error. Because the Packet Tracer uses the stripped-down version of the IOS software and this command is not available in the stripped-down version of the IOS.

This command is available in the full version of the IOS software. If you are using a real router or using a simulator software (such as GNS3) that uses the full version of the IOS, you can use this command.

If you are following this exercise on the packet tracer, use the second option.

To delete the old IOS image file, use the following command from the privileged-exec mode.

Router#delete flash: [ name of the old IOS image file]

The following image shows this command with the output.

delete current ios image

Once the new IOS file is set as the default IOS image file or the old IOS image file is deleted, use the \’reload\’ command to reboot the router.

The following image shows this command with the output.

reload command

After the reboot, the router will use the new IOS image. You can verify this by using the \’show version\’ and \’show flash\’ commands again.

verify installation and up-gradation of new ios

That\’s all for this part. In the next part of this tutorial, we will understand how to restore the Cisco IOS image file in an emergence. If you like this tutorial, please don\’t forget to share it with friends through your favorite social network.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

Cisco IOS Explained with Features and Functions

This tutorial explains what the Cisco IOS is and what are the main responsibilities of the IOS. Learn the features and functions of the Cisco IOS in detail.

What is the Cisco IOS?

The Cisco IOS (Internetwork Operating System) is a proprietary operating system that provides routing, switching, and internetworking features. It controls and manages the hardware on which it runs. Technically, it provides an interface between a user and the hardware, allowing the user to execute commands to configure and manage the Cisco device.

Originally, the IOS was developed for Cisco routers, but a few years later Cisco decided to use the IOS to its other platforms, including the Catalyst switches. Currently, the IOS runs on most Cisco routers as well as a growing number of Cisco Catalyst switches such as Catalyst 2960 and 3560 series switches.

Functions of the IOS

The IOS is responsible for the following functions: –

  • To carry network protocols and functions
  • To connect between different data link layer technologies
  • To connect high-speed traffic between devices
  • To secure network resources
  • To control unauthorized access
  • To provide scalability for ease of network growth
  • To keep the network stable and reliable

Let’s understand these functions in detail.



Scalability

Routers and switches are manufactured in two types of hardware platforms: fixed chassis and modular chassis.

If a router or switch is built on the fixed chassis platform, then we have to use it as it is. We cannot add any additional ports or interfaces to it and at the same time, we cannot remove any existing interfaces or ports.

The following image shows a fixed chassis router.

fixed chassis platform router

But if a router or switch is built on the modular chassis platform, then we can install the interfaces or ports of our choice. A modular router or switch has few empty slots along with the fixed ports and interfaces. In empty slots, we can install interfaces or ports of our choice.

The following image shows a modular chassis router and modular interfaces.

modular chassis router

The modular chassis platform provides more flexibility but costs more than the fixed chassis platform.

Cisco creates separate versions of the IOS for both platforms. If you purchase a fixed chassis platform, then you will get an IOS that does not contain the features that are required for the modular chassis platform. Since Cisco uses customized versions of the IOS, you never need to pay for the features that you do not need.

Connectivity



Each media type uses a separate format to transfer data over it. The IOS not only understands the formats of almost all modern media types but can also convert them.

You can use an IOS running router to connect two different networks that use different media types such as: –

  • To connect a LAN network to a WAN network
  • To connect a wireless network to a wired network.

Reliability

The first IOS was written in 1986 by William Yeager. Since then, to keep the IOS up-to-date, to ensure critical resources always remain accessible, and to adopt new technologies introduced in the market, Cisco has not only tweaked and tuned IOS several times but also has added new features in every update.

Because of the success of its IOS software, Cisco has moved from a garage-router company to one of the world\’s largest companies in less than two decades. Nowadays a large portion of the Internet backbone is composed of Cisco products. Due to the reliability and stability of the IOS, most enterprise networks, as well as ISPs use Cisco products in one form or another.

Security

The IOS includes a wide range of security features that allow you to strictly control your network resources and networking devices according to your internal security policies. You can configure the IOS to allow or deny a specific host or a range of hosts. You can also configure the IOS to allow or deny access to a particular application.

Once security policies, commonly known as the access control lists, are configured the IOS actively monitors all traffic that passes through it and allows or denies the traffic based on the configured rules. For example, if the IOS receives traffic from a host that is blocked in the access list, the IOS discards the traffic immediately. Or if the IOS receives traffic from a host that is allowed in the access list, the IOS process the traffic and forwards that to the destination.

That’s all for this part. In the next part of this tutorial, we will understand the Cisco IOS naming convention in detail. If you like this tutorial, please don’t forget to share it with friends through your favorite social network.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

How RIP Routing Protocol Works

This tutorial explains how the RIP routing protocol learns and advertises network paths. Learn what the RIP routing protocol is and how it works in detail through examples.

What is the RIP routing protocol?

When an IP packet arrives on an interface of the router, the router reads the destination address of the IP packet and searches the destination address in the routing table. A routing table entry contains two important pieces of information: the destination subnet and the local interface that is connected with that destination.

If the router finds an entry for the destination address in the routing table, the router forwards the incoming packet from the interface that is associated with the destination address in the entry. If the router does not find an entry for the destination address in the routing table, it immediately discards the incoming packet.

There are two ways to add entries in the routing table: manual and dynamic. In the manual method, we manually add entries for all network paths in the routing table. In dynamic routing, we configure and activate a routing protocol and the routing protocol automatically discovers all network paths and adds them to the routing table.

RIP (Routing Information Protocol) is a dynamic routing protocol. Once configured and activated, it not only automatically discovers all network paths but also adds them to the routing table.

In the following section, we will understand how the RIP routing protocol works.

How does RIP routing protocol work?



RIP requires information about locally available networks. On the first step, we add this information and activate the RIP routing protocol on routers of the network. Once configured and activated, each router sends the routing update out of all active interfaces every 30 seconds.

Each router also receives routing updates from its neighboring routers. A routing update contains the entire routing table of the sending router. Routers compare the received routing tables with their routing tables. If they find any new route in the received routing tables, they add them to their routing tables.

In the next routing update, routers advertise the updated routing tables. Over time, as each router learns more routes, they advertise about those routes as well. By the end of the process, all routers know about all routes.

Let\’s understand this process in detail through a simple example.

In a network, two routers: A and B are connected. An administrator configures the RIP routing protocol on both routers. After configuration, the RIP routing protocol of both routers automatically exchanges the information of locally available networks.

The following image shows this process.

how rip exchange routing information

If RIP detects any change in locally available networks’ information, it updates the other router about this change in the next update. This way, an administrator only needs to provide information about locally available networks once. After that, the RIP protocol automatically manages all changes in the network.

RIP Routing broadcasts



To share the paths\’ information, the RIP protocol uses broadcast messages. RIP protocol periodically reads the routing table and shares it with neighbors through a broadcast message. Upon receiving a broadcast message from a neighbor, the RIP protocol reads the broadcast message and updates the routing table accordingly.

For example, if the broadcast message contains information about a new path, the RIP protocol adds that path in the routing table or if the broadcast message contains information that an existing path has gone down, the RIP protocol removes that path from the routing table or marks that path unusable in the routing table.

When a router running RIP protocol broadcasts the routing table, it not only broadcasts the information about the locally connected networks but also broadcasts the information about the networks that it has learned from its neighbors through the previously received broadcasts.

This update sequence eventually allows all routers to learn all paths. Let’s understand this process through an example. Suppose, in a network, four routers: A, B, C, and D are connected in a sequence. All four routers are using the RIP routing protocol. Networks 10.0.0.0/8, 20.0.0.0/8, 30.0.0.0/8, and 40.0.0.0/8 are locally connected to the routers A, B, C, and D respectively.

The routing update sequence goes in the following way.

Router A broadcasts information of the network 10.0.0.0/8 to Router B.

Router B broadcasts information of the network 10.0.0.0/8 to Router A and C.

Router C broadcasts information of the network 30.0.0.0/8 to Router B and D.

Router D broadcasts information of the network 40.0.0.0/8 to Router C.

All routers after receiving broadcast update their routing tables, respectively.

Router A adds an entry in the routing table that indicates the network 20.0.0.0/8 is reachable through Router B.

Router B adds an entry in the routing table that indicates the networks 10.0.0.0/8 and 30.0.0.0/8 are reachable through Router A and C, respectively.

Router C adds an entry in the routing table that indicates the networks 40.0.0.0/8 and 20.0.0.0/8 are reachable through Router B and D, respectively.

Router D adds an entry in the routing table that indicates the network 30.0.0.0/8 is reachable through Router C.

The following image shows this process.

rip routing broadcast

After the next routing update:-

Router A adds an entry in the routing table that indicates the network 30.0.0.0/8 is reachable through Router B.

Router B adds an entry in the routing table that indicates the network 40.0.0.0/8 is reachable through Router C.

Router C adds an entry in the routing table that indicates the network 10.0.0.0/8 is reachable through Router B.

Router D adds an entry in the routing table that indicates the network 20.0.0.0/8 is reachable through Router C.

The following image shows routing tables before and after the second routing broadcast.

how rip routing protocol works

After the next routing update:-

Router A adds an entry in the routing table that indicates the network 40.0.0.0/8 is reachable through Router B.

Router D adds an entry in the routing table that indicates the network 10.0.0.0/8 is reachable through Router C.

The following image shows routing tables before and after the third routing broadcast.

rip routing update process

The situation in which all routers know all paths of the network is called convergence. After the convergence, the RIP routing protocol actively monitors all paths. If it detects any change in any path, it updates neighboring routers about that change in the next broadcast.

That\’s all for this part. This tutorial is the first part of the article \”How to configure RIP routing protocol explained with features and functions of the RIP protocol \”. In the next part of this tutorial, we will understand various timers that RIP uses to perform its operations.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

Routing Loops Explained with Examples

This tutorial explains routing loops in detail through examples. Learn what the routing loops are and how they are formed in a distance-vector routing protocol running network.

Distance-vector routing protocols use broadcast messages to learn and advertise network paths.

A router running a distance-vector routing protocol periodically sends broadcast messages out from all of its active interfaces. These broadcast messages include the complete routing table of the router.

When other routers running the same distance-vector routing protocol receive these broadcast messages, they learn new routes from the advertised routing table and add them to their routing table.

Through this process, all routers running the same distance-vector routing protocol learn all routes of the network.

Like any other type of routing protocol, distance-vector routing protocols also have some problems. Routing loops are the most common problem of distance-vector routing protocols.

What is a routing loop?



A routing loop is a confusion about the reachability of a destination network. Routing loops not only consume a lot of precious network bandwidth but also cause the router to believe that an inaccessible network is accessible.

What causes a routing loop?

Distance-vector routing protocols use the routing update timer to propagate routing updates. If the value of this timer is not the same on all routers, routing loops may occur. In other words, routing loops may occur when all routers do not broadcast routing updates simultaneously.

When a loop occurs, a router (call it A) thinks that the path to some destination (call it B) is available through its neighboring router (call it C), at the same time the neighboring router (B) thinks that the path to the same destination (C) is available through the first router (A). When a packet for the destination C arrives, it will loop endlessly between routers: A and B.

Let\’s understand this example in detail.

Routing loops example

The following figure illustrates a simple network. In this network, a destination network 1.0.0.0/8 is directly connected to router C on its F0/0 interface. To ensure that the destination network 1.0.0.0/8 always remains available, the administrator added an additional link between routers: A and B.

routing loop example

To enable IP routing, the administrator configured the RIP routing protocol. RIP is a distance-vector routing protocol and uses broadcast messages to learn and advertise network paths. RIP broadcasts routing updates every 30 seconds.

Now, suppose this network is powered off. To start this network, the administrator powered on all routers in the following order: C, A, and B. Since all routers are started at different times, their routing update timers are also running differently.

When the router C starts, it sends a broadcast message out from all of its active interfaces. This message indicates that the network 1.0.0.0/8 is reachable through router C at the cost of one hop.

To learn how the RIP routing protocol works in detail through examples, you can check the previous parts of this article.

This tutorial is the fourth part of the article \”How to configure RIP routing protocol explained with features and functions of the RIP protocol\”. The previous parts of this article are the following.

How RIP routing protocol works
This tutorial is the first part of the article. This part explains how the RIP routing protocol uses broadcast messages to exchange network paths\’ information.

RIP Routing Information Protocol Explained
This tutorial is the second part of the article. This part explains the concept of distance-vector routing and how the RIP routing protocol uses this concept.

Basic operation of RIP protocol
This tutorial is the third part of the article. This part explains RIP timers and differences between RIPv1 and RIPv2.

Both routers: A and B receive broadcast messages from router C on their interfaces: S0/0/0 and S0/0/0, respectively.

When a router receives a routing update, it learns the advertised routes and does the following.

  • If the advertised route is not available in the routing table, the router adds the advertised route to the routing table.
  • If the advertised route is available in the routing table, the router compares the metric of the advertised route with the metric of the route that is available in the routing table.
    • If the metric of the advertised route is worse, then the router ignores the advertised route and keeps the existing route.
    • If the metric of the advertised route is better, then the router replaces the existing route with the advertised route.
    • If the metric of the advertised route is equal, then the router adds the advertised route to the routing table along with the existing route. This feature is known as load balancing.

From the received routing update, both routers: A and B learn that the destination network 1.0.0.0/8 is available through router C at a cost of 1 hop. Since the routing tables of both routers are empty, they both add this routing information to their routing tables.

The following image shows this process.

before routing loops first routing update

After router C, router A broadcasts its routing update. This routing update indicates that the network 1.0.0.0/8 is reachable through router A at the cost of 2 hops. Both router B and C receive this update. But they do not add the advertised route in their routing tables, as they already have a better route for the destination.

The following image shows this process.

second routing update before routing loop

In the end, router B broadcasts its routing update. This routing update indicates that the network 1.0.0.0/8 is reachable through router B at the cost of 2 hops. Both routers A and C receive this message and ignore it, as they already have a better route for the destination network.

The following image shows this process.

third routing update before routing loop

At this moment all routers have learned all routes of the network. This state of the network is called convergence. Routers do not stop broadcasting routing updates after getting the state of convergence. As long as the network is running, all routers continuously broadcast their routing tables when their periodic timer expires. This feature helps routers to learn any network change that occurs in the future.

Physical loops V/s Routing loops



Usually, physical loops do not cause much trouble for routing protocols. For example, our network works fine even it includes a physical loop.

To eliminate any possibility of forming routing loops due to the physical loops of the network, distance-vector routing protocols add only one best route for each destination in the routing table.

But, this feature does not prevent routing loops that are caused by differences between routing update timers. Let\’s understand it.

Suppose, the connection between router C and the destination network\’s switch fails.

Since the destination network is directly connected to router C, router C immediately detects this change and removes the entry that is associated with the destination network from the routing table. However, router C does not pass this information to routers: A and B until its routing update timer expires.

The following image shows this process.

first routing update after routing loop

Now suppose that the routing update timer of router A expires before the routing update timer of router C expires.

Router A broadcast its routing update. This routing update indicates that the network 1.0.0.0/8 is reachable thorough the router A at the cost of 2 hops. Both routers: B and C receive this message.

Router B ignores this update message as it still has a better route for the destination. But, router C not only processes this message but also adds the advertised route to its routing table as currently its routing table has no route for the destination network.

The following image shows this process.

second routing update after routing loop

When the routing update timer of router C expires, the router C broadcasts its routing update. This routing update indicates that the destination network 1.0.0.0/8 is reachable through router C at the cost of 3 hops.

Both routers A and B receive this message and ignore it as they both have a better route for the destination.

The following image shows this process.

third routing update after routing loop

When the routing update timer of router B expires, the router B broadcasts its routing update. This routing update indicates that the network 1.0.0.0/8 is reachable through router B at the cost of 2 hops.

Both routers: A and C receive this message. Router A ignores this message as it already has a better route for the destination network. Router C adds the advertised route to its routing table because the advertised route and the existing route both have equal cost. Routers add equal-cost routes for load balancing.

The following figure shows this process.

convergence after routing loop

At this moment, the network is converged again. But, this convergence is false. The destination network is down but routers A and B think that the router C knows how to reach the destination network while the router C thinks that the routers A and B equally know how to reach the destination network. This misunderstanding creates a routing loop.

When routers A and B receive a packet for the destination network 1.0.0.0/8, they will forward that packet to router C. And the router C will forward that packet back router A. The packet will keep cycling between routers: A and C endlessly.

The following image shows how a packet received by router B gets stuck in a routing loop.

packets stuck in routing loop

This is a very simple example of a routing loop. Typically, routing loops are created because of confusion in the network related to the drawbacks of using periodic timers.

That\’s all for this part. The next part of this article covers the methods that a distance-vector protocol might implement to solve routing loop problems. If you like this tutorial, please don\’t forget to share it with friends through your favorite social network.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

Split Horizon Explained with Examples

This tutorial explains the split-horizon feature in detail through examples. Learn what the split-horizon feature is and how it removes routing loops in the network.

What is the split-horizon?

Split-horizon is a feature that prevents a router from advertising a route back out the same interface where the router originally learned the route. Routing protocols use this feature along with other features to remove routing loops.

How does the split-horizon work?

Routers use routing protocols to learn new routes from neighboring routers and advertise learned routes to neighboring routers. Split-horizon feature tells the routing protocol to skip some routes when advertising a routing update from an active interface. These routes are the routes that the routing protocol learned from the same outgoing interface.

Let\’s take an example to understand how the split-horizon feature works practically.

Example network (the split-horizon feature is disabled)



The following image shows a simple network. In this network, two routers: router A and router B are connected through a serial cable. Networks 10.0.0.0/8 and 30.0.0.0/8 are connected to router A\’s F0/0 and router B\’s F0/0 interfaces, respectively. To connect routers on serial interfaces, the network 20.0.0.0/8 is used.

When this network starts, both routers learn directly connected networks and add them to their routing tables.

example network without split horizon feature

Now suppose, the administrator configures the RIP routing protocol on both routers. RIP routing protocol periodically broadcasts the entire routing table from all active interfaces as a routing update. When neighboring routers running the same RIP routing protocol listen to this broadcast, they learn the advertised routes. If any advertised route is not available in their routing tables or have a worse metric, then they add that advertised route to their routing tables.

To learn how the RIP routing protocol works in detail through examples, you can check the previous parts of this article. This tutorial is the fifth part of the article \”How to configure RIP routing protocol explained with features and functions of the RIP protocol \”. The previous parts of this article are the following.

How RIP Routing works

This tutorial is the first part of the article. This part explains how the RIP routing protocol uses broadcast messages to exchange network paths\’ information.

RIP Routing features and functions

This tutorial is the second part of the article. This part explains the concept of distance-vector routing and how the RIP routing protocol uses this concept.

RIP Tutorial – Basic operation of RIP Protocol

This tutorial is the third part of the article. This part explains RIP timers and differences between RIPv1 and RIPv2.

Routing Loops Explained with Examples

This tutorial is the fourth part of the article. This part explains routing loops and how they are formed in a distance-vector routing protocol running network.

By default, the RIP routing protocol broadcasts the entire routing table from all active interfaces. But if the split-horizon feature is enabled on any interface, then the RIP does not broadcast the routes which it learned from that interface.

To understand how the split-horizon feature affects routing updates, let\’s suppose that the split-horizon feature is disabled on serial interfaces of both routers.

Without split-horizon in effect, both routers broadcast their routing tables from their serial interfaces. Router A broadcasts networks: 10.0.0.0/8 and 20.0.0.0/8. Router B broadcasts networks: 20.0.0.0/8 and 30.0.0.0/8.

Both routers receive broadcast messages of each other and learn advertised routes. Router A learns about the networks: 20.0.0.0/8 (Metric1) and 30.0.0.0/8 (Metric1). Router B learns about the networks: 10.0.0.0/8 (Metric1) and 20.0.0.0/8 (Metric1).

Both routers ignore update about the network 20.0.0.0/8 (Metric1) as they already have a better route for the advertised route. But, they add the remaining route as that is not available in their routing tables.

The following image shows this process.

first routing update

On the next routing update, both routers broadcast their routing tables again.

Router A receives update about the networks: 30.0.0.0/8 (Metric1), 20.0.0.0/8 (Metric1), and 10.0.0.0/8 (Metric2). Router A ignores the update about the networks: 20.0.0.0/8 (Metric1), and 10.0.0.0/8 (Metric2) as it already has better routes for these networks. But, it updates the timer of the third network 30.0.0.0/8 (Metric1) as it has an equal metric.



Router B receives update about the networks: 10.0.0.0/8 (Metric1), 20.0.0.0/8 (Metric1), and 30.0.0.0/8 (Metric2). Router B ignores the update about the networks: 20.0.0.0/8 (Metric1), and 30.0.0.0/8 (Metric2) as it already has better routes for these networks. But, it updates the timer of the third network 10.0.0.0/8 (Metric1) as it has an equal metric.

Both routers repeat the same process on all further routing updates.

The following image shows this process.

third routing without split horizon

As long as the physical topology of this network does not change, this network work fines even the split-horizon feature is disabled. Physical changes are very common on networks. They can occur at any time on any network.

If the split-horizon feature is disabled, a physical change may cause a routing loop. Let\’s understand this fact through our example.

Suppose, the connection between the network 10.0.0.0/8 and router A fails. Router A immediately detects this change and removes the route of the network 10.0.0.0/8 from its routing table.

To make this example easier to understand, I mentioned that the router removes the unreachable route immediately. Technically, the router does not remove the unreachable route immediately. Instead of removing an unreachable route, the router makes its metric to unreachable or infinite. In the next part of this article, I will explain this feature in detail through examples. For this tutorial and example, you can assume that the router removes the unreachable route immediately.

On the next routing update, router A does not advertise the network 10.0.0.0/8 as this route has been removed from its routing table. But, router B advertises a route for the network 10.0.0.0/8 as router B still contains the old route information.

Router A receives the routing update of router B and thinks that the router B knows another route for the network 10.0.0.0/8. Router A adds the advertised route to its routing table and advertises it back to router B on the next routing update but the router B ignores this update as it already a has better path for the network 10.0.0.0/8.

The following image shows this process step by step.

routing loop without split horizon

At this moment, even the network 10.0.0.0/8 is down, still, router A thinks that the router B has a path for the network 10.0.0.0/8 while the router B thinks that the router A has a path for the network 10.0.0.0/8.

This situation is known as the routing loop. In this situation, if any one router from both routers receives a packet for the destination network 10.0.0.0/8, it will forward that packet to another router and another router will forward that packet back to the first router. The packet will cycle between both routers endlessly.

The following image shows this situation.

routing without split horizon

This network is stuck in a routing loop because the split-horizon feature was disabled. If the split-horizon feature is enabled, this routing loop can be avoided.

To understand how the split-horizon feature prevents routing loops, let\’s take the above example again.

Example network (the split-horizon feature is enabled)

If the split-horizon feature is enabled, it subtracts routes from routing updates. Which routes? The routes which are available on the same interface. For example, if a network 1.0.0.0/8 is available on the F0/0 interface of the router, the split-horizon feature subtracts this network (1.0.0.0/8) from all routing updates that are sent out from the interface F0/0.

In our example, when routers send their first routing update out from their interface S0/0/0, they skip routing information about the network 20.0.0.0/8 as this network is available on their S0/0/0 interface.

The following image shows how routers send their first routing update when the split-horizon feature is enabled.

first routing update with split horizon feature

After the first routing update, both routers learn about remote networks. Router A learns about the network 30.0.0.0/8 and router B learns about the network 10.0.0.0/8. Both routers add the learned network to their routing tables.

Although routers add these routes to their routing tables, still they do not advertise these routes in the next routing updates that they send from the interface S0/0/0.

The following image shows this process.

second routing update with split horizon feature

Now suppose the connection between the network 10.0.0.0/8 and the router A breaks. Router A detects this change and removes the entry that is associated with this network from the routing table. Since the entry of this route has been removed from the routing table, the routing protocol that broadcast routes from the routing table cannot advertise this route.

Router B still contains old route information about the network 10.0.0.0/8. But, due to the split-horizon feature, it can\’t advertise this information back to router A.

The following image shows this process.

split horizon feature removes routing loops

iIn this manner, the split-horizon feature not only reduces the size of routing updates but also removes routing loops from the network.

In some circumstances, routers ignore this feature and send routing updates about the networks that are learned on the same interface. In the next part of this article, we will understand those circumstances in detail.

That\’s all for this article. If you like this article, please don\’t forget to share it with friends through your favorite social networking site.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

Infinity Metric and Route Poisoning Explained

This tutorial explains the infinity metric and route poisoning features in detail. Learn what the infinity metric and route poisoning are and how they are used to remove routing loops.

A routing loop is a situation in which routers, running a distance vector routing protocol, advertise and learn wrong route information. When routing loops occur, routers fail to deliver data packets to their correct destinations.

To remove routing loops, distance vector routing protocols use four mechanisms: split-horizon, infinity metric, route poisoning, and timers.

Split-horizon

Split-horizon feature states that if a router receives a route from its neighboring router, it will not propagate the received route back to the neighboring router on the same interface.

To understand how the split-horizon feature works, consider the following example.

example network

Router A advertises the network 10.0.0.0/8 out from its S0/0/0 interface. Since router B is connected to router A’s S0/0/0 interface, router B receives this advertisement and adds the advertised route to its routing table.



How the router B will advertise this newly learned route depends on whether the split-horizon feature is enabled or not. Without split-horizon in effect, router B advertises this network right back to router A.

Router A ignores this update since the directly connected path is better than router B’s advertised path. However, what would happen if router A’s F0/0 interface failed and it received an update from router B stating that it had an alternative path to the network 10.0.0.0/8?

In this situation, Router A will add the advertised route to its routing table thinking router B might know another route to the network 10.0.0.0/8.

The following image shows this process step by step.

routing update without split horizon feature

This misunderstanding causes a routing loop where the actual network is down, but both routers think the network is reachable through each other.

In this situation, if anyone router from both routers receives a packet for the destination network 10.0.0.0/8, it will forward that packet to other router and another router will forward that packet back to the first router.

The packet will keep cycling between both routers. The following image show this situation.

routing loop example

But if the split-horizon feature is enabled, router B never broadcast the network 10.0.0.0/8 back to router A. The following image shows how the split-horizon functions.

split horizon example

If the split-horizon feature is enabled and router A’s F0/0 interface fails, it will not cause a routing loop. With split-horizon, router B would never advertise the 10.0.0.0/8 back to router A. Therefore, if router A’s F0/0 interface fails, both router A and router B would realize that there is no alternative path to reach this network until router A’s F0/0 connection is fixed.

Infinity metric



To keep the routing table stable, routers do not remove unreachable routes immediately. When a route becomes unreachable, instead of removing that route from the routing table, the router changes the metric value of that route to infinite. A route with an infinite metric value is equal to a deleted route. If the metric value of a route is set to infinite, the router never uses that route for the routing.

The infinity metric value is routing protocol specific. Different routing protocols use different infinity metric values. RIP routing protocol uses the value 16 as infinity. In an RIP running network, if the value of a route is set to 16, the route will be considered as an unreachable or a down route.

The following image shows how router A changes the metric value of the network 10.0.0.0/8 when the network 10.0.0.0/8 became unreachable.

infinity metric example

Route poisoning

Route poisoning is a derivative of split-horizon. It states that if a router receives a route with an infinity metric from its neighboring router, the router will ignore the split-horizon feature and propagate the received route back to the neighboring router on the same interface.

To understand how the route poisoning works, let’s take the above example back.

When network 10.0.0.0/8 fails, router A sets its metric value to 16 and advertises this route from all of its active interfaces.

The following image shows this process.

infinity metric example

Router B receives this routing update and changes the metric value of the network 10.0.0.0/8 in its routing table. Since this routing update states that the network 10.0.0.0/8 is no longer reachable, router B overrules the split-horizon feature and sends a routing update back to router A about the network 10.0.0.0/8.

The following image shows how the route poisoning feature works.

how infintiy metric works

Route poisoning feature is the inverse of the split-horizon feature. Until a route is activated, the split-horizon feature applies. When the route fails, the route poisoning feature overrules the split-horizon feature.

Key points
  • When a route fails, routers change the metric value of the failed route to infinity.
  • A route with the infinity metric value is considered as a deleted route.
  • For routing, routers never use a route whose metric value is set to infinity.
  • Route poisoning refers to the practice of advertising a failed route back to the source.
  • The route poisoning feature applies only to routes whose metric value is set to infinity.
Timers

Distance vector routing protocols use various timers to manage route information. For example, RIP a true distance vector routing protocol uses four timers. These timers are the following.

Update timer (default 30 Sec.): –
RIP uses this timer to keep the interval between routing updates.

Invalid timer (default 180 sec): –
RIP uses this timer to control how long a route will remain in the routing table if no new updates about the route are received.

Hold down timer (default 180 sec): –
RIP puts a route on the hold-down state when it receives a routing update that indicates the route is unreachable.

Route flush timer (default 240Sec): –
RIP uses this timer to define how long a route can stay in the routing table before it will be flushed if no new updates about the route are received.

To learn more about timers, you can check the previous parts of this tutorial. This tutorial is the part of the article \”How to configure RIP routing protocol explained with features and functions of the RIP protocol\”. The previous parts of this article are the following.

How RIP Routing works

This tutorial is the first part of the article. This part explains how the RIP routing protocol uses broadcast messages to exchange network paths\’ information.

RIP Routing features and functions

This tutorial is the second part of the article. This part explains the concept of distance-vector routing and how the RIP routing protocol uses this concept.

RIP Tutorial – Basic operation of RIP Protocol

This tutorial is the third part of the article. This part explains RIP timers and differences between RIPv1 and RIPv2.

Routing Loops Explained with Examples

This tutorial is the fourth part of the article. This part explains routing loops and how they are formed in a distance-vector routing protocol running network.

Split Horizon Explained with Examples

This tutorial is the fifth part of the article. This part explains the split-horizon feature and how it removes routing loops in the network.

That’s all for this tutorial. In the next part of this tutorial, we will understand how to configure RIP routing protocol in detail through examples. If you like this tutorial, please don’t forget to share it with friends through your social channel.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo

Categories
CCNA Study Guide

Contiguous and Discontiguous Networks Explained

This tutorial explains contiguous and discontiguous networks in detail. Learn the differences between contiguous and discontiguous networks through examples.

What are the contiguous and discontiguous networks?

A contiguous network is a network in which packets sent between every pair of subnets pass through subnets of the same network. A discontiguous network is a network in which packets sent between at least one subnet must pass through subnets of a different network.

In simple terms, a network is considered a contiguous network when a host of the network can access any part of the same network without going outside the network. To access some other part of the network, if a host has to go through some different network then the network is considered as a discontiguous network.

Example of contiguous networks



The following image shows an example of contiguous networks. In this network topology: –

  • Three network addresses are subnetted and used. These network addresses are: 10.0.0.0/8, 20.0.0.0/8, and 192.168.1.0/24.
  • Two subnets 10.1.0.0/24 and 10.2.0.0/24 of the network 10.0.0.0/8 are used on F0/0 and F0/1 interfaces of router R0, respectively.
  • Two subnets 20.1.0.0/24 and 20.2.0.0/24 of the network 20.0.0.0/8 are used on F0/0 and F0/1 interfaces of router R1, respectively.
  • One subnet of the network 192.168.1.0/24 is used to connect R0\’s serial 0/0/0 to R1\’s serial 0/0/0.

example of contiguous networks

This network topology is created on Packet Tracer. You can download this network topology from here.

Link to download the contiguous network topology.

To download Packet Tracer, visit this page.

Download Packet Tracer for Windows and Linux

In this network topology, if a host wants to communicate or exchange data packets with other hosts of the same network, it does not need to cross the boundaries of the same network.

Let\’s understand how it works practically.



Suppose PC0 wants to communicate with PC3. PC0 creates a data packet for PC3. Since PC3 is not available in the local subnet, PC0 sends this packet to the default gateway (F0/0 interface of router R0).

The router R0 reads the destination network address of the incoming packet. Since the destination network address of the incoming packet is available on R0\’s F0/1 interface, the router R0 forwards the incoming packet from the F0/1 interface.

PC3 receives this packet from R0\’s F0/1 and processes it. In response, if PC3 sends a data packet back to PC1, the packet will go through the same route in reverse.

The following image process.

data exchange process in contiguous networks

Throughout the entire communication, data packets exchanged between PC0 and PC3 do not take a route that is not related to the network 10.0.0.0. To verify this, you can use the \’tracert\’ command.

The following image shows the output of the \’tracert\’ command from both PCs.

verification of contiguous networks

The term contiguous is network specific. It does not include subnets of other networks. In our example, we have three networks: 10.0.0.0, 20.0.0.0, and 192.168.1.0. They all are contiguous as long as their hosts can access other hosts of the same network without going outside of the network.

The following image outlines these networks.

how contiguous networks work

Example of discontiguous networks

The following image shows an example of discontiguous networks. Except for the location of two subnets, this is the same network topology that we used above. In this topology, subnets 10.2.0.0/24 and 20.1.0.0/24 are interchanged.

example of discontiguous networks

You can download this network topology from here.

Link to download the discontiguous network topology.

In this network topology, if a host wants to communicate with other hosts of the same network, it has to go through another network\’s subnet. For example, if PC1 wants to communicate with PC7, it has to cross a subnet of a different network.

Since PC1 and PC7 belong to two different subnets (10.1.0.0/24 and 10.2.0.0/24) of the same network (10.0.0.0/8) and to communicate they have to cross a subnet (192.168.1.0/30) of the different network (192.168.1.0/24), the network (10.0.0.0/8) is considered as a discontiguous network.

The following image shows the output of the \’tracert\’ command from both PCs.

verification of discontiguous networks

As you can see in the above image, packets exchanged between PC1 (10.1.0.3) and PC7 (10.2.0.3) take a route (192.168.1.1–192.168.1.2) that does not belong to their network (10.0.0.0).

How to know whether a network is contiguous or discontiguous?

To know whether a network is contiguous or not, check its subnets.

If all subnets of a network are organized in such a way that their hosts can communicate with each other without going outside the network, the network is contiguous.

If a host takes a route to communicate with other hosts of the same network that belongs to a different network, the network is discontiguous.

The following image shows one contiguous network 192.168.1.0 and two discontiguous networks: 10.0.0.0, and 20.0.0.0.

differences between contiguous and discontiguous networks

What type of network topology should you use?

When designing a network, you should always arrange subnets in a contiguous way. Contiguous subnets have several advantages over discontiguous subnets. If subnets are contiguous, routing protocols summarize them before advertising. I will explain this feature through examples in the next article.

That\’s all for this tutorial. If you like this tutorial, please don\’t forget to share it with friends through your favorite social channel.

Prerequisites for 200-301

200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.

The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.

Full Version 200-301 Dumps

Try 200-301 Dumps Demo