|
Post by Admin on Jun 29, 2015 15:28:56 GMT
copy running-config tftp
router fa0/0 192.168.1.1
pc 192.169.1.2
//copy config - for backup copy running-config tftp 192.168.1.2
//copy ios - for backup
copy flash: trtp:
dir flash:
//to delete ios delete flash: <name of ios>
// to recover IOS
rommon1>set ip_address=192.168.3.1 ip_subnet_mask=255.255.255.0 default_gateway=192.168.3.1 tftp_server=192.168.3.2 tftp_file=sample ios3 tftpdnid
sample:
rommon 11 > IP_ADDRESS=192.168.1.5 rommon 12 > IP_SUBNET_MASK=255.255.255.0 rommon 13 > DEFAULT_GATEWAY=192.168.1.1 rommon 14 > TFTP_SERVER=192.168.1.10 rommon 15 > TFTP_FILE=c1841-advipservicesk9-mz.124-13a.bin rommon 16 > tftpdnld . IP_ADDRESS: 192.168.1.5 IP_SUBNET_MASK: 255.255.255.0 DEFAULT_GATEWAY: 192.168.1.1 TFTP_SERVER: 192.168.1.10 TFTP_FILE: c1841-advipservicesk9-mz.124-13a.bin TFTP_MACADDR: 00:13:80:7b:20:1e TFTP_VERBOSE: Progress TFTP_RETRY_COUNT: 18 TFTP_TIMEOUT: 7200 TFTP_CHECKSUM: Yes FE_PORT: 0 FE_SPEED_MODE: Auto Detect . Invoke this command for disaster recovery only. WARNING: all existing data in all partitions on flash will be lost! Do you wish to continue? y/n: [n]: y ... Receiving c1841-advipservicesk9-mz.124-13a.bin from 192.168.1.10 !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .... File reception completed. Validating checksum. Copying file c1841-advipservicesk9-mz.124-13a.bin to flash. program load complete, entry point: 0x8000f000, size: 0xc100 . Initializing ATA monitor library....... . Format: Drive communication & 1st Sector Write OK... Writing Monlib sectors. ................................................................................ .................. Monlib write complete Format: All system sectors written. OK... Format: Operation completed successfully. Format of flash: complete program load complete, entry point: 0x8000f000, size: 0xc100 Initializing ATA monitor library....... rommon 17 >
|
|
|
Post by Admin on Jun 29, 2015 15:29:27 GMT
//
rommon1>set ip_address=192.168.3.1 ip_subnet_mask=255.255.255.0 default_gateway=192.168.3.1 tftp_server=192.168.3.2 tftp_file=sample tftpdnid
//
rommon1>set ip_address=192.168.1.2 ip_subnet_mask=255.255.255.0 default_gateway=192.168.1.1 tftp_server=192.168.1.1 tftp_file=sample tftpdnid ________________
How to load an IOS onto a Cisco router using the ROMmon mode
To load an IOS onto a router using ROMmon mode via Ethernet cable:
Start the TFTP server (make sure the file path is correct and that you allow both transfer and receive) Connect to the router via Ethernet cable (an Ethernet cable is preferred due to the large size of the file and the maximum speed that data can travel over the console cable) ¨ Before the IOS is loaded it is important to make sure that your router has enough memory to support the IOS. The router will allow an IOS to be loaded even if there is not enough memory, in this case a smaller IOS will have to be loaded.
At the rommon prompt enter the following commands (commands are case sensitive, and the use of the directional arrows and tab auto complete function is not allowed):
IP_ADDRESS=IP address of the Ethernet port IP_SUBNET_MASK=subnet mask of the Ethernet port DEFAULT_GATEWAY=the default gateway TFTP_SERVER=the IP of the TFTP server (your local computer) TFTP_FILE=the file name of the IOS file tftpdnld
The router will then issue a warning message: Invoke this command for disaster recovery only. WARNING: all existing data in all partitions on flash will be lost! Do you wish to continue? y/n: [n]: y
Enter y, and the IOS will load Once loaded you must boot up the new IOS by issuing the boot command
To load an IOS onto a router using ROMmon mode via the Cisco console cable:
Connect to the router using the light blue Cisco console cable (make sure the RJ-45 connector is plugged into the console port on the router) using the 9600-8-N-1 settings. The next two steps (changing the console baud rate) are optional. In ROMmon mode, change the baud rate to 15200 using the confreg command. rommon 1>confreg Configuration Summary enabled are: break/abort has effect console baud: 9600 boot: the ROM monitor
¨ The router will guide you through changing the registry. You want to press y to chang the configuration. The only other change you need to make is the change to the console baud rate, set that to 7 (115200).
do you wish to change the configuration? y/n [n]: y enable "diagnostic mode"? y/n [n]: enable "use net in IP bcast address"? y/n [n]: enable "load rom after netboot fails"? y/n [n]: enable "use all zero broadcast"? y/n [n]: disable "break/abort has effect"? y/n [n]: enable "ignore system config info"? y/n [n]: change console baud rate? y/n [n]: y enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400 4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7 change the boot characteristics? y/n [n]:
Configuration Summary enabled are: break/abort has effect console baud: 115200 boot: the ROM Monitor
do you wish to change the configuration? y/n [n]: You must reset or power cycle for new config to take effect.
rommon 2>
When you reset the router in your console window you will see characters that you cannot read. You have to stop the session and set your baud rate to 115200. This will let you increase the speed that you use to transfer the file. At the rommon prompt enter xmodem -c {filename} When prompted, enter y to continue From your hyperterminal prompt, click on transfter then send file Select the IOS image then change the protocol to xmodem via the dropdown box then click send. After the IOS has been downloaded, change the boot order by using the confreg 0x2102 command.
|
|
|
Post by Admin on Jun 29, 2015 15:29:42 GMT
OS Upgrade LAB Overview This lab will use a PC connected to a router using a rollover cable connected to the console port to transfer a new IOS image to the router from a TFTP server. Transfer of the IOS via the ethernet interface is faster than using a serial cable to transfer the image. The TFTP server is used as a repository for the new IOS image.
Method
Open Packet Tracer (Minimum version 4.1)
Open a new file and add the hardware listed below. You will need as a minimum: Server PT; Router – choose an 1841; Switch – any; PC with any Ethernet interface. Set up the hardware as shown below.
Cabling the network Use a copper straight-through cable between server and switch and also between switch and router. Use the lowest numbered interfaces on all devices for Cat 5 cabling. Use a console (rollover) cable between the PC and router and connects it to the console port on the router and the RS232 port on the PC.
Setup of the RS232 port on the PC Go to PC, Desktop then Terminal. Make sure the settings are as shown below. This is necessary to setup the serial link between the PC and the rouiter. You will need to use the same settings when using a VT100 emulator such as hyperterminal.
Click OK
Setup of the router You need to give the router a temporary IP address for the purpose of connecting the router to the TFTP server. Give the router a /24 IP address on an Ethernet interface. You will need to supply the correct subnet mask. Work this address and subnet mask out before you continue. Change the router’s name to my_new_router You can do this yourself or follow the instructions below:
At Continue with configuration dialog? [yes/no]: type n, Return
Now type the following commands
Router>enable Router#configure terminal Router(config)#interface ?
This displays the available interfaces. Choose the appropriate ethernet interface.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#hostname my_new_router
my_new_router(config)#exit %SYS-5-CONFIG_I: Configured from console by console my_new_router#write Destination filename [startup-config]? Building configuration... [OK] my_new_router#
Visit the CLI of the router and ascertain the IOS version that is currently running. Use the ‘show version’ command to do this. When viewing the output note that IOS is not the same as System Bootstrap! Make a note of the values for NVRAM, DRAM and FLASH. Where are these values written?
The IOS is displayed prefixed by its location on the router. Make a note of the location and the FULL name of the IOS that is currently installed on the router. Make a note of the value of the Configuration Register. This tells the router where to look at boot for its IOS.
Setup the TFTP server Open the TFTP server properties by clicking on it. Under Config, Services turn off all services except TFTP Notice the IOS versions already ‘downloaded’ to the TFTP server Set a /24 address and subnet mask from the router’s FastEthernet network range that you defined earlier in this lab.
Make sure that your network has connectivity between the server and router before continuing. Use a ping from either the router or the server to verify connectivity.
my_new_router#ping 192.168.1.2
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms
Copy the results of the ping (you may have used different IP settings to mine). Carry out diagnostics if the ping fails and do not continue until you have achieved connectivity.
ROMMON The ROM monitor (also called the bootstrap program) is the firmware that runs when you power on Cisco routers. It is similar to the BIOS (CMOS) setup menu on a PC because it allows basic hardware changes to be configured. During normal operation, the ROM monitor helps to initialize the processor hardware and boot the operating system software.
Entering ROMMON is accomplished by changing the configuration register to either 0x2100 or 0x0.
my_new_router#configure terminal Enter configuration commands, one per line. End with CNTL/Z.
my_new_router(config)#config-register 0x2100 my_new_router(config)#exit %SYS-5-CONFIG_I: Configured from console by console my_new_router#reload Proceed with reload? [confirm]
Press Enter Type ? Note that the response gives a list of the commands available, but not how to use them. Now look at files in FLASH memory using the command shown below:
rommon 8 > dir flash: File size Checksum File name
13832032 bytes (0xd30f60) 0x1033 c1841-ipbase-mz.123-14.T7.bin
Now reboot the router (use the 'reset' command).
If the router will not boot into its IOS, issue the command boot flash:
Copying the new IOS image onto the router Choose the IOS image on the TFTP server that you do not currently have in the router’s FLASH – note the COMPLETE name.
Enter Priv Exec mode on your router and type the command copy tftp flash:
You will need to supply the IP address of the TFTP server, the filename of the chosen IOS and verify the destination filename ( you should keep this the same as the source file name).
my_new_router#copy tftp flash: Address or name of remote host []? 192.168.1.2 Source filename []? c1841-ipbasek9-mz.124-12.bin Destination filename [c1841-ipbasek9-mz.124-12.bin]? Accessing tftp://192.168.1.2/c1841-ipbasek9-mz.124-12.bin.... Loading c1841-ipbasek9-mz.124-12.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!! [OK - 16599160 bytes]
16599160 bytes copied in 30.097 secs (123409 bytes/sec) my_new_router#dir flash: Directory of flash:/ (read the output)
Now re-enter ROMMON
rommon 1 > boot flash:c1841-ipbasek9-mz.124-12.bin
Observe the boot process and verify that the router has booted the new IOS using the ‘show version’ command
my_new_router#delete flash:c1841-advipservicesk9-mz.124-15.T1.bin Delete filename [c1841-advipservicesk9-mz.124-15.T1.bin]? Delete flash:/ c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]
my_new_router#dir flash: Directory of flash:/
2 -rw- 16599160 <no date> c1841-ipbasek9-mz.124-12.bin
32514048 bytes total (15914888 bytes free)
Reboot the router with the 'reload' command. Notice that the router boots to Rommon again. To rectify this, you will need to change the configuration register back to 0x2102 once more. This tells the router to boot from the IOS the next time it is rebooted.
rommon 2 > confreg 0x2102 rommon 3 > reset
Once the router reboots, verify that the IOS is now the new version – use the show version command. If the router has booted from the new IOS, you have completed this part of the lab.
Backing up your configuration files to the TFTP server
You should make copies of your configuration files regularly to make disaster recovery manageable. At the priv exec prompt you issue the copy command and specify the file to copy, the IP address of the destination (the TFTP server) and the destination filename.
my_new_router#copy running-config tftp Address or name of remote host []? 192.168.1.2 Destination filename [my_new_router-confg]? .!! [OK - 352 bytes]
352 bytes copied in 3.184 secs (0 bytes/sec)
Look in the TFTP server for the config file that you copied This is useful as a backup in case of router failure.
Save this work and your Packet Tracer file.
|
|
|
Post by Admin on Jun 29, 2015 15:30:01 GMT
www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/6130-index.htmlPassword recovery procedure 1. Press ctrl break within 60 seconds Result: rommon> 2. Type confreg 0x2142 This step bypasses the startup config where the passwords are stored 3. Type reset The router reboots, but ignores the saved config 4. Type no – in each questions or press ctrl C 5. Now you will be at user privilege mode type enable 6. Type configure memory or copy startup-config running-config In order to copy the nonvolatile RAM (NVRAM) into memory. Warning: DO NOT TYPE COPY RUNNING-CONFIG STARTUP-CONFIG 7. Type show running-config Now you can see the configuration of the router You can see the passwords Can you see the passwords at enable secret 8. Type configure terminal 9. You can now change the ff: Enable secret: class Line con 0 : cisco Line vty : cisco And also the IP add 10. Save 11. Reload 12. Ctrl break 13. Type config-register 0x2102 14. Reset
|
|