Using Cisco Discovery Protocol (CDP)

The Cisco Discovery Protocol (CDP) provides a protocol-independent method for testing direct connectivity, that is, those routers who are your neighbors. This means it will collect information, regardless of whether the neighbor router supports IP, IPX, DECnet, etc. CDP is a layer two Cisco-proprietary protocol that provides information on directly connected neighbors. CDP uses data-link broadcasts to discover neighboring Cisco routers that also run CDP. The results will show you your neighbor’s device ID, local port number, holdtime (in seconds), network device capability, hardware platform, and remote port type and number. The command show cdp interface displays CDP con.guration and status information.

Simple Network Management Protocol (SNMP)

SNMP, another way to monitor a network, is commonly used for router monitoring and frequently for router confiuration changes as well. SNMP uses a workstation as the point of entry and control for the Network Manager. In the Cisco environment, the router has an SNMP agent and a management information block (MIB). The MIB is a simple, hierarchical tree structure containing device information. The basic commands are the GET that retrieves information from an MIB and the SET that places data into an MIB variable. With SNMP, you also can gather statistics or configure the router. Gather statistics with get-request and get-next-request messages, and con.gure routers with set-request messages. You will need some software to communicate with your router. SNMP messages have a community string that is a cleartext password sent in every packet between a management station and the router, which has an SNMP agent. The SNMP community string is used to authenticate messages sent between the manager and agent. Brie.y, a community string is a password that identi.es a speci.c level of access for a device (either read-only or read-write). Only when the manager sends a message with the correct community string will the agent
respond.
Version 1 of SNMP, which is the most widely used, uses a very weak authentication scheme based on only the community string, which amounts to a fixed password transmitted over the network unencrypted. SNMP version 1 is ill-suited for use across the public Internet for the following reasons:
-It uses cleartext authentication ASCII strings that anyone can capture on a network. Most SNMP implementations send the authentication strings as part of their periodic polling.
-It sends all data in cleartext.
-It uses UDP as a transport and is dif.cult to .lter due to its connectionless state.
-It is an easily spoofable, datagram-based transaction protocol.

Routing Algorithms

An algorithm is a mathematical process used to arrive at a particular solution. It is repeatable; that is, using the same input, one will get the same output. With respect to routing protocols, the algorithm can be thought of as the set of rules or process that the routing protocol uses to determine the desirability of paths on the internetwork for the movement of packets. The router uses the routing algorithm to build the routing table the router uses as it forwards packets. Routing algorithms come in two basic .avors, based on how they calculate routes: static and dynamic. Static algorithms consist of internetwork mapping information that a network administrator enters into the router’s routing table. This table dictates how packets are moved from one point to another on the network. All routes on the network are static; that is, unchanging. Static routes are preferable for routes coming into and out of a router used as part of a firewall configuration.

Routing and Routed Protocols

Routable Protocols
“Understanding OSI and TCP/IP,” you learned about routable or routed protocols. This book concentrates on TCP/IP, but there are other routable protocols, such as IPX and AppleTalk. These three protocol suites provide sufficient information in the network layer header to allow the router to forward packets from the source node to the destination node even when the router has to forward packets across various networks.

Routing Protocols
Whereas routable protocols provide the logical addressing system that makes routing possible, routing protocols provide the mechanisms for maintaining router routing tables. Routing protocols facilitate inter-router communication, which allows them to share route information used to build and maintain routing tables. Several different routing protocols exist, including Routing Information Protocol (RIP), Open Shortest Path First (OSPF), and Enhanced Interior Gateway Routing Protocol (EIGRP). And while these different routing protocols use different methods for determining the best path for packets routed from one network to another, each basically serves the same purpose. They help accumulate routing information related to a speci.c routed protocol such as the Internet Protocol. It is not uncommon to .nd host and server machines running more than one network protocol to communicate. For example, a Windows 2000 (W2K) Server in a domain might be using TCP/IP to communicate with its clients, while at the same time using IPX/SPX to support .le and print servers. Routing protocols also embrace this concept of simultaneously but independently running protocols. Multiple independent routing protocols can run on the same router, building and updating routing tables for several different routed protocols. This means that the same media can actually support different types of networking (e.g., peer-to-peer and client/server).
Routing Protocol Basics
Routing protocols not only provide information for router routing tables, but also have responsibility for determining the best route through an internetwork for packets as they move from the source station to the destination station. Designers have re.ned routing protocols to optimize routes on an internetwork and also to remain stable and show .exibility. They also designed routing protocols to use as little processing overhead as they determine and provide route information. This means that the router itself does not have to have a large multi-processor device to handle the routing of packets. The next section discusses the mechanisms that routing protocols use to determine paths.

