Tuesday , March 19 2024

from Huawei CLI – reset recycle-bin

reset recycle-bin

Sometimes new engineers, not familiar with Huawei devices, complain that there is not enough space in flash to upload a new software by FTP. The reason of it is that files from flash haven’t been deleted permanently from the memory. They use “delete name of file” command to delete files. Actually this command causes that deleted file is moved to recycle bin and “dir” command does not display it in flash, but it still occupies memory of flash. To display all files stored in flash you should use “dir /all” command.

<labnario>dir
Directory of flash:/
1  -rw-     12017319  Jan 19 2012 17:30:51   labnario.bin
2  -rw-     12017553  Aug 12 2008 18:02:39   ar28-vrp340-r0201p20.bin
3  -rw-         9018  Dec 05 2011 16:22:11   config.cfg

31877 KB total ( 7843 KB free)

Look what will happen if we use “delete labnario.bin” command:

<labnario>delete labnario.bin
Delete flash:/labnario.bin?[Y/N]:y
...
%Delete file flash:/labnario.bin...Done.

Read More »

Huawei AR19/29/49 router DHCP configuration

Let’s assume that we have a topology like in the picture:

  1. IP addresses of ETH 0/1 and ETH 0/2 on Router A are 172.16.1.128/25 and 172.16.1.1/25 respectively.
  2. Router B (dhcp client) obtains static IP address, gateway address and DNS server address from DHCP server (router A). A MAC address of interface ETH 0/0 of router B is 0800-6902-01FC.
  3. DHCP server assigns IP addresses to clients in subnet 172.16.1.0/24 subnetted to 172.16.1.1/25 and 172.16.1.128/25.
  4. DNS server address and WINS server address are 172.16.1.10/25 and 172.16.1.200/25 respectively.
  5. For subnet 172.16.1.128/25 configure DNS server address, WINS server address, gateway address and address lease duration for 6 days and 6 hours.
  6. For subnet 172.16.1.1/25 configure DNS server address, gateway address and address lease duration for 10 days.

Read More »

a few basic but useful maintenance commands

To 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

Read More »

too small flash to upload a new software

In my previous post I wrote about upgrade of Huawei S5300 switch. The question is, what to do if flash memory is too small to fit more than one software. As it was mentioned last time, you can format flash from bootrom menu and download a new software using FTP, from bootrom menu. In this post I will show you how to deal with this problem more smoothly. You can come up against this problem in Huawei S3328TP-SI switch, where flash capacity is 15MB. Let’s take it as an example.

<S3328>display version
Huawei Versatile Routing Platform Software
VRP (R) Software, Version 5.30 (S3328 V100R003C00SPC301)
Copyright (C) 2008-2009 Huawei Technologies Co., Ltd.
Quidway S3328TP-SI uptime is 0 day, 0 hour, 4 minutes

As you can see flash capacity is 15MB:

<S3328>dir
Directory of flash:/

   0   -rw-        61  Jan 01 2008 00:22:13   private-data.txt
   1   -rw-       660  Jan 01 2008 00:16:23   vrpcfg.zip
   2   -rw-       396  Jan 01 2008 00:12:06   hostkey
   3   -rw-   7068108  Jan 01 2008 00:20:12   s3328-v100r003c00spc301.cc
   4   -rw-       540  Jan 01 2008 00:12:11   serverkey
   5   -rw-    343712  Jan 01 2008 00:04:49   bootrom330.bin
   6  -rw-        60  Jan 01 2008 00:00:53   $_patchstate_a
   7  -rw-         4  Jan 01 2008 00:01:37   notilogindex.txt

14632 KB total (6268 KB free)

Read More »

upgrade of Huawei S5300 switch

Any time you want to upgrade huawei’s device you have 2 methods to do this. The first of them is to use CLI (command line interface), the second is to use bootrom menu. Using CLI is the most popular method. You can configure FTP server on the device and use your PC as FTP client or install FTP server on your PC and treat the device as FTP client. Anyway, you can use TFTP or serial (slow connection) instead of FTP. Sometimes it is not possible to get CLI because there is a problem with software file. It is damaged or does not exist. In this case we can use bootrom menu to download a new software and upgrade the device. Let’s take S5300 as an example.

Upgrade of Huawei S5300 switch from CLI
Huawei S5300 as FTP server:
#
FTP server enable
#
local-user labnario password simple labnario
local-user labnario privilege level 15
local-user labnario ftp-directory flash:
local-user labnario service-type ftp
#
interface MEth0/0/1
 ip address 192.168.0.20 255.255.255.0
#

Read More »