2 Static Routing

2.0 Chapter Introduction

2.0.1 Chapter Introduction

Page 1:
Chapter Introduction

Routing is at the core of every data network, moving information across an internetwork from source to destination. Routers are the devices responsible for the transfer of packets from one network to the next.

As we learned in the previous chapter, routers learn about remote networks either dynamically using routing protocols or manually using static routes. In many cases routers use a combination of both dynamic routing protocols and static routes. This chapter focuses on static routing.

Static routes are very common and do not require the same amount of processing and overhead as we will see with dynamic routing protocols.

In this chapter, we will follow a sample topology as we configure static routes and learn troubleshooting techniques. In the process, we will examine several key IOS commands and the results they display. We will also introduce the routing table using both directly connected networks and static routes.

As you work through the Packet Tracer activities associated with these commands, take the time to experiment with the commands and examine the results. Reading the routing tables will soon become second nature.


2.0.1 - Chapter Introduction
The diagram depicts the front panel of various Cisco routers and a list of chapter objectives. In this chapter you will learn to:
- Define the general role a router plays in networks.
- Describe the directly connected networks and the different router interfaces.
- Examine directly connected networks in the routing table and use the CDP protocol.
- Describe static routes with exit interfaces.
- Describe summary and default routes.
- Examine how packets get forwarded when using static routes.
- Identify how to manage and troubleshoot static routes.


2.1 Routers and Network

2.1.1 Role of the Router

Page 1:
Role of the Router

The router is a special-purpose computer that plays a key role in the operation of any data network. Routers are primarily responsible for interconnecting networks by:
  • Determining the best path to send packets
  • Forwarding packets toward their destination
Routers perform packet forwarding by learning about remote networks and maintaining routing information. The router is the junction or intersection that connects multiple IP networks. The routers primary forwarding decision is based on Layer 3 information, the destination IP address.

The router's routing table is used to find the best match between the destination IP of a packet and a network address in the routing table. The routing table will ultimately determine the exit interface to forward the packet and the router will encapsulate that packet in the appropriated data link frame for that outgoing interface.


2.1.1 - Role of the Router
The diagram depicts the role of the router. A photograph of a router is shown with arrows pointing to routers in a topology.

Network Topology:
PC1 is connected to switch S1, which is connected to router R1. Router R1 is connected to router R2 via a WAN link. Router R2 is connected to router R3 via a WAN link. PC2 is connected to switch S2, which is connected R3.


2.1.2 Introducing the Topology

Page 1:
Introducing the Topology

The figure shows the topology used in this chapter. The topology consists of three routers, labeled R1, R2, and R3. Routers R1 and R2 are connected through one WAN link, and routers R2 and R3 are connected through another WAN link. Each router is connected to a different Ethernet LAN, represented by a switch and a PC.

Each router in this example is a Cisco 1841. A Cisco 1841 router has the following interfaces:
  • Two FastEthernet interfaces: FastEthernet 0/0 and FastEthernet 0/1
  • Two serial interfaces: Serial 0/0/0 and Serial0/0/1
The interfaces on your routers may vary from those on the 1841, but you should be able to follow the commands in this chapter-with some slight modifications-and complete the hands-on labs. In addition, Packet Tracer activities are available throughout the discussion of static routing so that you can practice skills as they are presented. Lab 2.8.1, "Basic Static Route Configuration," mirrors the topology, configurations, and commands discussed in this chapter.


2.1.2 - Introducing the Topology
The diagram depicts the role of the router.

Network Topology:
There are three routers, R1, R2, and R3, three switches, S1, S2, and S3, and three PC's, PC1, PC2, and PC3.

PC1 is connected to LAN switch S1, which is connected to the R1 interface FA0/0. The R1 interface S0/0/0 (DCE) is connected to router R2 interface S0/0/0 via a WAN link.

PC2 is connected to LAN switch S2, which is connected to the R2 interface FA0/0. The R2 interface S0/0/0 is connected to router R1, and the R2 interface S0/0/1 (DCE) is connected to router R3 via WAN links.

PC3 is connected to LAN switch S3, which is connected to the R3 interface FA0/0. The R3 interface S0/0/1 is connected to router R2 via a WAN link.

Chapter Topology Address Table:
Device: R1
Interface: FA0/0
IP Address: 172.16.3.1
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R1
Interface: S0/0/0
IP Address: 172.16.2.1
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R2
Interface: FA0/0
IP Address: 172.16.1.1
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R2
Interface: S0/0/0
IP Address: 172.16.2.2
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R2
Interface: S0/0/1
IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R3
Interface: FA0/0
IP Address: 192.168.2.1
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: R3
Interface: S0/0/1
IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
Default Gateway: N/A

Device: PC1
Interface: NIC
IP Address: 172.16.3.10
Subnet Mask: 255.255.255.0
Default Gateway: 172.16.3.1

Device: PC2
Interface: NIC
IP Address: 172.16.1.10
Subnet Mask: 255.255.255.0
Default Gateway: 172.16.1.1

Device: PC3
Interface: NIC
IP Address: 192.168.2.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.2.1


2.1.3 Examining the Connections of the Router

Page 1:
Router Connections

Connecting a router to a network requires a router interface connector to be coupled with a cable connector. As you can see in the figure, Cisco routers support many different connector types.

Serial Connectors

Click 1 in the figure.

For WAN connections, Cisco routers support the EIA/TIA-232, EIA/TIA-449, V.35, X.21, and EIA/TIA-530 standards for serial connections, as shown. Memorizing these connection types is not important. Just know that a router has a DB-60 port that can support five different cabling standards. Because five different cable types are supported with this port, the port is sometimes called a five-in-one serial port. The other end of the serial cable is fitted with a connector that is appropriate to one of the five possible standards.

Note: The documentation for the device to which you want to connect should indicate the standard for that device.

Click 2 and 3 in the figure.

Newer routers support the smart serial interface that allows for more data to be forwarded across fewer cable pins. The serial end of the smart serial cable is a 26-pin connector. It is much smaller than the DB-60 connector used to connect to a five-in-one serial port. These transition cables support the same five serial standards and are available in either DTE or DCE configurations.

Note: For a thorough explanation of DTE and DCE, see Lab 1.5.1, "Cabling a Network and Basic Router Configuration."

These cable designations are only important to you when configuring your lab equipment to simulate a "real-world" environment. In a production setting, the cable type is determined for you by the WAN service you are using.

Ethernet Connectors

Click 4 in the figure.

A different connector is used in an Ethernet-based LAN environment. An RJ-45 connector for the unshielded twisted-pair (UTP) cable is the most common connector used to connect LAN interfaces. At each end of an RJ-45 cable, you should be able to see eight colored strips, or pins. An Ethernet cable uses pins 1, 2, 3, and 6 for transmitting and receiving data.

Two types of cables can be used with Ethernet LAN interfaces:
  • A straight-through, or patch cable, with the order of the colored pins the same on each end of the cable
  • A crossover cable, with pin 1 connected to pin 3, and pin 2 connected to pin 6
Straight-through cables are used for:
  • Switch-to-router
  • Switch-to-PC
  • Hub-to-PC
  • Hub-to-server
Crossover cables are used for:
  • Switch-to-switch
  • PC-to-PC
  • Switch-to-hub
  • Hub-to-hub
  • Router-to-router
  • Router-to-server
Note: Wireless connectivity is discussed in another course.


2.1.3 - Examining the Connections of the Router
The diagram depicts router connections and connectors. Router connections to CSU/DSU connections are shown. The router side of the WAN connection is the same. The type of cable needed to connect to CSU/DSU varies and must be ordered based on the CSU/DSU being used. LAN UTP cable wiring pinouts for straight-through and cables crossover cables are shown.

Photographs of a D T E Serial DB60 cable and a D T E Smart Serial DB60 cable are shown. The D T E smart serial cable is used with newer router series (1700, 1800, 2600, 2800, etc.) The EIA/T IA 568B UTP Ethernet Cable is shown.


Page 2:
Use the Packet Tracer Activity to build the topology that you will use for the rest of this chapter. You will add all the necessary devices and connect them with the correct cabling.

Click the Packet Tracer icon for more details.


2.1.3 - Examining the Connections of the Router
Link to Packet Tracer Exploration: Build the Chapter Topology

Use the Packet Tracer Activity to build the topology that you will use for the rest of this chapter. You add all the necessary devices and connect them with the correct cabling.


2.2 Router Configuration Review

2.2.1 Examining Router Interfaces

Page 1:
Examining Router Interfaces

As we learned in Chapter 1, the show ip route command is used to display the routing table. Initially, the routing table is empty if no interfaces have been configured.

As you can see in the routing table for R1, no interfaces have been configured with an IP address and subnet mask.

Note: Static routes and dynamic routes will not be added to the routing table until the appropriate local interfaces, also known as the exit interfaces, have been configured on the router. This procedure will be examined more closely in later chapters.

Interfaces and their Status

The status of each interface can be examined by using several commands.

Click show interfaces in the figure.

The show interfaces command shows the status and gives a detailed description for all interfaces on the router. As you can see, the output from the command can be rather lengthy. To view the same information, but for a specific interface, such as FastEthernet 0/0, use the show interfaces command with a parameter that specifies the interface. For example:

R1#show interfaces fastethernet 0/0
FastEthernet0/0 is administratively down, line protocol is down


Notice that the interface is administratively down and the line protocol is down. Administratively down means that the interface is currently in the shutdown mode, or turned off. Line protocol is down means, in this case, that the interface is not receiving a carrier signal from a switch or the hub. This condition may also be due to the fact that the interface is in shutdown mode.

You will notice that the show interfaces command does not show any IP addresses on R1's interfaces. The reason for this is because we have not yet configured IP addresses on any of the interfaces.

Additional Commands for Examining Interface Status

Click show ip interface brief in the figure.
The show ip interface brief command can be used to see a portion of the interface information in a condensed format.

Click show running-config in the figure.

The show running-config command displays the current configuration file that the router is using. Configuration commands are temporarily stored in the running configuration file and implemented immediately by the router. Using this command is another way to verify the status of an interface such as FastEthernet 0/0.

R1#show running-config

interface FastEthernet0/0
no ip address
shutdown


However, using show running-config is not necessarily the best way to verify interface configurations. Use the show ip interface brief command to quickly verify that interfaces are up and up (administratively up and line protocol is up).


2.2.1 - Examining Router Interfaces
The diagram depicts ways to check interfaces and their status.

Network Topology:
Same as 2.1.2 diagram 1.

The output from various commands is shown.
show i p route command: This command displays the routing table. Initially, the routing table is empty if no interfaces have been configured, as shown for router R1.

show interfaces command: Shows the status of each interface and gives a detailed description for each interface on the router. The output from the command is rather lengthy. To view the information for a specific interface, such as FastEthernet0/0, specify the interface in the command. For example:

R1#show interfaces fast ethernet0/0
FastEthernet0/0 is administratively down, line protocol is down

Notice that the interface is administratively down, and the line protocol is down.

show i p interface brief command: Shows only a portion of the interface information. This command displays each interface on the router, along with the associated IP address, status, and protocol, in a condensed format.

show running-config command: Using this command is another way to verify the status of an interface such as FastEthernet0/0, but the output can be lengthy as with the show interfaces command.

R1#show running-config
some output omitted
interface FastEthernet0/0
no i p address
shutdown
some output omitted


2.2.2 Configuring an Ethernet Interface

Page 1:
Configuring an Ethernet Interface

As shown, R1 does not yet have any routes. Let's add a route by configuring an interface and explore exactly what happens when that interface is activated. By default, all router interfaces are shutdown, or turned off. To enable this interface, use the no shutdown command, which changes the interface from administratively down to up.

R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown


The following message is returned from the IOS:

*Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


Both of these messages are important. The first changed state to up message indicates that, physically, the connection is good. If you do not get this first message, be sure that the interface is properly connected to a switch or a hub.

Note: Although enabled with no shutdown, an Ethernet interface will not be active, or up, unless it is receiving a carrier signal from another device (switch, hub, PC, or another router).

The second changed state to up message indicates that the Data Link layer is operational. On LAN interfaces, we do not normally change the Data Link layer parameters. However, WAN interfaces in a lab environment require clocking on one side of the link as discussed in Lab 1.5.1, "Cabling a Network and Basic Router Configuration," as well as later in the section, "Configuring a Serial Interface." If you do not correctly set the clock rate, then line protocol (the Data Link layer) will not change to up.

Unsolicited Messages from IOS

Click Unsolicited Messages from IOS in the figure.

The IOS often sends unsolicited messages similar to the changed state to up messages just discussed. As you can see in the figure, sometimes these messages will occur when you are in the middle of typing a command, such as configuring a description for the interface. The IOS message does not affect the command, but it can cause you to lose your place when typing.

Click Logging Synchronous in the figure.

In order to keep the unsolicited output separate from your input, enter line configuration mode for the consoled port and add the logging synchronous command, as shown. You will see that messages returned by IOS no longer interfere with your typing.


2.2.2 - Configuring an Ethernet Interface
The diagram depicts the logging synchronous command when configuring an interface to prevent unsolicited Cisco I O S messages from interrupting the process.

Network Topology:
Same as 2.1.2 diagram 1.
The following commands are shown.

Show i p route: The routing table has no routes.

Unsolicited Messages from I O S: The administrator attempts to configure the FastEthernet interface so that a router can be added to the routing table, but the description command input is interrupted by an I O S message indicating that the interface is up when the no shutdown command is entered.

Logging Synchronous: Using the logging synchronous command synchronizes I O S messages and command input. I O S messages no longer interfere typing.


Page 2:
Reading the Routing Table

Now look at routing table shown in the figure. Notice R1 now has a "directly connected" FastEthernet 0/0 interface a new network. The interface was configured with the 172.16.3.1/24 IP address which makes it a member of the 172.16.3.0/24 network.

Examine the following line of output from the table:

C 172.16.3.0 is directly connected, FastEthernet0/0

The C at the beginning of the route indicates that this is a directly connected network. In other words, R1 has an interface that belongs to this network. The meaning of C is defined in the list of codes at the top of the routing table.

The /24 subnet mask for this route is displayed in the line above the actual route.

172.16.0.0/24 is subnetted, 1 subnets
C 172.16.3.0 is directly connected, FastEthernet0/0


Routers Usually Store Network Addresses

With very few exceptions, routing tables have routes for network addresses rather than individual host addresses. The 172.16.3.0/24 route in the routing table means that this route matches all packets with a destination address belonging to this network. Having a single route represent an entire network of host IP addresses makes the routing table smaller, with fewer routes, which results in faster routing table lookups. The routing table could contain all 254 individual host IP addresses for the 172.16.3.0/24 network, but that is an inefficient way of storing addresses.

A phone book is a good analogy for a routing table structure. A phone book is a list of names and phone numbers, sorted in alphabetical order by last name. When looking for a number, we can assume that the fewer names there are in the book, the faster it will be to find a particular name. A phone book of 20 pages and perhaps 2,000 entries will be much easier to search than a book of 200 pages and 20,000 entries.

The phone book only contains one listing for each phone number. For example, the Stanford family might be listed as:

Stanford, Harold, 742 Evergreen Terrace, 555-1234

This is the single entry for everyone who lives at this address and has the same phone number. The phone book could contain a listing for every individual, but this would increase the size of the phone book. For example, there could be a separate listing for Harold Stanford, Margaret Stanford, Brad Stanford, Leslie Stanford, and Maggie Stanford - all with the same address and phone number. If this were done for every family, the phone book would be larger and take longer to search.

Routing tables work the same way: one entry in the table represents a "family" of devices that all share the same network or address space (the difference between a network and an address space will become clearer as you move through the course). The fewer the entries in the routing table, the faster the lookup process. To keep routing tables smaller, network addresses with subnet masks are listed instead of individual host IP addresses.

Note: Occasionally, a "host route" is entered in the routing table, which represents an individual host IP address. It is listed with the device's host IP address and a /32 (255.255.255.255) subnet mask. The topic of host routes is discussed in another course.


2.2.2 - Configuring an Ethernet Interface
The diagram depicts a directly connected route in the routing table when using the show i p route command.

Network Topology:
Same as 2.1.2 diagram 1.

The following entry is shown:

C 172.16.3.0 is directly connected, FastEthernet0/0

The show i p route output shows that router R1 now has a connected network. This is because the no shutdown command on FastEthernet0/0 was issued, which enabled the interface.


2.2.3 Verifying Ethernet interface

Page 1:
Commands to Verify Interface Configuration

The show interfaces fastethernet 0/0 command in the figure now shows that the interface is up, and the line protocol is up. The no shutdown command changed the interface from administratively down to up. Notice that the IP address is now displayed.

Click show ip interface brief in the figure.

The show ip interface brief command also shows verifies this same information. Under the status and protocol, you should see "up".

The show running-config command shows the current configuration of this interface. When the interface is disabled, the running-config command displays shutdown; however, when the interface is enabled, no shutdown is not displayed.

R1#show running-config

interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0


As explained in Chapter 1, a router cannot have multiple interfaces that belong to the same IP subnet. Each interface must belong to a separate subnet. For example, a router cannot have both its FastEthernet 0/0 interface configured as 172.16.3.1/24 address and mask and its FastEthernet 0/1 interface configured as 172.16.3.2/24.

The IOS will return the following error message if you attempt to configure the second interface with the same IP subnet as the first interface:

R1(config-if)#int fa0/1
R1(config-if)#ip address 172.16.3.2 255.255.255.0
172.16.3.0 overlaps with FastEthernet0/0
R1(config-if)#


Typically, the router's Ethernet or FastEthernet interface will be the default gateway IP address for any devices on that LAN. For example, PC1 would be configured with a host IP address belonging to the 172.16.3.0/24 network, with the default gateway IP address 172.16.3.1. 172.16.3.1 is router R1's FastEthernet IP address. Remember, a router's Ethernet or FastEthernet interface will also participate in the ARP process as a member of that Ethernet network.


2.2.3 - Verifying the Ethernet Interface
The diagram depicts verifying the interface status with the show interfaces and show i p interface brief commands.

Network Topology:
Same as 2.1.2 diagram 1.

show interfaces fast ethernet 0/0 command:
The command output shows that the interface is up, and the line protocol is up. The no shutdown command changed the status of the interface from administratively down to up. The IP address is now displayed.

show i p interface brief command:
The command output shows that the interface is up using a brief format. Under the status and protocol output, you should see "up". The IP address is also displayed.


Page 2:
Ethernet Interfaces Participate in ARP

A router's Ethernet interface participates in a LAN network just like any other device on that network. This means that these interfaces have a Layer 2 MAC address, as shown in the figure. The show interfaces command displays the MAC address for the Ethernet interfaces.

R1#show interfaces fastethernet 0/0

As demonstrated in Chapter 1, an Ethernet interface participates in ARP requests and replies and maintains an ARP table. If a router has a packet destined for a device on a directly connected Ethernet network, it checks the ARP table for an entry with that destination IP address in order to map it to the MAC address. If the ARP table does not contain this IP address, the Ethernet interface sends out an ARP request. The device with the destination IP address sends back an ARP reply that lists its MAC address. The IP address and MAC address information is then added to the ARP table for that Ethernet interface. The router is now able to encapsulate the IP packet into an Ethernet frame with the destination MAC address from its ARP table. The Ethernet frame, with the encapsulated packet, is then sent via that Ethernet interface.


2.2.3 - Verifying the Ethernet Interface
The diagram depicts verifying MAC addresses on Ethernet interfaces using the show interfaces fast ethernet 0/0 command. The command output displays the MAC address for the Ethernet interface.

Network Topology:
Same as 2.1.2 diagram 1.


Page 3:
Use the Packet Tracer Activity to practice configuring Ethernet interfaces. Follow the additional instructions provided in the activity to examine the ARP process in simulation mode.

Click the Packet Tracer icon for more details.


2.2.3 - Verifying the Ethernet Interface
Link to Packet Tracer Exploration: Configure Ethernet Interfaces for IP on Hosts and Routers

Use the Packet Tracer Activity to practice configuring Ethernet interfaces. Follow the additional instructions provided in the activity to examine the ARP process in simulation mode.


2.2.4 Configuring A Serial Interface

Page 1:
Configuring a Serial Interface

Next, let's configure the Serial 0/0/0 interface on router R1. This interface is on the 172.16.2.0/24 network and is assigned the IP address and subnet mask of 172.16.2.1/24. The process we use for the configuration of the serial interface 0/0/0 is similar to the process we used to configure the FastEthernet 0/0 interface.

R1(config)#interface serial 0/0/0
R1(config-if)#ip address 172.16.2.1 255.255.255.0
R1(config-if)#no shutdown


After entering the commands above, the state of the serial interface may vary depending upon the type of WAN connection. This will be discussed in more detail in a later course. In this course, we will be using dedicated, serial point-to-point connections between two routers. The serial interface will be in the up state only after the other end of the serial link has also been properly configured. We can display the current state of serial 0/0/0 using the show interfaces serial 0/0/0 command, as shown in the figure.

As you can see, the link is still down. The link is down because we have not yet configured and enabled the other end of the serial link.

R1#show interfaces serial 0/0/0
Serial0/0/0 is administratively down, line protocol is down


We will now configure the other end of this link, Serial 0/0/0 link for router R2.

Note: There is no requirement that both ends of the serial link use the same interface, in this case, Serial 0/0/0. However, because both interfaces are members of the same network, they both must have IP addresses that belong to the 172.16.2.0/24 network. (The terms network and subnet can be used interchangeably in this case.) R2's interface Serial 0/0/0 is configured with the IP address and subnet mask 172.16.2.2/24.

R2(config)#interface serial 0/0/0
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#no shutdown


If we now issue the show interfaces serial 0/0/0 command on either router, we still see that the link is up/down.

R2#show interfaces serial 0/0/0
Serial0/0/0 is up, line protocol is down


The physical link between R1 and R2 is up because both ends of the serial link have been configured correctly with an IP address/mask and enabled with the no shutdown command. However, the line protocol is still down. This is because the interface is not receiving a clock signal. There is still one more command that we need to enter, the clock rate command, on the router with the DCE cable. The clock rate command will set the clock signal for the link. Configuring the clock signal will be discussed in the next section.


2.2.4 - Configuring a Serial Interface
The diagram depicts a serial interface with a status of down and down even though it has an IP address and was enabled with the no shutdown command.

Network Topology:
Same as 2.1.2 diagram 1.

The following lines in the R1 show interfaces serial 0/0/0 command output are highlighted:
Serial0/0/0 is administratively down, line protocol is down.
Internet address is 172.16.2.1/24.


2.2.5 Examining Router Interfaces

Page 1:
Physically Connecting a WAN Interface

The WAN Physical layer describes the interface between the data terminal equipment (DTE) and the data circuit-terminating equipment (DCE). Generally, the DCE is the service provider and the DTE is the attached device. In this model, the services offered to the DTE are made available either through a modem or a CSU/DSU.

Typically, the router is the DTE device and is connected to a CSU/DSU, which is the DCE device. The CSU/DSU (DCE device) is used to convert the data from the router (DTE device) into a form acceptable to the WAN service provider. The CSU/DSU (DCE device) is also responsible for converting the data from the WAN service provider into a form acceptable by the router (DTE device). The router is usually connected to the CSU/DSU using a serial DTE cable, as shown.

Serial interfaces require a clock signal to control the timing of the communications. In most environments, the service provider (a DCE device such as a CSU/DSU) will provide the clock. By default, Cisco routers are DTE devices. However, in a lab environment, we are not using any CSU/DSUs and, of course, we do not have a WAN service provider.

Roll over the cables and devices in the figure to see what they are.


2.2.5 - Examining Router Interfaces
The diagram depicts physical connections on a router focusing on the WAN interface. A CSU/DSU is connected to the router using a D T E cable. The following components and cables are identified:

-RJ-45 to Telco Demarc - cable from CSU/DSU to Telco
-CSU/DSU DCE device
-V dot 35 cable from the router to CSU/DSU
-Power Supply on CSU/DSU
-Router D T E device
-UTP cable to 10/100 Ethernet Port on a switch
-Console cable to PC
-AC/DC adapter for router


Page 2:
Configuring Serial Links in a Lab Environment

For serial links that are directly interconnected, as in a lab environment, one side of a connection must be considered a DCE and provide a clocking signal. Although Cisco serial interfaces are DTE devices by default, they can be configured as DCE devices.

To configure a router to be the DCE device:

1. Connect the DCE end of the cable to the serial interface.

2. Configure the clock signal on the serial interface using the clock rate command.

The serial cables used in the lab are typically one of two types.
  • A DTE/DCE crossover cable on which one end is DTE and the other end is DCE
  • A DTE cable connected to a DCE cable
In our lab topology, the Serial 0/0/0 interface on R1 is connected with the DCE end of the cable, and the serial 0/0/0 interface on R2 is connected to the DTE end of the cable. The cable should be labeled either DTE or DCE.

You can also distinguish DTE from DCE by looking at the connector between the two cables. The DTE cable has a male connector, whereas the DCE cable has a female connector.

If a cable is connected between the two routers, you can use the show controllers command to determine which end of the cable is attached to that interface. In the command output, notice that R1 has the DCE cable attached to its serial 0/0 interface and that no clock rate is set.

R1#show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V.35, no clock


Once the cable is attached, the clock can now be set with the clock rate command. The available clock rates, in bits per second, are 1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000, 500000, 800000, 1000000, 1300000, 2000000, and 4000000. Some bit rates might not be available on certain serial interfaces. Because Serial 0/0/0 interface on R1 has the DCE cable attached, we will configure that interface with a clock rate.

R1(config)#interface serial 0/0/0
R1(config-if)#clock rate 64000
01:10:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up


Note: If a router's interface with a DTE cable is configured with the clock rate command, the IOS will disregard the command and there will be no ill effects.


2.2.5 - Examining Router Interfaces
The diagram depicts verifying the type of serial cable (DCE or D T E) attached to router R1 using the show controllers serial 0/0/0 command. The command output shows that R1 has a DCE cable connected but no clock rate is set.

Network Topology:
Same as 2.1.2 diagram 1. Note that router R1 S0/0/0 is labeled DCE.

R1#show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is PowerQUICC MPC860
DCE V dot 35, no clock
output omitted


Page 3:
Verifying the Serial Interface Configuration

As you can see from the figure, we can determine that the line protocol is now up and verify this on both ends of the serial link by using the show interfaces and show ip interface brief commands. Remember, the serial interface will be up only if both ends of the link are configured correctly. In our lab environment, we have configured the clock rate on the end with the DCE cable.

We can further verify that the link is up/up by pinging the remote interface.

R1#ping 172.16.2.2

Finally, we can see the 172.16.2.0/24 serial network in the routing tables of both routers. If we issue the show ip route command on R1, we will see the directly connected route for the 172.16.2.0/24 network.

R1#show ip route

Now take a look at router R1's running configuration by using the show running-config command.

R1#show running-config

Note: Although the clock rate command is two words, the IOS spells clockrate as a single word in the running configuration and startup configuration files.


2.2.5 - Examining Router Interfaces
The diagram depicts verifying the status of router R1's serial interface using the show interfaces and show i p interface brief commands. Output from these commands show that the line protocol is up and verifies that both ends of the serial link are also up. The output from R1 showing pings to R2. The output from the show i p route and show run commands further confirms the serial interface configuration and that status is up and up .

Network Topology:
Same as 2.1.2 diagram 1.


2.3 Exploring Directly Connected Networks

2.3.1 Verifying Changes to the Routing Table

Page 1:
Routing Table Concepts

