If it was previously configured with a hostname, then you will see:
hostname of router>
If you just turned on the router, after starting it will ask you if you want to start configuring from scratch. Please refuse to answer. If you agree, it will take you to the menu interface. So choose it.
Modes
The command line interface of Cisco IOS is organized according to the idea of modes . You switch in and out of several different modes while configuring the router, whichever mode you are in will determine which commands you can use. Each mode has a set of commands available to it, some of the commands are only available in certain modes. In any mode, a question mark will display a list of commands available in that mode.
Router>?
Privileged and non-privileged regimes
When you first connect to the router and provide the password (if necessary), you will enter EXEC mode, the first mode where you can use commands from the command line. From here, you can use unprivileged commands like ping, telnet, and rlogin. You can use the show command to collect system information. In privileged mode, you can use the show version command to display the version of IOS that the router is running. Rating show? will display all of the show commands available in the mode you are currently in.
Router> show?
You must enter privileged mode to configure your router. Do that by using the enable command. Privileged mode is usually password protected unless the router has not been configured. You can choose privileged mode without password protection but all should set a password to be safe. When issuing the enable command and providing the password, you will enter privileged mode.
To help users keep track of which mode they are in, the command line command prompt changes every time you enter another mode. When you switch from non-privileged mode to privileged mode, reminders will change from:
Router>
City
Router #
This will not be necessary if there are only two modes. However, in practice, with many modes, this feature is essential. You also need to pay attention to reminders all the time.
Inside privileged mode there are many small modes. When you enter privileged mode (or can be called parent - parent mode), the prompt will end with a sign (#). There are many modes that you can only enter after entering privileged mode. Each of these modes has a reminder like the form below:
Router (arguments) #
They still end with a pound sign (#) and are included in privileged mode. Many modes have sub-modes within themselves. When you enter privileged mode, you can access all configuration information as well as the options provided by IOS, directly from the parent mode or from one of its sub-modes.
3. Configure Cisco routers
If you have just turned on the router, it will not be fully configured. If it is already configured, you can view its current configuration. Even if it has not been configured before, you can manually exploit it with the show command before starting to configure the router. Enter privileged mode by issuing command enable, then play some show commands to see what they display. Remember, the show command? will display all existing show commands in the current mode. Try the following commands:
Router # show interfaces Router # show ip protocols Router # show ip route Router # show ip arp
When entering privileged mode by using the enable command, then you will be in the top-level mode of privileged mode, known in this document as 'parent-mode'. It is the mode where you can display most information about the router. As you know, you can do that with the show commands. Here you can know the configuration of the interface. It is possible to display what IP protocols are being used, such as dynamic routing protocols. You can view ARP routing and routing and some other important options.
When configuring the router, you will enter in a number of sub-modes to set the options, then return to the parent mode to display the results. You also return to father mode to enter other sub-modes. To return to father mode, simply press ctrl-z. This will cause the commands you have just issued to take effect and return you to father mode.
Global configuration
To configure any of the router's features, you must enter configuration mode. This is the first subset of the parent mode. In father mode, you issue the config command.
Router # config Router (config) #
As illustrated above, reminders will change to indicate which mode you are in now.
In configuration mode, you can set options to use for the entire system, referred to as global configurations. For example, name the router so you can easily identify it. You can do that in configuration mode with the hostname command.
As illustrated above, when you set the name of the host with the hostname command, the prompt will immediately change by replacing the Router with ExampleName. (Note: You should name your routers according to an organized name scheme).
Another useful command from the configuration mode is the command to specify the DNS server to use for the router:
Until you press ctrl-Z (or hit exit until you enter parent mode) your command is not affected. You can enter configuration mode, play a few different commands, then press ctrl-Z to activate them. Each time you press ctrl-Z, you will return to father mode and prompt:
ExampleName #
Here you use the show command to verify the results of the commands you played in configuration mode. To verify the results of the ip name-server command, issue the show host command.
Interface configuration
The naming of Cisco interfaces is very simple. The separate interfaces are led by this procedure:
media type slot # / port #
"Media type" is the type of device whose interface is the port, such as Ethernet, Token Ring, FDDI, serial, . The slot number is only suitable for routers that provide slot numbers so you can install modules. Modules include several ports for a given device. Series 7200 is an example. These modules are hot-swappable. You can remove a module from its slot and replace it with another module without interrupting the service provided by the other modules installed in the router. These slots are numbered on the router.
The port number is based on the reference port with other ports in that module. The numbering is done from left to right and all start from 0, not one digit.
For example, Cisco 7206 is a 7200 series router that has 6 slots. To refer to an interface that is the third port of an Ethernet module installed in the sixth slot, it will be the 6/2 interface. Therefore, to display the configuration of the interface, you need to use the command:
ExampleName # ethernet interface 6/2
If your router has no slots, like 1600, the interface name only includes:
media type port #
For example:
ExampleName # show serial interface 0
Here is an example of configuring a serial port with an IP address:
Notice the no shutdown command. An interface can be properly configured and physically connected but still has problems. In this state it will not work. The command that caused this error is shutdown.
ExampleName (config) #interface serial 1/1 ExampleName (config-if) #shutdown ExampleName (config-if) # ctrl-Z ExampleName # show serial interface 1/1
In the Cisco IOS, how to reverse or delete results for any command is to put it in front of it. For example, if you want to cancel the assignment of the IP address assigned to the serial interface 1/1:
ExampleName (config) #interface serail 1/1 ExampleName (config-if) #no ip address 192.168.155.2 255.255.255.0 ExampleName (config-if) ctrl-Z ExampleName # show serial interface 1/1
Configuring most interfaces for LAN connections can only include assigning a network layer address and ensuring that the interface is not shut down. There is often no need to specify data link layer encapsulation. Note that it is often necessary to specify compatible data link layer encapsulation, such as frame-relay and ATM. The default serial interfaces must use HDLC. However, in-depth discussion of data link protocols is beyond the scope of this document. You will need to look up the IOS command encapsulation for more details .
Configuration and routing
IP routing is enabled automatically on Cisco routers. If it has been previously disabled on your router, you can enable it again in configuration mode with the command ip routing.
There are two main ways a router knows where it sends packets. Administrators can assign static routes or routers can know routes by using a dynamic routing protocol.
Today, static routing is generally used in very simple networks or in cases where it is imperative to use them. To create a static route, an administrator only needs to tell the operating system that any network traffic that is intended for a particular network layer address needs to be forwarded to such a specific network layer address. . In the Cisco IOS, this is done with the ip route command.
ExampleName # config ExampleName (config) #ip route 172.16.0.0 255.255.255.0 192.168.150.1 ExampleName (config) # ctrl-Z ExampleName # show ip route
There are two things to say in this example. First, the destination address must contain the subnet mask for that destination network. Second, the address it sends forward is the specified address of the next router along with the path to the destination. This is the most common way to set up a static route. There are still some other methods though.
Dynamic routing protocols, running on connected routers, allow these routers to share routing information. That allows routers to know which routes are available to them. The advantage of this method is that routers can adjust to change the network topology. If a physical route is removed or the router next to it will crash, the routing protocol will look for new routes. Routing protocols can choose dynamically between routes that can be based on variables such as network congestion or network reliability.
There are many different routing protocols, all of which use different variables to decide on the appropriate routes. However, a router needs to run the same routing protocols as its adjacent routers. However, many routers can run multiple protocols. In addition, there are many protocols designed to be able to pass routing information to other routing protocols. This is called redistribution. Here we only introduce an IOS redistribute command so you can research if necessary.
Routing protocols are a complex topic and this document only includes their superficial descriptions. You can learn more from many other resources, an ideal source we introduce to you here on this topic is to visit the Cisco website, http://www.cisco.com.
This document describes the configuration of the Routing Information Protocol (RIP) on Cisco routers. From the command line, we must tell the router which protocol to use and what networks the protocol will route for.
Now when you issue the show ip protocols command, you will see an entry describing the RIP configuration.
Save router configuration
Once you have configured routing on the router, configured individual interfaces and your router is capable of routing traffic. Allow it to communicate with the surrounding networks, then issue the show ip route and show ip arp commands. There are entries in the table already known from the routing protocol.
If you turn off the router and turn it back on, you will have to start the configuration again. Your running configuration is not saved to any permanent archive. You can see this configuration with the command show running-config.
ExampleName # show running-config
If you want to save the running configuration successfully, please issue the copy running-config startup-config command.
ExampleName # copy running-config startup-config
Your configuration will now be saved to the non-volatile RAM (NVRAM). Play the show startup-config command.
ExampleName # show startup-config
Now whenever you need to bring your router to that configuration, issue the copy startup-config running-config command.
ExampleName # copy startup-config running-config
Configuration example
Router> enable
Router # config
Router (config) #hostname N115-7206
N115-7206 (config) #interface serial 1/1
N115-7206 (config-if) ip address 192.168.155.2 255.255.255.0
There must be problems during use. Often it is an error that users find that they cannot reach a destination, or all destinations. You need to know how to check how the router is trying to route traffic and must be able to check and detect error points.
Until now you have been proficient with show commands, both specific commands and how to learn what the show command currently has. Some of the most basic and useful commands you can use for troubleshooting are:
ExampleName # show interfaces ExampleName # show ip protocols ExampleName # show ip route ExampleName # show ip arp
Checking connection
It is possible that the error point is not in the router's configuration or not related to your router at all. If you check your router's configuration and operation and everything is fine, the problem may be in the transmission line.
A simple and useful diagnostic tool is the ping command. Ping is an implementation of the IP Message Control Protocol (ICMP). This command sends an ICMP echo request to the destination IP address. If the destination receives a request, it responds with an ICMP echo response packet. That signal replaces dialogue sentences such as:
Hello are you there Yes I'm here.
ExampleName # ping xx.xx.xx.xx
If after the ping succeeds, you will know that the destination you are trying to access currently exists and can be connected to.
If there are multiple routers between your router and the destination, you will have difficulty connecting to them, then the problem may be on other routers. Even if you ping a router and it responds, it is possible that some other interfaces have problems, its routing table may be corrupted or some other problem may arise.
To see where packets are left on your router when on the way to a destination, how far away, use the trace command.
ExampleName # trace xx.xx.xx.xx
It may take up to a few minutes for this gadget to work, so you need to wait patiently. It will display a list of all the hops performed on the way to the destination.
Debug command
There are several debug commands provided by IOS. These commands are not introduced here, you can refer to them on Cisco websites.
Hardware and physical connections
It is also possible to point the error to your physical or hardware connection. Any number of them can have problems, from motherboard errors to cable breaks or power failures. However, this document will not describe how to troubleshoot these problems, except for some simple remedies below.
Check if your router is turned on. It is also necessary to ensure that no cables are damaged or loose. Also make sure the cables are plugged into the correct port. In addition to this simple advice, you need to check other sources of help.
Out of control
If the error point is not on the line then the problem may be on the device. You can then call the device administrator, inform them about the problem you have and ask for help from them.