RSTP ( Rapid Spanning Tree Protocol) Huawei

  1. Eski konfigurasyonları silme
    Konfigure edilmiş STP priority değerlerini Switch1 ve Switch2 üzerinden silelim ve STP cost değerini kaldıralım.
    [Switch1]undo stp priority
    [Switch1]interface GigabitEthernet 0/0/9
    [Switch1-GigabitEthernet0/0/9]undo stp cost
    [Switch2]undo stp priority
  2. RSTP konfigure etme ve konfigurasyonu görüntüleme
    Switch1 ve Switch2 üzerinde Spanning Tree Protocol’u olarak RSTP seçelim.
    [Switch1]stp mode rstp
    [Switch2]stp mode rstp
    RSTP hakkında bilgileri görüntülemek için display stp komutunu kullanalım.
    [Switch1]display stp
    ——-[CIST Global Info][Mode RSTP]——-
    CIST Bridge :4096 .80fb-06ae-2c2e
    Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
    CIST Root/ERPC :0 .80fb-06e8-d3c0 / 20000
    CIST RegRoot/IRPC :4096 .80fb-06ae-2c2e / 0
    CIST RootPortId :128.9
    BPDU-Protection :disabled
    CIST Root Type :SECONDARY root
    TC or TCN received :34
    TC count per hello :0
    STP Converge Mode :Normal
    Time since last TC :0 days 0h:10m:50s
    —-[Port1(GigabitEthernet0/0/1)][DOWN]—-
    Port Protocol :enabled
    Port Role :Disabled Port
    Port Priority :128
    Port Cost(Dot1T ) :Config=auto / Active=200000000
    Desg. Bridge/Port :4096.80fb-06ae-2c2e / 128.1
    Port Edged :Config=default / Active=disabled
    Point-to-point :Config=auto / Active=false
    Transit Limit :147 packets/hello-time
    Protection Type :None
    Port Stp Mode :MSTP
    —- More —-
    [Switch2]display stp
    ——-[CIST Global Info][Mode RSTP]——-
    CIST Bridge :0 .80fb-06e8-d3c0
    Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
    CIST Root/ERPC :0 .80fb-06e8-d3c0 / 0
    CIST RegRoot/IRPC :0 .80fb-06e8-d3c0 / 0
    CIST RootPortId :0.0
    BPDU-Protection :disabled
    CIST Root Type :PRIMARY root
    TC or TCN received :0
    TC count per hello :0
    STP Converge Mode :Normal
    Time since last TC :0 days 0h:23m:57s
    —-[Port1(GigabitEthernet0/0/1)][DOWN]—-
    Port Protocol :enabled
    Port Role :Disabled Port
    Port Priority :128
    Port Cost(Dot1T ) :Config=auto / Active=200000000
    Desg. Bridge/Port :0.80fb-06e8-d3c0 / 128.1
    Port Edged :Config=default / Active=disabled
    Point-to-point :Config=auto / Active=false
    Transit Limit :147 packets/hello-time
    Protection Type :None
    Port Stp Mode :MSTP
    —- More —-
    3.Edge port’ların konfigurasyonu
    Edge portları RSTP hesaplamalarına katılmadan forwarding durumundadır, directly connected olarak switch üzerinde bağlantılardır; loop oluşumuna neden olması beklenmeyen portlardır.
    [Switch1]interface GigabitEthernet 0/0/4
    [Switch1-GigabitEthernet0/0/4]stp edged-port enable
    [Switch2]interface GigabitEthernet 0/0/4
    [Switch2-GigabitEthernet0/0/4]stp edged-port enable
  3. BPDU Protection konfigurasyonu
    Edge portları direcly connected olarak terminal’de görünürler ve BPDU’ları almazlar. Saldırganlar bu port üzerinden BPDU paketleri ile saldırıda bulunabilir, eğer edge portları bpdu paketlerini alırlarsa switch bu portu non-edge durumuna geçirecek ve RSTP algoritmasını yeniden başlatacaktır. BPDU protection ardarda gelen kötü niyetli BPDU paketlerinin önüne geçecektir.
    [Switch1]stp bpdu-protection
    [Switch2]stp bpdu-protection
    Port protection bilgilerini görüntülemek için display stp brief komutunu kullanalım.
    display stp brief
    MSTID Port Role STP State Protection
    0 GigabitEthernet0/0/4 DESI FORWARDING BPDU
    0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
    0 GigabitEthernet0/0/10 ALTE DISCARDING NONE
    display stp brief
    MSTID Port Role STP State Protection
    0 GigabitEthernet0/0/4 DESI FORWARDING BPDU
    0 GigabitEthernet0/0/9 DESI FORWARDING NONE
    0 GigabitEthernet0/0/10 DESI FORWARDING NONE
    Konfigurasyondan sonra, Switch1 üzerinde G0/0/4 portu ve Switch2 üzerinde G0/0/4 ‘ün protection durumları BPDU olarak değişti.
  4. Loop Protection konfigurasyonu
    RSTP çalışan networklerde trafik yoğunluğu sırasında geciken bir paket nedeni ile veya unidirectional-link(iki tarafında up olması fakat sadece bir taraftan paket gelmesi) gibi durumlar oluşması halinde, switch BPDU paketlerini almaz ise root port’u tekrar berlirleyecektir; root port olan designated, discarding port modunda olanlar ise forwarding durumuna geçecektir. Böyle bir durumda looplar oluşacaktır.
    Loop protection’ı hem root port hem alternate port için aktif hale getiririz.
    [Switch1]display stp brief
    MSTID Port Role STP State Protection
    0 GigabitEthernet0/0/4 DESI FORWARDING BPDU
    0 GigabitEthernet0/0/9 ROOT FORWARDING NONE
    0 GigabitEthernet0/0/10 ALTE DISCARDING NONE
    Switch1 üzerinde G0/0/9 ve G0/0/10 için loop protection’ı aktif hale getirelim.
    [Switch1]interface GigabitEthernet 0/0/9
    [Switch1-GigabitEthernet0/0/9]stp loop-protection
    [Switch1-GigabitEthernet0/0/9]quit
    [Switch1]interface GigabitEthernet 0/0/10
    [Switch1-GigabitEthernet0/0/10]stp loop-protection
    Port protection bilgilerini görüntülemek için display stp brief komutunu kullanalım.
    display stp brief
    MSTID Port Role STP State Protection
    0 GigabitEthernet0/0/4 DESI FORWARDING BPDU
    0 GigabitEthernet0/0/9 ROOT FORWARDING LOOP
    0 GigabitEthernet0/0/10 ALTE DISCARDING LOOP
    Switch2 root olduğu ve üzerindeki tüm portlar designated port olduğu için loop protection uygulamamıza gerek yoktur. Eğer Switch1’i root olarak kullanmak istiyorsak, ayni işlemi Switch2 üzerinde yaparız; root port ve alternate port’u üzerinde loop protection uygularız.
    Final:
    display current-configuration
    #
    !Software VersionV100R005C01SPC100
    sysname Switch1
    #
    stp mode rstp
    stp bpdu-protection
    stp enable
    #
    interface GigabitEthernet0/0/4
    stp edged-port enable
    #
    interface GigabitEthernet0/0/9
    stp loop-protection
    bpdu enable
    #
    interface GigabitEthernet0/0/10
    stp loop-protection
    bpdu enable
    #
    user-interface con 0
    user-interface vty 0 4
    #
    return

display current-configuration
#
!Software Version V100R005C01SPC100
sysname Switch2
#
stp mode rstp
stp bpdu-protection
interface GigabitEthernet0/0/4
stp edged-port enable
#
interface GigabitEthernet0/0/9
bpdu enable
#
interface GigabitEthernet0/0/10
bpdu enable
#
user-interface con 0
user-interface vty 0 4
#
return

About cemerbas

Check Also

Next Generation Firewall (NGFW) Huawei

Next Generation Firewall (NGFW) üzerinden geçen trafiği, Application identification, User identification ve Content identification temellerine …

Bir yanıt yazın