Friday , September 20 2024

from Huawei CLI – display this

display this

Very useful and very often used command on Huawei’s devices. You can use it in any view. Any time you configure something, you can use it to check what you have configured. If you set parameters, that are the same with the default ones, these parameters will not be displayed. Anyway “display current-configuration” does not also show the default parameters.

Example 1 (interface view):

[NE-GigabitEthernet1/0/1]display this
#
interface GigabitEthernet1/0/1
 description test
 undo shutdown
 ip address 10.1.1.1 255.255.255.252
 isis enable 1
 isis circuit-type p2p
 isis circuit-level level-2
 isis cost 100
 isis bfd enable
 mpls
 mpls te
 mpls rsvp-te
 mpls rsvp-te hello
#
return

Example 2 (isis view):

[NE-isis-1]display this
#
isis 1
 graceful-restart
 is-level level-2
 cost-style wide
 flash-flood level-2
 network-entity 49.0310.0100.0125.5025.00
 is-name labnario
 traffic-eng level-2
 log-peer-change
 set-overload on-startup
#
return

Example 3 (vpn-instance view):

[NE-vpn-instance-labnario]display this
#
ip vpn-instance labnario
 description test
 route-distinguisher 10.1.255.24:100
 vpn-target 10.1.255.24:100 export-extcommunity
 vpn-target 10.1.255.24:100 import-extcommunity
#
return

Example 4 (aaa view):

[NE-aaa]display this
#
aaa
 local-user labnario password cipher &EU15O"Q3/;Q=^Q`MAF4
 local-user labnario service-type ftp terminal telnet ssh
 local-user labnario level 15
 local-user labnario ftp-directory cfcard:/
 authentication-scheme default
  authentication-mode  local  radius
 authentication-scheme default0
 authentication-scheme default1
 #
 authorization-scheme default
 #
 accounting-scheme default
 accounting-scheme default0
 accounting-scheme default1
 #
 domain default
 domain default0
 domain default1
 #
#
return

Example 5 (ACL view):

[NE-acl-adv-3003]display this
#
acl number 3003
 rule 10 permit ip destination 172.10.1.41 0
#
return

Read More »

OSPF network types

In the era of ethernet transport technology we cannot forget about older, but still widely used ATM and FR technologies. Taking OSPF into consideration, it classifies networks based on link layers protocols. That’s why we have such terms like:

  • broadcast
  • non-broadcast multiple access NBMA
  • point-to-mulitpoint P2MP
  • point-to-point P2P.

Broadcast

Ethernet technology is a typical example of broadcast network where a transmitted packet is multiplied by ethernet switch and copies of this packet are transmitted to all end points. In this scenario OSPF Hello, LSU (link state update) and LSAck (link state acknowledgement) packets are transmitted in multicast mode. DD (database description) packets and LSR (link state request) packets are transmitted in unicast mode. OSPF routers in broadcast network elect designated router (DR) and backup designated router (BDR). Only DR and BDR form adjacencies with all non-designated OSFP routers. 224.0.0.5 and 224.0.0.6 are multicast IP addresses reserved for all OSFP routers and OSFP designated routers respectively.

NBMA

ATM and Frame Relay are typical examples of NBMA networks. NBMA simulates broadcast network. It must be full meshed and every router in the segment must be configured with IP address of each of its neighbours. In NBMA networks all OSPF packets are transmitted in unicast mode. DR and BDR routers are elected as well.

Point-to-multipoint

The common practice is to change non-full meshed NBMA network to a P2MP network. Non-full meshed FR network is P2MP network example.

A P2MP network, unlike full meshed NBMA networks, is a collection of point-to-point networks. As this is P2P, DR and BDR are not needed. OSPF network type must be manually configured because the network is not fully meshed. Inverse ARP should be configured on an interface. Hello packets are transmitted in mulitcast mode through the mulicast IP address 224.0.0.5. Other OSPF packets are transmitted in unicast mode.

Point-to-point

In this type of networks, OSPF protocol packets, such as Hello, DD, LSR, LSU and LSAck packets, are transmitted in multicast mode using 224.0.0.5 multicast address. As this is a link between exactly two points, each packet sent from one router have only one recipient on the local link.

Command to change network type on Huawei router for a specific interface:

[labnario-GigabitEthernet1/0/0]ospf network-type { broadcast | nbma | p2mp | p2p }

Command to set IP addresses for adjacent routers on an NBMA network:

[labnario] ospf 100
[labnario-ospf-100] peer 1.1.1.1

Read More »

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 »