📜 ⬆️ ⬇️

HUAWEI network equipment configuration (switching, static routing)

HUAWEI is one of the largest Chinese telecommunications companies. Founded in 1988.

HUAWEI has recently entered the Russian enterprise network equipment market. Given the trend of total savings, our company is very acutely faced with the question of selecting a worthy replacement for Cisco equipment.
In this article I will try to consider the basic aspects of setting up the switching and routing services of HUAWEI equipment using the example of a Quidway 5300 series switch.

Global teams, modes of operation, similarities and differences with CISCO CLI.


HUAWEI hardware built on the basis of the VRP operating system has a cisco-like command line interface. The principles remain the same, only the syntax changes.
In the CLI of the HUAWEI hardware, there are 2 command interface modes:
  1. system-view is an analogue of the tsiskov configuration mode conf t. In this mode, the command line prompt looks like [Switch].
  2. user-view is an analogue of ciskov's unprivileged mode. The invitation mode is: <Switch>.

Unlike Cisco's unprivileged mode, many functions are available from the user-view, in particular, you can reset the running processes. Connections via telnet and ssh are also available only from user-view.
After some complaints from Cisco Systems, part of the service words were replaced in the VRP OS. The correspondence table for some of the CLI service words is presented below.
CiscoHUAWEI
showdisplay
running-configurationcurrent-configuration
clearreset
configure terminalsystem view
writesave
quitexit
noundo

Basic commands:



Configuring vlan interfaces, physical ports of the switch


Vlan creation

To create vlan as an entity, the vlan XXX command is executed on the switch in system-view mode, where XXX is the vlan number.
<Quidway>system-view Enter system view, return user view with Ctrl+Z. [Quidway]vlan [Quidway]vlan 1 [Quidway-vlan1] 

Vlan is created. You can also use the description command to specify a description or vlan name. Unlike Cisco, the name is not a required attribute when creating a vlan.
')
To transfer created vlan within the local network, the GVRP protocol is used. It is activated by the gvrp command in the system-view mode.
 [Quidway]gvrp Info: GVRP has been enabled. [Quidway] 

Also gvrp must be enabled on the interface:
 # interface GigabitEthernet0/0/23 port link-type trunk port trunk allow-pass vlan 100 to 200 gvrp # 

Compatibility with Cisco VTP (vlan transfer protocol) is not and can not be.

Creating a vlan interface.

 <Quidway> <Quidway>system-view Enter system view, return user view with Ctrl+Z. [Quidway]int vlanif 1 [Quidway-Vlanif1]ip address 2.2.2.2 24 [Quidway-Vlanif1]display this # interface Vlanif1 ip address 2.2.2.2 255.255.255.0 # return [Quidway-Vlanif1] 

Unlike Cisco, you can write a mask in abbreviated form. Very comfortably.
I think that comments are superfluous.

Port Modes

Actually, nothing new. There are two main modes of operation of the port: access and trunk.
Trunk mode
Port setting:
 <Quidway>system-view Enter system view, return user view with Ctrl+Z. [Quidway]int gi0/0/1 [Quidway-GigabitEthernet0/0/1]port link-type trunk [Quidway-GigabitEthernet0/0/1]port trunk allow-pass vlan 1 [Quidway-GigabitEthernet0/0/1]di th # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 900 # return 

Unlike Cisco switches, by default, all vlans are prohibited and must be forcibly enabled using the port trunk allow-pass vlan command.
Untagged native vlan on the port is enabled with the command:
 [Quidway-GigabitEthernet0/0/1]port trunk pvid vlan 600 


Access mode

 [Quidway-GigabitEthernet0/0/1]port link-type access [Quidway-GigabitEthernet0/0/1]port default vlan 2 [Quidway-GigabitEthernet0/0/1]di th # interface GigabitEthernet0/0/1 port link-type access port default vlan 2 # return 


Eth-trunk configuration

 interface Vlanif100 ip address 1.1.1.2 255.255.255.252 # interface GigabitEthernet0/0/23 eth-trunk 1 # interface GigabitEthernet0/0/24 eth-trunk 1 # interface Eth-Trunk0 port link-type trunk port trunk allow-pass vlan 100 # 


Comments are superfluous.

STP Setup


For STP testing, the Cisco 2960 switches and HUAWEI Quidway S5328C-EI were connected.
To enable STP on the switch, in the system-view mode, enter the command
 [Quidway] stp enable 

By default, the priority of a HUAWEI switch, like that of a Cisco switch, is 32768.
View information about the current state of the ports:
 [Quidway]display stp brief MSTID Port Role STP State Protection 0 GigabitEthernet0/0/1 ALTE DISCARDING NONE 0 GigabitEthernet0/0/2 ROOT FORWARDING NONE 


It is seen that one of the ports is blocked, because the priority of the Cisco switch was higher.
View global STP information:

 [Quidway]disp stp -------[CIST Global Info][Mode STP]------- CIST Bridge :32768.781d-baa4-b6a7 Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 CIST Root/ERPC :8192 .2893-fe2a-9a80 / 199999 CIST RegRoot/IRPC :32768.781d-baa4-b6a7 / 0 CIST RootPortId :128.2 BPDU-Protection :Disabled TC or TCN received :107 TC count per hello :0 STP Converge Mode :Normal Share region-configuration :Enabled Time since last TC :0 days 1h:16m:17s Number of TC :9 Last TC occurred :GigabitEthernet0/0/2 


Change the priority of the HUAWEI switch. Make it the smallest: 4096.
 [Quidway]stp priority 4096 

Let's see that the port is unlocked:
 [Quidway]disp stp brief MSTID Port Role STP State Protection 0 GigabitEthernet0/0/1 DESI FORWARDING NONE 0 GigabitEthernet0/0/2 DESI FORWARDING NONE [Quidway] 

General information about STP:
 [Quidway]disp stp -------[CIST Global Info][Mode STP]------- CIST Bridge :4096 .781d-baa4-b6a7 Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 CIST Root/ERPC :4096 .781d-baa4-b6a7 / 0 CIST RegRoot/IRPC :4096 .781d-baa4-b6a7 / 0 CIST RootPortId :0.0 BPDU-Protection :Disabled TC or TCN received :123 TC count per hello :0 STP Converge Mode :Normal Share region-configuration :Enabled Time since last TC :0 days 0h:0m:44s Number of TC :11 Last TC occurred :GigabitEthernet0/0/1 


Static routing

Static routes are written in the same way as on Cisco equipment:
 [Quidway]ip route 0.0.0.0 0.0.0.0 1.1.1.1 

View routing table:
 [Quidway]disp ip routing-table Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 6 Routes : 6 Destination/Mask Proto Pre Cost Flags NextHop Interface 2.2.2.0/24 Direct 0 0 D 2.2.2.2 Vlanif1 2.2.2.2/32 Direct 0 0 D 127.0.0.1 Vlanif1 10.0.0.3/32 Direct 0 0 D 127.0.0.1 LoopBack0 90.0.0.1/32 Direct 0 0 D 127.0.0.1 LoopBack10 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 


That's all.
If a respected community is interested in the material, I plan to continue to highlight the HUAWEI hardware setup. In the next article we will look at configuring dynamic routing

Thanks for attention.

Source: https://habr.com/ru/post/153401/


All Articles