How To Remove BPDU-Filtering Enable and Timeout From Port Configuration

Bridge Hardware Offloading

Since RouterOS v6.41 it is possible to switch multiple ports together if a device has a built-in switch chip. While a bridge is a software feature that will consume CPU’s resources, the bridge hardware offloading feature will allow you to use the built-in switch chip to forward packets, this allows you to achieve higher throughput, if configured correctly. In previous versions (prior to RouterOS v6.41) you had to use the master-port property to switch multiple ports together, but in RouterOS v6.41 this property is replaced with the bridge hardware offloading feature, which allows your to switch ports and use some of the bridge features, for example, Spanning Tree Protocol. More details about the outdated master-port property can be found in the Master-port page.

Note: When upgrading from previous versions (before RouterOS v6.41), the old master-port configuration is automatically converted to the new Bridge Hardware Offloading configuration. When downgrading from newer versions (RouterOS v6.41 and newer) to older versions (before RouterOS v6.41) the configuration is not converted back, a bridge without hardware offloading will exist instead, in such a case you need to reconfigure your device to use the old master-port configuration.

Below is a list of devices and feature that supports hardware offloading (+) or disables hardware offloading (-):

  • Feature will not work properly in VLAN switching setups. It is possible to correctly snoop DHCP packets only for a single VLAN, but this requires that these DHCP messages get tagged with the correct VLAN tag using an ACL rule, for example, /interface ethernet switch acl add dst-l3-port=67-68 ip-protocol=udp mac-protocol=ip new-customer-vid=10 src-ports=switch1-cpu. DHCP Option 82 will not contain any information regarding VLAN-ID.
  • Feature will not work properly in VLAN switching setups.

Note: When upgrading from older versions (before RouterOS v6.41), only the master-port configuration is converted. For each master-port a bridge will be created. VLAN configuration is not converted and should not be changed, check the Basic VLAN switching guide to be sure how VLAN switching should be configured for your device.

Bridge Hardware Offloading should be considered as port switching, but with more possible features. By enabling hardware offloading you are allowing a built-in switch chip to processes packets using it’s switching logic. The diagram below illustrates that switching occurs before any software related action:

How To Remove BPDU-Filtering Enable and Timeout From Port Configuration

A packet that is received by one of the ports always passes through the switch logic first. Switch logic decides to which ports the packet should be going to (most commonly this decision is made based on the destination MAC address of a packet, but there might be other criteria that might be involved based on the packet and the configuration). In most cases the packet will not be visible to RouterOS (only statistics will show that a packet has passed through), this is because the packet was already processed by the switch chip and never reached the CPU, though it is possible in certain situations to allow a packet to be processed by the CPU. To allow the CPU process a packet you need to forward the packet to the CPU and not allow the switch chip to forward the packet through a switch port directly, this is usually called passing a packet to the switch CPU port (or the bridge CPU port in bridge VLAN filtering scenario).

By passing a packet to the switch CPU port you are prohibiting the switch chip to forward the packet directly, this allows the CPU to process the packet and lets the CPU to forward the packet. Passing the packet to the CPU port will give you the opportunity to route packets to different networks, perform traffic control and other software related packet processing actions. To allow a packet to be processed by the CPU, you need to make certain configuration changes depending on your needs and on the device you are using (most commonly passing packets to the CPU are required for VLAN filtering setups). Check the manual page for your specific device:

Warning: Certain bridge and Ethernet port properties are directly related to switch chip settings, changing such properties can trigger a switch chip reset, that will temporarily disable all Ethernet ports that are on the switch chip for the settings to have an effect, this must be taken into account whenever changing properties on production environments. Such properties are DHCP Snooping, IGMP Snooping, VLAN filtering, L2MTU, Flow Control and others (exact settings that can trigger a switch chip reset depends on the device’s model).

Example

To group ether1 and ether2 in the already created bridge1 bridge

[править] Настройка Rapid PVST+

Включение Rapid PVST:

sw(config)# spanning-tree mode rapid-pvst

Properties

Note: Improperly configured bridge VLAN filtering can cause security issues, make sure you fully understand how Bridge VLAN table works before deploying your device into production environments.

How To Remove BPDU-Filtering Enable and Timeout From Port Configuration

Trunk and Access Ports

/interface bridge
add name=bridge1 vlan-filtering=no

/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether6 pvid=200
add bridge=bridge1 interface=ether7 pvid=300
add bridge=bridge1 interface=ether8 pvid=400

/interface bridge vlan
add bridge=bridge1 tagged=ether2 untagged=ether6 vlan-ids=200
add bridge=bridge1 tagged=ether2 untagged=ether7 vlan-ids=300
add bridge=bridge1 tagged=ether2 untagged=ether8 vlan-ids=400

/interface bridge set bridge1 vlan-filtering=yes

[править] Настройка MST

Задачи по настройке MST:

  • Создать нужные VLAN’ы и назначить порты в соответствующие VLAN.
  • Настроить параметры IST:
    IST Bridge Priority
    IST Port Priority
  • IST Bridge Priority
  • IST Port Priority
  • Глобально включить MST и зайти в режим настройки MST выполнив команду spanning-tree mode mst
  • Из режима настройки MST настроить параметры, которые обязательно должны совпадать у всех коммутаторов в регионе:
    Имя региона MST
    MST revision number
    Соответствие MST instance — VLAN’ы
  • Имя региона MST
  • MST revision number
  • Соответствие MST instance — VLAN’ы
  • Настроить параметры, которые обычно (но не обязательно) уникальны для коммутатора:
    Bridge Priority для instance
    Port Priority для instance
  • Bridge Priority для instance
  • Port Priority для instance

Bridge VLAN Filtering

Note: Currently only CRS3xx series devices are capable of using bridge VLAN filtering and hardware offloading at the same time, other devices will not be able to use the benefits of a built-in switch chip when bridge VLAN filtering is enabled. Other devices should be configured according to the method described in the Basic VLAN switching guide. If an improper configuration method is used, your device can cause throughput issues in your network.

Bridge VLAN Filtering since RouterOS v6.41 provides VLAN aware Layer2 forwarding and VLAN tag modifications within the bridge.
This set of features makes bridge operation more like a traditional Ethernet switch and allows to overcome Spanning Tree compatibilty issues compared to configuration when tunnel-like VLAN interfaces are bridged.
Bridge VLAN Filtering configuration is highly recommended to comply with STP (IEEE 802.1D), RSTP (IEEE 802.1W) standards and is mandatory to enable MSTP (IEEE 802.1s) support in RouterOS.

Sub-menu: /interface bridge vlan

Bridge VLAN table represents per-VLAN port mapping with an egress VLAN tag action.
tagged ports send out frames with a learned VLAN ID tag.
untagged ports remove VLAN tag before sending out frames if the learned VLAN ID matches the port pvid.

Warning: The vlan-ids parameter can be used to specify a set or range of VLANs, but specifying multiple VLANs in a single bridge VLAN table entry should only be used for ports that are tagged ports. In case multiple VLANs are specified for access ports, then tagged packets might get sent out as untagged packets through the wrong access port, regardless of the PVID value.

Sub-menu: /interface bridge host

Bridge Host table allows monitoring learned MAC addresses and when vlan-filtering is enabled shows learned VLAN ID as well.

Note: Make sure you have added all needed interfaces to the bridge VLAN table when using bridge VLAN filtering. For routing functions to work properly on the same device through ports that use bridge VLAN filtering, you will need to allow access to the CPU from those ports, this can be done by adding the bridge interface itself to the VLAN table, for tagged traffic you will need to add the bridge interface as a tagged port and create a VLAN interface on the bridge interface. Examples can be found at the Management port section.

Warning: When allowing access to the CPU, you are allowing access from a certain port to the actual router/switch, this is not always desirable. Make sure you implement proper firewall filter rules to secure your device when access to the CPU is allowed from a certain VLAN ID and port, use firewall filter rules to allow access to only certain services.