As you can see in the figure, the show ip route command reveals the content of the routing table. Let's review the purpose of a routing table. A routing table is a data structure used to store routing information acquired from different sources. The main purpose of a routing table is to provide the router with paths to different destination networks.

The routing table consists of a list of "known" network addresses - that is, those addresses that are directly connected, configured statically, and learned dynamically. R1 and R2 only have routes for directly connected networks.



2.3.1 - Verifying Changes to the Routing Table
The diagram depicts basic routing table concepts by displaying the routing tables of routers R1 and R2. At this time, R1 and R2 only have routes for directly connected networks. R1 has two connected networks, and R2 has only one because its FastEthernet interface is still down.

Network Topology:
Same as 2.1.2 diagram 1.

Current Routing Table for R1:
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0

Current Routing Table for R2:
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.2.0 is directly connected, Serial0/0/0


Page 2:
Observing Routes as They are Added to the Routing Table

We will now take a closer look at how directly connected routes are added to, and deleted from, the routing table. In contrast to show commands, debug commands can be used to monitor router operations in real time. The debug ip routing command will let us see any changes that the router performs when adding or removing routes. We will configure the interfaces on the R2 router and examine this process.

First, we will enable debugging with the debug ip routing command so that we can see the directly connected networks as they are added to the routing table.

R2#debug ip routing
IP routing debugging is on


Configuring the IP address and Subnet Mask

Next, we will configure the IP address and subnet mask for the FastEthernet 0/0 interface on R2 and use the no shutdown command. Because the FastEthernet interface connects to the 172.16.1.0/24 network, it must be configured with a host IP address for that network.

R2(config)#interface fastethernet 0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shutdown


The following message will be returned from the IOS:

02:35:30: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
02:35:31: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


After the no shutdown command is entered and the router determines that the interface and line protocol are in the up and up state, the debug output shows R2 adding this directly connected network to the routing table.

02:35:30: RT: add 172.16.1.0/24 via 0.0.0.0, connected metric [0/0]
02:35:30: RT: interface FastEthernet0/0 added to routing table


Click Routing Table 1 in the figure.

The routing table now shows the route for the directly connected network 172.16.1.0/24, as seen in the figure.

The debug ip routing command displays routing table processes for any route, whether that route is a directly connected network, a static route, or a dynamic route.

Click Disable Debug in the figure.

Disable debug ip routing by using either the undebug ip routing command or the undebug all command.

Changing an IP Address

To change an IP address or subnet mask for an interface, reconfigure the IP address and subnet mask for that interface. This change will overwrite the previous entry. There are ways to configure a single interface with multiple IP addresses, as long as each address is on a different subnet. This topic will be discussed in a later course.

To remove a directly connected network from a router, use these two commands: shutdown and no ip address.

The shutdown command is used to disable interfaces. This command can be used by itself if you want to retain the IP address/mask configuration on the interface but want to shut it down temporarily. In our example, this command will disable R2's FastEtherent interface. The IP address, however, will still be in the configuration file, running-config.

After the shutdown command is used, you can remove the IP address and subnet mask from the interface. The order in which you perform these two commands does not matter.

Click Debug 2 in the figure.

Using debug ip routing we can see the routing table process, we will delete the configuration for R2's FastEthernet 0/0 interface.

R2(config)#interface fastethernet 0/0
R2(config-if)#shutdown


We can see the routing table process removing the directly connected route.

02:53:58: RT: interface FastEthernet0/0 removed from routing table
02:53:58: RT: del 172.16.1.0/24 via 0.0.0.0, connected metric [0/0]
02:53:58: RT: delete subnet route to 172.16.1.0/24


The IOS also indicates that the interface and line protocol are now down:

02:54:00: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
02:54:01: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

We will now remove the IP address on the interface.

R2(config-if)#no ip address

Disable debugging:

R2#undebug all
All possible debugging has been turned off


Click Routing Table 2 in the figure.

To verify that the route was removed from the routing table, we use the command show ip route. Notice that the route to 172.16.1.0/24 has been removed.

Reconfiguring the interface to continue with the chapter.

For the purposes of the rest of this chapter, we will assume that the addressing for FastEthernet 0/0 was not removed. To reconfigure the interface, simply enter the commands again:

R2(config)#interface fastethernet 0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shutdown


WARNING: Debug commands, especially the debug all command, should be used sparingly. These commands can disrupt router operations. Debug commands are useful when configuring or troubleshooting a network; however, they can make intensive use of CPU and memory resources. It is recommended that you run as few debug processes as necessary and disable them immediately when they are no longer needed. Debug commands should be used with caution on production networks because they can affect the performance of the device.


2.3.1 - Verifying Changes to the Routing Table
The diagram depicts routes as they are added to and removed from the routing table.

Network Topology:
Same as 2.1.2 diagram 1.

The debug i p routing command is issued on R2, and the FA0/0 interface is configured. The debug output shows the route to the 172.16.1.0/24 network being added when the interface comes up. The output from the show i p route command shows directly connected networks 172.16.1.0 and 172.16.2.0 in the routing table. The undebug all command is then issued to turn off debugging.

The debug i p routing command is issued again on R2, and the FA0/0 interface is shut down. The debug output shows the route to the 172.16.1.0/24 network being deleted when the interface goes down. The output from the show i p route command now shows only the directly connected network 172.16.2.0 in the routing table.


Page 3:
Use the Packet Tracer Activity to practice configuring Serial interfaces. You will also use debug ip routing to observe the routing table processes.

Click the Packet Tracer icon for more details.


2.3.1 - Verifying Changes to the Routing Table
Link to Packet Tracer Exploration: Configure Serial Interfaces and Verify the Routing Table

Use the Packet Tracer Activity to practice configuring serial interfaces. You also use the debug i p routing command to observe the routing table processes.


2.3.2 Devices on Directly Connected Networks

Page 1:
Accessing Devices on Directly Connected Networks

To return to our configuration in the sample topology, we will now assume that all directly connected networks are configured for all three routers. The figure shows the rest of the configurations for routers R2 and R3.

Click show ip interface brief in the figure.

The output in this figure verifies that all configured interfaces are "up" and "up".

Click show ip route in the figure.

By reviewing the routing tables in the figure, we can verify that all directly connected networks are installed for routing.

The crucial step in configuring your network is to verify that all the interfaces are "up" and "up" and that the routing tables are complete. Regardless of what routing scheme you ultimately configure - static, dynamic, or a combination of both - verify your initial network configurations with the show ip interface brief command and the show ip route command before proceeding with more complex configurations.

When a router only has its interfaces configured, and the routing table contains the directly connected networks but no other routes, only devices on those directly connected networks are reachable.
  • R1 can communicate with any device on the 172.16.3.0/24 and 172.16.2.0/24 networks.
  • R2 can communicate with any device on the 172.16.1.0/24, 172.16.2.0/24, and 192.168.1.0/24 networks.
  • R3 can communicate with any device on the 192.168.1.0/24 and 192.168.2.0/24 networks.
Because these routers only know about their directly connected networks, the routers can only communicate with those devices on their own directly connected LANs and serial networks.

For example, PC1 in the topology has been configured with the IP address 172.16.3.10 and the subnet mask 255.255.255.0. PC1 has also been configured with the default gateway IP address 172.16.3.1, which is the router's FastEtherent 0/0 interface IP address. Because R1 only knows about directly connected networks, it can forward packets from PC1 to devices on the 172.16.2.0/24 network, such as 172.16.2.1 and 172.16.2.2. Packets from PC1 with any other destination IP address, such as PC2 at 172.16.1.10, would be dropped by R1.

Let's take a look at the routing table for R2 in the figure. R2 only knows about its three directly connected networks. Try to predict what will happen if we ping one of the FastEthernet interfaces on one of the other routers.

Click ping in the figure.

Notice that the pings failed, as indicated by the series of five periods. It failed because R2 does not have a route in its routing table that matches either 172.16.3.1 or 192.168.2.1, which is the ping packet's destination IP address. To have a match between the packet's destination IP address of 172.16.3.1 and a route in the routing table, the address must match the number of left-most bits of the network address as indicated by the prefix of the route. For R2, all the routes have a /24 prefix, therefore, the left-most 24 bits are checked for each route.


2.3.2 - Devices on Directly Connected Networks
The diagram depicts configuring devices on directly connected networks and verifying the configurations.

Network Topology:
Same as 2.1.2 diagram 1.

The following is the remaining configuration of routers R2 and R3.
R2(config)#interface serial 0/0/1
R2(config-i f)#i p address 192.168.1.2 255.255.255.0
R2(config)#clock rate 64000
R2(config)#no shutdown

R3(config)#interface fast ethernet 0/0
R3(config)#i p address 192.168.2.1 255.255.255.0
R3(config)#no shutdown
R3(config)#interface serial 0/0/1
R3(config)#i p address 192.168.1.1 255.255.255.0
R3(config)#no shutdown

The show i p interface brief command is issued for R1, R2, and R3. The output verifies that all configured interfaces are up and up.

The show i p route command is issued for R1, R2, and R3. The output verifies that all directly connected networks are installed for routing.

The ping command is issued from R2 to PC1 172.16.3.1 on the R1 LAN, and PC3 192.168.2.1 on the R3 LAN. The pings failed, as indicated by the series of five periods. They failed because R2 does not have a route in its routing table that matches either 172.16.3.1 or 192.168.2.1, the ping packet's destination IP address.


Page 2:
Checking Each Route in Turn

The first route in the table for R1 is 172.16.1.0/24.

172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0


The IOS routing table process checks to see if the 24 left-most bits of the packet's destination IP address, 172.16.3.1, match the 172.16.1.0/24 network.

Play the first animation in the figure.

If you convert these addresses to binary and compare them, as shown in the animation, you will see that the first 24 bits of this route do not match because the 23rd bit does not match. Therefore, this route is rejected.

172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0


In the animation, we see that the first 24 bits of the second route do not match because the 24th bit does not match. Therefore, this route is also rejected, and the process moves on to the next route in the routing table.

C 192.168.1.0/24 is directly connected, Serial0/0/1

The third route is also not a match. As shown, 10 of the first 24 bits do not match. Therefore, this route is rejected. Because there are no more routes in the routing table, the pings are discarded. The router makes its forwarding decision at Layer 3, a "best effort" to forward the packet, but it makes no guarantees.

Click Pings are sent to R3 on the figure and play the animation.

Let's look at the second animation to see what happens if the router R2 pings the 192.168.1.1 interface on router R3.

This time the ping succeeds! It is successful because R2 has a route in its routing table that matches 192.168.1.1, which is the ping packet's destination IP address. The first two routes, 172.16.1.0/24 and 172.16.2.0/24, are rejected. But the last route, 192.168.1.0/24, matches the first 24 bits of the destination IP address. The ping packet is encapsulated in the Layer 2 HDLC protocol of Serial0/0/1, the exit interface, and forwarded via the Serial0/0/1 interface. R2 is now done making the forwarding decisions for this packet; the decisions made by other routers regarding this packet are not its concern.

Note: The routing table lookup process will be discussed in further detail in Chapter 8, "The Routing Table: A Closer Look."


2.3.2 - Devices on Directly Connected Networks
The animation depicts successful and unsuccessful pings based on the contents of the routing table.

Network Topology:
Same as 2.1.2 diagram 1.

Router R2 pings PC1 172.16.3.1 on the R1 LAN. The router looks at the routes in its routing table and does not find a match for the 172.16.3.0 LAN. The pings are discarded.

Router R2 pings the R3 S0/0/1 interface with the IP address 192.168.1.1. The router looks at the routes in its routing table and finds a match for the 192.168.1.0 network. The pings are sent to R3.


Page 3:
Use the Packet Tracer Activity to test connectivity between directly connected devices.

Click the Packet Tracer icon for more details.


2.3.2 - Devices on Directly Connected Networks
Diagram 3, Packet Tracer Activity
Link to Packet Tracer Exploration: Verify Connectivity of Directly Connected Devices

Use the Packet Tracer Activity to test connectivity between directly connected devices.


2.3.3 Cisco Discovery Protocol (CDP)

Page 1:
Network discovery with CDP

Cisco Discovery Protocol (CDP) is a powerful network monitoring and troubleshooting tool. CDP is an information-gathering tool used by network administrators to get information about directly connected Cisco devices. CDP is a proprietary tool that enables you to access a summary of protocol and address information about Cisco devices that are directly connected. By default, each Cisco device sends periodic messages, which are known as CDP advertisements, to directly connected Cisco devices. These advertisements contain information such as the types of devices that are connected, the router interfaces they are connected to, the interfaces used to make the connections, and the model numbers of the devices.

Most network devices, by definition, do not work in isolation. A Cisco device frequently has other Cisco devices as neighbors on the network. Information gathered from other devices can assist you in making network design decisions, troubleshooting, and making changes to equipment. CDP can be used as a network discovery tool, helping you to build a logical topology of a network when such documentation is missing or lacking in detail.

Familiarity with the general concept of neighbors is important for understanding CDP as well as for future discussions about dynamic routing protocols.

Layer 3 Neighbors

At this point in our topology configuration, we only have directly connected neighbors. At Layer 3, routing protocols consider neighbors to be devices that share the same network address space.

For example, R1 and R2 are neighbors. Both are members of the 172.16.2.0/24 network. R2 and R3 are also neighbors because they both share the 192.168.1.0/24 network. But R1 and R3 are not neighbors because they do not share any network address space. If we connected R1 and R3 with a cable and configured each with an IP address from the same network, then they would be neighbors.

Layer 2 Neighbors

CDP operates at Layer 2 only. Therefore, CDP neighbors are Cisco devices that are directly connected physically and share the same data link. In the CDP Protocol figure, the network administrator is logged in to S3. S3 will receive CDP advertisements from S1, S2, and R2 only.

Assuming that all routers and switches in the figure are Cisco devices running CDP, what neighbors would R1 have? Can you determine the CDP neighbors for each device?

Click the Topology button in the figure.

