Cisco IOS (Internetworking Operating System) - II - NetwaxLab

Breaking

Facebook Popup

BANNER 728X90

Tuesday, November 17, 2015

Cisco IOS (Internetworking Operating System) - II

Modular and Demodular Router


In Modular Router the interfaces are not fixed so that we will be able to installed cards latter on this router.

Modular Router

In case of Non-Modular/Demodular router the interfaces are fixed, we cannot able to add ports/interfaces later on.

Modular Router Series – 1700,2600, 2800, 3600,3700,4000,4500,7200,7600,10000,12000

Demodular Router Series – 300,400,900,1800,2500

ISR (Integrated Services Router)


An ISR integrates other network features into the router other than just routing features. Used mostly in small offices on ADSL lines, they offer things like VPN, firewall, and encryption services.

IOS Version – 9.0, 10.0, 11.0, 12.0, 12.2, 12.3, 12.4, 12.5, 15.0, 15.4

POST – It is used to check the basic functionality of the router hardware and determines which interfaces are present.

Mini-IOS – Mini-IOS is a small IOS in ROM that can be used to bring up and interface and load a Cisco IOS into flash memory.

RAM – Random Access Memory stored running config.

ROM – Random Access Memory, Used to start and maintain the router. Holds the POST and the bootstrap program as well as the mini-IOS.

Flash Memory – Stores the Cisco IOS by default. Flash memory is EEPROM (Electronically erasable programmable read-only memory).

NVRAM – Non volatile RAM, used to hold the router and switch configuration. NVRAM is not erased when the router or switch is reloaded.

Configuration Register – Used to control how the router boots up. This value can be found as the last line of the show version command output and by default is set to 0x2102, which tells the router to load the IOS from flash memory as well as to load the configuration from NVRAM.

Boot Sequence of a Router

Switch on – Post (Power on self-test) - Post checks all the hardware parts properly connected or not, if the post passes then router will search IOS image in flash memory. If the IOS is not there, then router uses mini IOS and starts in ROMMON>

If we see ROMMON Mode, which means router has no IOS image if the router has already IOS it would start and search startup config in NVRAM. If router has configured already, then it would show user mode. If there is no configuration then it would ask for the initial setup (Yes/No) if we entered no then we reach directly user mode. If we press yes then it would appear a setup mode.

Interfaces of Router

  1. Ethernet/Fast Ethernet/Gigabit Ethernet (LAN),
  2. Serial Interface (WAN),
  3. Console port (Access the router for configuration),
  4. Aux port (This is also for access the router but need a modem.).

