Basics of Cisco Routers - Glossary of Cisco Router Commands

Basics of Cisco Routers - Glossary of Cisco Router Commands
Page content

How is a Router different from a Server?

Routers are not like Microsoft or Linux or Sun servers because all they do is direct traffic. Servers from time to time, can act like routers, but that is not their primary function. Routers connect WANS - Wide Area Networks; a network between distant locations, from city to city, from country to country. Servers on the other hand service LANS, Local Area Networks; networks withing an office space.

Servers service one subnet; Routers service multiple subnets. A subnet is like a street. Servers service hosts (PC’s), printers, fax machines, copy machines, and any other device that is on a local network. Routers service other routers. Servers have applications like Microsoft Office suite, tax programs, or database programs. Routers break down an application to the packet level and deliver packets from one router to another. A server can help print a document to any location within the same subnet. A router can take that same document and redirect it to a printer in another country even going through 10 or 15 different subnets. Servers work with a GUI (graphical user interface). Routers use a command line interface.

Servers deliver applications through the Internet, using WWW, and Browsers like Internet Explorer, or FireFox. Routers run the Internet.

Learning how to use a server is easy; learning how to use a router is hard.

Cisco Operation Modes

There are 3 different modes of operation within the Cisco IOS.

  1. Disabled mode In this mode, a router that has been configured will operate and perform its routing functions.
  2. Enabled mode - in this mode, a router can be tested to perform operations after it has been configured.
  3. Configuration mode - In this mode, a router can be changed, or modified. A new configuration will be added or a current configuration will be modified.

Normally a router in the production state will operate in disabled mode. This prevents it from being modified by outside hackers, and it allows the current configuration to operate. Being disabled does not mean that it is off, it’s on; nor that is is not operational, it is operational.

Access-Operation Commands

This set of commands are used to prepare the router. Some are for testing purposes. Some are to clear the router, like erase or clear. These are not Cisco router configure commands. Configure commands can only be done in the configuration mode. These commands operate in the enable mode.

  • clock Manage the system clock
  • clear Reset functions
  • configure Enter configuration modeconfigure Enter configuration mode
  • debug Debugging functions (see also ‘undebug’)
  • disable Turn off privileged commands
  • enable Turn on privileged commands
  • erase Erase flash or configuration memory
  • exit Exit from the EXEC
  • no Disable debugging functions
  • ping Send echo messages

Cisco Show Commands

These commands are used for trouble shooting. They show the configuration of the router. They show different features of the router and how it responds to different interactions on the internetwork.

  • buffers Buffer pool statistics
  • configuration Contents of Non-Volatile memory
  • controllers Interface controller status
  • debugging State of each debugging option
  • dialer Dialer parameters and statistics
  • extended Extended Interface Information
  • flash System Flash information
  • history Display the session command history
  • hosts IP domain-name, lookup style, name servers, and host table
  • interfaces Interface status and configuration
  • ip IP information
  • processes Active process statistics
  • protocols Active network routing protocols
  • route-map route-map information
  • running-config Current operating configuration
  • tcp Status of TCP connections
  • terminal Display terminal configuration parameters
  • users Display information about terminal lines
  • version System hardware and software status

Subnetting

All networks work with subnets. As mentioned earlier, a subnet is like a street name. Individual house numbers plus the street name identify a unique address. The same concept applies with networks.

All networks have to have an IP address. An IP address has 32 bits,made up of 4 octets with 8 bits each. A bit is either a 0 or 1. The highest value of an octet will be 255, or 11111111. The following table shows how to convert a decimal value to a binary value. Here is the table to convert the IP address 68.196.130.10 to binary.

IP Address 68.196.130.10

But you also need a subnet mask and here is the table to use:

Subnet Mask Table

So you can have an IP address 68.196.130.10 with a subnet mask from the table above. Which one do you pick? It depends on how many networks you are trying to design and how many hosts will be on each network.

Cisco Router Config Commands

These commands will configure a router, and make it work with other routers on the internetwork.

configure - terminal: this command puts you in the mode to modify the router either to create a new configuration or to modify an existing one.

Interface: when you configure your router, you are configuring an interface - the port that has the network cable to the internet. A router will have an ethernet interface or a serial interface. Ethernet is for LANs and Serial is for WAN’s

example: interface s0

ip address: you have to add an ip address and subnet mask; this identifies the router on the network.

Example: ip address 200.25.13.99 255.255.255.224

router: All routers have their own ip address to identify the nework they are working with. But how does a router know about foreign routers? It has to use a routing protocol, and there are several, such as RIP (Routing Internet Protocol), or EIGRP, (Enhanced Interior Gateway Routing Protocol - a Cisco Specific protocol), or OSPF (Open Shortest Path First). These routing protocols will setup the connection to multiple networks. The router advertises itself to the network and each router builds a routing table with information coming from the other routers. That way each router knows what other router is in its network.

Example: router rip network 10.0.0.0 255.0.0.0 (network identifies the basic network that the router is on.)

ip route: Another way to get to another router is to tell the router how to get to the next router, this is called a static route and it lets the router hook up to another router easily.

example: ip route 35.201.74.0 255.255.255.0 38.16.25.3

Here is a complete example of a command line configuration

  • Router>enable
  • Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
  • Router(config)#interface serial 3/0
  • Router(config-if)#ip address 172.16.55.1 255.255.255.0
  • Router(config-if)#bandwidth 256
  • Router(config-if)#clock rate 56000
  • Router(config-if)#router rip
  • Router(config-if)#network 172.16.0.0
  • Router(config-if)#no shutdown
  • Router(config-if)#exit
  • Router(config)#ip route 35.201.74.0 255.255.255.0 38.16.25.3
  • Router(config)#