In our chapter topology, we can see the following CDP neighbor relationships:
  • R1 and S1 are CDP neighbors.
  • R1 and R2 are CDP neighbors.
  • R2 and S2 are CDP neighbors.
  • R2 and R3 are CDP neighbors.
  • R3 and S3 are CDP neighbors.
Notice the difference between Layer 2 and Layer 3 neighbors. The switches are not neighbors to the routers at Layer 3, because the switches are operating at Layer 2 only. However, the switches are Layer 2 neighbors to their directly connected routers.

Let's see how CDP can be helpful to a network administrator.


2.3.3 - Cisco Discovery Protocol (CDP)
The diagram depicts network device discovery with Cisco Discovery Protocol (CDP).

Network Topology:
A group of interconnected routers, R1 and R2, and switches, S1, S2, S3, S4, S5, and S6, is shown. S3 is connected to S1, S2, and R2. S1 is connected to S2 and R1. S2 is connected to S1 and S3. Switches S4, S5, and S6 are all interconnected. S4 is connected to R1.

A network administrator's PC is connected to switch S3. Because S3 is connected to S1, S2, and R2, the network administrator can obtain information about these other directly connected devices through CDP.


Page 2:
CDP Operation

Examine the output from the show cdp neighbors and show cdp neighbors detail commands in the figure. Notice that R3 has gathered some detailed information about R2 and the switch connected to the Fast Ethernet interface on R3.

CDP runs at the Data Link layer connecting the physical media to the upper-layer protocols (ULPs). Because CDP operates at the Data Link layer, two or more Cisco network devices, such as routers that support different Network layer protocols (for example, IP and Novell IPX), can learn about each other.

When a Cisco device boots up, CDP starts up by default. CDP automatically discovers neighboring Cisco devices running CDP, regardless of which protocol or suites are running. CDP exchanges hardware and software device information with its directly connected CDP neighbors.

CDP provides the following information about each CDP neighbor device:
  • Device identifiers - For example, the configured host name of a switch
  • Address list - Up to one Network layer address for each protocol supported
  • Port identifier - The name of the local and remote port-in the form of an ASCII character string such as ethernet0
  • Capabilities list - For example, whether this device is a router or a switch
  • Platform - The hardware platform of the device; for example, a Cisco 7200 series router


2.3.3 - Cisco Discovery Protocol (CDP)
The diagram depicts using the show cdp neighbors and show cdp neighbors detail commands to examine CDP neighbors.

Network Topology:
Same as 2.1.2 diagram 1.

The following command issued on R2 discovers switch S3 and router R2 that are connected to R3.
R3#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID: S3
Local Interface: FastEthernet 0/0
Holdtime: 151
Capability: S I
Platform: WS-C2950
Port ID: FastEthernet 0/6

Device ID: R2
Local Interface: Serial 0/0/1
Holdtime: 125
Capability: R
Platform: 1841
Port ID: Serial 0/0/1

The show cdp neighbors detail command provides additional information about neighboring devices, primarily the connected device's Layer 3 IP interface address.


Page 3:
Use the Packet Tracer Activity to explore the features of the Cisco Discovery Protocol (CDP). Practice enabling and disabling CDP - globally and on a per-interface basis. Investigate the power of using CDP to discover the topology of a network.

Click the Packet Tracer icon for more details.


2.3.3 - Cisco Discovery Protocol (CDP)
Link to Packet Tracer Exploration: Cisco Discovery Protocol (CDP)

Use the Packet Tracer Activity to explore the features of the Cisco Discovery Protocol (CDP). Practice enabling and disabling CDP, globally and on a per-interface basis. Investigate the power of using CDP to discover the topology of a network.


2.3.4 Using CDP for Network Discovery

Page 1:
CDP show commands

The information gathered by the CDP protocol can be examined with the show cdp neighbors command. For each CDP neighbor, the following information is displayed:
  • Neighbor device ID
  • Local interface
  • Holdtime value, in seconds
  • Neighbor device capability code
  • Neighbor hardware platform
  • Neighbor remote port ID
Click show cdp neighbors detail in the figure.

The show cdp neighbors detail command also reveals the IP address of a neighboring device. CDP will reveal the neighbor's IP address regardless of whether or not you can ping the neighbor. This command is very helpful when two Cisco routers cannot route across their shared data link. The show cdp neighbors detail command will help determine if one of the CDP neighbors has an IP configuration error.

For network discovery situations, knowing the IP address of the CDP neighbor is often all the information needed to telnet into that device. With an established Telnet session, information can be gathered about a neighbor's directly connected Cisco devices. In this fashion, you can telnet around a network and build a logical topology. In the next Packet Tracer Activity, you will do just that.

Disabling CDP

Could CDP be a security risk? Yes, it could be. You may already have seen CDP packets in your packet capturing labs from a previous course. Because some IOS versions send out CDP advertisements by default, it is important to know how to disable CDP.

Click Disabling CDP in the figure.

If you need to disable CDP globally, for the entire device, use this command:

Router(config)#no cdp run

If you want to use CDP but need to stop CDP advertisements on a particular interface, use this command:

Router(config-if)#no cdp enable


2.3.4 - Using CDP for Network Discovery
The diagram depicts CDP show commands and disabling CDP.

Network Topology:
Same as 2.1.2 diagram 1.

The output from the show cdp neighbors and show cdp neighbors detail commands is the same as that previously described.

To disable CDP, use the following global command.
R3(config)#no cdp run

To disable CDP on only an interface, use:
R3(config-i f)#no cdp enable


Page 2:
CDP show commands can be used to discover information about unknown devices in a network. CDP show commands display information about directly connected Cisco devices, including an IP address that can be used to reach the device. You can then telnet to the device and repeat the process until the entire network is mapped.

Use the Packet Tracer Activity to discover and map an unknown network using CDP and Telnet.

Click the Packet Tracer icon for more details.


2.3.4 - Using CDP for Network Discovery
Link to Packet Tracer Exploration: Mapping a Network with CDP and Telnet

CDP show commands can be used to discover information about unknown devices in a network. CDP show commands display information about directly connected Cisco devices, including an IP address that can be used to reach the device. You can then telnet to the device and repeat the process until the entire network is mapped.

Use the Packet Tracer Activity to discover and map an unknown network using CDP and Telnet.


2.4 Static Routes with "Next Hop" Addresses

2.4.1 Purpose and Command Syntax of ip route

Page 1:
Purpose and Command Syntax of ip route

As we have discussed previously, a router can learn about remote networks in one of two ways:
  • Manually, from configured static routes
  • Automatically, from a dynamic routing protocol
The rest of this chapter focuses on configuring static routes. Dynamic routing protocols are introduced in the next chapter.

Static routes

Static routes are commonly used when routing from a network to a stub network. A stub network is a network accessed by a single route. For an example, see the figure. Here we see that any network attached to R1 would only have one way to reach other destinations, whether to networks attached to R2 or to destinations beyond R2. Therefore, network 172.16.3.0 is a stub network and R1 is a stub router.

Running a routing protocol between R1 and R2 is a waste of resources because R1 has only one way out for sending non-local traffic. Therefore, static routes are configured for connectivity to remote networks that are not directly connected to a router. Again, referring to the figure, we would configure a static route on R2 to the LAN attached to R1. We will also see how to configure a default static route from R1 to R2 later in the chapter so that R1 can send traffic to any destination beyond R2.


2.4.1 - Purpose and Command Syntax of i p route
The diagram depicts the purpose of static routes when used with a stub network.

Network Topology:
Stub network 172.16.3.0/24 is shown with PC1 connected to switch S1. Switch S1 is connected to router R1. Router R1 is the stub router with a single link to another network via a WAN link to R2, network 172.16.2.0/24. A default route is configured on R1 pointing toward R2. A static route is configured on R2 pointing to R1.


Page 2:
The ip route command

The command for configuring a static route is ip route. The complete syntax for configuring a static route is:

Router(config)#ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent] [tag tag]

Most of these parameters are not relevant for this chapter or for your CCNA studies. As shown in the figure, we will use a simpler version of the syntax:

Router(config)#ip route network-address subnet-mask {ip-address | exit-interface }

The following parameters are used:
  • network-address - Destination network address of the remote network to be added to the routing table
  • subnet-mask - Subnet mask of the remote network to be added to the routing table. The subnet mask can be modified to summarize a group of networks.
One or both of the following parameters must also be used:
  • ip-address - Commonly referred to as the next-hop router's IP address
  • exit-interface - Outgoing interface that would be used in forwarding packets to the destination network
Note: The ip-address parameter is commonly referred to as the "next-hop" router's IP address. The actual next-hop router's IP address is commonly used for this parameter. However, the ip-address parameter could be any IP address, as long as it is resolvable in the routing table. This is beyond the scope of this course, but we've added this point to maintain technical accuracy.


2.4.1 - Purpose and Command Syntax of i p route
The diagram depicts the syntax and parameters of the i p route command.

Router(config)#i p route network-address subnet-mask {i p-address | exit-interface }

Parameter: network-address
Description: Destination network address of the remote network to be added to the routing table.

Parameter: subnet-mask
Description: Subnet mask of the remote network to be added to the routing table. The subnet mask can be modified to summarize a group of networks.

Parameter: i p-address
Description: Commonly referred to as the next-hop router's IP address.

Parameter: exit-interface
Description: Outgoing interface that is used to forward packets to the destination network.


2.4.2 Configuring Static Routes

Page 1:
Installing a Static Route in the Routing Table

Remember R1 knows about its directly connected networks. These are the routes currently in its routing table. The remote networks that R1 does not know about are:
  • 172.16.1.0/124 - The LAN on R2
  • 192.168.1.0/24 - The serial network between R2 and R3
  • 192.168.2.0/24 - The LAN on R3
Click Static Route in the figure.

First, enable debug ip routing to have the IOS display a message when the new route is added to the routing table. Then, use the ip route command to configure static routes on R1 for each of these networks. The figure shows the first route configured.

R1#debug ip routing
R1#conf t
R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2


Let's examine each element in this output:
  • ip route - Static route command
  • 172.16.1.0 - Network address of remote network
  • 255.255.255.0 - Subnet mask of remote network
  • 172.16.2.2 - Serial 0/0/0 interface IP address on R2, which is the "next-hop" to this network
When the IP address is the actual next-hop router's IP address, this IP address is reachable from one of this router's directly connected networks. In other words, the next-hop IP address 172.16.2.2 is on router R1's directly connected Serial 0/0/0 network 172.16.2.0/24.

Verifying the Static Route

The output from debug ip routing shows that this route has been added to the routing table.

00:20:15: RT: add 172.16.1.0/24 via 172.16.2.2, static metric [1/0]

Notice in the figure that entering show ip route on R1 shows the new routing table. The static route entry is highlighted.

Let's examine this output:
  • S - Routing table code for static route
  • 172.16.1.0 - Network address for the route
  • /24 - Subnet mask for this route; this is displayed in the line above, known as the parent route, and discussed in Chapter 8
  • [1/0] - Administrative distance and metric for the static route (explained in a later chapter)
  • via 172.16.2.2 - IP address of the next-hop router, the IP address of R2's Serial 0/0/0 interface
Any packets with a destination IP address that have the 24 left-most bits matching 172.16.1.0 will use this route.


2.4.2 - Configuring Static Routes
The diagram depicts directly connected routes and installing a static route in the routing table.

Network Topology:
Same as 2.1.2 diagram 1.

Directly Connected Routes:
R1#show i p route
output omitted

172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0

R2#show i p route
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1

R3#show i p route
C 192.168.1.0/24 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0

Static Route:
The debug i p routing command is issued on R1 to observe the static route being added to the routing table using the following command:

R1#conf t
R1(config)#i p route 172.16.1.0 255.255.255.0 172.16.2.2

The show i p route output verifies the new static route:
R1#show i p route
output omitted
S 172.16.1.0 [1/0] via 172.16.2.2
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0


Page 2:
Configuring Routes to Two More Remote Networks

The commands to configure the routes for the other two remote networks are shown in the figure. Notice that all three static routes configured on R1 have the same next-hop IP address: 172.16.2.2. Using the topology diagram as a reference, we can see that this is true because packets for all of the remote networks must be forwarded to router R2, the next-hop router.

Use the show ip route command again to examine the new static routes in the routing table, as shown.

S 192.168.1.0/24 [1/0] via 172.16.2.2
S 192.168.2.0/24 [1/0] via 172.16.2.2


The /24 subnet masks are located on the same line as the network address. For now, this difference is not important. It will be explained in detail in Chapter 8, "The Routing Table: A Closer Look."

Click Verify Static Route Configuration in the figure.

The static routes that have been configured can also be verified by examining the running configuration with the show running-config command.

Now is a good time to save the configuration to NVRAM:

R1#copy running-config startup-config


2.4.2 - Configuring Static Routes
The diagram depicts configuring the remaining R1 static routes. These are routes to two more remote networks.

Network Topology:
Same as 2.1.2 diagram 1.

R1 Static Routes to add:
R1(config)#i p route 192.168.1.0 255.255.255.0 172.16.2.2
R1(config)#i p route 192.168.2.0 255.255.255.0 172.16.2.2
R1(config)#end

The show i p route output verifies the three static routes whose entries begin with the letter S for Static:
R1#show i p route
output omitted

Gateway of last resort is not set
172.16.0.0/24 is subnetted, 3 subnets
S 172.16.1.0 [1/0] via 172.16.2.2
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 172.16.2.2
S 192.168.2.0/24 [1/0] via 172.16.2.2


Verify Static Route Configuration:
The show running-config command output also verifies the three static routes entered. In the diagram, the three i p route commands are highlighted:

R1#show running-config
Building configuration...
Current configuration : 849 bytes

hostname

output omitted

i p classless
i p route 172.16.1.0 255.255.255.0 172.16.2.2
i p route 192.168.1.0 255.255.255.0 172.16.2.2
i p route 192.168.2.0 255.255.255.0 172.16.2.2

output omitted

end


