故障現象 筆者使用的一臺CISCO 4006交換機的全局生成樹狀態如下: sh spantree summary MAC address redUCtion: disabled Root switch for vlans: none. Global loopguard is disabled on the switch. Global portfast is disabled on the switch. BPDU skewing detection disabled for the bridge. BPDU skewed for vlans: none. Portfast bpdu-guard disabled for bridge. Portfast bpdu-filter disabled for bridge. 現在想把某一個端口設為portfast,以節省初始化時間。因為使用終端,要求啟動后馬上連接到服務器,這個時間很短(不到1min),而等生成樹收斂的時間肯定超出。所以有這個需求。但是,把一個端口設置portfast后,沒有作用。還是要等一段時間網絡才通(在一臺cisco 2924交換機上設置后,馬上有預期的效果)。后來把BPDUfilter也重啟,再測試,還是沒有效果。 4006交換機設置單個端口portfast和BPDUfilter后結果這樣: sh spantree portfast 2/11 Portfast: Enable BPDU Filter: Enable BPDU Guard: Default Portfast BPDU guard is disabled. Portfast BPDU filter is disabled. 最后一行顯示結果還是disabled(無效)。
診斷過程 筆者查閱相關資料,從cisco網站查到,開機延時來自以下4個因素: Spanning-Tree PRotocol (STP) EtherChannel negotiation Trunking negotiation Link speed/duplex negotiation between the switch and the workstation 于是筆者把trunk mode設為off(原先是auto),解決了問題。