我在學習Ryu的內容,
在實作第五章生成樹(Spanning Tree)時遇到一些問題,
網路架構如下:
簡單說,就是3台switch互連,因為會造成迴圈,所以s3-eth2會自動BLOCK,
依實作順序,環境設好後,接下來模擬s2-eth2故障,然後s3-eth3就會自動啟用。
所以手動將s2-eth2關閉(down),方法是在Node s2下指令:
root@ryu-vm:~# ifconfig s2-eth2 down
正常情況下偵測所見情況如下,而且s3-eth2應該會自動啟用(up):
[STP][INFO] dpid=0000000000000002: [port=2] Link down.
[STP][INFO] dpid=0000000000000002: [port=2] DESIGNATED_PORT /DISABLE
...
[STP][INFO] dpid=0000000000000003: [port=2] DESIGNATED_PORT /FORWARD
...
可是我實作的結果卻是:
[STP][INFO] dpid=0000000000000002: [port=2] Link up.
[STP][INFO] dpid=0000000000000002: [port=2] DESIGNATED_PORT /LISTEN
[STP][INFO] dpid=0000000000000002: [port=2] Link down.
[STP][INFO] dpid=0000000000000002: [port=2] DESIGNATED_PORT /DISABLE
[STP][INFO] dpid=0000000000000001: [port=2] Link up.
[STP][INFO] dpid=0000000000000001: [port=2] DESIGNATED_PORT /LISTEN
[STP][INFO] dpid=0000000000000001: [port=2] Link down.
[STP][INFO] dpid=0000000000000001: [port=2] DESIGNATED_PORT /DISABLE
[STP][INFO] dpid=0000000000000002: [port=2] Link up.
[STP][INFO] dpid=0000000000000002: [port=2] DESIGNATED_PORT /LISTEN
[STP][INFO] dpid=0000000000000001: [port=2] Link up.
[STP][INFO] dpid=0000000000000001: [port=2] DESIGNATED_PORT /LISTEN
...
[STP][INFO] dpid=0000000000000001: Root bridge.
...
[STP][INFO] dpid=0000000000000002: [port=2] Receive superior BPDU.
...
[STP][INFO] dpid=0000000000000002: [port=2] ROOT_PORT /FORWARD
我實作的結果,s2-eth2雖然手動關閉,但卻又自動啟用,
完全沒讓s3-eth2自動啟用?
請問我該如何設定?才能達到預期的效果-讓s2-eth2關閉,且s3-eth3自動啟用?