Удалить ip route static huawei
ip route recursive-lookup blackhole protocol static
Function
The ip route recursive-lookup blackhole protocol static disable command prevents static routes from being iterated to blackhole routes.
The ip route recursive-lookup blackhole protocol static enable command allows static routes to be iterated to blackhole routes.
The undo ip route recursive-lookup blackhole protocol static disable command allows static routes to be iterated to blackhole routes.
By default, static routes can be iterated to blackhole routes.
Format
undo ip route recursive-lookup blackhole protocol static disable
Parameters
Parameter | Description | Value |
---|---|---|
disable | Prevents static routes from being iterated to blackhole routes. | - |
enable | Allows static routes to be iterated to blackhole routes. | - |
Views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If IGP, static, and blackhole routes exist on a network and a link fault occurs, services may be interrupted because static routes may be iterated to blackhole routes and remain active. To ensure uninterrupted services, run the ip route recursive-lookup blackhole protocol static disable command. This command will prevent static routes from being iterated to blackhole routes so that static routes will become inactive and IGP routes will be selected.
Precautions
The ip route recursive-lookup blackhole protocol static enable and undo ip route recursive-lookup blackhole protocol static disable commands have the same function. You only need to run one of them.
Example
ip route-static
Function
The ip route-static command configures a unicast static route.
The undo ip route-static command deletes a unicast static route.
By default, no IPv4 unicast static routes are configured.
Format
undo ip route-static ip-address < mask | mask-length > [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * [ track efm-state | permanent ]
undo ip route-static all
Parameters
Configures permanent advertisement of static routes.
Views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
On a simple network, you can configure static routes to ensure network connectivity. If a device cannot use dynamic routing protocols for network connectivity, static routes can also be configured on the device.
Precautions
When configuring unicast static routes, note the following:
Only public routes can be used for tunnel iteration.
If no preference is set for a static route, the static route uses the default preference 60.
When both the destination IP address and the mask are set to 0.0.0.0, a default route is configured. If the switch cannot find a route in the routing table to forward packets, the switch uses the default route to forward packets.
By setting different preferences, you can implement different routing management policies. For example, if multiple routes to the same destination are configured with the same preference, load balancing can be implemented. If multiple routes to the same destination are configured with different preferences, route backup can be implemented.
You can specify the description text parameter to add a description for a static route so that the administrator can easily check and maintain the static route. You can run the display this command in the system view or run the display current-configuration command to view the descriptions of static routes.
When configuring static routes, you can specify outbound interfaces or next-hop addresses based on the outbound interface type. For example, you can specify only outbound interfaces for static routes on P2P interfaces and specify only next hops for static routes on NBMA interfaces, and you must specify next hops for static routes on broadcast interfaces.
In some cases, for example, the link layer protocol is PPP and the peer IP address is unknown, you can also specify outbound interfaces when configuring a switch . In this manner, you do not need to modify the switch configuration when the peer IP address changes.
- If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same, and the destination address mask is greater than or equal to the next-hop address mask.
- If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are different. However, if you perform bitwise AND operations on the next-hop address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same.
Example
The ip route-static command configures a unicast static route.
The undo ip route-static command deletes a unicast static route.
By default, the system does not configure IPv4 unicast static routes.
Format
ip route-static ip-address < mask | mask-length > < nexthop-address | interface-type interface-number [ nexthop-address ] > [ preference preference | tag tag ] * [ permanent | inherit-cost ] [ description text ]
undo ip route-static ip-address < mask | mask-length > [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * [ permanent ]
undo ip route-static all
Parameters
Configures permanent advertisement of static routes.
Views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
On a simple network, you only need to configure static routes to ensure that the network runs properly. When the wireless access point cannot use dynamic routing protocols or establish a route to the destination network, configure static routes.
Precautions
When configuring unicast static routes, note the following:
Only public routes can be used for tunnel iteration.
If no preference is configured for a static route, the static route uses the default preference 60.
When both the destination IP address and the mask are set to 0.0.0.0, a default route is configured. If the wireless access point cannot find a route in the routing table to forward packets, the wireless access point uses the default route to forward packets.
Setting different preferences can implement different routing management policies. For example, if multiple routes to the same destination are configured with the same preference, load balancing can be implemented. If multiple routes to the same destination are configured with different preferences, route backup can be implemented.
You can configure the description text parameter to add the description of static routes so that the administrator can check and maintain static routes easily. You can run the display this command in the system view or run the display current-configuration command to view the descriptions of static routes.
When configuring static routes, you can specify outbound interfaces or next-hop addresses based on the outbound interface type. For example, you can specify only outbound interfaces for static routes on P2P interfaces and specify only next hops for static routes on NBMA interfaces, and you must specify next hops for static routes on broadcast interfaces.
In some cases, for example, the link layer protocol is PPP and the peer IP address is unknown, you can also specify outbound interfaces when configuring a wireless access point . In this manner, you do not need to modify the wireless access point configuration when the peer IP address changes.
The ip route-static command configures a unicast static route.
The undo ip route-static command deletes a unicast static route.
By default, no unicast static route is configured.
Format
ip route-static ip-address < mask | mask-length > < nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address > [ preference preference | tag tag ] * [ track < route-monitor-group route-monitor-group-name | efm-state interface-type interface-number | nqa admin-name test-name > | permanent ] [ description text ]
undo ip route-static ip-address < mask | mask-length > [ nexthop-address | interface-type interface-number [ nexthop-address ] ] [ preference preference | tag tag ] * [ track efm-state | permanent ]
undo ip route-static all
Parameters
Specifies a destination IP address.
The value is in dotted decimal notation.
Specifies a subnet mask.
The value is in dotted decimal notation.
Specifies the mask length. The 1s in each 32-bit mask must be consecutive. Therefore, a mask in dotted decimal notation can be presented by a mask length.
The value is an integer in the range from 0 to 32.
nexthop-address
Specifies the next-hop address.
The value is in dotted decimal notation.
interface-type interface-number
Specifies the type and number of an interface that forwards packets.
vpn-instance vpn-instance-name
Specifies the name of a VPN instance. If a VPN instance name is specified, the device searches the routing table of the VPN instance for a static route according to nexthop-address .
The value is a string of 1 to 31 case-sensitive characters with spaces. The string can contain spaces if it is enclosed with double quotation marks (").
preference preference
Specifies the preference of a static route. A smaller value indicates a higher preference.
The value is an integer that ranges from 1 to 255. The default value is 60.
tag tag
Specifies the tag value of a static route. By configuring different tag values, you can classify static routes to implement different routing policies. For example, routing protocols can import static routes with specified tag values through routing policies.
The value is an integer that ranges from 1 to 4294967295. The default value is 0.
track route-monitor-group route-monitor-group-name
Binds a static route to a route monitoring group for fast fault detection.
The value is a string of 1 to 31 case-sensitive characters.
track efm-state interface-type interface-number
Detects the EFM OAM state of a specified interface.
track nqa admin-name test-name
Specifies the administrator name of an NQA test instance bound to a static route, and the name of the test instance.
The values of admin-name and test-name are both a string of 1 to 32 case-sensitive characters without spaces.
permanent
Configures permanent advertisement of static routes.
description text
Configures a description for a static route.
The value is a string of 1 to 80 characters that can contain spaces.
all
Deletes all IPv4 unicast static routes.
Views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
On a simple network, you can configure static routes to ensure network connectivity. If a switch cannot use dynamic routing protocols for network connectivity, static routes can be configured on the switch .
Precautions
- Only public routes can be used for tunnel recursion.
- If no preference is set for a static route, the static route uses the default preference 60.
- When both the destination IP address and the mask are set to 0.0.0.0, a default route is configured. If the switch cannot find a route in the routing table to forward packets, the switch uses the default route to forward packets.
- By setting different preferences, you can implement different routing management policies. For example, if multiple routes to the same destination are configured with the same preference, load balancing can be implemented. If multiple routes to the same destination are configured with different preferences, route backup can be implemented.
- You can specify the descriptiontext parameter to add a description for a static route so that the administrator can easily check and maintain the static route. You can run the display this command in the system view or run the display current-configuration command to view the descriptions of static routes.
- When configuring static routes, you can specify outbound interfaces or next-hop addresses based on the outbound interface type. For example, you can specify only outbound interfaces for static routes on P2P interfaces and specify only next hops for static routes on NBMA interfaces, and you must specify next hops for static routes on broadcast interfaces.
- In some cases, for example, the link layer protocol is PPP and the peer IP address is unknown, you can also specify outbound interfaces when configuring a switch . In this manner, you do not need to modify the switch configuration when the peer IP address changes.
- When configuring static routes, you can specify both the outbound interface or next-hop address for the supernet route. Otherwise, the route cannot be activated. Any route that meets one of the following conditions is a supernet route:
- If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same, and the destination address mask is greater than or equal to the next-hop address mask.
- If you perform bitwise AND operations on the destination address mask with the destination address and next-hop address, respectively, the calculated network addresses are different. However, if you perform bitwise AND operations on the next-hop address mask with the destination address and next-hop address, respectively, the calculated network addresses are the same.
Example
HUAWEI – одна из крупнейших китайских компаний в сфере телекоммуникаций. Основана в 1988 году.
Компания HUAWEI достаточно недавно вышла на российский рынок сетевого оборудования уровня Enterprise. С учётом тенденции тотальной экономии, на нашем предприятии очень остро встал вопрос о подборе достойной замены оборудованию Cisco.
В статье я попытаюсь рассмотреть базовые аспекты настройки сервисов коммутации и маршрутизации оборудования HUAWEI на примере коммутатора Quidway серии 5300.
Глобальные команды, режимы работы, cходства и различия с CLI CISCO.
- system-view – аналог цисковского режима конфигурирования conf t. В этом режиме приглашение командной строки выглядит как [Switch].
- user-view – аналог цисковского непривилегированного режима. Режим приглашения выглядит так: .
Основные команды:
- system-view – переход из user-view в привилегированный режим system-view;
- save – запись текущих настроек в энергонезависимую память устройства;
- display current-configuration – вывод текущего файла конфигурации
- display current-configuration configuration XXXX – вывод настроек секции XXXX.
- display this – вывод конфигурации текущей секции;
- quit – выход из текущей секции в родительскую.
Настройка vlan интерфейсов, режимы работы физических портов коммутатора
Создание vlan
Для создания vlan как сущности, на коммутаторе в режиме system-view выполняется команда vlan XXX, где XXX – номер vlan.
Vlan создан. Так же командой description можно задать описание или название vlan. В отличие от Cisco имя не является обязательным атрибутом при создании vlan.
Для передачи созданых vlan в пределах локальной сети используется протокол GVRP. Включается он командой gvrp в режиме system-view.
Так же gvrp должен быть разрешён на интерфейсе:
Совместимости с Cisco VTP (vlan transfer protocol) нет и быть не может.
Создание vlan интерфейса.
В отличие от Cisco, маску можно писать сокращённо. Очень удобно.
Думаю, что комментарии излишни.Режимы работы портов
Собственно, ничего нового. Существуют два основных режима работы порта: access и trunk.
Режим trunk
Настройка порта:В отличие от коммутаторов Cisco, по-умолчанию, все vlan запрещены и их необходимо принудительно разрешить командой port trunk allow-pass vlan.
Нетэггированный native vlan на порту включается командой:Настройка eth-trunk
Настройка STP
Для тестирование STP были соединены коммутаторы Cisco 2960 и HUAWEI Quidway S5328C-EI.
Для включения STP на коммутаторе необходимо в режиме system-view ввести командуПо умолчанию, приоритет коммутатора HUAWEI, так же как и коммутатора Cisco равен 32768.
Просмотр информации о текущем состоянии портов:
Видно, что один из портов заблокирован, т. к. приоритет коммутатора Cisco оказался больше.
Просмотр глобальной информации об STP:Изменим приоритет коммутатора HUAWEI. Сделаем его наименьшим: 4096.
Посмотрим, что порт разблокировался:
Общая информация об STP:
Статическая маршрутизация
Статические маршруты прописываются точно так же, как на оборудовании Cisco:
Просмотр таблицы маршрутизации:
На этом всё.
Если уважаемое сообщество заинтересуется материалом, планирую продолжить освещать настройку оборудования HUAWEI. В следующей статье рассмотрим настройку динамической маршрутизации.Мы уже длительное время используем оборудование Huawei в продуктиве публичного облака. Недавно мы добавили в эксплуатацию модель CloudEngine 6865 и при добавлении новых устройств, появилась идея поделиться неким чек-листом или сборником базовых настроек с примерами.
В сети есть множество аналогичных инструкций для пользователей оборудования Cisco. Однако, для Huawei таких статей мало и иногда приходится искать информацию в документации или собрать из нескольких статей. Надеемся, будет полезно, поехали!
В статье опишем следующие пункты:
Первое подключение
Подключение к коммутатору через консольный интерфейс
По умолчанию коммутаторы Huawei поставляются без предварительных настроек. Без конфигурационного файла в памяти коммутатора, при включении запускается протокол ZTP (Zero Touch Provisioning). Не будем подробно описывать данный механизм, отметим лишь, что он удобен при работе с большим числом устройств или для осуществления настройки удалённо. Обзор ZTP можно посмотреть на сайте производителя.
Для первичной настройки без использования ZTP необходимо консольное подключение.
Параметры подключения (вполне стандартные)
Transmission rate: 9600
Data bit (B): 8
Parity bit: None
Stop bit (S): 1
Flow control mode: NoneПосле подключения Вы увидите просьбу задать пароль для консольного подключения.
Задаем пароль для консольного подключения
Просто задайте пароль, подтвердите его и готово! Изменить пароль и прочие параметры аутентификации на консольном порту далее можно с помощью следующих команд:
Пример смены пароля
system-view
[~HUAWEI] user-interface console 0
[~HUAWEI-ui-console0] authentication-mode password
[~HUAWEI-ui-console0] set authentication password cipher
[*HUAWEI-ui-console0] commitНастройка стекирования (iStack)
После получения доступа к коммутаторам, при необходимости можно настроить стек. Для объединения нескольких коммутаторов в одно логическое устройство в Huawei CE используется технология iStack. Топология стека - кольцо, т.е. на каждом коммутаторе рекомендуется использовать минимум 2 порта. Количество портов зависит от желаемой скорости взаимодействия коммутаторов в стеке.
Желательно при стекировании задействовать аплинки, скорость которых обычно выше, чем у портов для подключения конечных устройств. Таким образом, можно получить большую пропускную способность при помощи меньшего количества портов. Также, для большинства моделей есть ограничения по использованию гигабитных портов для стекирования. Рекомендуется использовать минимум 10G порты.
Есть два варианта настройки, которые немного отличаются в последовательности шагов:
Предварительная настройка коммутаторов с последующим их физическим соединением.
Сначала установка и подключение коммутаторов между собой, потом их настройка для работы в стеке.
Последовательность действий для этих вариантов выглядит следующим образом:
Последовательность действий для двух вариантов стекирования коммутаторов
Рассмотрим второй (более длительный) вариант настройки стека. Для этого нужно выполнить следующие действия:
Планируем работы с учётом вероятного простоя. Составляем последовательность действий.
Осуществляем монтаж и кабельное подключение коммутаторов.
Настраиваем базовые параметры стека для master-коммутатора:
Пример:
system-view
[~HUAWEI] sysname SwitchA
[HUAWEI] commit
[~SwitchA] stack
[~SwitchA-stack] stack member 1 priority 150
[SwitchA-stack] stack member 1 domain 10
[SwitchA-stack] quit
[SwitchA] commit[~SwitchA] interface stack-port 1/1
[SwitchA-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4
Warning: After the configuration is complete,
1.The interface(s) (10GE1/0/1-1/0/4) will be converted to stack mode and be configured with the
port crc-statistics trigger error-down command if the configuration does not exist.2.The interface(s) may go Error-Down (crc-statistics) because there is no shutdown configuration on the interfaces.Continue? [Y/N]: y
[SwitchA-Stack-Port1/1] commit
[~SwitchA-Stack-Port1/1] returnДалее, нужно сохранить конфигурацию и перезагрузить коммутатор:
save
Warning: The current configuration will be written to the device. Continue? [Y/N]: y
reboot
Warning: The system will reboot. Continue? [Y/N]: y4. Выключаем порты для стекирования на master-коммутаторе (пример)
[~SwitchA] interface stack-port 1/1
[*SwitchA-Stack-Port1/1] shutdown
[*SwitchA-Stack-Port1/1] commitsystem-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stack
[~SwitchB-stack] stack member 1 priority 120
[*SwitchB-stack] stack member 1 domain 10
[*SwitchB-stack] stack member 1 renumber 2 inherit-config
Warning: The stack configuration of member ID 1 will be inherited to member ID 2
after the device resets. Continue? [Y/N]: y
[*SwitchB-stack] quit
[*SwitchB] commitНастраиваем порты для стекирования. Обратите внимание, что несмотря на то, что была введена команда “stack member 1 renumber 2 inherit-config”, member-id в конфигурации используется со значением “1” для SwitchB.
Так происходит, потому что member-id коммутатора будет изменён только после перезагрузки и до неё коммутатор по-прежнему имеет member-id, равный 1. Параметр “inherit-config” как раз нужен для того, чтобы после перезагрузки коммутатора все настройки стека сохранились для member 2, которым и будет коммутатор, т.к. его member ID был изменён со значения 1 на значение 2.
[~SwitchB] interface stack-port 1/1
[*SwitchB-Stack-Port1/1] port member-group interface 10ge 1/0/1 to 1/0/4
Warning: After the configuration is complete,
1.The interface(s) (10GE1/0/1-1/0/4) will be converted to stack
mode and be configured with the port crc-statistics trigger error-down command if the configuration does
not exist.
2.The interface(s) may go Error-Down (crc-statistics) because there is no shutdown configuration on the
interfaces.
Continue? [Y/N]: y
[*SwitchB-Stack-Port1/1] commit
[~SwitchB-Stack-Port1/1] returnsave
Warning: The current configuration will be written to the device. Continue? [Y/N]: y
reboot
Warning: The system will reboot. Continue? [Y/N]: y6. Включаем порты стекирования на master-коммутаторе. Важно успеть включить порты до завершения перезагрузки коммутатора B, т.к. если включить их после, коммутатор B снова уйдёт в перезагрузку.
[~SwitchA] interface stack-port 1/1
[~SwitchA-Stack-Port1/1] undo shutdown
[*SwitchA-Stack-Port1/1] commit
[~SwitchA-Stack-Port1/1] return7. Проверяем работу стека командой “display stack”
Пример вывода команды после правильной настройки
display stack
MemberID Role MAC Priority DeviceType Description
+1 Master 0004-9f31-d520 150 CE6850-48T4Q-EI
2 Standby 0004-9f62-1f40 120 CE6850-48T4Q-EI
+ indicates the device where the activated management interface resides.
8. Сохраняем конфигурацию стека командой “save”. Настройка завершена.
Настройка доступа
Выше мы работали через консольное подключение. Теперь к нашему коммутатору (стеку) нужно как-то подключаться по сети. Для этого ему нужен интерфейс (один или несколько ) с IP-адресом. Обычно для коммутатора адрес назначается на интерфейс в VLAN сети управления или на выделенный порт управления. Но тут, конечно же, всё зависит от топологии подключения и функционального назначения коммутатора.
Пример настройки адреса для интерфейса VLAN 1:
[~HUAWEI] interface vlan 1
[~HUAWEI-Vlanif1] ip address 10.10.10.1 255.255.255.0
[~HUAWEI-Vlanif1] commitПредварительно можно явно создать Vlan и назначить ему имя, например:
[~Switch] vlan 1
[*Switch-vlan1] name TEST_VLAN (имя VLAN - необязательный элемент)Есть маленький лайфхак в плане именования — писать имена логических структур заглавными буквами (ACL, Route-map, иногда имена VLAN), чтобы было легче находить их в конфигурационном файле. Можете взять “на вооружение” ;)
Итак, у нас есть VLAN, теперь “приземляем” его на какой-нибудь порт. Для описанного в примере варианта делать это не обязательно, т.к. все порты коммутатора по умолчанию находятся в VLAN 1. Если хотим настроить порт в другой VLAN, пользуемся соответствующими командами:
Настройка порта в режиме access:
[~Switch] interface 25GE 1/0/20
[~Switch-25GE1/0/20] port link-type access
[~Switch-25GE1/0/20] port access vlan 10
[~Switch-25GE1/0/20] commit[~Switch] interface 25GE 1/0/20
[~Switch-25GE1/0/20] port link-type trunk
[~Switch-25GE1/0/20] port trunk pvid vlan 10 - указываем native VLAN (фреймы в этом VLAN не будут иметь тег в заголовке)
[~Switch-25GE1/0/20] port trunk allow-pass vlan 1 to 20 - разрешаем только VLAN с тегом от 1 до 20 (для примера)
[~Switch-25GE1/0/20] commitС настройкой интерфейсов разобрались. Перейдём к конфигурации SSH.
Приведем только необходимый набор команд:Назначаем имя коммутатору
system-view
[~HUAWEI] sysname SSH Server
[*HUAWEI] commit[~SSH Server] rsa local-key-pair create //Generate the local RSA host and server key pairs.
The key name will be: SSH Server_Host
The range of public key size is (512 ~ 2048).
NOTE: Key pair generation will take a short while.
Input the bits in the modulus [default = 2048] : 2048
[*SSH Server] commit[~SSH Server] user-interface vty 0 4
[~SSH Server-ui-vty0-4] authentication-mode aaa
[SSH Server-ui-vty0-4] user privilege level 3
[SSH Server-ui-vty0-4] protocol inbound ssh
[*SSH Server-ui-vty0-4] quit[SSH Server] aaa
[SSH Server-aaa] local-user client001 password irreversible-cipher
[SSH Server-aaa] local-user client001 level 3
[SSH Server-aaa] local-user client001 service-type ssh
[SSH Server-aaa] quit
[SSH Server] ssh user client001 authentication-type password[~SSH Server] stelnet server enable
[*SSH Server] commit[~SSH Server] ssh user client001 service-type stelnet
[*SSH Server] commitНастройка завершена. Если вы все сделали верно, то можно подключиться к коммутатору по локальной сети и продолжить работу.
Больше подробностей по настройке SSH можно найти в документации Huawei — первая и вторая статья.
Настройка базовых параметров системы
В этом блоке рассмотрим небольшое количество различных блоков команд для настройки наиболее популярных возможностей.
1. Настройка системного времени и его синхронизация по NTP.
Для настройки времени локально на коммутаторе можно использовать следующие команды:
clock timezone
clock datetime [ utc ] HH:MM:SS YYYY-MM-DDПример настройки времени локально
clock timezone MSK add 03:00:00
clock datetime 10:10:00 2020-10-08Для синхронизации времени по NTP с сервером вводим следующую команду:
ntp unicast-server [ version number | authentication-keyid key-id | source-interface interface-type
Пример команды для синхронищации времени по NTP
ntp unicast-server 88.212.196.95
commit2. Для работы с коммутатором порой требуется настроить как минимум один маршрут - маршрут по умолчанию или default route. Для создания маршрутов используется следующая команда:
ip route-static ip-address
Пример команды для создания маршрутов:
system-view
ip route-static 0.0.0.0 0.0.0.0 192.168.0.1
commit3. Настройка режима работы протокола Spanning-Tree.
Для корректного использования нового коммутатора в существующей сети важно уделить внимание выбору режима работы STP. Также, неплохо бы сразу настроить его. Надолго останавливаться здесь не будем, т.к. тема достаточно обширная. Опишем лишь режимы работы протокола:
stp mode stp | rstp | mstp | vbst > — в этой команде выбираем нужный нам режим. Режим по умолчанию: MSTP. Он же является рекомендуемым режимом для работы на коммутаторах Huawei. Обратная совместимость с RSTP имеется.
system-view
stp mode mstp
commit4. Пример настройки порта коммутатора для подключения конечного устройства.
Рассмотрим пример настройки acess-порта для обработки траффика в VLAN10
[SW] interface 10ge 1/0/3
[SW-10GE1/0/3] port link-type access
[SW-10GE1/0/3] port default vlan 10
[SW-10GE1/0/3] stp edged-port enable
[*SW-10GE1/0/3] quitОбратите внимание на команду “stp edged-port enable” - она позволяет ускорить процесс перехода порта в состояние forwarding. Однако, не стоит использовать эту команду на портах, к которым подключены другие коммутаторы.
Также, может быть полезна команда “stp bpdu-filter enable”.
5. Пример настройки Port-Channel в режиме LACP для подключения к другим коммутаторам или серверам.
[SW] interface eth-trunk 1
[SW-Eth-Trunk1] port link-type trunk
[SW-Eth-Trunk1] port trunk allow-pass vlan 10
[SW-Eth-Trunk1] mode lacp-static (или можно использовать lacp-dynamic)
[SW-Eth-Trunk1] quit
[SW] interface 10ge 1/0/1
[SW-10GE1/0/1] eth-Trunk 1
[SW-10GE1/0/1] quit
[SW] interface 10ge 1/0/2
[SW-10GE1/0/2] eth-Trunk 1
[*SW-10GE1/0/2] quitНе забываем про “commit” и далее уже работаем с интерфейсом eth-trunk 1.
Проверить состояние агрегированного линка можно командой “display eth-trunk”.Мы описали основные моменты настройки коммутаторов Huawei. Конечно, в тему можно погрузиться еще глубже и ряд моментов не описан, но мы старались показать основные, наиболее востребованные команды для первичной настройки.
Надеемся что этот “мануал” поможет вам настроить коммутаторы немного быстрее.
Также будет здорово, если вы в комментариях напишите команды, которых, по вашему мнению, не хватает в статье, но они также могут упростить настройку коммутаторов. Ну и, как обычно, будем рады ответить на ваши вопросы.Читайте также: