Portál AbcLinuxu, 6. května 2025 23:07
auto eth0.502 iface eth0.502 inet manual auto eth2.502 iface eth2.502 inet manual auto eth1 iface eth1 inet manual auto eth3 iface eth3 inet manual auto xenbr0 iface xenbr0 inet static address 10.2.0.X netmask 255.255.255.0 network 10.2.0.0 broadcast 10.2.0.255 gateway 10.2.0.1 bridge_ports eth0.502 eth2.502 bridge_stp on auto cluster0 iface cluster0 inet static address 172.29.1.X netmask 255.255.255.0 network 172.29.1.0 broadcast 172.29.1.255 bridge_ports eth1 eth3 bridge_stp onkonfigurace GW:
auto eth0 iface eth0 inet manual auto eth1 iface eth1 inet manual auto eth2 iface eth2 inet manual auto eth3 iface eth3 inet manual auto eth4 iface eth4 inet manual auto eth5 iface eth5 inet manual auto ebond0 iface ebond0 inet static address A.B.C.D netmask A.B.C.D network A.B.C.D broadcast A.B.C.D gateway A.B.C.D bond-slaves eth0 eth1 bond-mode 4 bond-primary eth0 eth1 bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto ibond0 iface ibond0 inet manual bond-slaves eth2 eth4 bond-mode 4 bond-primary eth2 eth4 bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto ibond1 iface ibond1 inet manual bond-slaves eth3 eth5 bond-mode 4 bond-primary eth3 eth5 bond-miimon 100 bond-downdelay 200 bond-updelay 200 auto ibr0 iface ibr0 inet manual # bridge_ports ibond0 ibond1 bridge_ports ibond0 bridge_stp on auto ibr0.501 iface ibr0.501 inet static address 172.29.1.1 network 172.29.1.0 netmask 255.255.255.0 broadcast 172.29.1.255 auto ibr0.502 iface ibr0.502 inet static address 10.2.0.1 network 10.2.0.0 netmask 255.255.255.0 broadcast 10.2.0.255
Řešení dotazu:
spanning-tree vlan vlan-id root secondary
a aplikoval na druhem switchi pro vsechny VLANy. Spojeni stale nefunguje. Prikladam vysledek show spanning-tree vlan 501
(VLAN 501 je nastavena jako access na portech kam miri rozhrani v bridgi cluster0 z uvedene konfigurace):
switch1:
VLAN0501 Spanning tree enabled protocol ieee Root ID Priority 29173 Address 04da.d2e9.2980 Cost 3 Port 224 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 33269 (priority 32768 sys-id-ext 501) Address b4e9.b004.5000 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi1/0/29 Desg FWD 4 128.29 P2p Gi1/0/30 Desg FWD 4 128.30 P2p Gi1/0/35 Desg FWD 4 128.35 P2p Po1 Root FWD 3 128.224 P2p Po2 Desg FWD 3 128.232 P2pswitch2:
VLAN0501 Spanning tree enabled protocol ieee Root ID Priority 29173 Address 04da.d2e9.2980 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 29173 (priority 28672 sys-id-ext 501) Address 04da.d2e9.2980 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi1/0/29 Desg FWD 4 128.29 P2p Gi1/0/30 Desg FWD 4 128.30 P2p Gi1/0/35 Desg FWD 4 128.35 P2p Po1 Desg FWD 3 128.224 P2pJe neco dalsiho co bych mel zkontrolovat?
Mas smulu. U Cisco pracuji kreteni, kteri si vymysleli vlastni STPhehe, nebylo to nahodou cisco, kdo STP vymyslel? :) Jinak se na ciscu urcite da zvolit kompatibilni verze STP - docela dobre to ma popsany samuraj
SW1 show spanning-tree vlan 502
VLAN0502 Spanning tree enabled protocol rstp Root ID Priority 20982 Address b4e9.b004.5000 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 20982 (priority 20480 sys-id-ext 502) Address b4e9.b004.5000 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi1/0/1 Desg FWD 4 128.1 P2p Gi1/0/2 Desg FWD 4 128.2 P2p Po1 Desg FWD 3 128.224 P2p Po2 Desg FWD 3 128.232 P2p
SW2 show spanning-tree vlan 502
VLAN0502 Spanning tree enabled protocol rstp Root ID Priority 20982 Address b4e9.b004.5000 Cost 3 Port 224 (Port-channel1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 29174 (priority 28672 sys-id-ext 502) Address 04da.d2e9.2980 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi1/0/1 Altn BLK 4 128.1 P2p Gi1/0/2 Desg FWD 4 128.2 P2p Po1 Root FWD 3 128.224 P2p Po2 Desg FWD 3 128.232 P2p
GW brctl showstp xenbr0
ibr0 bridge id 8000.001018f5a2ec designated root 5001.b4e9b0045000 root port 2 path cost 103 max age 20.00 bridge max age 20.00 hello time 2.00 bridge hello time 2.00 forward delay 15.00 bridge forward delay 15.00 ageing time 300.01 hello timer 0.00 tcn timer 0.00 topology change timer 0.00 gc timer 147.79 flags ibond0 (1) port id 8001 state forwarding designated root 5001.b4e9b0045000 path cost 100 designated bridge 8000.001018f5a2ec message age timer 0.00 designated port 8001 forward delay timer 0.00 designated cost 103 hold timer 0.00 flags CONFIG_PENDING ibond1 (2) port id 8002 state forwarding designated root 5001.b4e9b0045000 path cost 100 designated bridge 7001.04dad2e92980 message age timer 18.57 designated port 80e8 forward delay timer 0.00 designated cost 3 hold timer 0.00 flags
Host brctl showstp xenbr0
xenbr0 bridge id 8000.bc305bf90d6c designated root 8000.bc305bf90d6c root port 0 path cost 0 max age 20.00 bridge max age 20.00 hello time 2.00 bridge hello time 2.00 forward delay 15.00 bridge forward delay 15.00 ageing time 300.01 hello timer 1.27 tcn timer 0.00 topology change timer 0.00 gc timer 6.78 flags eth0.502 (1) port id 8001 state forwarding designated root 8000.bc305bf90d6c path cost 4 designated bridge 8000.bc305bf90d6c message age timer 0.00 designated port 8001 forward delay timer 0.00 designated cost 0 hold timer 0.26 flags eth2.502 (2) port id 8002 state forwarding designated root 8000.bc305bf90d6c path cost 4 designated bridge 8000.bc305bf90d6c message age timer 0.00 designated port 8002 forward delay timer 0.00 designated cost 0 hold timer 0.26 flagsJeste jsem prilozil schema aktualniho zapojeni, pro lepsi predstavu. Behem dneska jsem nahradil vsechny bridge na linuxech za bonding active-backup a momentalne to dela co potrebuju. Preklopeni po odpojeni portu trva 15s, coz je pomerne dlouho, ale nevim jestli by RSTP bylo rychlejsi?
Takže, jestli se nepletu, tak RSTP ještě v kernelu neni?
AFAIK ne "ještě" - počítá se s userspace implementací.
received packet on ibond1 with
own address as source address
.
Jinak tohle schema a vubec pouziti STP je kompromis, puvodne jsem mel v planu udelat etherchannely pro kazdy server nad souvisejicimi porty z obou switchu. Pak bych mel do kazdeho serveru znasobenou konektivitu vykonove i s ochranou proti vypadku. Coz by ovsem vyzadovalo mit ty switche v jednom stacku, coz ve stavajici verzi neumoznuji (ne bez Flexstacku).
Jeste me napadl jeden pokus, ale momentalne pocitam, ze STP opustim a necham tam ten failover bond bez popdpory na strane switche.
spanning-tree portfast [trunk]
). Vysledek je ten, ktery jsem potreboval. Pri vypadku spoje dojde k temer okamzitemu preklopeni na druhy switch, cluster se nerozpadne.
Jedina ciste kosmeticka otazka me jeste napadla: jestli je lepsi udelat ten bond nad fyzickym interfacem a nad nim udelat logicky interface pro kazdou potrebnou VLANu nebo udelat zvlast bond pro kazdou VLANu. Mam vyzkousene, ze funguje oboji. Ta druha varainta by mozna mela smysl, pokud by ovladac sitovky umel pracovat s podporou VLAN primo v HW sitovky. Ale to je ciste moje spekulace.
Ta druha varainta by mozna mela smysl, pokud by ovladac sitovky umel pracovat s podporou VLAN primo v HW sitovky.
Tohle funguje i s tou první, s níž se tak nějak všeobecně počítá. Naopak, když to uděláte tím druhým způsobem, bude se úplně zbytečně řešit monitoring a failover pro každý bond interface zvlášť (možná tam budou i jiné nevýhody, ale žádná mne z hlavy nenapadá).
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.