Huawei Switch Basic Configuration Command Reference


Local configuration mode
In view mode, enter a local configuration command, such as interface GE 1/0/0, to enter GE1/0/0 port configuration mode.

In addition, there are many local configuration modes. You can enter the vlan configuration mode, port aggregation configuration mode, etc. according to different requirements. , to see which commands can be executed in the current mode;

View device information

The key information is:
Software version: Version 8.130 (S6800 V800R013C00SPC560B560)
Equipment model: HUAWEI S6800
Running time: 0 day, 0 hour, 15 minutes
View and modify system time

Modify device name
If there is no commit, you need to exit the system view mode and save it.

Configure device description information

Visible after exiting view mode

Configure console login authentication mode and timeout time.
overtime time: After connecting the device, there is no operation for a period of time, the system automatically quits, and needs to log in again. The default timeout time is 10min;
Enter the console configuration mode
Console authentication mode is password.
Set the timeout to 20min
Use quit to return to view mode. After saving, use display this to check the configuration. The garbled password is the encrypted password.

Telnet configuration
Enter vty configuration mode, 0 4 indicates that 5 concurrent telnet connections are allowed.
The authentication mode is password. The aaa authentication prompt message is required. Ignore it for the time being.

Configure telnet to use cipher text authentication. Password Gauss_234
After exiting the save, use display this to view the configuration.

Configure aaa login authentication.
Authentication (authentication), authorization (accounting), accounting (accounting) short name, is a management mechanism of network security; Authentication is local authentication / authorization, authorization and accounting is served by a distant radius (remote dialing authentication system) or Hwtacacs (Huawei Terminal Access Control System) server completes authentication/authorization;
After exiting the vty configuration mode, enter the aaa configuration mode.
View the results after the configuration is complete, where the aaa authentication mode has no special requirements, and the default mode is adopted.

Configure device super password
You can use the super command to perform privilege escalation. To avoid the harm caused by illegal privilege escalation, it should be configured
Super password protection.
Set a super password for the CE6800. The password is stored in simple (plain text) mode (not supported by the emulator)
Save and view configuration
Save all configuration information, save it first and save it

View all saved configurations
View all current configurations
Configure interface IP

View the configuration after saving:


Configure the GE 1/0/0 address as 10.0.12.1 24


Ping the peer CE12800 from the CE6800 to test connectivity.

Configuring static routes

Goal: Let CE6800 ping the 8.0.10.2 on CE6850
On the CE12800, set the IP address of GE 1/0/1 to 8.0.1.1/24.

On the CE6850, set the IP address of GE 1/0/0 to 8.0.10.2/24.

After the network is connected, try to ping 8.0.10.2 on CE6850 from CE6800. The result is that the ping fails.
Check the CE6800 routing table. There is no route to 8.0.10.0/24.

Add a static route to 8.0.10.0/24 on the CE6800. The next hop address should be 10.0.12.2 on the CE12800.
Try to ping 8.0.10.2 on CE6850 from CE6800. The result is still pinging.
The reason is that the CE6850 does not have a route to the 10.0.12.0/24 network segment, causing the ping packet to «have no return»;
Add a static route to 10.0.12.0/24 on the CE6850. The next hop address should be 8.0.10.1 on the CE12800.
After the file is saved, the CE6800 can ping the 8.0.10.2 on the CE6850.



Notice the Proto field, there are two types: Direct Direct and Static Static.
The CE12800 routes are directly connected, and the Pre field is 0.
The CE6800 and CE6850 have two static routes. The Pre field is 60.
Pre indicates the route priority. The smaller the better, the better the route will be matched.

The rest of the agreement isDynamic routing protocol,include:
OSPF (Open Shortest Path First Protocol)
RIP (Routing Information Protocol)
IS-IS (Intermediate System to Intermediate System Protocol)
BGP (Border Gateway Protocol)
Configure default route

View the routing table separately:


With the default route, devices at both ends of the topology map can also ping each other.
LACP agreement
LACP, Link Aggregation Control Protocol (LACP) based on the IEEE802.3ax standard is a protocol for dynamic link aggregation. The LACP protocol is controlled by Link Aggregation Control Protocol Data Unit (LACPDU).Protocol data unit) and the opposite endInteractive information。
Dynamic LACP aggregation is a kind of aggregation that is automatically created or deleted by the system. The addition and deletion of ports in the dynamic aggregation group are automatically completed by the protocol. Only ports with the same rate and duplex attributes, connected to the same device, and the same basic configuration can be dynamically aggregated. Dynamic aggregation can be created even with only one port, in this casePort aggregation. In the dynamic aggregation, the LACP protocol of the port is enabled.
Port aggregation configuration example