Fast Forward

Fast Forward allows to forward packets faster under special conditions. When Fast Forward is enabled, then the bridge can process packets even faster since it can skip multiple bridge related checks, including MAC learning. Below you can find a list of conditions that MUST be met in order for Fast Forward to be active:

  • Bridge has fast-forward set to yes
  • Bridge has only 2 running ports
  • Both bridge ports support Fast Path, Fast Path is active on ports and globally on the bridge
  • Bridge Hardware Offloading is disabled
  • Bridge VLAN Filtering is disabled
  • bridge DHCP snooping is disabled
  • unknown-multicast-flood is set to yes
  • unknown-unicast-flood is set to yes
  • broadcast-flood is set to yes
  • MAC address for the bridge matches with a MAC address from one of the bridge slaves
  • horizon for both ports is set to none

Note: Fast Forward disables MAC learning, this is by design to achieve faster packet forwarding. MAC learning prevents traffic from flooding multiple interfaces, but MAC learning is not needed when a packet can only be sent out trough just one interface.

It is possible to check how many packets where processed by Fast Forward:

Note: If packets are processed by Fast Path, then Fast Forward is not active. Packet count can be used as an indicator whether Fast Forward is active or not.

Since RouterOS 6.44beta28 it is possible to monitor Fast Forward status, for example:

Warning: Disabling or enabling fast-forward will temporarily disable all bridge ports for settings to take effect. This must be taken into account whenever changing this property on production environments since it can cause all packets to be temporarily dropped.

VLAN Example #2 (Trunk and Hybrid Ports)

How To Remove BPDU-Filtering Enable and Timeout From Port Configuration

Trunk and Hybrid Ports

/interface bridge vlan
add bridge=bridge1 tagged=ether2,ether7,ether8 untagged=ether6 vlan-ids=200
add bridge=bridge1 tagged=ether2,ether6,ether8 untagged=ether7 vlan-ids=300
add bridge=bridge1 tagged=ether2,ether6,ether7 untagged=ether8 vlan-ids=400

Warning: You don’t have to add access ports as untagged ports, they will be added dynamically as untagged port with the VLAN ID that is specified in PVID, you can specify just the trunk port as tagged port. All ports that have the same PVID set will be added as untagged ports in a single entry. You must take into account that the bridge itself is a port and it also has a PVID value, this means that the bridge port also will be added as untagged port for the ports that have the same PVID. You can circumvent this behaviour by either setting different PVID on all ports (even the trunk port and bridge itself), or to use frame-type set to accept-only-vlan-tagged.

Bridge Settings

Sub-menu: /interface bridge settings

Note: In case you want to assign Simple Queues (Simple QoS) or global Queue Trees to traffic that is being forwarded by a bridge, then you need to enable the use-ip-firewall property. Without using this property the bridge traffic will never reach the postrouting chain, Simple Queues and global Queue Trees are working in the postrouting chain. To assign Simple Queues or global Queue Trees for VLAN or PPPoE traffic in a bridge you should enable appropriate properties as well.

[править] Дополнительная информация

  • Spanning Tree Protocol Root Guard Enhancement
  • Spanning Tree PortFast BPDU Guard Enhancement
  • Spanning Tree Protocol Problems and Related Design Considerations
  • Understanding and Configuring the Cisco UplinkFast Feature

Configuring Unifi switch in CLI mode

At this point we are not going to go into details why this is happening, we just need to stop flooding the syslog server with messages. To do that, the easiest way is to enable BPDU filter on the 0/1 interface. This will effectively ignore all BPDU messages received on that port, and since the device connected on the other side shouldn’t participate in our STP topology, we should be OK – at least until the next reboot 🙂

As can be seen here, BPDU filter is now enabled and the switch is no longer flooding the syslog server.