2.4.3 Routing Table Principles and Static Routes

Page 1:
Routing Table Principles

Now that three static routes are configured, can you predict whether packets destined for these networks will reach their destination? Will packets from all these networks destined for network 172.16.3.0/24 reach their destination?

Let's introduce three routing table principles, as described by Alex Zinin in his book, Cisco IP Routing.

Principle 1: "Every router makes its decision alone, based on the information it has in its own routing table."

R1 has three static routes in its routing table and makes forwarding decisions based solely upon the information in the routing table. R1 does not consult the routing tables in any other routers. Nor does it know whether or not those routers have routes to other networks. Making each router aware of remote networks is the responsibility of the network administrator.

Principle 2: "The fact that one router has certain information in its routing table does not mean that other routers have the same information."

R1 does not know what information other routers have in their routing table. For example, R1 has a route to the 192.168.2.0/24 network through router R2. Any packets that match this route belong to the 192.168.2.0/24 network and will be forwarded to router R2. R1 does not know whether or not R2 has a route to the 192.168.2.0/24 network. Again, the network administrator would be responsible for ensuring that the next-hop router also has a route to this network.

Using Principle 2, we still need to configure the proper routing on the other routers (R2 and R3) to make sure that they have routes to these three networks.

Principle 3: "Routing information about a path from one network to another does not provide routing information about the reverse, or return path."

Most of the communication over networks is bidirectional. This means that packets must travel in both directions between the end devices involved. A packet from PC1 may reach PC3 because all the routers involved have routes to the destination network 192.168.2.0/24. However, the success of any returning packets going from PC3 to PC1 depends upon whether or not the routers involved have a route to the return path, PC1's 172.16.3.0/24 network.

Using Principle 3 as guidance, we will configure proper static routes on the other routers to make sure they have routes back to the 172.16.3.0/24 network.


2.4.3 - Routing Table Principles and Static Routes
The diagram depicts Alex Zinin's routing principles.

Network Topology:
Same as 2.1.2 diagram 1.

Principle 1: Every router makes its decision alone, based on the information it has in its own routing table.

Principle 2: The fact that one router has certain information in its routing table does not mean that other routers have the same information.

Principle 3: Routing information about a path from one network to another does not provide routing information about the reverse or return path.


Page 2:
Applying the Principles

With these principles in mind, how would you answer the questions we posed regarding packets that originate from PC1?

1. Would packets from PC1 reach their destination?

In this case, packets destined for 172.16.1.0/24 and 192.168.1.0/24 networks would reach their destination. This is because router R1 has a route to these networks through R2. When packets reach router R2, these networks are directly connected on R2 and are routed using its routing table.

Packets destined for 192.168.2.0/24 network would not reach their destination. R1 has a static route to this network through R2. However, when R2 receives a packet, it will drop it because R2 does not yet contain a route for this network in its routing table.

2. Does this mean that any packets from these networks destined for 172.16.3.0/24 network will reach their destination?

If R2 or R3 receives a packet destined for 172.16.3.0/24, the packet will not reach its destination, because neither router has a route to the 172.16.3.0/24 network.

Click R2 and R3 Static Routes in the figure.

With the commands shown in the figure, all routers now have routes to all remote networks.

Click show ip route in the figure.

Examine the routing tables in the figure to verify that all routers now have routes to all remote networks.

Click ping in the figure.

Connectivity can be further verified by pinging remote router interfaces from router R1, as shown in the figure.

Full connectivity is now achieved for the devices in our topology. Any PC, on any LAN, can now access PCs on all other LANs.


2.4.3 - Routing Table Principles and Static Routes
The diagram depicts configuring static routes on R2 and R3 and verifying connectivity.

Network Topology:
Same as 2.1.2 diagram 1.

R2 and R3 static routes. With the commands shown, all routers now have routes to all remote networks.
R2(config)#i p route 172.16.3.0 255.255.255.0 172.16.2.1
R2(config)#i p route 192.168.2.0 255.255.255.0 192.168.1.1

R3(config)#i p route 172.16.1.0 255.255.255.0 192.168.1.2
R3(config)#i p route 172.16.2.0 255.255.255.0 192.168.1.2
R3(config)#i p route 172.16.3.0 255.255.255.0 192.168.1.2


Use the show i p route command to verify that all routers now have routes to all remote networks.

Connectivity can be further verified by pinging remote router interfaces from router R1.


2.4.4 Resolving to an Exit Interface

Page 1:
Recursive Route Lookup

Before any packet is forwarded by a router, the routing table process must determine the exit interface to use to forward the packet. This is known as route resolvability. Let's examine this process by looking at the routing table for R1 in the figure. R1 has a static route for the remote network 192.168.2.0/24, which forwards all packets to the next-hop IP address 172.16.2.2.

S 192.168.2.0/24 [1/0] via 172.16.2.2

Finding a route is only the first step in the lookup process. R1 must determine how to reach the next-hop IP address 172.16.2.2. It will do a second search looking for a match for 172.16.2.2. In this case, the IP address 172.16.2.2 matches the route for the directly connected network 17216.2.0/24.

C 172.16.2.0 is directly connected, Serial0/0/0

The 172.16.2.0 route is a directly connected network with the exit interface Serial 0/0/0. This lookup tells the routing table process that this packet will be forwarded out that interface. Therefore, it actually takes two routing table lookup processes to forward any packet to the 192.168.2.0/24 network. When the router has to perform multiple lookups in the routing table before forwarding a packet, it is performing a process known as a recursive lookup. In this example:

1. The packet's destination IP address is matched to the static route 192.168.2.0/24 with the next-hop IP address 172.16.2.2.

2. The next-hop IP address of the static route, 172.16.2.2, is matched to the directly connected network 172.16.2.0/24 with the exit interface of Serial 0/0/0.

Every route that references only a next-hop IP address, and does not reference an exit-interface, must have the next-hop IP address resolved using another route in the routing table that has an exit interface.

Typically, these routes are resolved to routes in the routing table that are directly connected networks, because these entries will always contain an exit interface. We will see in the next section that static routes can be configured with an exit interface. This means that they do not need to be resolve using another route entry.


2.4.4 - Resolving to an Exit Interface
The diagram depicts recursive route lookup with a static route for the remote network that uses the next hop interface IP address.

Network Topology:
Same as 2.1.2 diagram 1.

For R1 to send a packet to the R3 LAN 192.168.2.0 network, R1 does a recursive lookup:
Step 1: Find a route.
Step 2: Find an exit interface.

In the routing table, R1 first uses the static entry to identify the desired destination network.

S 192.168.2.0/24 [1/0] via 172.16.2.2

Then it uses the directly connected entry to find the exit interface that leads to the next hop.
C 172.16.2.0 is directly connected, Serial0/0/0


Page 2:
Exit Interface is Down

Let's consider what would happen if an exit interface goes down. For example, what would happen to R1's static route to 192.16.2.0/24 if its Serial 0/0/0 interface went down? If the static route cannot be resolved to an exit interface, in this case Serial 0/0/0, the static route is removed from the routing table.

Examine this process with debug ip routing on R1 and then configure the Serial 0/0/0 to shutdown, as shown.

Notice from the debug output that all three static routes were deleted when the Serial 0/0/0 interface was shut down. They were deleted because all three static routes were resolved to Serial 0/0/0. However, the static routes are still in the R1's running configuration. If the interface comes back up (is enabled again with no shutdown), the IOS routing table process will reinstall these static routes back into the routing table.


2.4.4 - Resolving to an Exit Interface
The diagram depicts what happens to routing table entries when an exit interface is down.

Network Topology:
Same as 2.1.2 diagram 1.

R1 routes depend on an exit interface to get to all other networks. In the example, the debug command is issued and then interface S0/0/0 is shut down. The debug output shows that four routes are removed from R1's routing table. Only one route is left in the table, which is the network to directly connected LAN interface FA0/0.


2.5 Static Routes with Exit Interfaces

2.5.1 Configuring a Static Route with an Exit Interface

Page 1:
Configuring a Static Route with an Exit Interface

Let's investigate another way to configure the same static routes. Currently, R1's static route for the 192.168.2.0/24 network is configured with the next-hop IP address of 172.16.2.2. In the running configuration, note the following line:

ip route 192.168.2.0 255.255.255.0 172.16.2.2

As you will recall from the previous section, this static route requires a second routing table lookup to resolve the 172.16.2.2 next-hop IP address to an exit interface. However, most static routes can be configured with an exit interface, which allows the routing table to resolve the exit interface in a single search instead of two searches.


2.5.1 - Configuring a Static Route with an Exit Interface
The diagram depicts syntax and parameters of the i p route command. One of the parameters is the specification of the exit interface instead of the next-hop router's IP address.

Router(config)#i p route network-address subnet-mask {i p-address | exit-interface }

Parameter: network-address
Description: Destination network address of the remote network to be added to the routing table.

Parameter: subnet-mask
Description: Subnet mask of the remote network to be added to the routing table. The subnet mask can be modified to summarize a group of networks.

Parameter: i p-address
Description: Commonly referred to as the next-hop router's IP address.

Parameter: exit-interface
Description: Outgoing interface that is used to forward packets to the destination network.


Page 2:
Static Route and an Exit Interface

Let's reconfigure this static route to use an exit interface instead of a next-hop IP address. The first thing to do is to delete the current static route. This is done using the no ip route command as shown in the figure.

Next, configure R1's static route to 192.168.2.0/24 using the exit interface Serial 0/0/0

Then use the show ip route command to examine the change in the routing table. Notice that the entry in the routing table no longer refers to the next-hop IP address but refers directly to the exit interface. This exit interface is the same one that the static route was resolved to when it used the next-hop IP address.

S 192.168.2.0/24 is directly connected, Serial0/0/0

Now, when the routing table process has a match for a packet and this static route, it will be able to resolve the route to an exit interface in a single lookup. As you can see in the figure, the other two static routes still must be processed in two steps, resolving to the same Serial 0/0/0 interface.

Note: The static route displays the route as directly connected. It is important to understand that this does not mean that this route is a directly connected network or directly connected route. This route is still a static route. We will examine the importance of this fact when we discuss Administrative Distances in the next chapter. We will learn that this type of static route still has an Administrative Distance of "1". For now, just note that this route is still a static route with an administrative distance of "1" and is not a directly connected network.

Static routes and point-to-point networks

Static routes that are configured with exit interfaces instead of next-hop IP addresses are ideal for most serial point-to-point networks. Point-to-point networks that use protocols such as HDLC and PPP do not use the next-hop IP address in the packet forwarding process. The routed IP packet is encapsulated in an HDLC Layer 2 frame with a broadcast Layer 2 destination address.

These types of point-to-point serial links are like pipes. A pipe has only two ends. What enters one end can only have a single destination - the other end of the pipe. Any packets that are sent via R1's Serial 0/0/0 interface can only have one destination: R2's Serial 0/0/0 interface. R2's serial interface happens to be the IP address 172.16.2.2.

Note: Under certain conditions, the network administrator will not want to configure the static route with an exit interface but with the next-hop IP address. This type of situation is beyond the scope of this course but is important to note.


2.5.1 - Configuring a Static Route with an Exit Interface
The diagram depicts an exit interface specified in the static route. As a result, there is no need for a recursive route lookup.

Network Topology:
Same as 2.1.2 diagram 1.

The following commands show removing the current static route with the next-hop router's IP address and replacing it with the exit interface.

R1(config)#no i p route 192.168.2.0 255.255.255.0 172.16.2.2
R1(config)#i p route 192.168.2.0 255.255.255.0 serial 0/0/0
R1(config)#end
The output from the show i p route command shows that the exit interface is now specified in the static route. Therefore, a recursive lookup is not needed.

S 192.168.2.0/24 is directly connected, Serial0/0/0


2.5.2 Modifying Static Routes

Page 1:
Modifying Static Routes

There are times when a previously configured static route needs to be modified:
  • The destination network no longer exists, and therefore the static route should be deleted.
  • There is a change in the topology, and either the intermediate address or the exit interface has to be changed.
There is no way to modify an existing static route. The static route must be deleted and a new one configured.

To delete a static route, add no in front of the ip route command, followed by the rest of the static route to be removed.

In the previous section, we had a static route:

ip route 192.168.2.0 255.255.255.0 172.16.2.2

We can delete that static route with the no ip route command:

no ip route 192.168.2.0 255.255.255.0 172.16.2.2

As you will recall, we deleted the static route because we wanted to modify it to use an exit interface instead of a next-hop IP address. We configured a new static route using the exit interface:

R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0/0

It is more efficient for the routing table lookup process to have static routes with exit interfaces - at least for serial point-to-point outbound networks. Let's reconfigure the rest of the static routes on R1, R2, and R3 to use exit interfaces.

As you can see in the figure, as we delete each route, we will configure a new route to the same network using an exit interface.


2.5.2 - Modifying Static Routes
The diagram depicts modifying static routes to remove the next hop IP address and add an exit interface for all three routers.

Network Topology:
Same as 2.1.2 diagram 1.

Configuration examples of static routes are shown for all three routers in the network topology, similar to the previous configuration example. In these examples, modifications to static routes are made by replacing the next hop IP address with an exit interface.


2.5.3 Verifying the Static Route Configuration

Page 1:
Verifying the Static Route Configuration

Whenever changes are made to static routes - or to other aspects of the network - verify that the changes took effect and that they produce the desired results.

Verifying Static Route Changes

In the previous section, we deleted and reconfigured the static routes for all three routers. Remember, the running configuration contains the current router configuration - the commands and parameters that the router is currently using. Verify your changes by examining the running configuration. The figure shows the portions of each router's running configuration that show the current static route.

Click show ip route in the figure.

This figure shows the routing table for all three routers. Notice that static routes with exit interfaces have been added to the routing table and that the previous static routes with next-hop addresses have been deleted.

Click ping in the figure.

The ultimate test is to route packets from source to destination. Using the ping command, we can test that packets from each router are reaching their destination and that the return path is also working properly. This figure shows successful ping outputs.