On the CE6850, GE 1/0/1 and GE 1/0/3 are directly connected to GE 1/0/1 to GE 1/0/3 of the peer CE12808. The three links are connected to each other.
The CE12808 configuration is the same as that of the CE6850.
View Eth-Trunk 1 Configuration

The three connections of the two ends of the device form a link aggregation. The logical interface is Eth-Trunk 1
Table of Contents
В TAC иногда просять предоставить диагностическую информацию, что бы ее собрать, на коммутаторе надо дать команду “display diagnostic-information some_file_name.txt”.
Файл с информацией будет на “flash:”, его надо забрать по scpsftp.
Процесс сбора занимает 3-5 минут, на CE6810 порцессор загружался на +10-15% от обычного уровня.
dis diagnostic-information sw21-dis-diag-20200206.txt
Now saving the diagnostic information to the device
100%
Info: The diagnostic information was saved to the device successfully.
Почистить корзину
Поудалял c flash:/ файлы старого софта, но свободного места не прибавилось.
Закачать новый патч не получается.
Надо почистить корзину
Удалить пачку вланов
В коммутаторах ce6810 размер мак таблицы составляет 128K.
Если возможности ограничивать количество мак адресов на физических интерфейсах, lag интерфейсах или в vlan.
При достижении определенного лимита мак адресов можно дропать пакеты (action discard) с “новыми” мак адресами или пропустить пакет (action forward), но не записывать его мак в таблицу мак-адресов. Соответственно обратный трафик пойдет как unknown-unicast.
Разрешить 1000 мак адресов на физическом порту.
Пакет с 1001 маком дропнуть и сделать запись в лог.
Для физических интерфейсов дефольное действие это дропунть пакет, для vlan дефолтное действие это пропустить пакет.
Информация о CPU/RAM/TEMP/FAN/PSU на ce6800
Общая информация выводится в рамках команды “display health”.
MTU на интерфейсах ce6800
Команда “jumboframe enable” принимает два значения.
Первое значение (value1) задает максимальный размер фрейма который может пройти через интфрейс.
А второе значение (value2) задает размер “обычного” фрейма.
Второе значение нужно, что бы более красиво распределять пакеты по счетчикам интерфесов.
Пакеты размером до value2 попадают в счетчик обычных пакетов.
Пакеты размером от value2 до value1 попадают в счетчик джамбо пакетов.
Если посмотреть на интерфейсы, то на них по дефолтку разрешены jumbo-frames, дефолтное значение 9216.
Так же можно задать размер пакетов которые надо считать как обычные пакеты, дефолтное значение 1518.
При этом, если посмотреть на mtu по snmp, то на интфрейсах на которых нет линка, значение mtu будет 1518, а на которых есть линк будет значение 1500.
Изменение настроек на “jumboframe enable” не влияет на то, что отдает коммутатор по snmp.
Коммутатор по snmp, в mtu, показывает именно второе “информационное” значение команды “jumboframe enable”.
Для физических интфейсов на эти значения можно не смотреть.
MLAG на ce6800
MLAG-пару коммутаторов надо было переводить из песочницы в боевое окружение.
Надо было поменять vlan и ip адреса на Meth интерфейсах и в настройках dfs-group.
В документации описания такого процесса нет, но при этом известно, что коммутаторы через PL договариваются, в том числе и о адресах DAD линков.
Пожтому адреса решил не менять на живую, а сначала положить все порты на слейв ноде, тем самым изолировав ноды друг от друга, и только после этого менять адреса.
Распределение ролей коммутаторов в нормальном состоянии:
Последовательность действий коротко:
Последовательность добавленияудаления vlan на MLAG портах
Реация MLAG-пары на добавление влана завит от того, на какой ноде делаются изменения — мастер или слейв.
Трафик через новый влан пойдет только в тот момент, когда влан будет добавлен в порт на мастер ноде.
При этом не имеет значения, есть ли новый влан на порту на слейв ноде.
Соответственно, лучше делать в такой последовательности:
Базовая настройка коммутатора серии ce6800
Скорость порта — 9600 8N1.
Пароль на консоль.
Настройка интерфейса meth0
Коммутаторы планируется использовать в MLAG кластере.
DAD линк будет работать через meth порты, DAD порты рекомендуется засунуть в отдельный VRF.
Создаем отдельный VRF.
Привязываем meth интерфейс к VRF, при этом сбросится все настройки ip которые были раньше настроены на интерфейсе.
Заход на коммутатор через ssh
Заводим локального пользователя который на коммутатор будет заходить через ssh.
Коммутатор утомил своими требования к сложности пароля, их отключаем.
Длину пароля ставим не меньше чем 8, дальше на свой вкус усложняем.
Включаем ssh сервер на коммутаторе и разрешаем новому пользователю заходить через ssh.
Пишем acl для прикрытия ssh.
Отдельно пишем правило для захода со стороны vrf VRF-DAD-1.
Проверяем, что можем зайти по ssh.
Отключаем ненужные сервисы
Отключаем ipv6 ssh сервер.
Отключаем zero touch provisioning.
Остальное важное по дефолту отключено.
Настройка ntp клиента
Отключаем ntp сервер на самих коммутаторах.
Настраиваем с каких ntp серверов брать время.
Задаем тайм-зону.
Настройка snmp
Создаем acl, в котором прописываем откуда можно обратиться по snmp к коммутатору.
Отключаем проверку сложности snmp community.
Задаем community и версию snmp.
Работа с конфигурацией на коммутаторах серии ce6800
Есть два режима внесения изменений в конфигурацию:
Приглашение в режиме конфигурации:
Далее рассматриваем режим “system-view”.
Просмотр изменений конфигурации
Посмотреть последовательность команд, которые были даны в ходе настройки.
Посмотреть всю конфигурацию с внесенными, но еще не примененными изменениями.
В junos это просто “show”.
Сбросить все внесенные, но еще не примененные изменения.
В junos просто “rollback”.
Применить изменения и сохранить конфигурацию
Ярлык пишется в одно слово.
Посмотреть список сделанных коммитов.
Сравнение коммитов
Посмотреть историю изменений можно сравнением текущей конфигурации с ранее сделанными коммитами.
Коммит для сравнения можно выбирать по его ID (CommitId) или по номеру (No.).
Сравнить текущую конфигурацию с последний коммитом.
Сравнить текущую конфигурацию с каким конкретным коммитом.
Откат изменений
Коммит, до которого надо откатиться, можно определить по номеру (No.), СommitId или по ранее присвоенному ярлыку.
last — откатиться по номеру (No.) коммита.
to — откатиться по СommitId или ярлыку коммита коммита.
Автоматически откат изменений
Есть возможность применить конфигурацию на время и, если что-то пошло не так, откатить ее.
Делается это командой “commit trial”.
По дефолту автоматический откат произойдет через 600 секунд, можно указать свое время.
При необходимости, можно раньше времени откатиться руками — “abort trial”.
Что бы окончательно применить триальные изменения, необходимо в рамках текущей sshконсольной сессии еще раз дать команду “commit”.
Если после триального коммита выкинуло из ssh сессии и получилось еще раз зайти по ssh или через консоль, то уже нельзя будет руками откатиться или применить триальные изменения, будет ругаться. Надо будет ждать пока истечет время триала.
Попытка зайти по ssh с адреск которого нет в acl
Серийный номер указан в поле BarCode.
DRAFT
* — Local node
Полезные ссылки
June 5, 2017
Overview
In this document will show how to configure Tacacs Plus protocols for security on Huawei switch model CE6800.
Prerequisites
In this article of how to configure Tacacs+ protocols for security on Huawei switch model CE6800, it is presumed that:
b. You had already configured SSH remote management on your Huawei switch. You would probably like to check this link SSH Configuration on Huawei Switch S5700.
Create Console Login for Backup
Before you start doing Tacacs Plus protocols security configuration on Huawei switch, it is recommended to create a console login first. So, in case that Tacacs Plus centralized access server is not reachable, you still can work with Huawei switch via direct console login.

