Tuesday , July 1 2025

file system of Huawei NE40E

How to manage storage devices, directories and files on Huawei’s equipment?

I will try to introduce the file system based on NE40E routers.

NE40E, as most of carrier class Huawei’s devices, has two MPU boards. Each board is equipped with two CFcards. The first CFcard, inside the board, is used for storing software and configuration’s files. The second one, at the front panel of the board, stores log files. Some of Huawei’s devices use flash memory to store all necessary files.

The file system manages files and directories in the storage device by creating, deleting, modifying, renaming files or directories and displaying contents of the files.

Let’s do an example:

  1. Create labnario and huawei directories in CFcard.
  2. Copy log.log file from CFcard2 to labnario directory.
  3. Display this file.
  4. Rename this file with old_log.log.
  5. Compress it.
  6. Move old_log.log.zip file to huawei directory of the same CFcard.
  7. Delete this file from huawei directory.
  8. Restore the deleted file.
  9. Delete this file permanently.
  10. Delete huawei directory.

Display files stored in CFcard:

<NE40E>dir
Directory of cfcard:/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-              0  Aug 08 2011 14:47:00   snmpnotilog.txt
    1  -rw-    247,575,224  Aug 08 2011 14:55:58   ne40e80ev6r1c00spc900.cc
    2  -rw-     37,289,817  Aug 08 2011 14:57:20   patch-v6r1spc020.pat
    3  -rw-         14,725  Sep 16 2011 11:02:28   license.txt
    4  -rw-         86,875  Sep 16 2011 11:03:10   paf.txt
    5  -rw-              0  Oct 18 2011 14:57:34   vrpcfg.cfg

Create two directories:

<NE40E>mkdir cfcard:/labnario
Info: Create directory cfcard:/labnario......Done.
<NE40E>mkdir cfcard:/huawei
Info: Create directory cfcard:/huawei......Done.

<NE40E>dir
Directory of cfcard:/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  drw-              -  Apr 30 2012 14:48:18   labnario
    1  drw-              -  Apr 30 2012 14:51:08   huawei
    2  -rw-              0  Aug 08 2011 14:47:00   snmpnotilog.txt
    3  -rw-    247,575,224  Aug 08 2011 14:55:58   ne40e80ev6r1c00spc900.cc
    4  -rw-     37,289,817  Aug 08 2011 14:57:20   patch-v6r1spc020.pat
    5  -rw-         14,725  Sep 16 2011 11:02:28   license.txt
    6  -rw-         86,875  Sep 16 2011 11:03:10   paf.txt
    7  -rw-              0  Oct 18 2011 14:57:34   vrpcfg.cfg

Copy log.log file from CFcard2 to labnario directory of CFcard:

<NE40E>copy cfcard2:/log/log.log cfcard:/labnario
Copy cfcard2:/log/log.log to cfcard:/labnario/log.log?[Y/N]:y
\
Info: Copied file cfcard2:/log/log.log to cfcard:/labnario/log.log...Done.
<NE40E>cd labnario
<NE40E>pwd
cfcard:/labnario

<NE40E>dir
Directory of cfcard:/labnario/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-        588,992  Apr 30 2012 14:46:50   log.log

1,022,848 KB total (414,016 KB free)

Rename this file:

<NE40E>rename cfcard:/labnario/log.log cfcard:/labnario/old_log.log
Rename cfcard:/labnario/log.log to cfcard:/labnario/old_log.log ?[Y/N]:y
Info: Rename file cfcard:/labnario/log.log to cfcard:/labnario/old_log.log ......Done.

<NE40E>dir
Directory of cfcard:/labnario/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-        588,992  Apr 30 2012 14:46:50   old_log.log

1,022,848 KB total (414,016 KB free)

Display old_log.log file:

<NE40E>more old_log.log 

################################################################
#Automatic record log end,current health information as follows:
Slot                    CPU Usage     Memory Usage (Used/Total)
---------------------------------------------------------------
9       MPU(System Master) 11%           19%  361MB/1877MB
1       LPU                12%           40%  130MB/319MB
2       LPU                11%           45%  145MB/319MB
3       LPU                11%           45%  145MB/319MB
10      MPU                 7%           17%  320MB/1877MB
#DateTime Stamp: 2012-01-25 10:15:27.100
################################################################