2.5.3 - Verifying the Static Route Configuration
The diagram depicts verifying the static route configuration for all three routers using the show run, show i p route, and ping commands.

Network Topology:
Same as 2.1.2 diagram 1.


Page 2:
Use the Packet Tracer Activity to practice removing static routes and reconfiguring static routes using the exit interface argument. Then verify the new configuration and test connectivity.

Click the Packet Tracer icon for more details.


2.5.3 - Verifying the Static Route Configuration
Link to Packet Tracer Exploration: Removing and Configuring Static Routes

Use the Packet Tracer Activity to practice removing static routes and reconfiguring static routes using the exit interface argument. Then verify the new configuration and test connectivity.


2.5.4 Static Routes with Ethernet Interfaces

Page 1:
Ethernet Interfaces and ARP

Sometimes the exit interface is an Ethernet network.

Suppose that the network link between R1 and R2 is an Ethernet link and that the FastEthernet 0/1 interface of R1 is connected to that network, as shown in the figure. A static route, using a next-hop IP address for the 192.168.2.0/24 network, can be set using this command:

R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

As discussed in the previous section "Configuring an Ethernet interface", the IP packet must be encapsulated into an Ethernet frame with an Ethernet destination MAC address. If the packet should be sent to a next-hop router, the destination MAC address will be the address of the next-hop router's Ethernet interface. In this case, the Ethernet destination MAC address will be matched to the next-hop IP address 172.16.2.2. R1 checks its FastEthernet 0/1 ARP table for an entry with 172.16.2.2 and a corresponding MAC address.

Sending an ARP Request

If this entry is not in the ARP table, R1 sends an ARP request via its FastEthernet 0/1 interface. The Layer 2 broadcast is requesting that if any device has the IP address 172.16.2.2, it should respond with its MAC address. Because R2's FastEthernet 0/1 interface has the IP address 172.16.2.2, it sends back an ARP reply with the MAC address for that interface.

R1 receives the ARP reply and adds the 172.16.2.2 IP address, and the associated MAC address, to its ARP table. The IP packet is now encapsulated into an Ethernet frame with the destination MAC address found in the ARP table. The Ethernet frame with the encapsulated packet is then sent out the FastEthernet 0/1 interface to router R2.


2.5.4 - Static Routes with Ethernet Interfaces
The diagram depicts using Ethernet as an exit interface between routers R1 and R2.

Network Topology:
Same as 2.1.2 diagram 1, except the serial WAN link between R1 and R2 is replaced with an Ethernet link. Router R1 interface FA0/1 now connects to R2 interface FA0/1.


Page 2:
Static routes and Ethernet exit interfaces

Let's configure a static route with an Ethernet exit interface instead of a next-hop IP address. Change the static route for 192.168.2.0/24 to use an exit interface with this command:

R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1

The difference between an Ethernet network and a point-to-point serial network is that a point-to-point network has only one other device on that network - the router at the other end of the link. With Ethernet networks, there may be many different devices sharing the same multi-access network, including hosts and even multiple routers. By only designating the Ethernet exit interface in the static route, the router will not have sufficient information to determine which device is the next-hop device.

R1 knows that the packet needs to be encapsulated in an Ethernet frame and sent out the FastEthernet 0/1 interface. However, R1 does not know the next-hop IP address and therefore it cannot determine the destination MAC address for the Ethernet frame.

Depending upon the topology and the configurations on other routers, this static route may or may not work. We will not go into the details here, but it is recommended that when the exit interface is an Ethernet network, you do not use only the exit interface in the static route.

One might ask: Is there any way to configure a static route over an Ethernet network so that it does not have to use the recursive lookup of the next-hop IP address? Yes - this can be done by configuring the static route to include both the exit interface and the next-hop IP address.

As you can see in the figure, the exit interface would be FastEthernet 0/1 and the next-hop IP address would be 172.16.2.2.

R1(config)#ip route 192.168.2.0 255.255.255.0 fastethernet 0/1 172.16.2.2

The routing table entry for this route would be:

S 192.168.2.0/24 [1/0] via 172.16.2.2 FastEthernet0/1

The routing table process will only need to perform a single lookup to get both the exit interface and the next-hop IP address.

Advantages of using an exit interface with static routes

There is an advantage to utilizing exit interfaces in static routes for both serial point-to-point and Ethernet outbound networks. The routing table process only has to perform a single lookup to find the exit interface instead of a second lookup to resolve a next-hop address.

For static routes with outbound point-to-point serial networks, it is best to configure static routes with only the exit interface. For point-to-point serial interfaces, the next-hop address in the routing table is never used by the packet delivery procedure, and so it is not needed.

For static routes with outbound Ethernet networks, it is best to configure the static routes with both the next-hop address and the exit-interface.

Note: For more information about the issues that can occur with static routes that only use an Ethernet or FastEthernet exit interface, see the book Cisco IP Routing, by Alex Zinin.


2.5.4 - Static Routes with Ethernet Interfaces
The diagram depicts a static route configuration for R1 that uses FA0/1 and an IP address of the next hop.

Network Topology:
Same as 2.5.4.1.

R1(config)#i p route 192.168.2.0 255.255.255.0 FastEthernet 0/1 172.16.2.2


2.6 Summary and Default Static Routes

2.6.1 Summary Static Routes

Page 1:
Summarizing Routes to Reduce the Size of the Routing Table

Creating smaller routing tables makes the routing table lookup process more efficient, because there are fewer routes to search. If one static route can be used instead of multiple static routes, the size of the routing table will be reduced. In many cases, a single static route can be used to represent dozens, hundreds, or even thousands of routes.

We can use a single network address to represent multiple subnets. For example, the networks 10.0.0.0/16, 10.1.0.0/16, 10.2.0.0/16, 10.3.0.0/16, 10.4.0.0/16, 10.5.0.0/16, all the way through 10.255.0.0/16 can be represented by a single network address: 10.0.0.0/8.

Route Summarization

Multiple static routes can be summarized into a single static route if:
  • The destination networks can be summarized into a single network address, and
  • The multiple static routes all use the same exit-interface or next-hop IP address
This is called route summarization.

In our example, R3 has three static routes. All three routes are forwarding traffic out the same Serial0/0/1 interface. The three static routes on R3 are:

ip route 172.16.1.0 255.255.255.0 Serial0/0/1
ip route 172.16.2.0 255.255.255.0 Serial0/0/1
ip route 172.16.3.0 255.255.255.0 Serial0/0/1


If possible, we would like to summarize all of these routes into a single static route. 172.16.1.0/24, 172.16.2.0/24 and 172.16.3.0/24 can be summarized to the 172.16.0.0/22 network. Because all three routes use the same exit interface, they can be summarized to the single 172.16.0.0 255.255.252.0 network, and we can create a single summary route.

Calculating a summary route

Here's the process of creating the summary route 172.16.0.0/22, as shown in the figure:

1. Write out the networks that you want to summarize in binary.

2. To find the subnet mask for summarization, start with the left-most bit.

3. Work your way to the right, finding all the bits that match consecutively.

4. When you find a column of bits that do not match, stop. You are at the summary boundary.

5. Now, count the number of left-most matching bits, which in our example is 22. This number becomes your subnet mask for the summarized route, /22 or 255.255.252.0

6. To find the network address for summarization, copy the matching 22 bits and add all 0 bits to the end to make 32 bits.

By following these steps, we can discover that the three static routes on R3 can be summarized into a single static route, using the summary network address of 172.16.0.0 255.255.252.0:

ip route 172.16.0.0 255.255.252.0 Serial0/0/1



2.6.1 - Summary Static Routes
The diagram depicts summarizing routes to reduce the size of the routing table.

Network Topology:
Same as 2.1.2 diagram 1.

Routes on R3 that can be summarized include:
172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
The subnet mask for these individual networks is /24 or 255.255.255.0.

The first 22 bits are the same, so these routes can be summarized into one route: 172.16.0.0/22
The subnet mask for the summarized network is /22 or 255.255.252.0.


Page 2:
Configuring a Summary Route

To implement the summary route, we must first delete the three current static routes:

