Cisco router commands are the Cisco IOS (Internetwork Operating System) commands you type at the command line to configure interfaces, routing, and security on a Cisco router. If you need a short working path: connect to the router with a console cable or SSH, enter privileged mode with enable, enter global configuration mode with configure terminal, then set an IP address on an interface, save with write memory, and verify with show ip interface brief. The long version below walks through each stage in order, including what to check and what usually goes wrong.
One note before you start: Cisco IOS command wording is stable, but interface names, licence levels, and some sub-commands differ by model and IOS or IOS XE version. If a command is rejected, check the exact interface name on your device with show ip interface brief rather than assuming.
What You'll Need
- A Cisco router you are allowed to configure. Changes affect everyone on that network.
- A console cable (USB-to-serial or USB console, depending on the model) and terminal software, or working SSH access if the router is already reachable.
- Terminal settings for console access: 9600 baud, 8 data bits, no parity, 1 stop bit, no flow control.
- The network plan: which interface gets which IP address and subnet mask, your LAN subnet, and the next-hop IP of your internet connection if you are routing to the internet.
- Enable secret and local credentials you intend to set, decided in advance.
- An out-of-band plan: physical access to the router in case a change locks you out.
Step-by-Step
- Connect and reach the prompt. Connect the console cable, open your terminal at the settings above, and press Enter. You should see a prompt ending in
>, which is user EXEC mode. Commands here are read-only and limited. - Enter privileged EXEC mode. Type
enableand press Enter, then enter the enable password or secret if prompted. The prompt changes to end in#. This mode allowsshowcommands and configuration changes, so always exit it when finished. - Enter global configuration mode. Type
configure terminal(often shortened toconf t). The prompt becomes something likeRouter(config)#. Everything you change here is held in the running configuration. - Give the router a hostname. Type
hostname MyRouterusing your own name. This appears in the prompt and in logs, which makes troubleshooting far easier. - Secure privileged access. Set
enable secretwith a strong password, then create a local username and password withusername admin privilege 15 secret YourPassword. Prefer thesecretkeyword overpassword:secretstores a hash rather than plain text. - Configure the console and remote lines. Enter
line console 0, thenpasswordandlogin, plusexec-timeout 10 0so an idle session disconnects. Then enterline vty 0 4, setlogin localso the local username is required, and set anotherexec-timeout. Useexitafter each block. - Configure an interface. Type
interface gigabitethernet 0/0(replace with the name shown inshow ip interface brief), thenip address 192.168.1.1 255.255.255.0, thenno shutdown. Cisco router interfaces are administratively down by default, so skippingno shutdownis one of the most common reasons an interface stays dead. - Enable routing. Routing is on by default on most Cisco routers, but you must tell the router where non-local traffic goes. For a simple internet edge, use a default route:
ip route 0.0.0.0 0.0.0.0followed by the next-hop IP. For connected networks, make sure each LAN interface has an IP andno shutdown. - (Optional) Add routing for internal networks. For a small network, static routes in the form
ip route <network> <mask> <next-hop>are enough. For larger networks use a routing protocol such as OSPF or EIGRP, but only after the basic addressing works. - Review the running configuration. Return to privileged mode with
end, then runshow running-configand read it line by line. Look for typos in addresses, a missingno shutdown, or credentials you did not intend. - Save the configuration. Type
write memory(orcopy running-config startup-config). Unsaved changes are lost on reload, and a common support call is a fully working router that forgets everything after a power cut. - Verify connectivity. Check interface state with
show ip interface brief, the routing table withshow ip route, and reachability withpingto a known address. Test from a client on the LAN, not just from the router.
Common Mistakes
The most frequent error is forgetting no shutdown on the interface, which leaves it down and makes every other setting look broken. The second is saving nothing: the running configuration is in memory only, so write memory matters. Third, people apply a static route with a wrong mask, such as 255.255.255.0 where 0.0.0.0 is needed for a default route. Fourth, using password instead of secret stores credentials in readable form. Fifth, applying an access control list to an interface before testing it, which can cut off your own management session. And on live networks, changing an interface that carries your SSH session is a quick way to lock yourself out, so change from the console or schedule the change for a quiet window.
Tips
Use ? at any point to see what the CLI accepts at that level, and use Tab to complete a command name. Shorten commands as far as they stay unambiguous: sh ip int br is standard shorthand for show ip interface brief. Add do show running-config to run show commands from configuration mode without leaving it. Label interfaces with description so the next person knows what each port connects to. Keep a copy of the configuration offline, and note that show running-config shows passwords in hashed or plain form depending on the command used. Finally, make one change at a time and test after each; a stack of untested changes is hard to unwind.
Troubleshooting
If the interface stays down, check the cable and the other end first, then confirm no shutdown is in the configuration. If show ip interface brief shows the interface up but no traffic passes, check the IP and mask match your subnet plan. If pings to the internet fail but local pings work, look at show ip route for a default route and confirm the next-hop address is correct.
If you are locked out of SSH, the cause is usually a missing login local on the vty lines or an access list blocking port 22 and port 23. Recover from the console rather than rebooting. If a command is rejected as invalid, check the interface name and the mode indicator in the prompt: an ip address command will not be accepted at global configuration level. If you lose everything after a reload, you forgot to save. If a change broke connectivity badly, you can remove or adjust the specific line with the no prefix in front of it, which is safer than reloading the router. As a last resort, a factory reset wipes the saved configuration and all credentials, so only do it with a backup of the configuration and physical access to the device.
Frequently Asked Questions
What is the difference between user EXEC and privileged EXEC mode?
User EXEC (prompt ending in >) allows only basic, mostly read-only commands. Privileged EXEC (prompt ending in #) lets you see full configuration and enter configuration mode.
Do I need to save after every command?
No. Changes go to the running configuration as you type them. Save once at the end, or after each confirmed working batch, with write memory.
How do I delete a mistake from the configuration?
Re-enter the same command with no in front of it, in the same mode. For example, no ip route 0.0.0.0 0.0.0.0 192.168.1.254 removes that default route.
Why does my router prompt say Router> instead of Router#?
You are in user EXEC mode. Type enable and supply the password to move to privileged mode.
Can I configure a Cisco router from a phone?
Only through an SSH or terminal app over the network, and only if SSH is already enabled and reachable. There is no full official Cisco configuration app for general IOS routing tasks, so the console or a computer terminal remains the practical route.
Is it safe to configure a production router live?
It carries risk. Interface and access-list changes can drop users or your own session. Work from the console where possible and make changes in a quiet window.