看板 Network 關於我們 聯絡資訊
大家好 我目前在某單位擔任網管 但對以前學長留下來的stp設定不太了解 這個單位有2台cisco 2960s 一台 hpe A5500-24G 沒有router 連線圖大概是這樣(更正) cisco n7k | | | | | | | | | 2960 2960 a5500 (三台都直連到不屬於我們單位的switch 也無從得知上游sw怎麼設定的) 問題來了 這三台switch有開stp,並共用同一個vlan 查詢後,兩台2960的stp root 指向a5500 意思是否 1.資料會由 src->2960s->N7K->a5500->N7K->wan 這樣繞一圈呢? 還是其實沒差 根本不需要開stp? 附上show spanning-tree result 2960: (mac e8ba.****.****) Spanning tree enabled protocol ieee Root ID Priority 0 Address e8f7.****.**** Cost 4 Port ** (TenGigabitEthernet*/*/*) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address e8ba.****.**** Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec a5500:(mac e8f7.****.****) dis stp ----[Port**(Ten-GigabitEthernet*/*/*)][FORWARDING]---- Port Protocol :enabled Port Role :CIST Designated Port Port Priority :128 Port Cost(Legacy) :Config=auto / Active=2 Desg. Bridge/Port :0.e8f7-****-**** / 128.34 Port Edged :Config=disabled / Active=disabled Point-to-point :Config=auto / Active=true Transmit Limit :10 packets/hello-time Protection Type :None MST BPDU Format :Config=auto / Active=legacy Port Config- Digest-Snooping :disabled Rapid transition :true Num of Vlans Mapped :1 PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20 BPDU Sent :1572341 TCN: 0, Config: 0, RST: 1572341, MST: 0 BPDU Received :4891 TCN: 0, Config: 0, RST: 4891, MST: 0 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.154.130 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Network/M.1585020003.A.72A.html ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 11:29:56
zaknafein: 觀念錯誤 STP 作用只是建立任何點到點的單一路徑03/24 11:56
zaknafein: 不代表所有流量都會先去 STP root03/24 11:56
zaknafein: 同樣錯誤觀念我也在快二十年的學長上看過 唉唉~03/24 11:57
也就是說stp只有建立在同vlan可以到的地方會做動嗎? ※ 編輯: tomsawyer (180.217.140.144 臺灣), 03/24/2020 12:00:47
zaknafein: STP 本來就是為 layer2 設計的03/24 12:09
zaknafein: 不同 vlan 會影響的話就天下大亂啦03/24 12:19
zaknafein: 但你文中有說三台 switch 用同一個 vlan ?03/24 12:20
都設定是vlan 1 這樣是叫做共用嗎(?)
zaknafein: 哪個 VLAN ? do these sw use the same ip network?03/24 12:22
這些sw上跑的都是同一個subnet的網路(/16) ※ 編輯: tomsawyer (180.217.140.144 臺灣), 03/24/2020 12:33:37
deadwood: 1.首先你們三台switch上串的也是一台switch,不然2960S03/24 13:07
deadwood: 不會看到另一台的BPDU資訊而把他當root03/24 13:08
deadwood: 2.三台switch都只有單port上串的話,哪台當root沒有影響03/24 13:09
deadwood: 如果2960S跟A5500又有另一port對接,就真的會所有流量先03/24 13:10
deadwood: 過A5500了03/24 13:10
zaknafein: 同一個subnet那上端的一定不是router03/24 13:10
zaknafein: 可能是L3 switch03/24 13:11
問了一下學長 發現是一台n7k 修正一下 ※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 13:16:17 ※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 13:19:18
birdy590: STP 只是用來避免 loop, 沒踩到可以當它不存在 03/24 13:26
zaknafein: n7k 是L3 Switch 2960 STP 跑到 a5500上面 表示設定有 03/24 13:28
zaknafein: 問題 如果整個環境STP是自動運算的 你把a5500拿掉 03/24 13:29
所以這樣會造成route上的問題/迴圈嗎?
zaknafein: 會造成整個網路環境暫時失能 建議你玩玩看 XD03/24 13:29
之前單位停電時 有想要乘機調2960s的stp 可是無法調成root bridge ※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 13:32:19
zaknafein: root 不見 整個 stp 需要重新運算03/24 13:35
zaknafein: 這段時間 網路不能使用 哈哈03/24 13:35
zaknafein: 2960 把 priority 設成 O 應該可以搶贏 A550003/24 13:39
zaknafein: 但是正常來說 root 擺在 n7k 那邊比較好 因為變動少03/24 13:40
zaknafein: 之前公司沒有強制設定 root 加上又沒做 bpdu guard03/24 13:43
zaknafein: 員工私接 switch 進而導致網路常出問題 董事長跳腳...03/24 13:44
怕是n7k上有弄stp guard ,因為我2960s的prior降不下來 不知道為什麼 ※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 13:45:53
deadwood: n7k要是有BPDU guard你也看不到STP訊息了吧.... 03/24 13:57
deadwood: 然後如果有stp root guard,A5500也會直接被斷03/24 13:58
deadwood: 可見是n7k甚麼設定都沒做,真的要解決你們環境的stp問題03/24 13:59
也就是說 我請n7k的管理員幫忙把root綁到他們身上就好了吧
zaknafein: 同意樓上 不過認真講 你自己lab玩玩就好03/24 13:59
因為這幾台都負責一整棟/好幾層樓的網路 斷幾分鐘不是不行 但不能太久xD
deadwood: 要解決stp問題根本的做法就是把A5500 priority設定改掉03/24 14:00
deadwood: 至少要設定跟2960一樣32768才對03/24 14:02
deadwood: 不是去把2960S調成0去搶root03/24 14:03
※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 14:22:39 ※ 編輯: tomsawyer (140.115.72.59 臺灣), 03/24/2020 14:32:37
zaknafein: 對 管理員會對你刮目相看 (如果他聽得懂的話)03/24 15:04
zaknafein: 不過我猜應該不懂 然後 call out vendor03/24 15:04
反正n7k的管理員也是學生,應該會吧 ※ 編輯: tomsawyer (140.115.50.48 臺灣), 03/24/2020 15:09:50
zaknafein: 我當學生時都不懂 (系電管理員03/24 15:22
所以我推測 N7K上沒對這幾台開stp/bpdu 所以才會導致root亂跳對嗎? ※ 編輯: tomsawyer (140.115.50.48 臺灣), 03/24/2020 15:26:30
birdy590: 如果沒特別設定, root bridge 本來就是選出來的03/24 15:57
birdy590: 因為和資料流向其實無關 確定不會loop 關掉也不會怎麼樣 03/24 16:01
deadwood: root跑到不該是root的switch(5500)是因為5500設定不對03/24 16:13
deadwood: spanning-tree的priority被設定為0(通常是core才這樣設)03/24 16:15
deadwood: N7K身為上層switch也沒設定priority才會這樣03/24 16:16
deadwood: 怎麼解前面講了,看你要不要去改而已,現在沒問題也只是03/24 16:17
deadwood: 問題還沒浮現出來,最好是找n7K管理者一起解掉比較好03/24 16:18
zaknafein: n7k 應設定 bpdu root guard 避免有sw宣告自己是 root03/24 16:47
zaknafein: 這東西一時半刻也講不清楚 出問題就會了03/24 16:49
我想要手設a5500 的stp port priority 結果超過240就不行了 仔細想想不對欸 明明priority是128.但在2960看過去是0 是因為是root的關係嗎? ※ 編輯: tomsawyer (140.115.50.48 臺灣), 03/24/2020 17:09:23 ※ 編輯: tomsawyer (140.115.50.48 臺灣), 03/24/2020 17:25:49
birdy590: 要改的是 bridge priority, 不是 port priority03/24 17:31
ok 我改好了 問題是我現在不知道上游的N7K mac address了Orz 因為是不同的subnet(都是外網) ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 20:32:31
zaknafein: Show cdp neighbor03/24 20:59
這個我剛剛有看到 問題是沒東西 2960S>sh cdp neighbor detail ------------------------- Device ID: ***-**-N7K(JA**********) Entry address(es): IP address: ***.**.***.187 <-某個與sw不同subnet的外網 Platform: N7K-C****, Capabilities: Router Switch IGMP CVTA phone port Interface: TenGigabitEthernet*/*/*, Port ID (outgoing port): Ethernet*/* Holdtime : 129 sec Version : Cisco Nexus Operating System (NX-OS) Software, Version *.*(**) advertisement version: 2 Native VLAN: 3070 <-這是對面看過來的vlan對吧? Duplex: full Management address(es): ------------------------- ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 21:25:15 ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 21:26:05 ok 我從hpe A5500那邊撈到了 LLDP neighbor-information of port **[Ten-GigabitEthernet1/1/2]: Neighbor index : 1 Update time : 0 days,0 hours,2 minutes,24 seconds Chassis type : MAC address Chassis ID : f0f7-5515-**** Port ID type : Locally assigned Port ID : Eth4/6 Port description : System name : ***-***N7K.***.***.tw System capabilities supported : Bridge,Router System capabilities enabled : Bridge,Router Port VLAN ID(PVID): 3070 Unknown organizationally-defined TLV TLV OUI : 00-01-42 TLV subtype : 1 Index : 1 TLV information : 01 STP也正常了 A5500: ----[CIST][Port**(Ten-GigabitEthernet1/1/2)][FORWARDING]---- Port Protocol :enabled Port Role :CIST Root Port Port Priority :64 Port Cost(Legacy) :Config=2 / Active=2 Desg. Bridge/Port :0.64a0-****-**** / 128.518 Port Edged :Config=disabled / Active=disabled Point-to-point :Config=auto / Active=true Transmit Limit :10 packets/hello-time Protection Type :None MST BPDU Format :Config=auto / Active=legacy Port Config- Digest-Snooping :disabled Num of Vlans Mapped :1 PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 0 BPDU Sent :1585837 TCN: 0, Config: 0, RST: 1584813, MST: 1024 BPDU Received :10002 TCN: 0, Config: 0, RST: 10002, MST: 0 2960s: VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 3070 Address 64a0.****.**** Cost 2 Port 28 (TenGigabitEthernet1/0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address e8ba.****.**** Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 21:40:52 ※ 編輯: tomsawyer (140.115.154.130 臺灣), 03/24/2020 22:24:16
deadwood: 現在還有一個小問題,兩台switch對接N7K的switchport 03/24 22:25
deadwood: mode可能不一致,對面是trunk port native vlan 307003/24 22:25
deadwood: 你的兩台switch可能都是access port vlan1(預設值)03/24 22:26
deadwood: N7K上面其實也有設定switch priority=0,但是VLANID高於03/24 22:28
deadwood: 底下5500(0+3070>0+1),root才會被搶走03/24 22:29
deadwood: 雖然使用上沒問題,但是也需要修正比較好的錯誤03/24 22:31
deadwood: 看是要把n7k上把對接埠改成access vlan 1(通常不太可能)03/24 22:32
deadwood: 或是把底下switch全部改成access vlan 3070,然後對接埠03/24 22:33
deadwood: 改成跟n7k一樣的mode跟vlan03/24 22:34
這樣把vlan統一有差別在哪嗎? 如果效能可以提高 我就一台一台慢慢改 有3台2960跟一堆aruba Orz ※ 編輯: tomsawyer (180.217.183.182 臺灣), 03/25/2020 00:44:41
deadwood: 現在N7K串接埠的native vlan是3070,下面是switch是 1 03/25 12:58
deadwood: 表示不帶vlan的封包在下串switch是當成vlan1流量,到了 03/25 12:59
deadwood: N7K是送到vlan 3070處理,哪天N7K native vlan改掉 03/25 13:00
deadwood: 下面的網路就不通了 03/25 13:00
deadwood: 要改下串switch設定要先確認N7K的設定,調整成一致的 03/25 13:02
deadwood: 自行修改不對照N7K的話可能改了也會不通,先確認清楚吧 03/25 13:03