As previously stated, BPDU filter is a functionality that will help us resolve the issue at hand. This still doesn’t resolve the underlying issue of BPDU frames being sent in the first place. BPDU filter is a great option when you don’t control both devices that are having an issue and you need to resolve a symptom, not an underlying issue.
BPDU filter shouldn’t be configured on ports of the devices we control unless we are trying to manually influence spanning-tree topology. BPDU filtering on ports that are actually connected to switches in our network could cause bridging loops as the ports configured with BPDU filter will ignore any BPDU they receive and will alway be in a forwarding state.

Configuration changes made in the CLI of Unifi equipment are not saved after a device reboot. Unfortunately, once the device is rebooted, changes made in the CLI will be gone and this procedure will have to be repeated. This is by design as Unifi devices should be managed by a Unifi Controller, not directly. If anyone has an idea on how to make CLI changes permanent, feel free to comment below.

[править] Опциональные настройки STP

  • Loop Guard
  • BPDU Guard
  • Root Guard
  • PortFast
  • BPDU Filter
  • UDLD

Функции PortFast, BPDU guard, BPDU filtering, EtherChannel guard, root guard или loop guard могут быть настроены в режиме PVST+, rapid PVST+ или MSTP.

Функции UplinkFast, BackboneFast или cross-stack UplinkFast могут быть настроены в режиме rapid PVST+ или MSTP, но они будут оставаться выключенными (inactive) до тех пор пока режим не будет изменен на PVST+.

Настройки по умолчанию опциональных функций

Portfast — функция, которая позволяет порту пропустить состояния listening и learning и сразу же перейти в состояние forwarding. Настраивается на портах уровня доступа, к которым подключены пользователи или сервера.

Фактически, PortFast меняет две вещи в стандартной работе STP:

  • порт пропускает состояния listening и learning
  • при изменении статуса порта, не отправляется сообщение о изменении состояния порта TCN BPDU (topology change notification BPDU)

Когда на интерфейсе включен PortFast, он все равно отправляет BPDU.

Но, если включить PortFast на портах, которые соединены с другими коммутаторами, то есть риск создания петли. Так как, после получения BPDU порт остается в состоянии Forwarding. За это время, уже может образоваться петля.

Поэтому, в связке с PortFast, как правило, используется BPDUGuard (хотя и это, конечно же, не даст 100% гарантии, что не будет петли).

Настройка Port Fast

Синтаксис команды для настройки Port Fast на интерфейсе:

Настройка Port Fast на access-интерфейсе:

sw(config)#interface fa0/1
sw(config-if)# spanning-tree portfast

Настройка Port Fast на интерфейсе, который работает в режиме trunk (тегированый порт):

sw(config)#interface fa0/1
sw(config-if)# spanning-tree portfast trunk

Функцию Port Fast можно настроить глобально на всех интерфейсах в режиме access:

sw(config)#spanning-tree portfast default

Отключить Port Fast на интерфейсе:

sw(config-if)# spanning-tree portfast disable

Просмотр информации о настройках Port Fast

Просмотр информации о статусе функции Port Fast на интерфейсе:

sw# show spanning-tree interface fa 0/1 portfast
VLAN0001 enabled

Просмотр информации о настройках spanning-tree на интерфейсе:

sw# show spanning-tree interface fa 0/1 detail
Port 1 (FastEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 000a.b8ab.eb80
Designated bridge has priority 32769, address 0012.0111.e580
Designated port id is 128.1, designated path cost 19
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast mode
Link type is point-to-point by default
BPDU: sent 75684, received 0

Если Port Fast была включена глобально на всех access-портах, то это можно посмотреть в суммарной информации о настройках STP на коммутаторе:

После включения UplinkFast на коммутаторе:

Если основной RP выходит из строя, то коммутатор сразу переключается на запасной и переводит его в состояние forward.

Кроме того, UplinkFast позволяет коммутаторам обновить записи в таблицах коммутации, без использования TCN.
Вместо TCN коммутатор находит MAC-адреса всех локальных устройств и отправляет один multicast фрейм с каждым MAC-адресом в поле отправитель. Удаляются также остальные записи в таблицы коммутации самого коммутатора.

Позволяет быстрее найти альтернативный путь, после изменения топологии. Для того чтобы функция работала, необходимо включить её на всех коммутаторах в сети.

sw(config)# spanning-tree backbonefast

BPDU Guard — функция, которая позволяет выключать порт при получении BPDU.

Может быть включена глобально на коммутаторе или на интерфейсе, у этих режимов есть некоторые отличия:

  • Если BPDU Guard включена глобально на коммутаторе, то для портов с включенной функцией Port Fast:
    при корректной настройке, порты с включенным Port Fast не должны получать BPDU,
    получение BPDU на портах с Port Fast говорит о неправильных настройках или о том, что подключено неавторизованное устройство,
    при получении BPDU на интерфейсе, функция BPDU Guard переведет его в состояние error-disabled,
  • при корректной настройке, порты с включенным Port Fast не должны получать BPDU,
  • получение BPDU на портах с Port Fast говорит о неправильных настройках или о том, что подключено неавторизованное устройство,
  • при получении BPDU на интерфейсе, функция BPDU Guard переведет его в состояние error-disabled,
  • Если BPDU Guard включена на интерфейсе (без включения функции Port Fast):
    при получении BPDU на интерфейсе, функция BPDU Guard переведет его в состояние error-disabled.
  • при получении BPDU на интерфейсе, функция BPDU Guard переведет его в состояние error-disabled.
Настройка BPDU Guard

Включение BPDU Guard глобально на коммутаторе, на портах с включенной функцией Port Fast:

sw(config)# spanning-tree portfast bpduguard default

Настройка BPDU Guard на интерфейсе:

sw(config)#interface fa0/1
sw(config-if)# spanning-tree bpduguard enable

Просмотр информации о настройках BPDU Guard

sw1#sh span int fa0/1 detail
Port 1 (FastEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 000a.b8ab.eb80
Designated bridge has priority 32769, address 0012.0111.e580
Designated port id is 128.1, designated path cost 19
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Bpdu guard is enabled
BPDU: sent 116964, received 0

Если функция BPDU Guard была включена глобально на коммутаторе, то это можно посмотреть в суммарной информации о настройках STP на коммутаторе:

BPDU Filtering — после включения функции, порт не принимает и не отправляет BPDU.

  • Если BPDU filtering включена глобально на коммутаторе, то для портов с включенной функцией Port Fast:
    функция работает только для портов на которых включена функция Port Fast, но не включена функция BPDU Filtering (не применена на интерфейсе),
    порт не принимает и не отправляет BPDU,
    при включении порта отправляются несколько BPDU (10 BPDU) если порт на протяжении этого времени получает любой BPDU пакет то PortFast или PortFast + BPDU filtering отключается.
  • функция работает только для портов на которых включена функция Port Fast, но не включена функция BPDU Filtering (не применена на интерфейсе),
  • порт не принимает и не отправляет BPDU,
  • при включении порта отправляются несколько BPDU (10 BPDU) если порт на протяжении этого времени получает любой BPDU пакет то PortFast или PortFast + BPDU filtering отключается.
  • Если BPDU filtering включена на интерфейсе (без включения функции Port Fast):
    порт не принимает и не отправляет BPDU,
    применение этой функции на интерфейсе равносильно отключению spanning-tree на нем и может привести к образованию петель.
  • применение этой функции на интерфейсе равносильно отключению spanning-tree на нем и может привести к образованию петель.

Возможные комбинации при включении BPDU Filtering глобально или на интерфейсе:

Настройка BPDU Filtering

Включение BPDU Filtering глобально на коммутаторе, на портах с включенной функцией Port Fast:

sw(config)# spanning-tree portfast bpdufilter default

Настройка BPDU Filtering на интерфейсе:

sw(config)#interface fa0/1
sw(config-if)# spanning-tree bpdufilter enable

Просмотр информации о настройках BPDU Filtering

sw1#sh spanning-tree interface fa0/1 detail
Port 1 (FastEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 19, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 000a.b8ab.eb80
Designated bridge has priority 32769, address 0012.0111.e580
Designated port id is 128.1, designated path cost 19
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
The port is in the portfast mode by default
Link type is point-to-point by default
Bpdu filter is enabled
BPDU: sent 117353, received 0

Если функция BPDU Filtering была включена глобально на коммутаторе, то это можно посмотреть в суммарной информации о настройках STP на коммутаторе:

Root Guard — если функция включена на интерфейсе, то при получении на нём BPDU лучшего, чем текущий корневой коммутатор, порт переходит в состояние root-inconsistent (эквивалентно состоянию listening).
После того как порт перестает получать BPDU, он переходит в нормальное состояние.

Включение Root Guard на интерфейсе (переводит порт в роль designated):

sw(config)# interface fa0/1
sw(config-if)# spanning-tree guard root

Посмотреть какие порты в состоянии inconsistent:

sw# show spanning-tree inconsistentports

Одна из проблем с STP в том, что само оборудование, которое его использует, может быть причиной сбоя и создания петли. Для предотвращения подобных сбоев и была создана функция Loop Guard.

Описание Loop Guard

Loop Guard – обеспечивает дополнительную защиту на 2 уровне от возникновения петель. STP петля возникает когда блокированный порт в избыточной топологии ошибочно переводится в состояние forwarding(передачи). Это может возникнуть например когда блокированный STP порт перестаёт получать BPDU. Так как работа протокола STP полагается на постоянное присутствие BPDU пакетов в сети.(Designated (назначенный) порт постоянно должен передавать BPDU пакеты а non-designated должен их получать). Как только на порт перестают поступать BPDU STP понимает это как изменение топологии и исчезновение петли и переводит порт в состояние forwarding.
В случае использования Loop Guard порт после прекращения получения пакетов BPDU переводится в состояние loop-inconsistent и остаются по прежнему блокированным. А в логах появится следующее сообщение:

Как только на порт снова начинают поступать BPDU порт переводится в состояние согласно содержанию пакетов BPDU, а в логах появится следующее сообщение:

По умолчанию Loop guard выключен.
Для того что бы его включить используйте следующие команды:

spanning-tree guard loop

Router(config)#interface gigabitEthernet 1/1
Router(config-if)#spanning-tree guard loop

Что бы включить Loop guard глобально:

Router(config)#spanning-tree loopguard default

Команда для проверки статуса Loop Guard:

show spanning-tree summary

Router#show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
EtherChannel misconfig guard is enabled
Extended system ID is disabled
Portfast Default is disabled
PortFast BPDU Guard Default is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default is enabled
UplinkFast is disabled
BackboneFast is disabled
Pathcost method used is short

  • UDLD — использует сообщения канального уровня для того чтобы обнаружить ситуацию когда коммутатор более не получает кадры от соседа. Коммутатор передающий интерфейс которого не вышел из строя, переводится в состояние err-disable
  • UDLD aggressive mode — коммутатор пытается соединиться с другим коммутатором (8 раз) после того как обнаружил, что более не получает кадры от соседа. Если коммутатор не отвечает, то обе стороны переводятся в состояние err-disable.

Совместимость и отличия функций

  • Root Guard и Loop Guard не могут быть включены одновременно.
  • Root Guard не должен быть включен на интерфейсах, которые используются функцией UplinkFast. UplinkFast позволяет запасным интерфейсам (которые находятся в заблокированном состоянии) заменять корневой порт, если он вышел из строя. Однако, если на запасных интерфейсах включен Root Guard, то порты будут переведены в состояние root-inconsistent и не перейдут в состояние forward.

Loop Guard в сравнении с UDLD

Функции Loop Guard и UDLD (Unidirectional Link Detection) частично совпадают друг с другом. Обе эти функции предназначены для борьбы с последствиями сбоев в функциональности STP. Однако есть небольшие отличия в функциональности.

Spanning Tree Protocol

RouterOS bridge interfaces are capable of running Spanning Tree Protocol to ensure a loop-free and redundant topology. For small networks with just 2 bridges STP does not bring much benefits, but for larger networks properly configured STP is very crucial, leaving STP related values to default may result in completely unreachable network in case of a even single bridge failure. To achieve a proper loop-free and redundant topology, it is necessary to properly set bridge priorities, port path costs and port priorities.

Warning: In RouterOS it is possible to set any value for bridge priority between 0 and 65535, the IEEE 802.1W standard states that the bridge priority must be in steps of 4096. This can cause incompatibility issues between devices that does not support such values. To avoid compatibility issues, it is recommended to use only these priorities: 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440

STP has multiple variants, currently RouterOS supports STP, RSTP and MSTP. Depending on needs, either one of them can be used, some devices are able to run some of these protocols using hardware offloading, detailed information about which device support it can be found in the Hardware Offloading section. STP is considered to be outdated and slow, it has been almost entirely replaced in all network topologies by RSTP, which is backwards compatible with STP. For network topologies that depend on VLANs, it is recommended to use MSTP since it is a VLAN aware protocol and gives the ability to do load balancing per VLAN groups. There are a lot of considerations that should be made when designing a STP enabled network, more detailed case studies can be found in the Spanning Tree Protocol section. In RouterOS the protocol-mode property controls the used STP variant.

Note: By the IEEE 802.1ad standard the BPDUs from bridges that comply with IEEE 802.1Q are not compatible with IEEE 802.1ad bridges, this means that the same bridge VLAN protocol should be used across all bridges in a single Layer2 domain, otherwise (R/M)STP will not function properly.

Summary

Sub-menu: /interface bridge

Standards: IEEE 802.1D , IEEE 802.1Q

Ethernet-like networks (Ethernet, Ethernet over IP, IEEE 802.11 in ap-bridge or bridge mode, WDS, VLAN) can be connected together using MAC bridges. The bridge feature allows the interconnection of hosts connected to separate LANs (using EoIP, geographically distributed networks can be bridged as well if any kind of IP network interconnection exists between them) as if they were attached to a single LAN. As bridges are transparent, they do not appear in traceroute list, and no utility can make a distinction between a host working in one LAN and a host working in another LAN if these LANs are bridged (depending on the way the LANs are interconnected, latency and data rate between hosts may vary).

[править] Петли в сети

Петли в коммутируемой сети могут возникнуть по нескольким причинам:

  • Отключен STP;
  • PVST BPDU передает идентификатор VLAN. Если на access-интерфейсе полученный идентификатор VLAN’а не совпадает с VLAN ID в котором было получено BPDU, то порт переводится в заблокированное состояние для этого VLAN;
  • Различные версии STP;
  • Разные native VLAN’ы на концах транка;
  • Слишком маленькие таймеры STP;
  • Большое количество хопов в топологии STP.

Per port STP

There might be certain situations where you want to limit STP functionality on a single or multiple ports. Below you can find some examples for different use cases.

Warning: Be careful when changing the default (R/M)STP functionality, make sure you understand the working principles of STP and BPDUs. Misconfigured (R/M)STP can cause unexpected behaviour.

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
/interface bridge filter
add action=drop chain=output dst-mac-address=01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF out-interface=ether1

/interface ethernet switch rule
add dst-mac-address=01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF new-dst-ports=”” ports=ether1 switch=switch1

Or on CRS1xx/CRS2xx with Access Control List (ACL) support:

/interface ethernet switch acl
add action=drop mac-dst-address=01:80:C2:00:00:00 src-ports=ether1

In this example all received BPDUs on ether1 are dropped. This will prevent other bridges on that port becoming a root bridge.

/interface bridge
add name=bridge1
/interface bridge port
add bridge=bridge1 interface=ether1 bpdu-guard=yes
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3

Оцените статью
Huawei Devices
Добавить комментарий