Jan 25 2012 10:25:05 NE40E SRM_BASE/1/ENTITYINSERT: OID 1.3.6.1.4.1.2011.5.25.129.2.1.2 Physical entity is inserted. (EntityPhysicalIndex=16842767, BaseTrapSeverity=4, BaseTrapProbableCause=65541, BaseTrapEventType=5, EntPhysicalContainedIn=16842757, EntPhysicalName="GigabitEthernet1/0/9")
Jan 25 2012 10:25:06 NE40E %%01PHY/4/PHY_SFP_XFP_OK(l)[2082]:Slot=1;GigabitEthernet1/0/9 SFP/XFP is present.
Jan 25 2012 10:27:14 NE40E %%01SRM/2/NODEFAULT(l)[2083]:Slot=1;PIC0 of LPU1 is failed, perhaps Low Rx Pow ALM of SFP9 ALARM is abnormal. (Reason="EAGF0 ESFP RX power low alarm, Current Rxpower is -40.00dBm. ")
Jan 25 2012 10:29:55 NE40E %%01SRM/2/NODERESUME(l)[2084]:Slot=2;OTHER of LPU2: branch 2 of 48vPOWER resumed.
Jan 25 2012 10:29:56 NE40E %%01SRM/2/NODEFAULT(l)[2085]:Slot=2;OTHER of LPU2 is failed, perhaps branch 2 of 48vPOWER is abnormal. (Reason="second branch abnormal")
Jan 25 2012 10:29:57 NE40E %%01SRM/2/NODERESUME(l)[2086]:Slot=2;OTHER of LPU2: branch 2 of 48vPOWER resumed.

Compress this file:

<NE40E>zip cfcard:/labnario/old_log.log cfcard:/labnario/old_log.log.zip
Compress cfcard:/labnario/old_log.log  to cfcard:/labnario/old_log.log.zip?[Y/N]:y
%Compressed file cfcard:/labnario/old_log.log cfcard:/labnario/old_log.log.zip.

<NE40E>dir
Directory of cfcard:/labnario/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-        588,992  Apr 30 2012 14:46:50   old_log.log
    1  -rw-         47,918  Apr 30 2012 14:48:20   old_log.log.zip

1,022,848 KB total (413,968 KB free)

Move the zipped file to huawei directory:

<NE40E>move cfcard:/labnario/old_log.log.zip cfcard:/huawei
Move cfcard:/labnario/old_log.log.zip to cfcard:/huawei/old_log.log.zip ?[Y/N]:y
%Moved file cfcard:/labnario/old_log.log.zip to cfcard:/huawei/old_log.log.zip.

<NE40E>dir
Directory of cfcard:/labnario/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-        588,992  Apr 30 2012 14:46:50   old_log.log

1,022,848 KB total (413,952 KB free)

<NE40E>cd cfcard:/huawei
<NE40E>dir
Directory of cfcard:/huawei/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-         47,918  Apr 30 2012 14:48:20   old_log.log.zip

1,022,848 KB total (413,952 KB free)

Delete this file from huawei directory (actually move to recycle bin):

<NE40E>delete old_log.log.zip 
Delete cfcard:/huawei/old_log.log.zip?[Y/N]:y
Info: Deleting file cfcard:/huawei/old_log.log.zip...succeeded.

<NE40E>dir /all
Directory of *

    0  -rw-         47,918  Apr 30 2012 14:48:18  [old_log.log.zip]

1,022,848 KB total (413,936 KB free)

<NE40E>dir
Info: File can't be found in the directory.
1,022,848 KB total (413,936 KB free)

Restore the deleted file from recycle bin:

<NE40E>undelete old_log.log.zip 
Undelete cfcard:/huawei/old_log.log.zip?[Y/N]:y
%Undeleted file cfcard:/huawei/old_log.log.zip.

<NE40E>dir
Directory of cfcard:/huawei/

  Idx  Attr     Size(Byte)  Date        Time(LMT)  FileName 
    0  -rw-         47,918  Apr 30 2012 14:48:20   old_log.log.zip

1,022,848 KB total (413,936 KB free)

Delete this file permanently:

<NE40E>delete /unreserved old_log.log.zip 
Warning: The contents of file cfcard:/huawei/old_log.log.zip cannot be recycled. Continue? [Y/N]:y
Info: Deleting file cfcard:/huawei/old_log.log.zip...succeeded.

How to make recycle-bin empty go to “reset recycle-bin”.

Delete huawei directory:

<NE40E>cd cfcard:
<NE40E>rmdir cfcard:/huawei
Remove directory cfcard:/huawei?[Y/N]:y
%Removing directory cfcard:/huawei...Done!

Read More »

from Huawei CLI – reset saved-configuration

reset saved-configuration

If you need to reconfigure a Huawei device and do not want to delete its configuration line by line, it is the fastest way to restore the device to the default configuration. Reset saved-configuration command does not delete the existing configuration file in storage device. It is required to restart the device to activate changes. Before reboot, the device compares the configuration file to be loaded at the next startup and existing file to be deleted. Finally the device:

  • loads the default configuration if both files are the same
  • deletes the configuration file in use if they are different
  • displays a message indicating that the configuration file does not exist if the configuration file to be deleted does not exist
