Thursday , April 25 2024
Home / Tag Archives: Huawei CLI (page 6)

Tag Archives: Huawei CLI

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 »

GRE on Huawei routers

Generic Routing Encapsulation (GRE) is introduced to encapsulate packets. Then these packets can be transmitted over an IPv4 network. GRE provides a mechanism to encapsulate packets of one protocol into packets of another protocol. This allows packets to be transmitted over heterogeneous networks. GRE also provides tunnels to transparently transmit VPN packets. When a device receives a packet that needs to be encapsulated and routed, it adds a GRE header to the packet and encapsulates it into another protocol such as IP. The packet is then forwarded by the IP protocol.

Let’s try to configure GRE tunnel between labnario_1 and labnario_3. All packets sent from PC_1 to PC_2, and vice versa, will be transmitted through the GRE tunnel.

Assure communication between routers in the network. It is omitted here.

Read More »

DHCP Relay Agent configuration in Huawei CLI

When PCs are in a different subnet than a DHCP server installed, DHCP Relay Agent can be used to forward DHCP requests from PCs to DHCP server. How to configure DHCP Relay Agent using Huawei CLI?

Let’s assume that we have the following topology:

We want our PC to acquire its IP address from the DHCP server configured on the labnarioR1 router. To do so, labnarioR2 should be configured as a DHCP Relay Agent to forward DHCP Requests and Offers between server and clients.

First, DHCP server should be configured. LabnarioR1 router will be configured to offer DHCP service for PC.

<labnarioR1>system-view 
Enter system view, return user view with Ctrl+Z.
[labnarioR1] dhcp enable
[labnarioR1] ip pool 1
[labnarioR1-ip-pool-1] gateway-list 172.16.1.1
[labnarioR1-ip-pool-1] network 172.16.1.0 mask 255.255.255.0
[labnarioR1-ip-pool-1] dns-list 150.100.15.1 150.100.15.2
[labnarioR1-ip-pool-1] domain-name labnario.com
[labnarioR1-ip-pool-1] quit
[labnarioR1]interface Ethernet0/0/0
[labnarioR1-Ethernet0/0/0]dhcp select global

Read More »

Huawei’s equivalent of Cisco’s ‘logging synchronous’

If a router wants you to know something, it wants you to know right now!

Let’s look what will happen if you are entering a long command and the device wants you to be informed about a link’s failure:

[Huawei-acl-adv-3000]rule 10 permit ip vpn-instance vpn_labnario source 1.1.1.1 0.0.0.255 destination 1.1.1.2
Jan 15 2013 11:04:18-08:00 Huawei %%01PHY/1/PHY(l)[5]:    GigabitEthernet0/0/0:
change status to down
Jan 15 2013 11:04:18-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[6]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the DOWN state.
^
Error:Incomplete command found at '^' position.

When you click ‘Enter’ you will have to write the command once again. It is frustrating for all network administrators.

Unfortunately we cannot change it, like on Cisco’s devices, by ‘logging synchronous‘ command.

Read More »

how to check the default configuration of switch’s interface

When taking into consideration that default settings are invisible in a configuration file, it is a good information that Huawei’s S3700/S5700 switches have such possibility to display default settings for ethernet interfaces. The ‘display this include-default’ command displays the effective configurations in the current view, including the unchanged default configurations.

[labnario-Ethernet0/0/1]display this include-default 
#
interface Ethernet0/0/1
 portswitch
 undo shutdown
 enable snmp trap updown
 undo set flow-stat interval
 undo qinq vlan-translation enable
 undo mac-address learning disable
 port priority 0
 port link-type hybrid
 port hybrid pvid vlan 1
 port hybrid untagged vlan 1
 qinq protocol 8100
 undo loopback-detect enable
 stp enable
 undo stp config-digest-snoop
 undo stp no-agreement-check
 undo stp root-protection
 undo stp loop-protection
 stp transmit-limit 147
 stp point-to-point auto
 stp compliance auto

Read More »