Mounir ORFI

Yet another network engineer...

Reset Quidway® NetEngine40E/80E to Factory Default Settings

| Comments

Customer asked for the redeployment of some NE40E used as PEs from one region to another. After installation we found out that they were completely locked (password set on all user interfaces even on the console).

We needed to both reset the routers to factory default configurations and remove the passwords at the same time. One possible solution is to first locate the startup configuration file, then rename it to force the router to boot with the default configuration settings.

Step 1: Locate the startup configuration file

Power on the router and quickly press Ctrl+B when prompted to do so, in order to get to the Boot Menu.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
        ****************************************************
        *                                                  *
        *             8090 boot ROM, Ver 380.00             *
        *                                                  *
        ****************************************************

  Copyright 2001-2009 Huawei Tech. Co., Ltd. 
  Creation date: May 31 2011, 11:06:13

  CPU type                 : MPC7447A

Press Ctrl+B to enter Main Menu... 3 2

Password: 

If you are prompted for a password, use 8090 which is the default one unless it was changed too.

Then choose option 5. Set boot file and path followed by 4. Modify the config file to get the startup saved configuration file name.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      Main  Menu(bootload ver: 380.00)

 1. Boot  with  default  mode
 2. Boot  from  CFcard
 3. Enter serial submenu
 4. Enter ethernet submenu
 5. Set boot file and path
 6. Modify boot ROM password
 7. List file in CFcard
 8. Chkdsk CFcard
 9. Set patch mode
10. Set version back signal
11. Reboot

Enter your choice(1-11): 5

      Boot  Files  Submenu

 1. Modify the boot file
 2. Modify the paf file
 3. Modify the license file
 4. Modify the config file
 5. Modify the patch file
 6. Modify the patch states file
 7. Return to main menu

Enter your choice(1-7): 4

 Config file is cfcard:/vrpcfgv3r2.cfg, modify the file name if needed.
 Please input correctly, e.g.: cfcard:/vrpcfg.zip 

Once you have the startup configuration filename (in this case cfcard:/vrpcfg.zip), go back to the main menu.

Step 2: Rename the startup configuration file

In order to rename a file you need to enter the hidden menu using the Ctrl+Z key combination.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
      Hidden Menu

1. Enter to debug environment
2. Erase flash
3. Delete file from CFcard
4. Rename file in CFcard
5. Disable config password
6. Format CFcard
7. Disable Config Password From Slave MPU
8. Return to main menu
9. Disable auto upgrade boot ROM

Enter your choice(1-9): 4

Choose option 4. Rename file in CFcard then 1. Change File(s) name In CFcard

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
      Change File(s) In  CFcard  List Submenu

 1. Change File(s) name In CFcard
 2. Change File(s) name In CFcard2
 3. Return to Up menu

Enter your choice(1-3): 1

Please input the file name you want to rename, e.g.: test.txt 
('*' for display all files in cfcard:)
*
246962464 Oct 16  2010  ne40e80ev6r1c00spc800.cc
   531549 Jan  1 00:54  private-data.txt
47664 Jan  1 00:54  vrpcfgv3r2.cfg
56344 Oct 16  2010  spc800-mpu.pat
 3336 Jan  1 00:06  $_patchstate_reboot
 6471 Oct 16  2010  vrpcfg.zip
16064 Oct 16  2010  paf.txt
  114 Jan 16  2008  patchstate.dat
  684 Jan  1 00:04  rsahostkey.dat
   64 Oct 15  2010  patchnpstate.dat
 8192 Oct 16  2010  ~/
 6906 Oct 16  2010  license.txt
 73308092 Jan 16  2008  ne40e&80ev300r002c06b286.cc
42962 Jan  1 00:01  console_info_record.txt
  1733750 Mar  1  2008  patch.pat
 38788979 Jul 13  2011  patch_v600r001c00spc015.pat
  540 Jan  1 00:04  rsaserverkey.dat
 84211846 Mar  7  2012  patch_v600r001c00spc036.pat
16064 Jan 16  2008  ~/paf.txt
 6906 Jan 16  2008  ~/license.txt
14899 Nov 30  2007  ~/paf.txt.bak

21 files are found!
Please input exact name: vrpcfgv3r2.cfg

