a few basic but useful maintenance commands

Huawei router NE40E-X16To make it easy to maintain Huawei’s device it is recommended to configure proper time. You can do it manually or configure NTP protocol to force the device to use reference time from external servers. I will also show you how to configure header for login information and how to execute the specified batch file.

Setting of time zone:

clock timezone time-zone-name { add | minus } offset

Let’s take Poland time zone as an example.

<NE40E>clock timezone labnario add 1

Setting of daylight-saving-time:

clock daylight-saving-time time-zone-name repeating start-time { { { first | second | third | fourth | last } weekday month } | start-date } end-time { { { first | second | third | fourth | last } weekday month } | end-date } offset

Using the “clock daylight-saving-time” command, you can configure the name, start time and end time of the daylight saving time. Taking Poland as an exapmple we add 1 hour during summer time:

<NE40E>clock daylight-saving-time labnario repeating 02:00 last Sun Mar 03:00 last Sun Oct 01:00

Setting of actual time:

<NE40E>clock datetime 18:00 2011-11-03

You can display clock information using “display clock” command.

NTP external servers:

If you want to use external NTP servers, for time synchronization, you can configure them in the following way:

ntp-service unicast-server x.x.x.x source-interface interface name
ntp-service unicast-server y.y.y.y source-interface interface name

You can display status of NTP using “display ntp-service status” command.

I only showed you basic NTP configuration. More details you can find in specific product documentation.

Header login configuration:

You can configure header login information in the 2 ways:

As a text:

[NE40E]header login information "
Info:The banner text supports 220 characters max, including the start and the end character.If you want to enter more than this, use banner file instead.
Input banner text, and quit with the character '"':
****************************************

Authorised access only
This system is the property of LABNARIO
Disconnect IMMEDIATELY if you are not an authorised user!

****************************************
"
[NE40E]

Using a file stored in CF card:

[NE40E]header login file labnario.txt

execute name.bat

Sometimes, instead of putting many commands in CLI, it is easier and faster to use batch file. You can create such batch (suffixed with “.bat”) file with a set of commands inside and then upload it to CF card by FTP. Then you can use “execute name.bat” command to start the file.

Advertisements

6 thoughts on “a few basic but useful maintenance commands

  1. mschedrin

    Why in the world Huawei developers decided to make configuration of time available only from user-veiw?

    Reply
  2. labnario Post author

    I guess you are afraid that from user-view everyone can change clock settings, right? You can assign command privilege level for each user to avoid such situation. I do not remember and cannot check now in which privilege level clock command is available, for sure in Level 0 there is no such command. On the other hand in huawei devices there is no “enable” command like in cisco. We cannot set password for system-view. What you can configure on huawei devices depends on what privilege you have. Anyway I will ask what is a reason that we can set clock in user-view.

    Reply
  3. mschedrin

    Thank you. That is not a big deal for me, I am just wondering if there is any logic that I cannot see. And if you also cannot see that logic… then may be it does not exist :)

    Reply
  4. labnario Post author

    I think it does not matter if this clock configuration is in user-view or system-view. Each user has his own privilege and we can decide which commands are available for each user. If you do not want the user to have access to all configuration commands it is enough to set low privilege level for him. The structure of VRP is different than cisco IOS. We have user-view and system-view but system-view is not protected by password. From system-view you can configure everything what you want. We do not have any equivalent for privilege level in IOS (enable). To sum up set a proper privilege level for each user to be sure that not all commands are available for everyone.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s