# Mise à jour des OS d’un switch HPE

1 – Connecter un PC portable sur le port console de l’équipement

2 – Remettre l’équipement en mode de configuration « usine » :

<span style="color: rgb(45, 194, 107);">undo startup saved-configuration</span>  
<span style="color: rgb(45, 194, 107);">delete startup.cfg</span>  
<span style="color: rgb(45, 194, 107);">Y</span>  
<span style="color: rgb(45, 194, 107);">delete lauth.dat</span>  
<span style="color: rgb(45, 194, 107);">Y</span>  
<span style="color: rgb(45, 194, 107);">reboot</span>  
<span style="color: rgb(45, 194, 107);">N</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

3 – Vérifier la version logicielle active sur l’équipement  
<span style="color: rgb(45, 194, 107);">display version</span>

4 – Vérifier les versions logicielles autorisées sur l’équipement  
<span style="color: rgb(45, 194, 107);">display boot-loader</span>

5 – Si la version logicielle active est autorisée uniquement au seul emplacement « main » ou « backup » alors l’autoriser sur le 2ème emplacement

<span style="color: rgb(45, 194, 107);">boot-loader file boot flash:/5140ei-cmw710-boot-xxx.bin system flash:/5140ei-cmw710-system-xxx.bin slot 1 main</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

ou

<span style="color: rgb(45, 194, 107);">boot-loader file boot flash:/5140ei-cmw710-boot-xxx.bin system flash:/5140ei-cmw710-system-xxx.bin slot 1 backup</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

6 – Si la version logicielle active ne correspond pas à la version « cible » alors configurer le serveur SFTP sur l’équipement

<span style="color: rgb(45, 194, 107);">system-view</span>  
<span style="color: rgb(45, 194, 107);">public-key local create dsa</span>  
<span style="color: rgb(45, 194, 107);">y</span>  
<span style="color: rgb(45, 194, 107);">2048</span>  
<span style="color: rgb(45, 194, 107);">public-key local create rsa</span>  
<span style="color: rgb(45, 194, 107);">y</span>  
<span style="color: rgb(45, 194, 107);">2048</span>

<span style="color: rgb(45, 194, 107);">interface vlan-interface 1</span>  
<span style="color: rgb(45, 194, 107);">ip address (adresse ip) (mask)</span>  
<span style="color: rgb(45, 194, 107);">undo shutdown</span>

<span style="color: rgb(45, 194, 107);">local-user LOGIN class manage</span>  
<span style="color: rgb(45, 194, 107);"> authorization-attribute user-role network-admin</span>  
<span style="color: rgb(45, 194, 107);"> undo authorization-attribute user-role network-operator</span>  
<span style="color: rgb(45, 194, 107);"> password simple PASSWORD</span>  
<span style="color: rgb(45, 194, 107);"> service-type ssh</span>  
<span style="color: rgb(45, 194, 107);"> state active</span>

<span style="color: rgb(45, 194, 107);">domain system</span>  
<span style="color: rgb(45, 194, 107);">accounting default none</span>  
<span style="color: rgb(45, 194, 107);">authentication default local</span>  
<span style="color: rgb(45, 194, 107);">authorization default local</span>  
<span style="color: rgb(45, 194, 107);">undo authorization-attribute user-profile</span>  
<span style="color: rgb(45, 194, 107);">state active</span>

<span style="color: rgb(45, 194, 107);">user-group system</span>  
<span style="color: rgb(45, 194, 107);">ssh server enable</span>  
<span style="color: rgb(45, 194, 107);">ssh server authentication-retries 3</span>  
<span style="color: rgb(45, 194, 107);">ssh server authentication-timeout 60</span>  
<span style="color: rgb(45, 194, 107);">Undo ssh server compatible-ssh1x</span>  
<span style="color: rgb(45, 194, 107);">undo ssh server port</span>

<span style="color: rgb(45, 194, 107);">undo scp server enable</span>  
<span style="color: rgb(45, 194, 107);">sftp server enable</span>  
<span style="color: rgb(45, 194, 107);">sftp server idle-timeout 5</span>  
<span style="color: rgb(45, 194, 107);">ssh user LOGIN service-type all authentication-type password</span>

<span style="color: rgb(45, 194, 107);">line vty 0 63</span>  
<span style="color: rgb(45, 194, 107);">authentication-mode scheme</span>  
<span style="color: rgb(45, 194, 107);">idle-timeout 5 0</span>  
<span style="color: rgb(45, 194, 107);">protocol inbound ssh</span>

<span style="color: rgb(45, 194, 107);">return</span>

7 – Connecter le PC portable sur un port de l’équipement

8 – Initialiser une session SFTP entre le PC portable (Client) et l’équipement (Serveur)  
Remarque : Si le client SFTP utilisé est WinSCP alors sélectionner Options/Préférences/Solidité et déactiver « Autoriser la reprise/transférer vers un fichier temporaire pour » puis cliquer sur OK

9 – Transférer, via le client SFTP, la version logicielle dans la flash de l’équipement au niveau de la « racine »

10 – Vérifier les versions logicielles contenues dans la flash de l’équipement

<span style="color: rgb(45, 194, 107);">dir flash:/</span>

11 – Autoriser la version logicielle téléchargée à l’emplacement « main »

<span style="color: rgb(45, 194, 107);">boot-loader file flash:/5140ei-CMW710-xxx.ipe slot 1 main</span>  
<span style="color: rgb(45, 194, 107);">Y</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

12 – Redémarrer l’équipement sur la version logicielle téléchargée

<span style="color: rgb(45, 194, 107);">reboot</span>  
<span style="color: rgb(45, 194, 107);">N</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

13 – Vérifier la version logicielle active

<span style="color: rgb(45, 194, 107);">display version</span>

14 – Autoriser la version logicielle téléchargée à l’emplacement « backup »

<span style="color: rgb(45, 194, 107);">boot-loader file boot flash:/5140ei-cmw710-boot-xxx.bin system flash:/5140ei-cmw710-system-xxx.bin slot 1 backup</span>  
<span style="color: rgb(45, 194, 107);">Y</span>

15 – Supprimer les versions logicielles non utilisées contenues dans la flash de l’équipement

<span style="color: rgb(45, 194, 107);">delete flash:/5140ei-cmw710-boot-xxx.bin</span>  
<span style="color: rgb(45, 194, 107);">Y</span>  
<span style="color: rgb(45, 194, 107);">delete flash:/5140ei-cmw710-system-xxx.bin</span>  
<span style="color: rgb(45, 194, 107);">Y</span>