Configure Tacacs Plus Server
You should be able to configure Tacacs Plus on Huawei switch CE6800 now. Tacacs+ is the only security protocols used to provide centralized access into networks. Hopefully, you can find this article informative. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them.
Comments
June 8, 2017
The DHCP server can only dynamically distributing network configuration parameters to the client computers within the same network with DHCP server. For client computers that reside a separated networks to get the network configuration parameters from DHCP server, we need a DHCP relay server.
In this article you will see how to install and configure DHCP relay server on Huawei L3 switch model CE6800.
In this tutorial, it is supposed that:
a. You have already installed DHCP server up and running. In case that you don’t, you would probably like to read this link Configuring DHCP Server on RHEL/CentOS 7.
b. You have the SSH remote access to Huawei L3 switch.
System Architecture Diagram
There are three VLANs on Huawei L3 switch. The DHCP server locates in VLAN 10. For DHCP server to dynamically distributing network configuration parameters to clients computers locate in another separated VLANs which are VLAN20 and VLAN30, we need to configure DHCP relay on Huawei L3 switch.

The DHCP relay need to apply on the interface or VLAN that connect the clients. It is no need to apply DHCP relay on the interface or VLAN that connect to DHCP server. So, in our case just need to apply DHCP relay configuration on interface VLAN 20 and interface VLAN 30 only.
Configure VLAN Interface
Let configure the VLAN interfaces for VLAN 10, VLAN 20, and VLAN 30
Now we need to assign the switch ports to the associated VLANs.
Test DHCP Relay


Now you just have done the configuration of DHCP relay server on Huwei L3 switch model CE6800. I hope that you can find this instruction informative. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them.
