Mar 2

Introduction

Set the basic configuration of a router is simply activate the various interfaces of router and configure the software for routing and routing protocols. There are different ways of carrying out the configuration of the router, but to establish the basic configuration of a misconfigured router, we recommend using the console port.

  • Console router. The router can be configured directly from a PC connected to the console port of the router through the coiled wire that incorporta the router. Before starting the router, check power, wiring and connection of the console, so that when starting the router, if there be any error appear in the console. We will use the command config terminal activation mode.
  • Virtual Terminal. You can connect via Telnet to the router via a virtual terminal. We will use the command config terminal activation mode.
  • Workstation network management. From a workstation running a special software for managing networks such as CiscoWorks or HP Openview.
  • Cisco ConfigMaker. Graphical utility to build a router configuration and distribute it to other routers connected to the network. To function, the interfaces of the routers must be configured already.
  • TFTP server. You can load a router configuration from a TFTP server into the network. We will use the command net config mode activation.



The System Configuration dialog box

This chapter explains using the example of a Cisco 2505, consists of two serial ports and one ethernet port repeater as 8 mouths.

When starting a new router or a router that has deleted the configuration file, open the System Configuration dialog box, which presents the user with a series of questions that will initiate a configuration for that router, which you can then customize or modified from the command line. At any time we can cancel this wizard and go to the command line, like we can run the setup command to start the wizard again.

The first question is whether you want to enter the initial configuration. If your answer yes, you ask if you want to see a current overview interface, specify a name for the router, specify the password for privileged mode (enable), specify the password for virtual terminal, and activate the SNMP protocol if necessary. We recommend enabling the password is different from the password secret clearance, which would thus be as clear text password in the configuration file, giving clues to guess the password secret clearance. Enabling The secret password is encrypted using the MD5 algorithm.

Procedure is then designed and configure routing protocols. Be asked whether you want DECnet, AppleTalk, IPX, IP, IGRP, and RIP.

Then proceed to enable and configure the router interfaces.

  • For the Ethernet interface 0 will wonder if in use, should respond positively to activate the interface. Then be asked if you want to configure IP, in which case they will ask the IP address of the interface, and in the case of the Cisco 2505, be asked if you want to activate all ports on the hub.
  • For each serial interface, be asked if you want to configure, in which case it prompts you to configure IP. When configuring IP, it asks if you want to use IP unnumbered, to say no to continue to specify the IP address of the interface.

Finally, the system asks whether to use the existing systems, and consequently generate and store the corresponding configuration file in NVRAM.

At any other time, we can rerun the configuration dialog, running the global configuration command setup. If necessary, we may also restart the router using the reload global configuration command.

Using the different router modes