Please input new name: vrpcfgv3r2.cfg.bak

File "vrpcfgv3r2.cfg" will be renamed to "vrpcfgv3r2.cfg.bak" !
Are you sure? Yes or No(Y/N)y

Rename successfully!

Step 3: Reboot and save

Finally go back to the Main menu and choose option 11. Reboot, please make sure the MPU you are connected to (via the console cable) will boot as the master board, otherwise you will have to redo the same steps on the other MPU.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
        ****************************************************
        *                                                  *
        *             8090 boot ROM, Ver 380.00             *
        *                                                  *
        ****************************************************

  Copyright 2001-2009 Huawei Tech. Co., Ltd. 
  Creation date: May 31 2011, 11:06:13

  CPU type                 : MPC7447A

Press Ctrl+B to enter Main Menu... 3 2 1 0
Auto-booting...

Booting from CFcard

  Be sure the baudrate be 9600bps!

The start file is cfcard:/ne40e80ev6r1c00spc800.cc 
The config file is cfcard:/vrpcfgv3r2.cfg 
The paf file is cfcard:/ne40e80ev6r1c00spc800.cc 
The license file is cfcard:/ne40e80ev6r1c00spc800.cc 

...

Press ENTER to get started....
<HUAWEI>
<HUAWEI>disp cu
#
 sysname HUAWEI
#
snmp-agent trap type base-trap
#
diffserv domain default
diffserv domain qinq
diffserv domain 5p3d
#
aaa
 authentication-scheme default
 #
 authorization-scheme default
 #
 accounting-scheme default
 #
 domain default
 #
#
interface Aux0/0/1
 link-protocol ppp
 undo shutdown
#
interface GigabitEthernet0/0/0
 speed auto
 duplex auto
 undo shutdown
#
interface NULL0
#
 snmp-agent
 snmp-agent local-engineid 000007EBAFFFFFFF0000BB92
 snmp-agent sys-info version v3
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
user-interface vty 16 20
#
return
<HUAWEI> 
<HUAWEI>

Once the router has completely booted up, save the current configuration.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<HUAWEI>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name(*.cfg,*.zip)[vrpcfg.zip]:
Now saving the current configuration to the slot 9 ..
Save the configuration successfully.
Now saving the current configuration to the slot 10 ..
Save the configuration successfully.
<HUAWEI>
<HUAWEI>
<HUAWEI>disp startup
MainBoard: 
  Configured startup system software:        cfcard:/ne40e80ev6r1c00spc800.cc
  Startup system software:                   cfcard:/ne40e80ev6r1c00spc800.cc
  Next startup system software:              cfcard:/ne40e80ev6r1c00spc800.cc
  Startup saved-configuration file:          NULL
  Next startup saved-configuration file:     cfcard:/vrpcfg.cfg
  Startup paf file:                          default
  Next startup paf file:                     default
  Startup license file:                      default
  Next startup license file:                 default
  Startup patch package:                     cfcard:/patch_v600r001c00spc036.pat
  Next startup patch package:                cfcard:/patch_v600r001c00spc036.pat
SlaveBoard: 
  Configured startup system software:        cfcard:/ne40e80ev6r1c00spc800.cc
  Startup system software:                   cfcard:/ne40e80ev6r1c00spc800.cc
  Next startup system software:              cfcard:/ne40e80ev6r1c00spc800.cc
  Startup saved-configuration file:          NULL
  Next startup saved-configuration file:     cfcard:/vrpcfg.cfg
  Startup paf file:                          default
  Next startup paf file:                     default
  Startup license file:                      default
  Next startup license file:                 default
  Startup patch package:                     cfcard:/patch_v600r001c00spc036.pat
  Next startup patch package:                cfcard:/patch_v600r001c00spc036.pat
<HUAWEI>

Alternatives

  • Take out the CFcard inside the MPU, then use a CFcard reader to erase or rename the startup configuration file.
  • If you have access to the CLI then you could simply use the reset saved-configuration followed by a reboot.
  • Enter the Hidden Menu then choose 5. Disable config password option if you want to remove the passwords but keep the configuration file as is.
  • Kick it until all LEDs start blinking in red, then wait for few seconds

Comments