Table of Contents for
Packet Tracer Network Simulator

Chapter 6. Configuring Routing with the CLI

We have finally reached the important part of networking—routing. Routing allows communication between multiple logical networks. When configuring routing on the command line of Packet Tracer—similar to configuring on physical hardware—you'll find that Packet Tracer offers a GUI to configure static and RIP routing protocols. In addition to this, we'll also see how load balancing works using the simulation mode, which will help you understand things better.

Static routing

Static routing is the no-brainer method for configuring routing even though it requires more work. With Packet Tracer, static routing can be configured using the GUI alone. In this method, we configure a router with a destination and a gateway to reach it. So, each router in a topology should know the means to reach all destinations in the network, which requires manual work. Similarly, if a router is added or removed from the topology, all routers must be manually updated to reflect this.

Static routing with GUI

Even if you do not know Cisco commands, this feature of Packet Tracer comes in handy. For this exercise, we will be using the topology shown in the following screenshot:.

Static routing with GUI

This network has four routers in a ring topology, with no PCs or loopback interfaces. Because we will be using only the GUI here, configuration will be kept to a minimum. The topology can be configured by performing the following steps:

  1. Click on a router icon, go to the Config tab, select an interface, and configure the IP address. Make sure that you select the On checkbox in this section to bring the port state up. For this example, we'll be using the following IP addresses:

    Router

    Interface

    IP Address

    R1

    FastEthernet0/0

    192.168.10.1

     

    FastEthernet0/1

    192.168.20.1

    R2

    FastEthernet0/0

    192.168.10.2

     

    FastEthernet0/1

    192.168.30.1

    R3

    FastEthernet0/0

    192.168.20.2

     

    FastEthernet0/1

    192.168.40.1

    R4

    FastEthernet0/0

    192.168.30.2

     

    FastEthernet0/1

    192.168.40.2

  2. Under the ROUTING section, click on Static. The following screenshot is displayed:
    Static routing with GUI
  3. The following settings will be used for configuring static routing using the GUI. The concept here is to enter all routes that are not directly connected to a router and a gateway IP that belongs to a network that is directly connected.

    Device

    Network/Mask

    Next Hop

    R1

    192.168.30.0 / 255.255.255.0

    192.168.10.2

     

    192.168.40.0 / 255.255.255.0

    192.168.20.2

    R2

    192.168.20.0 / 255.255.255.0

    192.168.10.1

     

    192.168.40.0 / 255.255.255.0

    192.168.30.2

    R3

    192.168.10.0 / 255.255.255.0

    192.168.20.1

     

    192.168.30.0 / 255.255.255.0

    192.168.40.2

    R4

    192.168.10.0 / 255.255.255.0

    192.168.30.1

     

    192.168.20.0 / 255.255.255.0

    192.168.40.1

  4. Now use simple PDU and test the connectivity between all of the routers. Then use the simulation mode to find the route taken by the packets.
  5. How about taking a look at the routing table? For this, too, the GUI has an option; click on the inspect icon or press I and select a router. A table containing four routes will appear for each router, as shown in the following screenshot:
    Static routing with GUI

But we configured only two routes, so why four? The extra two routes are the subnets of the directly-connected links.

In this topology, even though there is an alternate route to each network, only one route is used because this is how we have configured it. We'll learn more about having more than one route in the Load Sharing section.

Static routing with the CLI

The configuration and the topology will be same in this section. We'll only see the commands required for one device. The topology can be configured by performing the following steps:

  1. Assign IP addresses to the interfaces on each router using the following commands:
    R1(config)#interface FastEthernet0/0
    R1(config-if)#ip address 192.168.10.1 255.255.255.0
    R1(config-if)#no shutdown
    R1(config-if)#exit
    R1(config)#interface FastEthernet0/1
    R1(config-if)#ip address 192.168.20.1 255.255.255.0
    R1(config-if)#no shutdown
    R1(config-if)#exit
  2. Configure static routing with the ip route command, using the following syntax:
    R1(config)#ip route <Destination Prefix> <Destination prefix mask> <Gateway IP>
    
  3. For router R1, the following commands are used:
    R1(config)#ip route 192.168.30.0 255.255.255.0 192.168.10.2
    R1(config)#ip route 192.168.40.0 255.255.255.0 192.168.20.2
    

Use simple PDU to test the connectivity. If you get message indicating a failure, switch to simulation mode and see which router is incorrectly configured.