From owner-freebsd-net@FreeBSD.ORG Fri Jan 20 13:32:14 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A421F1065670 for ; Fri, 20 Jan 2012 13:32:14 +0000 (UTC) (envelope-from cosmic17@yandex.ru) Received: from forward18.mail.yandex.net (forward18.mail.yandex.net [IPv6:2a02:6b8:0:1402::3]) by mx1.freebsd.org (Postfix) with ESMTP id EC83C8FC17 for ; Fri, 20 Jan 2012 13:32:12 +0000 (UTC) Received: from web3.yandex.ru (web3.yandex.ru [95.108.252.103]) by forward18.mail.yandex.net (Yandex) with ESMTP id 0C0D517827BA for ; Fri, 20 Jan 2012 17:32:11 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1327066331; bh=6kO7km5Hw1L9bxQzYjuy3sWMLEFfT3sDEDhdNMg5LBY=; h=From:To:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=tGQ4U9NyQlw3BdLmjsC81wHl/Q37Eh4aCmlnCv8jufq/3HsTOqx1WWiMsYx8uFdFT v4pjQpftkXuKefJ75d/YYMWuggk0ODICJ5oOJLrrEyFxWYUPl2uThVp5uYuEdlsa2w 0UBqxaX2t3TDu/RigqSnbVy67eF11PSmhviEaXco= Received: from localhost (localhost.localdomain [127.0.0.1]) by web3.yandex.ru (Yandex) with ESMTP id E36D2208802C for ; Fri, 20 Jan 2012 17:32:10 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1327066330; bh=6kO7km5Hw1L9bxQzYjuy3sWMLEFfT3sDEDhdNMg5LBY=; h=From:To:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=rJyWl/DFUlKJlQOl4HTDhJY5z8RnB1AmAg8pVxKVnuoLJRnfNkYnrQOLxEAYe9wx0 Q2diujWeBIY3/w12E7OmF4hLKDAQQPsHF+64VspI5fDuSuFLs6JCizN5V1k5vQzp7i Bj5jUd3J2SyTElVst0SIq9O9BpUk8erVJOW+5bgY= X-Yandex-Spam: 1 Received: from [79.174.46.80] ([79.174.46.80]) by web3.yandex.ru with HTTP; Fri, 20 Jan 2012 17:32:10 +0400 From: Dmukha Nikolay Envelope-From: cosmic17@yandex.ru To: freebsd-net@freebsd.org MIME-Version: 1.0 Message-Id: <220871327066330@web3.yandex.ru> Date: Fri, 20 Jan 2012 17:32:10 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: MSTP on FreeBSD X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 13:32:14 -0000 Hello. Please, help me to setup this sheme: ******************************************************* comp1 comp2 | | | | dgs3627g(24)-----------(12)dgs3612g |(21) (9)| |______freebsd bridge_______| ******************************************************* Devices are: Dlink DGS3627G (FW 2.84-B25), Dlink DGS3612G (FW 2.84-B25), FreeBSD (8.0 stable 201105). The main target is to reserve the FreeBsd bridge. The priority route for traffic from comp 1 to comp 2 is freebsd. When the server (freebsd bridge) is down, traffic should go through the direct link between switches. I want to reserve 3 freebsd bridges. So it`s necessary to use MSTP technology. For example I try to setup MSTP for one server. In my opinion the logic of this sheme is: ******************************************************* packet from comp1-->3627-->freebsd bridge-->3612-->target (comp2) ******************************************************* I think that the Root Bridge for 3627 is freebs bridge. If freebsd bridge is down, 3612 will be Root. So I should to designate the next priority: ******************************************************* 3627 - lowest FreeBSD bridge - highest 3612 - something middle bentween FreeBSD bridge and 3627 ******************************************************* Let`s start to setup: ******************************************************* 3627 (00-22-B0-26-C1-00): config vlan default delete 1-27 create vlan bridge1 tag 101 config vlan bridge1 add unt 21-24 config stp version mstp config stp mst_config_id name bridge1 revision_level 1 config stp priority 8192 instance_id 0 create stp instance_id 2 config stp instance_id 2 add_vlan 101 config stp priority 8192 instance_id 2 enable stp 3612 (00-1E-58-D9-13-00): config vlan default delete 1-12 create vlan bridge1 tag 101 config vlan bridge1 add unt 9-12 config stp version mstp config stp mst_config_id name bridge1 revision_level 1 config stp priority 4096 instance_id 0 create stp instance_id 2 config stp instance_id 2 add_vlan 101 config stp priority 4096 instance_id 2 enable stp FreeBSD bridge: ifconfig bridge0 stp em0 stp em1 ifconfig bridge0 priority 0 ifconfig bridge0 fwddelay 4 ifconfig bridge0 maxage 6 ******************************************************* Tests: 1. There is no direct link between switches: ******************************************************* 3627: STP Instance Settings --------------------------- Instance Type : CIST Instance Status : Enabled Instance Priority : 8192 (Bridge Priority : 8192 , SYS ID Ext : 0 ) STP Instance Operational Status -------------------------------- Designated Root Bridge : 0 /00-15-17-8E-E7-EE External Root Cost : 20000 Regional Root Bridge : 8192 /00-22-B0-26-C1-00 Internal Root Cost : 0 Designated Bridge : 0 /00-15-17-8E-E7-EE Root Port : 21 Max Age : 6 Forward Delay : 4 Last Topology Change : 145 Topology Changes Count : 27 STP Instance Settings --------------------------- Instance Type : MSTI(2) Instance Status : Enabled Instance Priority : 8194 (Bridge Priority : 8192 , SYS ID Ext : 2 ) STP Instance Operational Status -------------------------------- Regional Root Bridge : 8194 /00-22-B0-26-C1-00 Internal Root Cost : 0 Designated Bridge : 8194 /00-22-B0-26-C1-00 Root Port : None Remaining Hops : 20 Last Topology Change : 101 Topology Changes Count : 27 Command: show stp ports 21 MSTP Port Information ---------------------- Port Index : 21 , Hello Time: 2 /2 , Port STP : Enabled , LBD : No External PathCost : Auto/20000 , Edge Port : False/No , P2P : Auto /Yes Port RestrictedRole : False, Port RestrictedTCN : False Port Forward BPDU : Enabled MSTI Designated Bridge Internal PathCost Prio Status Role ----- ------------------ ----------------- ---- ---------- ---------- 0 0000/0015178EE7EE 20000 128 Forwarding Root 2 2002/0022B026C100 20000 128 Forwarding Master ******************************************************* I can see the traffic with tcpdump on FreeBSD bridge. 2. There is direct link between switches: ******************************************************* 3627: STP Instance Settings --------------------------- Instance Type : CIST Instance Status : Enabled Instance Priority : 8192 (Bridge Priority : 8192 , SYS ID Ext : 0 ) STP Instance Operational Status -------------------------------- Designated Root Bridge : 0 /00-15-17-8E-E7-EE External Root Cost : 20000 Regional Root Bridge : 4096 /00-1E-58-D9-13-00 Internal Root Cost : 20000 Designated Bridge : 4096 /00-1E-58-D9-13-00 Root Port : 24 Max Age : 6 Forward Delay : 4 Last Topology Change : 387 Topology Changes Count : 26 STP Instance Settings --------------------------- Instance Type : MSTI(2) Instance Status : Enabled Instance Priority : 8194 (Bridge Priority : 8192 , SYS ID Ext : 2 ) STP Instance Operational Status -------------------------------- Regional Root Bridge : 4098 /00-1E-58-D9-13-00 Internal Root Cost : 20000 Designated Bridge : 4098 /00-1E-58-D9-13-00 Root Port : 24 Remaining Hops : 19 Last Topology Change : 473 Topology Changes Count : 26 Command: show stp ports 24 MSTP Port Information ---------------------- Port Index : 24 , Hello Time: 2 /2 , Port STP : Enabled , LBD : No External PathCost : Auto/20000 , Edge Port : False/No , P2P : Auto /Yes Port RestrictedRole : False, Port RestrictedTCN : False Port Forward BPDU : Enabled MSTI Designated Bridge Internal PathCost Prio Status Role ----- ------------------ ----------------- ---- ---------- ---------- 0 1000/001E58D91300 20000 128 Forwarding Root 2 1002/001E58D91300 20000 128 Forwarding Root Command: show stp ports 21 MSTP Port Information ---------------------- Port Index : 21 , Hello Time: 2 /2 , Port STP : Enabled , LBD : No External PathCost : Auto/20000 , Edge Port : False/No , P2P : Auto /Yes Port RestrictedRole : False, Port RestrictedTCN : False Port Forward BPDU : Enabled MSTI Designated Bridge Internal PathCost Prio Status Role ----- ------------------ ----------------- ---- ---------- ---------- 0 0000/0015178EE7EE 20000 128 Discarding Alternate 2 2002/0022B026C100 20000 128 Discarding Alternate 3612: STP Instance Settings --------------------------- Instance Type : CIST Instance Status : Enabled Instance Priority : 4096 (Bridge Priority : 4096 , SYS ID Ext : 0 ) STP Instance Operational Status -------------------------------- Designated Root Bridge : 0 /00-15-17-8E-E7-EE External Root Cost : 20000 Regional Root Bridge : 4096 /00-1E-58-D9-13-00 Internal Root Cost : 0 Designated Bridge : 0 /00-15-17-8E-E7-EE Root Port : 9 Max Age : 6 Forward Delay : 4 Last Topology Change : 510 Topology Changes Count : 11 STP Instance Settings --------------------------- Instance Type : MSTI(2) Instance Status : Enabled Instance Priority : 4098 (Bridge Priority : 4096 , SYS ID Ext : 2 ) STP Instance Operational Status -------------------------------- Regional Root Bridge : 4098 /00-1E-58-D9-13-00 Internal Root Cost : 0 Designated Bridge : 4098 /00-1E-58-D9-13-00 Root Port : None Remaining Hops : 20 Last Topology Change : 532 Topology Changes Count : 11 Command: show stp ports 9 MSTP Port Information ---------------------- Port Index : 9 , Hello Time: 2 /2 , Port STP : Enabled , LBD : No External PathCost : Auto/20000 , Edge Port : False/No , P2P : Auto /Yes Port RestrictedRole : False, Port RestrictedTCN : False Port Forward BPDU : Enabled MSTI Designated Bridge Internal PathCost Prio Status Role ----- ------------------ ----------------- ---- ---------- ---------- 0 0000/0015178EE7EE 20000 128 Forwarding Root 2 1002/001E58D91300 20000 128 Forwarding Master Command: show stp ports 12 MSTP Port Information ---------------------- Port Index : 12 , Hello Time: 2 /2 , Port STP : Enabled , LBD : No External PathCost : Auto/20000 , Edge Port : False/No , P2P : Auto /Yes Port RestrictedRole : False, Port RestrictedTCN : False Port Forward BPDU : Enabled MSTI Designated Bridge Internal PathCost Prio Status Role ----- ------------------ ----------------- ---- ---------- ---------- 0 1000/001E58D91300 20000 128 Forwarding Designated 2 1002/001E58D91300 20000 128 Forwarding Designated ******************************************************* And the priority road for traffic - direct link... I think the mistake is in FreeBSD, because without freebsd server (two direct links) it is OK... Can you help me to correct setup freebsd? Thanks.