<labnario> reset saved-configuration
The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]: y

Which configuration file is set as the “next startup saved-configuration file” you can check by the following command:

<labnario> display startup
MainBoard:
  Configured startup system software:        cfcard:/v600r002c03spc100.cc
  Startup system software:                   cfcard:/v600r002c03spc100.cc
  Next startup system software:              cfcard:/v600r002c03spc100.cc
  Startup saved-configuration file:          cfcard:/labnario.cfg
  Next startup saved-configuration file:     cfcard:/labnario.cfg
  Startup paf file:                          cfcard:/paf.txt
  Next startup paf file:                     cfcard:/paf.txt
  Startup license file:                      cfcard:/license.txt
  Next startup license file:                 cfcard:/license.txt
  Startup patch package:                     cfcard:/patch.pat
  Next startup patch package:                cfcard:/patch.pat
SlaveBoard:
  Configured startup system software:        cfcard:/v600r002c03spc100.cc
  Startup system software:                   cfcard:/v600r002c03spc100.cc
  Next startup system software:              cfcard:/v600r002c03spc100.cc
  Startup saved-configuration file:          cfcard:/labnario.cfg
  Next startup saved-configuration file:     cfcard:/labnario.cfg
  Startup paf file:                          cfcard:/paf.txt
  Next startup paf file:                     cfcard:/paf.txt
  Startup license file:                      cfcard:/license.txt
  Next startup license file:                 cfcard:/license.txt
  Startup patch package:                     cfcard:/patch.pat
  Next startup patch package:                cfcard:/patch.pat

Read More »

disabling Huawei S3300 notification record

In this post I will show you how to disable a notification record which appears always after you type a configuration command. This notification causes your frustration when you want to configure anything on this switch and suddenly you see the following record:

[labnario]interface GigabitEthernet 0/0/1
[labnario-GigabitEthernet0/0/1]
Jan  1 2008 00:24:47+01:00 labnario DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 24, the change loop count is 0, and the maximum number of records is 4095.

You have such situation on Huawei S2300, S3300 and S5300 switches if you are logged by the console.

How to cope with it?

You have two ways to do this. The first is to disable it temporarily by the following commands:

<labnario>undo terminal monitor

or

<labnario>undo terminal trapping

The only disadvantage of the temporary solution is that after you are logged by the console once again this notification still exists. At the same time you block all notifications in the console view.

The second solution is to disable this notification in info-center of the switch:

[labnario]info-center source DS channel console trap state off level warning

How to find appropriate parameters for this command?

You can find all needed information from this notification:

Jan  1 2008 00:24:47+01:00 labnario DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 24, the change loop count is 0, and the maximum number of records is 4095.

Source: DS
Level: 4 (warning)
Channel: console.

Read More »

BFD process-interface-status vs. process-pst

BFD process-interface-status and process-pst are applicable only for single-hop BFD. Let’s assume that we have two routers directly connected through interface GE1/0/0.

process-interface-status

By associating BFD session status with interface status we can trigger fast route convergence. We can use this function only for BFD session that uses a default multicast IP address to detect the single-hop link. We can use association between BFD session status and interface status in the case, when transport devices exist on the link between the routers. As the actual physical path is segmented by transport devices, the routers on both ends need a long time to detect a fault that occurred on the link. The change of BFD status affects the protocol status of the interface and thus fast convergence is triggered. When the BFD session becomes DOWN, the correspondence interface status also goes to BFD_DOWN state, causing that this direct route is deleted from the routing table but the router can still forward BFD packets.

[Labnario] bfd
[Labnario-bfd] quit
[Labnario] bfd test bind peer-ip default-ip interface gigabitethernet 1/0/0
[Labnario-bfd-session-test] discriminator local 1
[Labnario-bfd-session-test] discriminator remote 2
[Labnario-bfd-session-test] process-interface-status
[Labnario-bfd-session-test] commit

Remember that BFD should be configured symmetrically on both ends of the link.

[Labnario] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384     (One Hop) State : Up     Name : test
--------------------------------------------------------------------------------
Local Discriminator     :1         Remote Discriminator     :2
Session Detect Mode     : Asynchronous Mode Without Echo Function
BFD Bind Type           : Interface(GigabitEthernet1/0/0)
Bind Session Type       : Static
Bind Peer Ip Address    : 224.0.0.184
NextHop Ip Address      : 224.0.0.184
Bind Interface          : GigabitEthernet1/0/0
FSM Board Id            : 3                   TOS-EXP      : 7
Min Tx Interval (ms)    : 10      Min Rx Interval (ms)     : 10
Actual Tx Interval (ms) : 10   Actual Rx Interval (ms)     : 10
Local Detect Multi      : 3        Detect Interval (ms)    : 30
Echo Passive            : Disable           Acl Number     : --
Destination Port        : 3784                     TTL     :255
Proc interface status   : Enable            Process PST    : Disable
WTR Interval (ms)       : 300000
Active Multi            : 3
Last Local Diagnostic   : No Diagnostic
Bind Application        :IFNET
Session TX TmrID        : --       Session Detect TmrID    : --
Session Init TmrID      : --          Session WTR TmrID    : --
PDT Index               : FSM-5000000|RCV-0|IF-0|TOKEN-0
Session Description     : --
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0

