D. Cisco IOS
1. Cisco router boot configuration commands:
1. boot system - This is a global command that allows you to specify the source of the IOS software image to load. If you configure more than one source, attempts are made to load the IOS from the first command in the configuration to the last successively. If the first fails, the second boot command is used.
2. boot system rom - Loads IOS from ROM.
3. boot system flash - Loads the first file from flash memory.
4. boot system tftp <file name> < tftp_address > - Loads IOS with a filename <file name> from a TFTP server.
2. To enable the Cisco IOS to forward packets destined for obscure subnets of directly connected networks onto the best route, you use "ip classless" command.
3. Internal memory components of a Cisco router:
1. ROM (Read Only Memory): Memory containing micro-code for basic functions to start and maintain the router. ROM is not typically used after the IOS is loaded.
2. RAM/DRAM : stores the running configuration, routing tables, and packet buffers. Some routers, such as the 2500 series, run IOS from Flash, not RAM.
3. NVRAM (Non-Volatile Ram): Memory that does not lose information when power is lost. Stores the system’s configuration file and the configuration register. NVRAM uses a battery to maintain the data when power is turned off.
4. Flash Memory: Stores the compressed IOS (IOS stands for Cisco Internetwork Operating System) image. Flash memory is either EEPROM or PCMCIA card. Flash memory enables you to copy multiple versions of IOS software. This allows you to load a new level of the operating system in every router in your network and then, to upgrade the whole network to that version at an appropriate time.
4. The Cisco router can be configured from many locations.
1. Console port: During the initial installation, you configure the router from a console terminal connected to the "Console port" of the router.
2. Virtual Terminals (vty): A virtual terminal (vty) is typically accessed through Telnet. A router can be accessed through vty after it the initial installation in the network. There are five virtual terminals, namely, vty0, vty1, vty2, vty3, vty4.
3. Auxiliary Port: you can configure a router through auxiliary port. Typically, a modem is used to configure the modem through aux port.
4. TFTP Server: Configuration information can be downloaded from a TFTP server over the network.
5. NMS (Network Management Station): You can also manage router configuration through NMS such as CiscoWorks or HP
5. Router modes of operation:
1. User EXEC mode (Prompt: Router>):- This is the LOWEST level of access. This allows examination of router status, see routing tables, and do some diagnostics. However, you cannot change the router configuration, view the configuration files, or control the router in any way. The prompt in this mode is "Router>".
2. Privileged (enable) EXEC mode (Prompt: Router#):- This mode allows you to have all the privileges of EXEC (user) mode plus commands that enable you to view configuration files, change the router configuration, perform troubleshooting that could potentially disrupt traffic. The default prompt for this mode is "Router#".When you are working in the privileged mode (at # prompt), you can get back to user mode by typing "disable" at the "#" prompt.
3. Global Configuration mode (Prompt: Router (Config)#):- Global configuration mode allows you to perform tasks that affect the entire router, such as naming the router, configuration of banner messages, enabling routed protocols, and generally anything that affects the operation of the entire router.
When you first switch on a router, you enter Setup mode. Setup mode is different from configuration mode in that setup mode appears when there is no configuration file present. Upon entering setup mode, you can supply some basic configuration parameters to Cisco router.
6. There are three ways a router learns how to forward a packet:
1. Static Routes - Configured by the administrator manually. The administrator must also update the table manually every time a change to the network takes place. Static routes are commonly used when routing from a network to a stub (a network with a single route) network
The command is
ip route network mask address/interface [distance]
ex: ip route 220.127.116.11 255.255.255.0 18.104.22.168
Here, 22.214.171.124 is the destination network or subnet
255.255.255.0 is the subnet mask
126.96.36.199 is the default gateway
2. Default Routes - The default route (gateway of last resort) is used when a route is not known or is infeasible. The command is
ip route 0.0.0.0 0.0.0.0 165.44.56.
The default gateway is set to 188.8.131.52
3. Dynamic Routes - In dynamic routing, the routing tables are automatically updated. Dynamic routing uses broadcasts and multicasts to communicate with other routers.
The commands to enable rip are:
network <major network number>
7. The following are some important commands that can be used to edit and review command history buffer on a Cisco router. It will be useful to practice these commands.
<ctrl> A: Move to the beginning of the command line
<ctrl> E: Move to the end of the command line
<ctrl> F: Move forward one character, same as using "Right Arrow".
<ctrl> B: Move backward one character, same as using "Left Arrow".
<ctrl> P: Repeat Previous command, same as using "Up Arrow".
<ctrl> N: Repeat Next (more recent) command, same as using "Down Arrow".
<esc> B: Moves to beginning of previous word.
<esc> F: Moves to beginning of next word.
<ctrl>R: Creates new command prompt, followed by all the characters typed at the last one.
8. There are five different types of passwords:
1. ENABLE PASSWORD - A global command that restricts access to privileged exec mode. This is a non-encrypted password.
2. ENABLE SECRET - Assigns a one-way encryptographic secret password, available in versions 10.3 and up. This secret password is used instead of the enable password when it exists.
3. Virtual Terminal Password (vty password) - The virtual terminal password is used for Telnet sessions into the router. The password can be changed at any time. It can be set up when you configure the router from the console. There can be five distinct passwords corresponding to each vty (vty0 to vty4) or there can be a single password for all vtys.
4. Auxiliary Password - Auxiliary password is used to set password to the auxiliary port. This port is used to access a router through a modem.
5. Console Password - Console password is used to set the console port password
9. The Catalyst IOS software is very similar to a router IOS. IOS image files are stored in the Flash memory on a switch.
Show running-config [interface <type> <mod>/<num> | vlan <vlan-id> | module <mod>]: The command displays the contents of the configuration file.
Show tech-support: The command is primarily used to send switch information to Cisco TAC support personnel.
Verify flash:<filename> - This command is used to verify whether the Flash contents are intact, and not corrupted. The checksum of the flashfile specified is verified for correctness.
10. By default, Cisco routers support 5 simultaneous telnet sessions. This number can be configured using IOS commands.
11. Routers can make alternate route decisions based on ICMP messages, if appropriate. Routers send an ICMP message if the destination is unreachable.
ICMP (Internet Message Control Protocol) messages are used for basic error reporting between host to host, or host to gateway. It is not used for error reporting between Gateways. ICMP messages are encapsulated using the IP protocol. For example, the command “ping” uses ICMP protocol. In the OSI Reference model, ICMPs are generally considered part of the IP layer.
1. CDP stands for Cisco Discovery Protocol. This protocol is proprietary of Cisco. CDP runs SNAP (Sub network Access Protocol) at the Data Link Layer. Two Cisco devices running two different Network layer protocol can still communicate and learn about each other.
2. The following are true about CDP:
1. CDP - Cisco Discovery Protocol is a Cisco proprietary Layer 2 protocol.
2. CDP uses a multicast packet to the common destination address 01-00-0c-cc-cc.
3. CDP packets are sent out with a non zero TTL after an interface is enabled and with a zero TTL value immediately before and interface is made idle. This enables the neighboring devices to quickly discover the state of neighbors.
4. CDP packets will never be forwarded beyond the directly connected devices. To find CDP information on indirectly connected routers, administrators can 'telnet' to the intended destination device and run CDP command.
ii. Router Commands
1. The following are some frequently used COPY commands:
1. COPY RUNNING-CONFIGURATION STARTUP-CONFIGURATION (alternatively, you can use an older version of the command, WRITE MEMORY): This command saves the current configuration to NVRAM. Alternatively, we can issue the command using short form: COPY RUNNING STARTUP - Copies configuration from RAM to NVRAM
2. COPY STARTUP RUNNING - This command merges configuration from NVRAM to RAM.
3. COPY FLASH TFTP - Copies current IOS from router flash memory to TFTP server.
4. COPY TFTP FLASH - Copies image file from TFTP server to flash. This is used to upgrade the IOS image file to a newer version, or if your IOS image becomes corrupt.
2. SHOW command is extensively used for seeing the status and configuration information of the router.
Some of the frequently used commands are:
1. SHOW RUNNING-CONFIGURATION -This command displays the router's active configuration file, passwords, system name, and interface settings, interfaces IP addresses etc.
2. SHOW INTERFACE - Shows status and configuration information of the local interfaces. The first line says something like “TokenRing1 is up, line protocol is up”. The first part “TokenRing1 is up” describes the physical layer components such as electrical cabling and signaling are OK. The second part “line protocol is up” means that the router is detecting keep-alive messages. The router may be put into administratively down status, at which point the line would read, “TokenRing1 is administratively down, line protocol is down.”
3. SHOW INTERFACE SERIAL 0 - Shows the serial 0 configuration.
4. SHOW INTERFACES - Displays statistics for all interfaces configured on the switch.
5. SHOW PROCESS - Displays a router’s CPU utilization.
6. SHOW CONFIG - Displays information on the startup configuration.
7. SHOW VERSION - Displays information about the system hardware (RAM/ROM), software version, names of configuration files, and boot-images. This command will also show the current configuration register value.
3. Show IP protocol: This command will show information on RIP timers including routing update timer (30sec default), hold-down timer (default 180sec). It also displays the number of seconds due for next update (this is fraction of update timer). This command also gives the network number for which IP RIP is enabled, Gateway, and the default metric.
4. Show IP route: This command will display the IP routing table entries. In addition, it displays the Gateway of last resort (if one is assigned). It also displays the codes used for various types of routes. Some of the important codes are:
C: directly connected;
S: Statically connected
Show IP interface: This command shows you interface-wise information such as IP address assigned to each interface, whether the interface is up, MTU etc.
Debug IP RIP: Debug IP RIP will turn the RIP debugging ON. This will display a continuous list of routing updates as they are sent and received. This leads to lot of overhead, which is the reason that you use "undebug ip rip" to turn-off debugging as soon as you finish with debugging.
5. The banner is displayed whenever anyone logs in to your Cisco router. The syntax is
"banner motd # ". MOTD stands for "Message Of The Day".
# symbol signifies the start of the banner message to the router. You will be prompted for the message to be displayed. You need to enter "#" symbol at the end of the message, signifying that the message has ended.
6. Copy running-config startup-config
-allows the running configuration file to be saved onto the startup configuration file on the switch. Make sure that you use this command whenever you have made any configuration changes to the switch. Otherwise, your configuration command are not permanently saved in the switch memory, and lost soon after power cycling the switch.
Copy startup-config running-config
-allows startup configuration file to be copied into the current running configuration file.
Copy running-config tftp:
-Copies the running configuration of a switch to a TFTP server. You will be prompted for the server address and destination filename.
Copy tftp: startup-config
-This command is useful to restore the startup-config file incase the original is lost or corrupt. The command loads the startup-config file from a remote tftp server.