Router Components

Every router has the following components that make up its con.guration: RAM, NVRAM, Flash, ROM, and interfaces.

Random Access Memory (RAM)
RAM serves as a temporary working storage area for the router. RAM contains data such as routing tables, cache, buffers, and I/O queues. RAM also provides storage for temporary memory for the router’s active IOS and configuration .(i.e., the running-con.g). You lose the entire contents of RAM when you power down or restart the router.

Non-Volatile RAM (NVRAM)
Conversely, NVRAM is permanent and retains its contents when you power down or restart the router. NVRAM stores permanent information, such as the router’s backup con.guration .le. The router retrieves the startup-con.g from NVRAM at start-up and loads into RAM.

Flash
Flash stores the Cisco IOS image and associated microcode. Flash is erasable, programmable, read-only memory (EPROM) that retains its contents when you power down or restart the router. You can store several versions of IOS images in Flash memory. Flash allows you to upgrade the router without adding, removing, or replacing microchips on the router.

Read-Only Memory (ROM)
ROM, like Flash, maintains a copy of the IOS but it is an older version of the IOS. ROM also stores the bootstrap program and power-on diagnostic programs. Unlike Flash, you can only upgrade ROM by replacing chips on the motherboard.

Interfaces
Interfaces provide the network connections where packets move in and out of the router. Depending on the router model, the interfaces might exist on the motherboard or on separate, modular interface cards.

Routing Activities

When you need to move data between two networks, an internetworking device called a router is responsible for the movement of this data. Routing data on an internetwork requires that a couple different events take place: an appropriate path for the packets must be determined, and then the packets must be moved toward their final destination. That is, routers perform two basic activities: path determination and packet switching. Both path determination and routing of packets (or switching as it is also referred to; packets are switched from an incoming interface to an outgoing interface on the router) take place at layer 3 (network layer) of the OSI Model. Another important layer 3 event is the resolution of logical addresses (such as IP addresses when TCP/IP is the routed protocol) to actual hardware addresses.

Path Determination
Routers enable you to divide a large network into logical subnets; doing so keeps network traffic local on each subnet, enabling you to take better advantage of the available bandwidth. It is then the job of the router to move data packets between different subnets when required. Routers can also serve as a connection device between your networks. Routers can also serve as the connective device to other networks to which your network is attached.

Packet Switching
After the router has the packets, packet switching comes into play. This means that the router will move the packets from the router interface that they came in on and switch them over to the router interface connected to the subnet they must go out on. However, in some cases, the packets might have to pass through more than one router to reach the final destination. In our example, there is only one router. Router 1 knows that the logical address 10.16.0.1 is on Subnet 10.16. So, the router will switch packets from Router Interface 1 to Router Interface 2. Again, the router uses broadcast messages to resolve logical address 10.16.0.1 to the actual hardware address of FF-FF-FF-FF-FF-F5. The router addresses the
packets correctly and then forwards them to Subnet 10.16. When Node 1 on Subnet 10.16 sees the packets for itself (hardware address FF-FF-FF-FF-FF-F5), it copies the messages into its memory space.

Routing Tables for Router 1
Subnet Logical Destination Router Interface
10.8 1
10.16 2

Routing involves the use of logical addresses and hardware addresses to get packets from the source (i.e., the sender) to the destination. Each routable protocol (e.g., IP and IPX) uses a slightly different method for resolving logical addresses to hardware addresses, but the overall theory is pretty much the same as outlined here.

Cisco Router Overview

The Cisco IOS is the most important part of the router. The IOS is the program code that defines how the router functions. Without it, the router cannot route packets. The IOS is feature-rich and pretty much standard across the various Cisco platforms. So once you become familiar with IOS commands on one router, you do not have to learn new commands to work on a new router.The IOS provides a labor-saving command line interface for configuring routers that is easy to navigate.

User Interface
The Cisco IOS provides a robust user interface called EXEC for its routers. EXEC, short for executive, intercepts commands and executes them. For security purposes, EXEC supports two types of access:
_ User mode
_ Privileged mode
User Mode
Upon logging in to the router, you are automatically put into user mode. EXE commands in user mode allow you to display information but you cannot change router configuration settings. User mode commands are a subset of the larger privileged mode commands.
Privileged Mode
You must enter a password before you can access privileged mode. Privileged mode allows execution of all of the user mode commands, as well as setting configuration parameters, performing extensive testing and debugging, and accessing the other router modes.