The router has three basic modes of access: User mode, the privileged mode and configuration mode. There are other ways of router, which does not explain the moment.

  • User Mode. Provides limited access to the router, through which to examine the configuration of the router, not allowing change its configuration. This mode is activated by default when you restart the router, appreciated by appearing as an indicator of the router name followed by the sign> (greater than).
  • Privileged Mode. Also known as activation mode (Enabled). To access the privileged mode from user mode execute the enable command, after which they will ask for the password in this way. In this case, is shown with the name of the router followed by the character # (pound). Once the work in the privileged mode, you must return to user mode to not leave the router configuration in the open, for which execute the command disable. The privileged mode command offers a range much wider than the user mode, but not to change the configuration of the router.
  • Setup Mode. It allows to determine all the parameters related to the hardware and software of the router (interfaces, routing protocols designed and passwords, etc). Configuration mode is accessed from the privileged mode by typing config, and then selecting the terminal option, or directly executing the command configure terminal (config t in reduced mode) to enter global configuration mode. In this way we can enter specific configuration modes, including:
    • Interface (config.if). Supports commands for configuration operations based on the use of an interface.
    • Subinterface (config.subif). Supports commands to configure multiple virtual interfaces (logical) in the same physical interface. A subinterface is only a mechanism used to assign multiple network numbers to the same physical interface. The command interface [type] [# Interface]. [# Subinterface] creates logical subinterface on the physical interface. Subinterface numbers can be chosen arbitrarily in the range of 1-4294967293.
    • Controller (config.controller). Supports commands to configure drivers (eg E1 and T1).
    • Line (config.line). Just as there are physical intefaces as E0 and E1, there are also so-called virtual interfaces virtual terminal lines (vty). There are five default of these lines, numbered from 0 to 4, which are used to make the telnet command line interface of the router.
    • Router (config.router). Supports commands to configure an IP routing protocol.
    • IPX-router (config.ipx-router). Supports commands to configure the Novell network protocol.

By the exit command in any mode of the router, return to the previous mode, while with the end command or key combination Ctrl-z will return to privileged mode. Some examples of global configuration commands are:

  • Hostname [newname] to change the name of the router.
  • Enable secret [password] to specify the Privileged mode password or Activation.

Once all the desired changes, type end (or press Ctrl + Z) and press enter to save the new configuration of the router and return to privileged mode. To set the new configuration as boot configuration, you must run the command copy running-config startup-config (write memory or write in versions 10.3 or earlier).

Apart from the way we are, the IOS can always show a full list of available commands by running the command?. Thus, we can also get help on a specific command by entering the name of the command followed by?, e.g., show? For information about the show command. You can use? for a list of all commands that begin with a particular sequence of characters, e.g., s?. It is possible to abbreviate the commands in Cisco IOS introducing a sufficient number of characters. For example, instead of typing show interfaces would be sufficient to introduce sh int.

Use the show history command to display the contents of the command buffer. The command history is enabled by default, and the system records ten command lines in its history buffer. We can use the command history size terminal history size or to specify the number of commands that we want to keep in the buffer up to a maximum of 256, but not recommended by the memory resources it uses. To move through the history, use the up and down, or the key combinations Ctrl-P (Previous) and Ctrl-N (Next) respectively. In addition, pressing the Tab key, it completes any command found partially introduced if enough characters have been written to avoid ambiguity.

Replacing a lost password from a router

  1. Turn off the router and wait five seconds before restarting. When the router is started, press Ctrl + Break.
  2. It will launch the ROM Monitor mode. E/s2000002 Enter, then press Enter. Write down the number of virtual configuration that appears on the screen.
  3. At the prompt enter now o/r0×2142 and hit enter. With this, the router will ignore the configuration file included in the NVRAM. Enter I at the prompt and press Enter. The router will restart and launch the configuration dialog box. Select No and press Enter.
  4. At the router prompt, type enable to launch the privileged mode. Enter copy running-config startup-config, then press enter to access the router’s original configuration stored in RAM.
  5. In indicator of activation, enter config. Already on the configuration mode. Enter enable secret [new_password].
  6. Enter the number of virtual settings config-register 0x, which is more than the number you wrote earlier in the paper, and press Enter.
  7. Now type end and press enter to exit setting mode. Restart the router. It has been assigned the new password.

The show command

One of the most useful commands is the command or its abbreviation sh show, which displays the status of all interfaces including the router, and statistics for each item, such as Flash RAM memory and network protocols being track. Below are several show commands user mode:

  • The show interfaces command provides enough information for each of the interfaces of the router. For each of the interfaces in the router provides its state (enabled / disabled), MAC address (in case of LAN interfaces) and IP protocol status or protocols configured on that interface, number of packages that have come and gone, number frame collisions and wrong, kind of scope (usually ARPA for Ethernet and PPP WAN, etc.). If you want to display only the information on an interface, you can use the command show interface [interface]. For example, would execute show interface ethernet 0 for Ethernet 0.
  • Show clock shows the date and time settings for the router. The command set is the clock used to set the date and time.
  • Show version shows the parameters of the system hardware configuration, software version, the names and sources of configuration files, the current value of the configuration register and boot images.
  • Show protocols network protocols list configured on the router.
  • SHOW PROCESS displays information about CPU utilization.
  • Show history list last 10 commands used.
  • Show hub displays information about the status of hub ports, such as in the case of a Cisco 2505.
  • Show cdp neighbor Show interconnected neighbors. This information is obtained through the CDP protocol, which must be activated. For more detailed information, run show cdp neighbor details.

Also available show commands are available only in privileged mode (enabled), such as the following:

  • The show running-config command (write term in versions 10.3 and earlier) shows the configuration currently running on the router (i.e., stored in RAM), and provides information about the interfaces that are currently configured, protocols routing that have been activated, the password set for the router (it will appear online encrypted, etc.).
  • The command show startup-config (show config in versions 10.3 and earlier) shows the router’s startup configuration (ie, stored in NVRAM), so that appears similar to the previous command.
  • Show flash command displays the number of free and used flash memory and its files (with your name and size).
  • Show cdp interface command provides configuration information for the CDP protocol for each interface of the router.



Setting the date and time

To set the date and time, we must enter privileged mode (enable), and run the clock command in September followed by the time and date. A valid format would clock September 13 june 2001 21:43:05.

Configuring router passwords

Use the command line console 0 followed subcommands login and password to establish a logon password for the console terminal. Console Connection 0 means the router console while login for the password to the user before allowing the connection to the console.

The command line vty 0 4 password followed by the subcommand set a logon password for future sessions Telnet. No need to enter the login subcommand is included as default.

Enable password global command restricts access to privileged mode with a password. We may also use a password that is stored in encrypted format, known as enabling secret password. If both passwords are set, will use the secret password enabling the password rather than enabling. To set the secret password use the enable secret command, such as enable secret willie. To disable it, use the no form of the command, i.e., not enable secret willie.

Copy settings and Enforcement Home

The copy command will allow us to copy the settings of initiation and implementation. After making changes in the current configuration, we can save those changes to the startup configuration running copy running-config startup-config. The opposite is also true, i.e., if for some reason we want to refresh the startup configuration as current configuration, run copy running-config startup-config, taking into account that the startup configuration is stored in NVRAM , and run configuration is currently stored in RAM.

Check Interconnection Neighbors

Cisco routers feature a proprietary protocol, the Cisco Discovery Protocol (CDP), which operates in the link layer and provides access to the information about neighboring devices that are also running CDP. CDP is automatically enabled on all routers running IOS 10.3 or later, and works only in those physical media that support SNAP encapsulation. CDP packages provide the following information about each CDP neighbor device:

  • Device IDs. For example, the name configured for the switch and the domain name (if any).
  • Address List. To an address for each input port.
  • Port ID. Name of local port and remote port in the form of an ASCII string, such as ethernet0.
  • List of capabilities. Supported features, for example, if the device acts as a Bridge or a Router.
  • Platform. Device hardware platform, such as Cisco 7000.

To verify that interfaces have enabled the CDP protocol, you can use the command show cdp interface. We may also use this command followed by the abbreviation of an interface to view CDP information for a particular interface, such as show cdp interface s0 for the number 0.

There are two parameters of interest in the CDP protocol. The range of CDP packets sent by default is set to 60 seconds, and maintenance time, which indicates the maximum time during which the router retains the CDP information received from a neighboring router, the default of 180 seconds ( After this time, this information is discarded). To change the value of maintenance time, we enter configuration mode and run the command cdp holdtime [seconds]. Also, from the configuration mode can enable and disable the CDP protocol to one or all interfaces. We can use the no cdp run command to disable the CDP protocol for all interfaces, and cdp run command to turn it on all interfaces. CDP can activate the protocol for a particular interface from the configuration mode, specifying the interface that we want to configure, and then running the command cdp enable. The show cdp traffic command displays information about interface traffic, while show cdp interface command displays the interface status and configuration information from the local device.

Finally for interconnection neighbors once CDP protocol enabled, execute the command show cdp neighbor. For a more detailed information, you can run the command show cdp neighbor details. This command is run from user mode.

Ping and Telnet Commands

The ping command is a privileged mode (enabled) used to test the connection between two or more nodes included in a network, whether clients, servers, routers, etc. Ping can be used with multiple layer 3 protocols such as IP, IPX and AppleTalk, using the logical address assigned to network node.

Also, telnet [IP address] is very useful to check or change the configuration of a remote router, being able to log in as if we were the console of the router. Telnet is a virtual terminal protocol that is part of the TCP / IP, located on port 25/tcp. Telnet connections allows remote console sessions from one device to one or more remote devices. No need to enter the connect or telnet commands to establish a telnet connection, just enter the IP address or hostname of the target device. To end a telnet session, use the quit command.

For our convenience we can leave a suspended telnet session, which, though not the demos use is open and we can connect at the point where we left later. To suspend a Telnet session, press Ctrl-Shift-6, then press x. There are several ways to recover a suspended telnet session:

  • Press Enter twice.
  • Run the command without parameters summarized, if only one session.
  • Use the show sessions command to locate the ID number of the session, and then run the command summarizes.

To end the telnet session that we are currently running execute the command exit or logout. However, to put an end to an open session from the local device when it is suspended and we are on the local computer, run the command disconnect. To close a Telnet session has been opened by a remote host, use the clear command line can find the line number using the show users command.

Establishing the Home Router

The cover of a router configuration mode is created by the command banner motd [CaracterFinal], where the last character corresponds to a keyboard character to the user’s choice that marks the end of the text on the cover. For example, run banner motd $, type the text you want using intro and the spacebar to insert blank lines and characters, and when finished type $ and press Enter. Finally, press Ctrl-Z to save the home and exit setup.

Other console commands

Other console commands are quite useful, like exec-timeout 0. This command sets the timeout for EXEC session to zero minutes and zero seconds. The idea behind this is to prevent the session exceeds the time limit and disconnect the user. It could also enter the command exec-timeout. It is not advisable to use in devices in production.

Command logging synchronous line configuration is useful when the console displays messages while you try to enter EXEC command. Instead of that console messages are interrupted by the entries made by the user, these entries appear on a line by the end of each console message that interrupts the entry. This greatly facilitates reading the entries and messages.

The user interface includes an improved editing mode enabled by default, which provides a suite of editing key functions. Use the privileged command terminal no editing to turn this way or editing terminal command to turn it back.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Designed By :Xperwebbuilder.com  All Right Reserved