# Routeur Cisco

# Mettre à jour l'IOS (ISR) en USB

<p class="callout info">Pour mettre à jour un équipement sous Catalyst c'est par ici : [Mettre à jour l'IOS](https://wikidunn.ddns.net/books/switch-cisco/page/mettre-a-jour-lios "Mettre à jour l'IOS")</p>

##### Etape 1 : Insérer la clef USB

Une fois la clef USB détecté, un message apparait :

```
Router#
*Jul  5 07:27:21.840: %IOSXE-3-PLATFORM:  R0/0: kernel: ntfs: (device sdb1): load_system_files(): $LogFile is not clean.  Mounting read-only.  Mount in Windows.
*Jul  5 07:27:21.955: %IOSD_INFRA-6-IFS_DEVICE_OIR: Device usb0 added
```

##### Etape 2 : Vérifier la présence de l'IOS sur la clef USB

```
Router#dir usb0:
Directory of usb0:/

  109  -r--        764265678   Jul 5 2024 07:15:05 +00:00  isr4300-universalk9.17.09.03a.SPA.bin
   36  dr-x                0   Jun 7 2024 06:37:10 +00:00  System Volume Information
   39  dr-x                0   Jun 7 2024 06:39:22 +00:00  www

4003459072 bytes total (3223986176 bytes free)
```

##### Etape 3 : Copier l'IOS de la clef USB vers le routeur 

```
Router#copy usb0: flash:
Source filename []? isr4300-universalk9.17.09.03a.SPA.bin
Destination filename [isr4300-universalk9.17.09.03a.SPA.bin]?
Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC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CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
764265678 bytes copied in 60.706 secs (12589623 bytes/sec)
```

##### Etape 4 : Vérifier la présence de l'IOS dans le répertoire flash

```
Router#dir flash:
Directory of bootflash:/

   12  -rw-        550218354   Sep 5 2019 12:15:29 +00:00  isr4300-universalk9.16.06.06.SPA
81446  -rw-              596   Jul 5 2024 06:18:11 +00:00  vlan.dat
81447  -rw-        764265678   Jul 5 2024 07:30:19 +00:00  isr4300-universalk9.17.09.03a.SPA.bin


3149967360 bytes total (917188608 bytes free)
```

##### Etape 5 : Installation du nouvel ISO

<p class="callout info">A la question : Do you want to remove the above files? \[y/n\] répondre Y</p>

```
Router#install remove file bootflash:isr4300-universalk9.16.06.06.SPA.bin
install_remove: START Fri Jul  5 07:35:14 UTC 2024

*Jul  5 07:35:50.239: %PLATFORM-4-ELEMENT_WARNING:  SIP1: smand:  RP/0: Used Memory value 90% exceeds warning level 88%grep: packages.conf: No such file or directory
Cleaning up unnecessary package files
  Scanning boot directory for packages ... done.
  Preparing packages list to delete ...
  done.

The following files will be deleted:
[R0]:
/bootflash/isr4300-universalk9.16.06.06.SPA

Do you want to remove the above files? [y/n]n
[R0]:

SUCCESS: install_remove  Fri Jul  5 07:37:38 UTC 2024

Router#
```

##### Etape 6 : Booter sur le nouveau IOS

```
Router(config)#boot system flash:isr4300-universalk9.16.06.06.SPA.bin
Router(config)#wr
```

##### Etape 7 : Reboot

```
Router#reload
Proceed with reload? [confirm]
```

##### Etape 8 : Vérification de la version

```
 Router#sh ver
Cisco IOS XE Software, Version 17.09.03a
Cisco IOS Software [Cupertino], ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.9.3a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2023 by Cisco Systems, Inc.
```

##### Bonus : Supprimer le vieux IOS :

```
Router#delete flash:c1100-universalk9.17.03.04a.SPA.bin
Delete filename [c1100-universalk9.17.03.04a.SPA.bin]?
Delete bootflash:/c1100-universalk9.17.03.04a.SPA.bin? [confirm]
Router#
```

# Supprimer la configuration

##### Supprimer la configuration

```
router#erase startup-config
************************************************************************************************************
Erasing Nvram will not clear license trust code.
************************************************************************************************************
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
router#
router#reload
WARNING:
Boot variable either does not exist or buffer is too small
This may impact autoboot of the router. Proceed with caution
Do you wish to proceed with reload anyway[confirm]
Proceed with reload? [confirm]
*Oct 20 12:49:11.992 UTC: %IOSXE_RP_CFG_NOT-3-BOOT_VAR_NOT_SET: Either the boot variable does not exist or the buffer is too small.Keep it blank.
[confirm]
*Oct 20 12:49:15.326 UTC: %SYS-5-RELOAD: Reload requested by cisco on console. Reload Reason: Reload Command.
```

# Ajouter une configuration en USB

```
Router#enable
Router#dir usb0:
Directory of usb0:/

5       -rwx             9953   Nov 5 2025 10:22:00 +00:00  conf.txt
4       -rwx        685683088   Nov 5 2025 08:40:30 +00:00  c1100-universalk9.17.09.03a.SPA.bin
3       drwx             8192  Aug 22 2025 11:37:32 +00:00  System Volume Information

15565045760 bytes total (14879309824 bytes free)
Router#
Router#
Router#copy usb0: startup-config
Source filename []? conf.txt
Destination filename [startup-config]?
9953 bytes copied in 3.208 secs (3103 bytes/sec)
Router#
Router#reload
WARNING:
Boot variable either does not exist or buffer is too small
This may impact autoboot of the router. Proceed with caution
Do you wish to proceed with reload anyway[confirm]
Proceed with reload? [confirm]
```