Modes of Router

  1. User Mode (Router>)
  2. Privilege Mode (Router#)
  3. Global Config Mode (Router (config) #)
  4. Interface Mode (Router (config-if) #)
  5. Line Mode (Router (config-line) #)
  6. Router Mode (Router (config-router) #)
  7. Sub interface Mode (Router (config-subif) #)

Some Privilege Mode Commands

Router# show clock
Router# show Version
Router# show flash
Router# show run
Router# show clock
Router# show startup config
Router# show Ip int brief
Router# show fa0/0
Router# show controllers
Router# show controllers s0/0

To access the ROMMON Mode of Router

Restart the Router and press CTRL + Pause Break

Password Recovery

  1. Reboot the Router
  2. Press Ctrl+Pause Break

We will see here ROMMON Mode here

Rommon1>confreg 0x2142
Rommon2>Reset

Once Router will restart Copy the startup-config file to running-config

#copy startup config
Router (config) #config-register 0x2102

Change the password now and save the configuration. (Once we change the registry value it will bypass the NVRAM).

Boot System Commands
We can configure our router to boot another IOS if the flash is corrupted, even we can boot the router from a TFTP host also.

Router (config) #boot?
Router (config) # boot system?
Router (config) # boot system flash c2800m-advsecurityk9-mz.124-12.bin
Router (config) # boot system tftp?
Router (config) # boot system tftp c2800m-advsecurityk9-mz.124-12.bin?
Router (config) # boot system tftp c2800m-advsecurityk9-mz.124-12.bin 192.168.10.2
Router (config) # boot system rom
Router (config) # do sh run | include boot system

Some Requirements before copying the IOS
  1. TFTP server software must be running on the administrator’s workstation.
  2. The Ethernet connection between the router and the workstation must be made with a crossover cable.
  3. The workstation must be on the same subnet as the router’s Ethernet interface.
  4. The copy flash tftp command must be supplied the IP address of the workstation if you are copying from the router flash.
  5. And if we are copying into flash, we need to verify that there’s enough space in flash memory to accommodate the file to be copied.
Verifying Flash Memory

Router#show flash
Router#show version

Backing Up the Cisco IOS

To back up the Cisco IOS first we need TFTP Server on our computer, and then we use the command copy flash tftp.

Router#coy flash tftp
Source filename ()? C2800nm-advsecurityk9-mz.124-12.bin
Address or name of remote host ()? 192.168.10.5
Destination filename (c2800nm-advsecurityk9-mz.124-12.ing)? (Enter)

Just copy the IOS filename from either the show flash or show version command and then paste it when prompted for the source filename.

In this example, the contents of flash memory were copied successfully o the TFTP server. The address of the remote host is the Ip address of the TFTP host, and the source filename is the file in flash memory.

Restoring or Upgrading the Cisco Router IOS

If we want to upgrade IOS, then we can download the file from a TFTP server to flash memory by using the copy tftp flash command. This command requires the IP address of the TFTP host and the name of the file you want to download.

Router#copy flash tftp
Address or name of remote host ()? 192.168.10.5
Source filename ()? C2800nm-advsecurityk9-mz.124-12.bin
Destination filename (C2800nm-advsecurityk9-mz.124-12.bin)? (Enter)
Confirm? (Enter)

In this preceding example, I copied the same file into flash memory, so it asked me if I wanted to overwrite it. Remember that we are playing with files in flash memory. If I had just corrupted my file by overwriting it, I won’t know until I reboot the router. Be careful with this command if the file corrupted, you’ll need to do an IOS restore from ROM monitor mode.

If you are loading a new file and you don’t have enough room in flash memory to store both the new and existing copies, the router will ask to erase the contents of flash memory before writing the new file into flash memory.

Router#show file info flash: c1841-8pbase-ipb ase-mz.124-1c.bin
Router# delete flash: c1841-8pbase-ipb ase-mz.124-1c.bin
Router#copy tftp://192.168.10.5//c1841-advipservicesk9-mz.124-12.bin/ flash:/c1841-advicesk9mz.124-12.bin
Router#show flash
Router#show file information flash: c1841-advipservicesk9-mz.124-12.bin

Backing Up and Restoring the Cisco Configuration

Any changes that we make to the router configuration are stored in the running-config file. And if we don’t enter a copy run start command after we make a change to running-config, that change will go poof if the router reboots or gets powered down. So we need to make another backup of the configuration information just in case the router or switch completely ides on you.

To copy the routers’ configuration from a router to a TFTP server, we can use either the copy running-config tftp or the copy startup-config command.

Verifying the Current Configuration.

Router#show running-config

Verifying the Stored configuration

Router#show startup-config

Copying the Current Configuration to NVRAM

Router#copy running-config startup-config

Copying the configuration to a TFTP Server

Router#copy running-config tftp
Address or name of remote host ()? 192.168.10.5

Restoring the cisco router configuration

Router#copy tftp running-config
Address or name of remote host ()? 192.168.10.5
Source filename ()? Todd-config (Enter)

Erasing the configuration

Router#erase startup-config (Enter)
Router#reload

Using the Cisco IOS File System to Manage your Routers Configuration (Cisco IFA)

Router#show file information nvram: startup-config
Router#cd nvram:
Router#pwd
Router#dir
Router#cd system:
Router#pwd
System: /
Router#dir?
Router#config net (Enter)
Router#copy tftp://192.168.10.5/todd-config system://runningconfig Destination filename (running config)?enter

Using Cisco Discovery Protocol (CDP)


Cisco Discovery Protocol is a proprietary protocol designed by Cisco to help administrator collect information about both locally attached and remote devices. By using CDP, you can gather hardware and protocol information about neighbor devices, which is useful info for troubleshooting and documenting the network.

Router#show cdp neighbors
Router# (config) #cdp?
Router#show cdp neighbors detail
Router#show cdp entry *
Router#show cdp entry * protocols
Router#show cdp entry * version
Router#show cdp entry traffic
Router#show cdp interface

If we telnet to a router or switch, you can end the connection by typing exit at any time. But what if you want to keep your connection to a remote device but still come back to your original router console? To do that, you can press the Ctrl+Shift+6 key combination, release it, and then press X.

Checking Telnet Connections

Router#show sessions

Checking Telnet Users

Router#show users
Router#disconnect 2

DNS configuration

Router#config t
Router (config) #ip domain-lookup
Router (config) #ip name-server?
Router (config) #ip name-server 192.168.10.1
Router (config) #ip domain-name lamle.com
Router#show hosts
Router#ping?

Using the traceroute Command

Traceroute shows the path, a packet takes to get to a remote device. It uses time to live (TTL) time-outs and ICMP error messages to outline the path a packet takes through an internetwork to arrive at a remote host.

Router#Traceroute?
C:\>tracert www.google.com

Debugging

Debug is a troubleshooting command that’s available from the privileged exec mode of Cisco IOS. It’s used to display information about various router operations and the related traffic generated or received by the router, plus any error messages.

Router#debug?
Router#debug all
Router#un all
Router#debug ip rip

To check the cpu utilization

Router#show processes

No comments:

Post a Comment