From owner-freebsd-net@FreeBSD.ORG Mon Sep 22 14:23:14 2008 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 17B671065672 for ; Mon, 22 Sep 2008 14:23:14 +0000 (UTC) (envelope-from psychosensor@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 91B7C8FC1F for ; Mon, 22 Sep 2008 14:23:13 +0000 (UTC) (envelope-from psychosensor@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1321982uge.39 for ; Mon, 22 Sep 2008 07:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=c6nhcNzP+i/SzOQINEyX5YnvdCllPg8N6TSR/PJ0O7M=; b=RCIF2eRE+EL7dMEkDjM0ZYxhsCO3ZQcZTMfACWk5Y7GY1fjliiysDIF5dJq9hpDGVq 1ckH2os4Ou1gwFC5ashNnXz64apBGUotxeqBoQEB4dMrDcuXGkPK41fyeahQo98IkHQM ZEhvWbusG3QpKFQ/i+O1TzGodLFTB6bmTO8MY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=fYeh2dIm2hkAcEK7QBFTIrfrrPFtk1ze38ZbNyawZJp0wcfqbtsqtZY2FVWSsskdsY LOFIcxVfl6KJ0UZhGbIA5mBCEMnt5MlEVd2s/p+wyZOdnRUmBJXYJonIidBIZVIEj/MV F74ayFpzxGSe2AQrS1L/V2SkvnbdYV0aHaZ1g= Received: by 10.86.29.8 with SMTP id c8mr4814006fgc.23.1222092059171; Mon, 22 Sep 2008 07:00:59 -0700 (PDT) Received: by 10.86.31.8 with HTTP; Mon, 22 Sep 2008 07:00:59 -0700 (PDT) Message-ID: Date: Mon, 22 Sep 2008 17:00:59 +0300 From: "Sergey Listopad" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: bridged tap interfaces with stp 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: Mon, 22 Sep 2008 14:23:14 -0000 Hi! I am playing with bridge(4) stp feature. there are 2 boxes with 7.0-RELEASE-p4. rt1 rt2 ___________ ___________ | ____| |____ | | |tap1| ------------------------|tap1| | | | | | | |tap2|-------------------------|tap2| | |___________| |___________| rt1 connected to rt2 with 2 openvpn L2 links (tap). tap1 bridged with tap2 on both routers. rt1# ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 56:8d:35:75:ee:3f inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap2 flags=143 member: tap1 flags=143 rt2# ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 3a:af:9d:0f:c1:b9 inet 3.3.3.2 netmask 0xffffff00 broadcast 3.3.3.255 id 00:00:00:00:00:00 priority 16384 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 16384 ifcost 0 port 0 member: tap2 flags=143 member: tap1 flags=143 rt1# ping 3.3.3.2 PING 3.3.3.2 (3.3.3.2): 56 data bytes 64 bytes from 3.3.3.2: icmp_seq=0 ttl=64 time=8.144 ms 64 bytes from 3.3.3.2: icmp_seq=1 ttl=64 time=4.313 ms 64 bytes from 3.3.3.2: icmp_seq=2 ttl=64 time=4.421 ms ... all works while broadcast Then I'd try to enable stp on bridge0 interfaces for automatic disable one of redundant links (tap1/tap2). rt1# ifconfig bridge0 stp tap1 stp tap2 rt1# ifconfig bridge0 bridge0: flags=8943 metric 0 mtu 1500 ether 56:8d:35:75:ee:3f inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 id 00:1c:c0:39:d6:b9 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:1c:c0:39:d6:b9 priority 32768 ifcost 0 port 0 member: tap2 flags=147 port 12 priority 128 path cost 2000000 proto rstp role disabled state discarding member: tap1 flags=147 port 16 priority 128 path cost 2000000 proto rstp role disabled state discarding rt2# ifconfig bridge0 stp tap1 stp tap2 rt2# ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 3a:af:9d:0f:c1:b9 inet 3.3.3.2 netmask 0xffffff00 broadcast 3.3.3.255 id 00:1c:c0:39:d6:ad priority 16384 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:1c:c0:39:d6:ad priority 16384 ifcost 0 port 0 member: tap2 flags=147 port 9 priority 128 path cost 2000000 proto rstp role disabled state discarding member: tap1 flags=147 port 8 priority 128 path cost 2000000 proto rstp role disabled state discarding But when stp is enabled, it blocks all bridge members, and bridge stop working. May be I am misunderstand something with stp? At all it is possible to use bridge(4) stp with tap(4)? Even when bridge0 on both router has only 1 member, ports stay in disabled state. rt1# ifconfig bridge0 deletem tap1 deletem tap2 rt1# ifconfig bridge0 bridge0: flags=8943 metric 0 mtu 1500 ether 56:8d:35:75:ee:3f inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 rt2# ifconfig bridge0 deletem tap1 deletem tap2 rt2# ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 3a:af:9d:0f:c1:b9 inet 3.3.3.2 netmask 0xffffff00 broadcast 3.3.3.255 id 00:00:00:00:00:00 priority 16384 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 16384 ifcost 0 port 0 rt1# ifconfig bridge0 addm tap1 stp tap1 rt1# ifconfig bridge0 bridge0: flags=8943 metric 0 mtu 1500 ether 56:8d:35:75:ee:3f inet 3.3.3.1 netmask 0xffffff00 broadcast 3.3.3.255 id 00:1c:c0:39:d6:b9 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:1c:c0:39:d6:b9 priority 32768 ifcost 0 port 0 member: tap1 flags=147 port 16 priority 128 path cost 2000000 proto rstp role disabled state discarding rt2# ifconfig bridge0 addm tap1 stp tap1 rt2# ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 3a:af:9d:0f:c1:b9 inet 3.3.3.2 netmask 0xffffff00 broadcast 3.3.3.255 id 00:1c:c0:39:d6:ad priority 16384 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:1c:c0:39:d6:ad priority 16384 ifcost 0 port 0 member: tap1 flags=147 port 8 priority 128 path cost 2000000 proto rstp role disabled state discarding -- S.Listopad