Friday , June 21 2024
Home / Command Line (page 3)

Command Line

from Huawei CLI – lock and send

Today a few words about 2 simple but useful commands: lock and send.

LOCK – prevents unauthorized users from operating on the current terminal interface

SEND – enables the system to transfer messages between user interfaces

Let’s look how they work on Huawei S5700 switch.

Enter Password:
Confirm Password:

 Info: The terminal is locked. 

Enter Password:


Read More »

from Huawei CLI – virtual-cable-test

My friend found an interesting command while he was searching Huawei S3700 documentation. It looks like it is possible to check (by command) a state of physical cable, connected to electrical Ethernet or GigabitEthernet interfaces. I have never used it but as soon as I get such switch I promise to test it.

Short description from Hedex:

  • When the checked cable is in normal state, the total length of the cable is displayed in the output information.
  • If the cable is abnormal, the distance between the interface and the faulty point is displayed.
[Quidway] interface Ethernet 0/0/1
[Quidway-Ethernet0/0/1] virtual-cable-test
Warning: The command will stop service for a while, Continue [Y/N]?y
Pair A length: 189meter(s)
Pair B length: 189meter(s)
Pair C length: 189meter(s)
Pair D length: 189meter(s)
Pair A state: Ok
Pair B state: Ok
Pair C state: Ok
Pair D state: Ok

Read More »

from Huawei CLI – capture-packet …

Network administrators often need to capture packets, on switches or routers, to locate faults. Some devices do not support remote mirroring, that’s why administrators have to go on-site to capture packets, using local mirroring.

We have a useful command (capture-packet …), on some devices, to catch packets remotely. When taking S5700 switch into consideration, we can capture all packets from an interface (port mirroring) or packets matching specified rules (traffic mirroring). These capture packets can be sent to FTP or TFTP servers and displayed on terminal screen. CX600 and NE40E routers with V6R3 software version can send capture packets to local CF card (name.cap file).

Let’s look at this command:

[Huawei]capture-packet ?
  acl        Acl
  cpu        Packet send to cpu
  interface  Ingress Interface

As you can see you can use port or traffic mirroring. You can also catch packets sent to CPU.

[Huawei]capture-packet interface GigabitEthernet 0/0/1 destination ?
  ftp-server   Send to ftp server
  terminal     Output terminal
  tftp-server  Send to tftp server

Read More »

from Huawei CLI – debugging …

To enable system debugging functions on Huawei’s device:

<labnario>debugging ?
  acl4                    ACL4 module
  acl6                    ACL6 module
  anti-attack             Specify anti-attack configurations
  application-apperceive  Set application-apperceive information
  arp                     ARP module
  arp-ping                ARP-ping
  arp-proxy               Arp proxy debugging functions
  atm                     ATM module
  bfd                     BFD module
  bgp                     BGP protocol
  bridge                  Bridge
  ce-ping                 Enable ce-ping debugging
  cfm                     CFM module
  cluster                 Cluster module
<labnario>debugging ip icmp

To send debugging information to terminal:

<labnario>terminal monitor
Info: Current terminal monitor is on.
<labnario>terminal debugging
Info: Current terminal debugging is on.

To display which debugging functions are enabled:

<labnario>display debugging
IP icmp debugging is on

Read More »

from Huawei CLI – schedule reboot

schedule reboot { at time | delay interval }

When can you use this command?

You can always use it 🙂

Seriously telling, you can use it in cases, when there is probability that your work and a new configuration can cause a device to be unavailable. Sometimes it is necessary to change a configuration of a device, which is not accessible by console, but only by remote connection. Specially if you are changing IP addresses or doing some experiments with access methods of the device. Even if you tested everything in your lab and you are sure that everything will go smoothly, it is better to remember about this function. People make mistakes. After you configured schedule reboot function, you are sure that all your mistakes can be repair by reboot of the device, with the restriction that the new configuration is not saved. Of course I am talking about some small or less important devices. For more important or crucial devices it is recommended to use console connection (console server).

Remember to turn this function off when you are sure that everything works properly!

Read More »