Switch upgrade IOS

Source: Internet
Author: User

 

First, log on to the vro using the Super Terminal and set the fa0/1 IP address.

R1 (config-if) # ip address 192.168.1.1 255.255.255.0

R1 (config-if) # no shutdown

Set the IP address of the tftp server to 192.168.1.2/24

 

The IOS of the router is backed up to the tftp server.

In privileged mode, enter the command copy flash tftp and press Enter. after entering the address or Host Name of the tftp server and the file name to be copied, IOS will be backed up to the tftp server. The detailed command is as follows:

R1 # copy flash tftp

Source filename []? C2600-i-mz.122-28.bin here enter the IOS file name to copy, you can view through the show flash command

Address or name of remote host []? 192.168.6.2 enter the IP address of the tftp server.

Destination filename [c2600-i-mz.122-28.bin]? If you press enter, the saved file name is the original IOS file name by default. You can also enter a new name.

After a short wait, the IOS file backup is complete. Now we can see that the IOS file we just saved already exists in the tftp server.

The next step is how to upgrade/restore IOS. This is important. First, upgrade. The same vro and different versions of IOS can implement different functions, in case of a fault in IOS, it is not a problem to implement functions. The entire router is paralyzed and how to recover is crucial.

Before upgrading the vro, let's take a look at the original IOS file of the vro. In privileged mode, enter show version or show flash. I personally prefer the latter, because the previous command will display a lot of irrelevant information, you only need to view this information. The command is shown as follows:

R1 # show flash

System flash directory:

File Length Name/status

3 5571584 c2600-i-mz.122-28.bin

2 28282 sigdef-category.xml

1 227537 sigdef-default.xml

[5827403 bytes used, 58188981 available, 64016384 total]

63488 K bytes of processor board System flash (Read/Write)

At this point we can see that the router only has one IOS file, the name is c2600-i-mz.122-28.bin, at the same time we can see that the flash space is relatively large, you can store two IOS files at the same time, if the space is relatively small, upgrade the old IOS file to a new one. In privileged mode, enter the command copy tftp flash, which also requires entering the IP address and file name of the tftp server. The detailed configuration is as follows:

R1 # copy tftp flash

Address or name of remote host []? 192.168.1.2 enter the address of the tftp server.

Source filename []? C2600-ipbasek9-mz.124-8.bin here input IOS file name

Destination filename [c2600-ipbasek9-mz.124-8.bin]? Press enter.

After a short wait, the IOS upgrade is successful. At this time, we can use the show flash command again. We can see that there are two IOS files in flash, and the flash space has changed.

R1 # show flash

System flash directory:

File Length Name/status

3 5571584 c2600-i-mz.122-28.bin

4 c2600-ipbasek9-mz.124-8.bin 13169700

2 28282 sigdef-category.xml

1 227537 sigdef-default.xml

[18997103 bytes used, 45019281 available, 64016384 total]

63488 K bytes of processor board System flash (Read/Write)

At this time, we can use the boot command to select which IOS file to boot, or delete the IOS file of the principle, and run the delete flash command.

R1 (config) # boot system flash c2600-ipbasek9-mz.124-8.bin

Restart the vro and boot the new IOS file.

If you accidentally delete IOS or IOS is damaged, you need to recover it from tftp. Unfortunately, PT 5.3 cannot delete IOS. After Entering erase flash, an invalid command is prompted, you can only write the command steps without the command.

Because IOS is deleted, the vro automatically enters the rom mode. Enter the following commands in sequence:

Rommon 1> IP_ADDRESS = 192.168.1.1 this is the first Ethernet port address of the router.

Rommon 2> IP_SUBNET_MASK = 255.255.255.0 Subnet Mask

Rommon 3> DEFAULT_GATEWAY = 192.168.1.2 the default gateway is set to the address of the tftp server.

Rommon 4> TFTP_SERVER = 192.168.1.2 tftp server address

Rommon 5> TFTP_FILE = c2600-i-mz.122-28.bin IOS file name

Rommon 6> sync save

Rommon 7> set view

Rommon 8> tftpdnld starts to upload files. The system prompts you to select y.

After the restoration, boot starts.

Verification Method:

Dir bootflash

Verify bootflash 'image files' are all C characters indicating that the verification has passed

Boot bootflash 'image file' use the new image name

Dir bootflash: write down this file in the flash device

Show bootvar check current startup variable

No boot system flash bootflash 'image file' to delete the original incorrect startup variable

Boot system flash bootflash 'image file' to add the correct startup variable

Config-register 0x2102 assign a value again. The value of the register variable should be 0x2102.

Write memory: Save the configuration of the running configuration file to the startup configuration file.

This article is from the "JSFIDO" blog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.