R3(config)#no ip route 172.16.1.0 255.255.255.0 serial0/0/1
R3(config)#no ip route 172.16.2.0 255.255.255.0 serial0/0/1
R3(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1


Next, we will configure the summary static route:

R3(config)#ip route 172.16.0.0 255.255.252.0 serial0/0/1

Click Effect of Summary Route in the figure.

To verify the new static route, examine R3's routing table with the show ip route command, as shown:

172.16.0.0/22 is subnetted, 1 subnets
S 172.16.0.0 is directly connected, Serial0/0/1


With this summary route, the destination IP address of a packet only needs to match the left-most 22 bits of the 172.16.0.0 network address. Any packet with a destination IP address belonging to the 172.16.1.0/24, 172.16.2.0/24, or 172.16.3.0/24 network matches this summarized route.

Click Verify Summary Route in the figure.

As you can see in the figure, we can test the reconfiguration using the ping command. We verify that we still have proper connectivity throughout the network.

Note: As of March 2007, there are over 200,000 routes in the Internet core routers. Most of these are summarized routes.


2.6.1 - Summary Static Routes
The diagram depicts the effect of a summary route on the routing table and how to verify the summary route.

Effect of Summary Route:
The output of the show i p route command on R3 before summarization is:
S 172.16.1.0 is directly connected, Serial0/0/1
S 172.16.2.0 is directly connected, Serial0/0/1
S 172.16.3.0 is directly connected, Serial0/0/1

The output of the show i p route command on R3 after summarization is:
S 172.16.0.0 is directly connected, Serial0/0/1

Verify Summary Route
Pings from R3 to the three 172.16.x.x networks on R1 and R2 are successful.


2.6.2 Default Static Route

Page 1:
Most Specific Match

It is possible that the destination IP address of a packet will match multiple routes in the routing table. For example, what if we had the following two static routes in the routing table:

172.16.0.0/24 is subnetted, 3 subnets
S 172.16.1.0 is directly connected, Serial0/0/0 and
S 172.16.0.0/16 is directly connected, Serial0/0/1


Consider a packet with the destination IP address 172.16.1.10. This IP address matches both routes. The routing table lookup process will use the most-specific match. Because 24 bits match the 172.16.1.0/24 route, and only 16 bits of the 172.16.0.0/16 route match, the static route with the 24 bit match will be used. This is the longest match. The packet will then be encapsulated in a Layer 2 frame and sent via the Serial 0/0/0 interface. Remember, the subnet mask in the route entry is what determines how many bits must match the packet's destination IP address for this route to be a match.

Note: This process is the same for all routes in the routing table including static routes, routes learned from a routing protocol and directly connected networks. The routing table lookup process will be explained in more detail in a later chapter.

The default static route matches all packets

A default static route is a route that will match all packets. Default static routes are used:
  • When no other routes in the routing table match the packet's destination IP address. In other words, when a more specific match does not exist. A common use is when connecting a company's edge router to the ISP network.
  • When a router has only one other router to which it is connected. This condition is known as a stub router.
Configuring a Default Static Route

The syntax for a default static route is similar to any other static route, except that the network address is 0.0.0.0 and the subnet mask is 0.0.0.0:

Router(config)#ip route 0.0.0.0 0.0.0.0 [exit-interface | ip-address ]

The 0.0.0.0 0.0.0.0 network address and mask is called a "quad-zero" route.

R1 is a stub router. It is only connected to R2. Currently R1 has three static routes, which are used to reach all of the remote networks in our topology. All three static routes have the exit interface Serial 0/0/0, forwarding packets to the next-hop router R2.

The three static routes on R1 are:

ip route 172.16.1.0 255.255.255.0 serial 0/0/0
ip route 192.168.1.0 255.255.255.0 serial 0/0/0
ip route 192.168.2.0 255.255.255.0 serial 0/0/0


R1 is an ideal candidate to have all of its static routes replaced by a single default route. First, delete the three static routes:

R1(config)#no ip route 172.16.1.0 255.255.255.0 serial 0/0/0
R1(config)#no ip route 192.168.1.0 255.255.255.0 serial 0/0/0
R1(config)#no ip route 192.168.2.0 255.255.255.0 serial 0/0/0


Next, configure the single default static route using the same Serial 0/0/0 exit interface as the three previous static routes:

R1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0


2.6.2 - Default Static Route
The diagram depicts a default static route for the R1 stub network router to R2.

Network Topology:
The stub network with an address of 172.16.3.0/24 is shown with PC1 connected to switch S1. Switch S1 is connected to router R1. Router R1 is the stub router with a single link to another network via a WAN link to R2. This WAN link has a network address of 172.16.2.0/24. A default route configured on R1 points to R2. A static route configured on R2 points to R1.


Page 2:
Verifying a Default Static Route

Verify the change to the routing table with the show ip route command, as shown in the Figure:

S* 0.0.0.0/0 is directly connected, Serial0/0/0

Note the * or asterisk next to the S. As you can see from the Codes table in the figure, the asterisk indicates that this static route is a candidate default route. That is why it is called a "default static" route. We will see in later chapters that a "default" route does not always have to be a "static" route.

The key to this configuration is the /0 mask. We previously said that it is the subnet mask in the routing table that determines how many bits must match between the destination IP address of the packet and the route in the routing table. A /0 mask indicates that zero or no bits are needed to match. As long as a more specific match doesn't exist, the default static route will match all packets.

Default routes are very common on routers. Instead of routers having to store routes for all of the networks in the Internet, they can store a single default route to represent any network that is not in the routing table. This topic will be discussed in more detail when we discuss dynamic routing protocols.


2.6.2 - Default Static Route
The diagram depicts the effect of a default route on the R1 routing table. The three static routes to networks 172.16.1.0, 192.168.1.0, and 192.168.2.0 have been removed and replaced with a single default route.

R1(config)#i p route 0.0.0.0 0.0.0.0 serial 0/0/0

The change to the routing table is verified with the show i p route command:

S* 0.0.0.0/0 is directly connected, Serial0/0/0

Note: The asterisk or star next to the S indicates that this static route is a candidate default route.

Network Topology:
Same as 2.6.2 diagram 1.


Page 3:
Use the Packet Tracer Activity to practice configuring summary routes and default routes. Then verify the new configuration by testing for connectivity.

Click the Packet Tracer icon for more details.


2.6.2 - Default Static Route
Link to Packet Tracer Exploration: Configuring a Default Route

Use the Packet Tracer Activity to practice configuring summary routes and default routes. Then verify the new configuration by testing for connectivity.


2.7 Managing and Troubleshooting Static Routes

2.7.1 Static Routes and Packet Forwarding

Page 1:
Static Routes and Packet Forwarding

The following is an example of the packet forwarding process with static routes. As you can see in the animation, PC1 is sending a packet to PC3:

1. The packet arrives on the FastEthernet 0/0 interface of R1.

2. R1 does not have a specific route to the destination network, 192.168.2.0/24; therefore, R1 uses the default static route.

3. R1 encapsulates the packet in a new frame. Because the link to R2 is a point-to-point link, R1 adds an "all 1s" address for the Layer 2 destination address.

4. The frame is forwarded out the serial 0/0/0 interface. The packet arrives on the Serial 0/0/0 interface on R2.

5. R2 decapsulates the frame and looks for a route to the destination. R2 has a static route to 192.168.2.0/24 out Serial0/0/1.

6. R2 encapsulates the packet in a new frame. Because the link to R3 is a point-to-point link, R2 adds an "all 1s" address for the Layer 2 destination address.

7. The frame is forwarded out the Serial0/0/1 interface. The packet arrives on the Serial0/0/1 interface on R3.

8. R3 decapsulates the frame and looks for a route to the destination. R3 has a connected route to 192.168.2.0/24 out FastEthernet 0/1.

9. R3 looks up the ARP table entry for 192.168.2.10 to find the Layer 2 MAC address for PC3.

a. If no entry exists, R3 sends an ARP request out FastEthernet 0/0.

b. PC3 responds with an ARP reply which includes the PC3 MAC address.

10. R3 encapsulates the packet in a new frame with the MAC address of interface FastEthernet 0/0 as the source Layer 2 address and the MAC address of PC3 as the destination MAC address.

11. The frame is forwarded out the FastEthernet 0/0 interface. The packet arrives on the NIC interface of PC3.

This process is no different from the process demonstrated in Chapter 1. As was explained in Chapter 1, you must be able to describe this process in detail. Knowing how a router performs its two basic functions-path determination and packet forwarding - is fundamental to all routing discussions. In Lab 2.8.1, "Basic Static Route Configuration," you have an opportunity to demonstrate your knowledge of the path determination and packet forwarding process.


2.7.1 - Static Routes and Packet Forwarding
The animation depicts static routes and packet forwarding from PC1 on the R1 LAN to PC3 on the R3 LAN. A detailed description of this animation is provided in the chapter text associated with this page.

Network Topology:
Same as 2.1.2 diagram 1.


2.7.2 Troubleshooting a Missing Route

Page 1:
Troubleshooting a Missing Route

Networks are subject to many different forces that can cause their status to change quite often:
  • An interface fails.
  • A service provider drops a connection.
  • There is an over-saturation of links.
  • An administrator enters a wrong configuration.
When there is a change in the network, connectivity may be lost. As a network administrator, you are the one responsible for pinpointing and solving the problem.

What steps can you take?

By now, you should be very familiar with some tools that can help you isolate routing problems. Listed in the figure, they include:

ping
traceroute
show ip route


Although we have not used traceroute yet in this course, you should be very familiar with its capabilities from previous studies. Recall that traceroute commands will find a break in the path from source to destination.

As we go further into this course, you will discover more tools. For example, show ip interface brief gives you a quick summary of interface status. CDP can help you gather information about the IP configuration of a directly connected Cisco device using the show cdp neighbors detail command.


2.7.2 - Troubleshooting a Missing Route
The animation depicts Cisco I O S command-based connectivity troubleshooting tools. These include:
- ping
- trace route
- show i p route
- show i p interface brief
- show cdp neighbors detail


2.7.3 Solving the Missing Route

Page 1:
Solving the Missing Route

Finding a missing (or misconfigured) route is relatively straightforward if you methodically use the correct tools.

Consider this problem: PC1 cannot ping PC3. A traceroute reveals that R2 is responding but that there is no response from R3. Displaying the routing table on R2 reveals that the 172.16.3.0/24 network is configured incorrectly. The exit interface is configured to send packets to R3. Obviously, from the topology, we can see that R1 has the 172.16.3.0/24 network. Therefore, R2 must use Serial 0/0/0 as the exit interface - not Serial0/0/1.

To remedy the situation, remove the incorrect route and add the route for network 172.16.3.0/24 with the Serial 0/0/0 specified as the exit interface.

R2(config)#no ip route 172.16.3.0 255.255.255.0 serial0/0/1
R2(config)#ip route 172.16.3.0 255.255.255.0 serial 0/0/0



2.7.3 - Solving the Missing Route
The diagram depicts a problem with a missing route on R2 resulting from a misconfigured static route to 172.16.3.0/24. The S0/0/1 interface was specified instead of S0/0/0.

Network Topology:
Same as 2.1.2 diagram 1.


Page 2:
Use the Packet Tracer Activity to see how the loop explained in this section can occur. In Simulation mode, watch as R2 and R3 loop a packet for 172.16.3.10 until the TTL field reaches zero. Then fix the problem and test for connectivity between PC1 and PC3.

Click the Packet Tracer icon for more details.


2.7.3 - Solving the Missing Route
Link to Packet Tracer Exploration: Solving the Missing Route

Use the Packet Tracer Activity to see how the loop explained in this section can occur. In Simulation mode, watch as R2 and R3 loop a packet for 172.16.3.10 until the TTL field reaches zero. Then fix the problem and test for connectivity between PC1 and PC3.


2.8 Static Route Configuration Labs

2.8.1 Basic Static Route Configuration

Page 1:
In this lab activity, you will create a network like the one used in this chapter. You will cable the network and perform the initial router configurations required for connectivity. After completing the basic configuration, you will test connectivity between the devices on the network. You will then configure the static routes that are needed to allow communication between the hosts.

Click the lab icon for more details.


2.8.1 - Basic Static Route Configuration
Link to Hands-on Lab: Basic Static Route Configuration

In this lab activity, you create a network like the one used in this chapter. You cable the network and perform the initial router configurations required for connectivity. After completing the basic configuration, you test connectivity between the devices on the network. You then configure the static routes that are needed to allow communication between the hosts.


Page 2:
Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.1. Remember, however, that Packet Tracer is not a substitute for a hands-on lab experience with real equipment.

A summary of the instructions is provided within the activity. Use the Lab PDF for more details.

Click the Packet Tracer icon for more details.


2.8.1 - Basic Static Route Configuration
Link to Packet Tracer Exploration: Basic Static Route Configuration

Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.1.


2.8.2 Challenge Static Route Configuration

Page 1:
In this lab activity, you will be given a network address that must be subnetted to complete the addressing of the network. The addressing for the LAN connected to the ISP router and the link between the HQ and ISP routers has already been completed. Static routes will also need to be configured so that hosts on networks that are not directly connected will be able to communicate with each other.

Click the lab icon for more details.


2.8.2 - Challenge Static Route Configuration
Link to Hands-on Lab: Challenge Static Route Configuration

In this lab activity, you are given a network address that must be subnetted to complete the addressing of the network. The addressing for the LAN connected to the ISP router and the link between the HQ and ISP routers has already been completed. Static routes also need to be configured so that hosts on networks that are not directly connected can communicate with each other.


Page 2:
Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.2. Remember, however, that Packet Tracer is not a substitute for a hands-on lab experience with real equipment.

A summary of the instructions is provided within the activity. Use the Lab PDF for more details.

Click the Packet Tracer icon for more details.


2.8.2 - Challenge Static Route Configuration
Link to Packet Tracer Exploration: Challenge Static Route Configuration

Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.2.


2.8.3 Troubleshooting Static Routes

Page 1:
In this lab, you will begin by loading corrupted configuration scripts on each of the routers. These scripts contain errors that will prevent end-to-end communication across the network. You will need to troubleshoot each router to determine the configuration errors, and then use the appropriate commands to correct the configurations. When you have corrected all of the configuration errors, all of the hosts on the network should be able to communicate with each other.

Click the lab icon for more details.


2.8.3 - Troubleshooting Static Routes
Link to Hands-on Lab: Troubleshooting Static Routes

In this lab, you begin by loading corrupted configuration scripts on each of the routers. These scripts contain errors that prevent end-to-end communication across the network. You need to troubleshoot each router to determine the configuration errors, and then use the appropriate commands to correct the configurations. When you have corrected all the configuration errors, all hosts on the network should be able to communicate with each other.


Page 2:
Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.3. Remember, however, that Packet Tracer is not a substitute for a hands-on lab experience with real equipment.

A summary of the instructions is provided within the activity. Use the Lab PDF for more details.

Click the Packet Tracer icon for more details.


2.8.3 - Troubleshooting Static Routes
Link to Packet Tracer Exploration: Troubleshooting Static Routes

Use this Packet Tracer Activity to repeat a simulation of Lab 2.8.3.


2.9 Chapter Summary

2.9.1 Summary and Review

Page 1:
Summary

In this chapter you learned how static routes can be used to reach remote networks. Remote networks are networks that can only be reached by forwarding the packet to another router. Static routes are easily configured. However, in large networks this manual operation can become quite cumbersome. As we will see in later chapters, static routes are still used - even when a dynamic routing protocol is implemented.

Static routes can be configured with a next-hop IP address, which is commonly the IP address of the next-hop router. When a next-hop IP address is used, the routing table process must resolve this address to an exit interface. On point-to-point serial links it is usually more efficient to configure the static route with an exit interface. On multiaccess networks such as Ethernet, both a next-hop IP address and an exit interface can be configured on the static route.

Static routes have a default administrative distance of "1". This administrative distance also applies to static routes configured with a next-hop address as well as an exit-interface.

A static route will only be entered in the routing table if the next-hop IP address can be resolved through an exit interface. Whether the static route is configured with a next-hop IP address or exit interface, if the exit interface that is used to forward that packet is not in the routing table, the static route will not be included in the routing table.

In many cases, several static routes can be configured as a single summary route. This means fewer entries in the routing table and results in a faster routing table lookup process. The ultimate summary route is a default route, configured with a 0.0.0.0 network address and a 0.0.0.0 subnet mask. If there is not a more specific match in the routing table, the routing table will use the default route to forward the packet to another router.

Note: The routing table lookup process is examined more closely in Chapter 8, "The Routing Table: A Closer Look."


2.9.1 - Summary and Review
In this chapter, you learned to:
- Define the general role a router plays in networks.
- Describe the directly connected networks and the different router interfaces.
- Examine directly connected networks in the routing table and use the CDP protocol.
- Describe static routes with exit interfaces.
- Describe summary and default routes.
- Examine how packets get forwarded when using static routes.
- Identify how to manage and troubleshoot static routes.


Page 2:


2.9.1 - Summary and Review
This is a review and is not a quiz. Questions and answers are provided.
Question 1. Describe the cabling used to connect devices to an Ethernet LAN.
Answer: Straight-through cables are used to connect PC's and routers to hubs and switches. Crossover cables are used to connect PC's to routers, hubs to switches, routers to routers, and switches to switches.

Question 2. List three commands used to display interface configuration information.
Answer:
- show interfaces
- show i p interface brief
- show running-config

Question 3. Explain the difference between attaching a serial interface to a service provider in a production environment and attaching a serial interface to another router in a lab environment.
Answer: In a production environment, serial interfaces are attached to service provider equipment. Normally, the service provider sets the clocking speed. In a lab environment, routers are directly connected through the serial interface. Therefore, one of the routers must provide the clocking speed.

Question 4. What is CDP and why would you want to disable it?
Answer: CDP, or Cisco Discovery Protocol, is a proprietary protocol for gathering information about directly connected Cisco devices. For example, a Cisco router and a Cisco switch both send CDP advertisements by default when the Data Link Layer of the shared link is active. The information revealed in CDP advertisements (including IP addresses, device platforms, and I O S versions) presents a security risk. CDP can be disabled on an interface-by-interface basis or disable globally.

Question 5. What is the simpler form used for the i p route command syntax?
Answer: Router(config)#i p route network-address subnet-mask {i p-address | exit-interface }

Question 6. What is a recursive route lookup and when does it occur?
Answer: A recursive route lookup is another search of the routing table to find an exit interface for an outbound packet. A recursive route lookup occurs when the initial route lookup resolves to an IP address for the next hop. Because Cisco I O S needs an exit interface, it must look up the exit interface for the next-hop IP address.

Question 7. Why must you remove a static route from the configuration before modifying it?
Answer: A static route cannot just be changed. The original route must also be removed from the configuration. Otherwise, both the original route and the new route are stored in the configuration.

Question 8. Explain the value of summary and default routes.
Answer: Summary and default routes decrease the size of routing tables. If a router has a large collection of static routes pointing out the same interface, sometimes these routes can be summarized into one routing table entry. Without default routing, every router would need a route to every location in the network.

Question 9. List the commands used to test and troubleshoot a network implementation.
Answer:
- ping
- trace route
- show i p route
- show i p interface brief
- show cdp neighbors

Question 10. On some newer computers, it does not matter whether you attach a straight-through or crossover cable to the device. The computer successfully connects to the other device. Why do you think this happens?
Answer: In older computers, only a crossover cable would work between two computers. However, many manufacturers (Dell Computers, for instance) are designing the onboard NIC to auto-detect what type of device is on the other end of the connection and then internally switches the transmit and receive pins, if necessary. For example, connecting two newer Dell computers directly works with a straight-through cable. One of the computers switches the 1 and 3 pins to be the receive pair.

Question 11. Refer to the standard network topology from 2.1.2 diagram 1 and the key parts of the output from the show i p interface brief for the three routers:
Router R1:
Interface: FastEthernet0/0
IP Address: 172.16.3.1
Status: up
Prot: up

Router R1:
Interface: Serial0/0
IP Address: 172.16.2.1
Status: up
Prot: up

Router R2:
Interface: FastEthernet0/0
IP Address: 172.16.1.1
Status: up
Prot: up

Router R2:
Interface: Serial0/0
IP Address: 172.16.2.2
Status: up
Prot: up

Router R2:
Interface: Serial0/1
IP Address: 192.168.1.1
Status: up
Prot: up

Router R3:
Interface: FastEthernet0/0
IP Address: 192.168.2.1
Status: up
Prot: up

Router R3:
Interface: Serial0/1
IP Address: 192.168.1.1
Status: up
Prot: up

All network interfaces are up and up. PC1, PC2, and PC3 have full connectivity. Pings from R1 to R2 and R3 are successful. However, although pings from R3 to R2 are successful, R3 cannot ping either address on R1. Identify the problem, explain why the ping fails, and suggest a solution.

Answer: R2 and R3 are sharing the same IP address on the 192.168.1.0/24 network. When R1 pings R3 at 192.168.1.1, R2 replies not R3. To see this, the network administrator would have to trace route to 192.168.1.1. When R3 pings R1, the ping it sourced from the Serial0/0/1 interface with IP address 192.168.1.1 is the source address. R1 receives the ping request and replies. However, R2 accepts the ping reply sent to 192.168.1.1 as belonging to R2. Therefore, the ping reply is not routed to R2. To fix the problem, configure R2 with a different IP address from the 192.168.1.0/24 network. (192.168.1.2 is used in the chapter example.)

Question 12. On a piece of paper, use the output from the show cdp neighbors command to draw the topology. Show the connections between the devices and label the interfaces.

You might want to contact your instructor for assistance with this activity.

HQ#show cdp neighbors
Capability Codes: R -Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID: S4
Local Interface: FastEthernet0/0
Capability: S
Platform: WS-C2960
Port ID: FastEthernet0/16

Device ID: EAST
Local Interface: Serial0/0
Capability: R
Platform: C1841
Port ID: Serial0/1

Device ID: WEST
Local Interface: Serial0/1
Capability: R
Platform: C1841
Port ID: Serial0/0

EAST#show cdp neighbors

Device ID: S1
Local Interface: FastEthernet0/1
Capability: S
Platform: WS-C2960
Port ID: FastEthernet0/3

Device ID: HQ
Local Interface: Serial0/1
Capability: R
Platform: C1841
Port ID: Serial0/0

Device ID: S2
Local Interface: FastEthernet0/0
Capability: S
Platform: WS-C2960
Port ID: FastEthernet0/3

WEST#show cdp neighbors

Device ID: S1
Local Interface: FastEthernet0/0
Capability: S
Platform: WS-C2960
Port ID: FastEthernet0/4

Device ID: HQ
Local Interface: Serial0/0
Capability: R
Platform: C1841
Port ID: Serial0/1

Device ID: S3
Local Interface: FastEthernet0/1
Capability: S
Platform: WS-C2960
Port ID: FastEthernet0/12

Answer:
Note: Contact your instructor to discuss the diagram to be drawn.

Network Topology:
There are three routers, HQ, East, and West. There are fours switches, S1, S2, S3, and S4.

Router HQ interface FA0/0 is connected to switch S4 interface FA0/16.
Router HQ interface S0/0 is connected to router East interface S0/1.
Router HQ interface S0/1 is connected to router West interface S0/0.
Router East interface FA0/0 is connected to switch S2 interface FA0/3.
Router East interface FA0/1 is connected to switch S1.
Router East interface S0/1 is connected to router HQ interface S0/0.
Router West interface FA0/0 is connected to switch S1.
Router West interface FA0/1 is connected to switch S3 interface FA0/12.
Router West interface S0/0 is connected to router HQ interface S0/1.


Question 13.
Note: The topology diagram for this question is relatively complex and requires you to use Packet Tracer. Contact your instructor to discuss how to best answer this question.

All the Branch routers need to be configured with a default route to Region A. Region A needs a default router to HQ, and HQ needs a default route to the ISP. Region A can summarize each of the LAN's attached to each Branch router with one static route pointing to each of the Branch routers. HQ and ISP can summarize all the LAN's with just one static route. What are the static default routes for each Branch router, for Region A, and for HQ? What are the summary static routes configured on Region A, HQ, and ISP?

Build the topology in Packet Tracer and test your static and default routing commands. The Web Server should be able to ping every interface on every router.

Answer:
Branch 1, Branch 2, and Branch 3 all have the same default static route:

i p route 0.0.0.0 0.0.0 s0/0/0

Region A has the following static route configuration:

i p route 0.0.0.0 0.0.0.0 Serial0/0/3
i p route 172.16.0.0 255.254.0.0 Serial0/0/0
i p route 172.18.0.0 255.254.0.0 Serial0/0/1
i p route 172.24.0.0 255.248.0.0 Serial0/0/2

HQ has the following static route configuration:

i p route 0.0.0.0 0.0.0 Serial0/0/1
i p route 172.16.0.0 255.240.0.0 Serial0/0/0

ISP has the following static route configuration:
i p route 172.16.0.0 255.240.0.0 Serial0/0/0


Page 3:
The Packet Tracer Skills Integration Challenge Activity for this chapter integrates all the knowledge and skills you acquired in the first two chapters of this course. In this activity, you will build a network from the ground up. Starting with an addressing space and network requirements, you must implement a network design that satisfies the specifications. Then implement an effective static routing configuration.

Packet Tracer Skills Integration Instructions (PDF)

Click the Packet Tracer icon for more details.


2.9.1 - Summary and Review
Link to Packet Tracer Exploration: Chapter 2 - Packet Tracer Skills Integration Challenge.

The Packet Tracer Skills Integration Challenge Activity for this chapter integrates all the knowledge and skills you acquired in the first two chapters of this course. In this activity, you build a network from the ground up. Starting with an addressing space and network requirements, you must implement a network design that satisfies the specifications, and then implement an effective static routing configuration.


Page 4:
To Learn More
Floating Static Routes

A floating static route is a backup route to a route which is either a dynamic route or another static route. The default administrative distance of a static route is "1". See if you can create a static route using a different exit-interface or next-hop IP address which would only be added to the routing table if the primary static route fails.

Hints: Remember, if the router has two routes to the same destination network with two different administrative distance values, it will add the route with the lower administrative distance. A static route will be removed from the routing table if the exit-interface or next-hop IP address is no longer available.

Discard Route

A common configuration in many networks is to have a static default route on the edge router forwarding packets to the ISP. The ISP router then has a static route pointing to the customer's network.

For example, Customer A has the network address of 172.16.0.0/16, which is subnetted into several /24 subnets. The edge router of Customer A has a static default route forwarding all other traffic to the ISP router:

ip route 0.0.0.0 0.0.0.0 serial 0/0/0

The ISP router has a static default route for forwarding traffic to Customer A's network:

ip route 172.16.0.0 255.255.0.0 serial 0/0/1

A problem can occur when packets are originated from the Customer A's network for a subnet that does not exist. Customer A's edge router will use its default route to forward those packets onto the ISP, The ISP router will receive those packets and send them back to Customer A's edge router because they are part of the 172.16.0.0/16 network, The edge router will once again send them back to the ISP. The packets are caught in a loop until the TTL of the packet expires.

Configure a static route on the Customer A's edge router to discard those packets instead of forwarding them onto the ISP router.

Further Reading on Static Routing

Although static routes can be easily understood and configured, there are some situations when the IOS processing of static routes can be quite complex. This is especially true when there are various static routes configured that cover the same range of networks.

Alex Zinin's book, Cisco IP Routing, covers static routing and IOS's static route processing in detail. This book goes beyond just the configuration and looks at the inner-workings of the Cisco IOS and its routing processes.


2.9.1 - Summary and Review
The diagram depicts a collage of people using computers and networks.


2.10 Chapter Quiz

2.10.1 Chapter Quiz

Page 1:


2.10.1 - Chapter Quiz
1. Refer to the topology description to answer the question.
Topology description:
Router A interface FA0/0/0 is connected to network 192.168.1.0/24.
Router A interface S0/1/0 with the IP address 172.16.40.1/24 is connected to Router B interface S0/0/0 with the IP address 172.16.40.2/24.
Router B interface FA0/0/0 is connected to network 10.0.0.0/8.

Which two commands must be configured to allow communication between the 192.168.1.0/24 and 10.0.0.0/8 networks? (Choose two.)
A. A(config)#i p route 10.0.0.0 255.0.0.0 172.16.40.2
B. A(config)#i p route 10.0.0.0 255.0.0.0 s 0/0/0
C. A(config)#i p route 10.0.0.0 255.0.0.0 10.0.0.1
D. B(config)#i p route 192.168.1.0 255.255.255.0 172.16.40.1
E. B(config)#i p route 192.168.1.0 255.255.255.0 172.16.40.2
F. B#i p route 192.168.1.0 255.255.255.0 192.168.1.1

2. Which statement is true concerning configuring static routes using next hop addresses?
A. Routers cannot use more than one static route with a next hop address.
B. When the router identifies that a packet is destined for a route associated with a next hop address in the routing table, the router requires no further information and can immediately forward the packet.
C. Routers configured with a static route using a next hop address must either have the exit interface listed in the route or have another route with the next hop and an associated exit interface.
D. Routes associated with next hop addresses are more efficient than routes going to exit interfaces.

3. Refer to the show i p route command output below to answer the question.

A#show i p route

output omitted

Gateway of last resort is not set.

S 10.0.0.0/8 [1/0] via 172.16.40.2
64.0.0.0/16 is subnetted, 1 subnets
C 64.100.0.0 is directly connected, Serial0/1
C 128.107.0.0/16 is directly connected, Loopback2
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.40.0 is directly connected, Serial0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
S 192.168.2.0/24 [1/0] via 172.16.40.2
C 198.133.219.0/24 is directly connected, Loopback0

The network administrator must remove the route to the 10.0.0.0 network. What command accomplishes this task?
A. no i p address 10.0.0.1 255.255.255.0 172.16.40.2
B. no router rip
C. no i p route 10.0.0.0 255.0.0.0 172.16.40.2
D. no network 10.0.0.0 255.255.255.0

4. Refer to the command output below to answer the question.

Router1>
1 53 ms 43 ms 36 ms 10.0.0.1
2 106 ms 70 ms 74 ms 192.168.0.2
3 * * * Request timed out


What command was used on Router1 to produce the output?
A. trace route
B. extended ping
C. show i p route
D. show cdp neighbor detail

5. Refer to the topology description to answer the question.

Topology description:
Router R1 interface S0 with IP address 2.1.1.1 is connected to Router R2 interface S1 with IP address 2.1.1.2.
Router R2 is connected to the Internet.

Which command correctly configures a static default route on R1?
A. R1(config-i f)#i p route 0.0.0.0 0.0.0.0 s0
B. R1(config)#i p route 0.0.0.0 0.0.0.0 s1
C. R1(config-i f)#i p route 0.0.0.0 0.0.0.0 2.1.1.2
D. R1(config)#i p route 0.0.0.0 0.0.0.0 2.1.1.2
E. R1(config-router)#default-information originate

6. Which three are characteristics of a static route? (Choose three.)
A. Reduces the memory and processing burdens on a router.
B. Ensures that there is always a path available.
C. Used for networks with multiple routes to a destination network.
D. Used for routers that connect to stub networks.
E. Used for networks with a single route to a destination network.
F. Reduces configuration time.

7. Which of the following is a function of the Cisco I O S command show cdp neighbors?
A. It displays the port type and platform of neighboring Cisco routers.
B. It displays the device capability code of all non-Cisco routers.
C. It displays platform information for all devices in the network.
D. It displays the protocol encapsulations used by neighboring routers.

8. A photograph is shown of a cable with a V dot 35 male connector on one end and a very small connector on the opposite end that connects the router. Which type of connector is shown?
A. The DB-60 D T E end of the serial cable for 1600 and 2500 series routers.
B. The D T E end of a smart serial cable used with newer routers.
C. The EIA/T IA-530 DCE end of a serial cable that plugs into the CSU/DSU.
D. The V dot 35 DCE end of a serial cable that plugs into the CSU/DSU.
E. The EIA/T IA-232 DCE end of a serial cable that plugs into the CSU/DSU.
F. The EIA /T IA-449 DCE end of a serial cable that plugs into the CSU/DSU.

9. Which statement is true concerning directly connected routes?
A. They appear in the routing table as soon as cables are connected to the router.
B. They appear in the routing table when the routing protocol is configured on the router.
C. They appear in the routing table when the no shutdown command is entered in router interface configuration mode.
D. They appear in the routing table when an IP address is configured on an interface, and the show interface command shows that the interface is up and the line protocol is up.

10. Match each command to the associated configuration task.
Commands:
A. interface fast ethernet 0/0
B. i p address 192.168.35.11 255.255.255.0
C. i p address 192.168.35.11/24
D. config terminal
E. i p 192.168.35.11 255.255.255.0
F. i p 192.168.35.11/24
G. no shutdown
H. show interface fast ethernet 0/0

Configuration Tasks:
1. Enter global configuration mode.
2. Enter interface configuration mode.
3. Configure an IP address.
4. Activate the interface.

11. Match each command to the description of its output.
Commands:
A. show i p route
B. show interface brief
C. show interfaces
D. show controllers
E. debug i p routing
F. show cdp neighbors

Descriptions:
1. Display all known networks.
2. Display detailed port information.
3. Display routing troubleshooting information.
4. Display basic port information.
5. Display directly connected routers.
6. Display D T E/DCE information.

0 comments:

Post a Comment