Look what will happen if we shutdown interface GE1/0/0:

[Labnario] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384     (One Hop) State : Down     Name : test
--------------------------------------------------------------------------------
Local Discriminator     :1         Remote Discriminator     :2
Session Detect Mode     : Asynchronous Mode Without Echo Function
BFD Bind Type           : Interface(GigabitEthernet1/0/0)
Bind Session Type       : Static
Bind Peer Ip Address    : 224.0.0.184
NextHop Ip Address      : 224.0.0.184
Bind Interface          : GigabitEthernet1/0/0
FSM Board Id            : 3                   TOS-EXP      : 7
Min Tx Interval (ms)    : 10      Min Rx Interval (ms)     : 10
Actual Tx Interval (ms) : 10   Actual Rx Interval (ms)     : 10
Local Detect Multi      : 3        Detect Interval (ms)    : 30
Echo Passive            : Disable           Acl Number     : --
Destination Port        : 3784                     TTL     :255
Proc interface status   : Enable            Process PST    : Disable
WTR Interval (ms)       : 300000
Active Multi            : 3
Last Local Diagnostic   : No Diagnostic
Bind Application        :IFNET
Session TX TmrID        : --       Session Detect TmrID    : --
Session Init TmrID      : --          Session WTR TmrID    : --
PDT Index               : FSM-5000000|RCV-0|IF-0|TOKEN-0
Session Description     : --
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0

Display interface command shows that line protocol state for GE1/0/0 is “BFD status down”:

[Labnario] display interface gigabitethernet 1/0/0
GigabitEthernet1/0/0 current state : UP
Line protocol current state : UP(BFD status down)

You can also associate BFD status with subinterface status by adding the following command:

process-interface-status sub-if

process-pst

As it was mentioned earlier in this post process-pst function is only applicable to single-hop BFD session. BFD can modify Port State Table (PST) when it detects that interface has a fault. It detects that interface is DOWN and modifies the corresponding entry in the PST. Through the PST, upper application protocols can know the BFD detection result. LDP FRR and IP FRR are examples of such protocols that need to know the BFD detection result through PST.

Use the following command in BFD view to permit PST to be modified:

process-pst

[Labnario] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384     (One Hop) State : Up     Name : test
--------------------------------------------------------------------------------
Local Discriminator     :1         Remote Discriminator     :2
Session Detect Mode     : Asynchronous Mode Without Echo Function
BFD Bind Type           : Interface(GigabitEthernet1/0/0)
Bind Session Type       : Static
Bind Peer Ip Address    : 224.0.0.184
NextHop Ip Address      : 224.0.0.184
Bind Interface          : GigabitEthernet1/0/0
FSM Board Id            : 3                   TOS-EXP      : 7
Min Tx Interval (ms)    : 10      Min Rx Interval (ms)     : 10
Actual Tx Interval (ms) : 10   Actual Rx Interval (ms)     : 10
Local Detect Multi      : 3        Detect Interval (ms)    : 30
Echo Passive            : Disable           Acl Number     : --
Destination Port        : 3784                     TTL     :255
Proc interface status   : Disable        Process PST    : Enable
WTR Interval (ms)       : 300000
Active Multi            : 3
Last Local Diagnostic   : No Diagnostic
Bind Application        :IFNET
Session TX TmrID        : --       Session Detect TmrID    : --
Session Init TmrID      : --          Session WTR TmrID    : --
PDT Index               : FSM-5000000|RCV-0|IF-0|TOKEN-0
Session Description     : --
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0

Read More »

Huawei cheat sheet – Huawei CLI

I have been describing Huawei datacom devices on my blog since July 2011. I started with some basic information about Huawei CLI, access methods and upgrade procedures. Then I showed you more advanced topics like PBR, DHCP etc. I am pleasantly surprised that this blog is visited by people from all continents, even from countries I have never heard about. As this blog is getting more and more popular I will do my best to publish more interesting posts.

As we went through a some stage, I have decided to prepare a cheat sheet describing Huawei CLI. You can download it as PDF, print and keep it :). I hope it will be useful for you.

Read More »