Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2003 20:19:43 +0400 (MSD)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        ad@astral-on.net
Cc:        freebsd-net@freebsd.org
Subject:   Re: Problem with bridge 802.1q frames
Message-ID:  <20030609201828.L95896@news1.macomnet.ru>
In-Reply-To: <20030609142309.GB37504@astral-on.net>
References:  <20030609142309.GB37504@astral-on.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Jun 2003, 17:23+0300, Andrew Degtiariov wrote:

> Hello FreeBSD users!
> We'v tried to bridge Ethernet frames across rl0 and vlan0 interfaces and this
> does not work.
>
>                 vlan4|-------|
>      |---------------| Host1 |
>      | p1            |       |
> -----=-----          |-------|
> | Switch  |          192.168.3.100
> -----=-----
>      | p2
>      |
>      | vlan0
> ----------           --------
> |        | rl0   fxp0|      |
> |Host2   |-----------|Host3 |
> |        |           |      |
> ----------           --------
>                      192.168.3.15
>
> Host1, Host2 and Host3 in the same VLAN (vlan 6).
> Port p1 and port p2 on Swith is "trunk" or "tagged" (add/delete vlan tags).
> Host2 is bridge.
> On Host3 we execute ping 192.168.3.100.
> If we do ifconfig vlan0 inet 192.168.3.254 netmask 255.255.255.0 on Host2 and
> lanch ping 192.168.3.100 its work perfectly!
> I can see on vlan0 and fxp0 frames that forwarded from Host3 to Host1
> Frames passed from host1 don't appeare on vlan0 but on fxp0 do!?
>
> There aren't packet filters on Host2
>
> Some debug information about Host2:
>
> bash-2.05b# uname -spr
> FreeBSD 5.1-RC1 i386
> bash-2.05b#
>
> bash-2.05b# ifconfig -au
> fxp0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
>         options=8<VLAN_MTU>
>         ether 00:07:e9:0b:92:cf
>         media: Ethernet autoselect (100baseTX)
>         status: active
> rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
>         ether 00:00:21:29:2c:c7
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet 127.0.0.1 netmask 0xff000000
> vlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
>         ether 00:07:e9:0b:92:cf
>         media: Ethernet autoselect (100baseTX)
>         status: active
>         vlan: 6 parent interface: fxp0
>
> bash-2.05b# sysctl net.link.ether
> net.link.ether.inet.prune_intvl: 300
> net.link.ether.inet.max_age: 1200
> net.link.ether.inet.host_down_time: 20
> net.link.ether.inet.maxtries: 5
> net.link.ether.inet.useloopback: 1
> net.link.ether.inet.proxyall: 0
> net.link.ether.inet.log_arp_wrong_iface: 1
> net.link.ether.inet.log_arp_movements: 1
> net.link.ether.ipfw: 0
> net.link.ether.bridge_cfg: vlan0:1,rl0:1
> net.link.ether.bridge: 1
> net.link.ether.bridge_ipfw: 0
> net.link.ether.bridge_ipf: 0
> net.link.ether.bridge_ipfw_drop: 0
> net.link.ether.bridge_ipfw_collisions: 0
> net.link.ether.verbose: 0
> net.link.ether.bdg_split_pkts: 0
> net.link.ether.bdg_thru: 264
> net.link.ether.bdg_copied: 0
> net.link.ether.bdg_dropped: 0
> net.link.ether.bdg_copy: 0
> net.link.ether.bdg_predict: 0
> net.link.ether.bdg_fw_avg: 0
> net.link.ether.bdg_fw_ticks: 0
> net.link.ether.bdg_fw_count: 0
> bash-2.05b#
>
> This is "tcpdump -i fxp0" output
> 15:22:45.738897 802.1Q vlan#6 P0 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:45.739121 802.1Q vlan#6 P0 arp reply 192.168.3.100 is-at 0:2:b3:61:ab:8d
> 15:22:46.599665 802.1d config 07d0.00:30:84:1c:1c:92.8015 root 07d0.00:30:84:1c:1c:92 pathcost 0 age 0 max 20 hello 2 fdelay 15
> 15:22:46.749497 802.1Q vlan#6 P0 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:46.749759 802.1Q vlan#6 P0 arp reply 192.168.3.100 is-at 0:2:b3:61:ab:8d
> 15:22:47.760087 802.1Q vlan#6 P0 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:47.760311 802.1Q vlan#6 P0 arp reply 192.168.3.100 is-at 0:2:b3:61:ab:8d
> 15:22:48.490190 802.1d config 07d0.00:30:84:1c:1c:92.8015 root 07d0.00:30:84:1c:1c:92 pathcost 0 age 0 max 20 hello 2 fdelay 15
> 15:22:48.770688 802.1Q vlan#6 P0 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:48.770920 802.1Q vlan#6 P0 arp reply 192.168.3.100 is-at 0:2:b3:61:ab:8d
> 15:22:49.781306 802.1Q vlan#6 P0 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:49.781537 802.1Q vlan#6 P0 arp reply 192.168.3.100 is-at 0:2:b3:61:ab:8d
> 15:22:50.771076 802.1d config 07d0.00:30:84:1c:1c:92.8015 root 07d0.00:30:84:1c:1c:92 pathcost 0 age 0 max 20 hello 2 fdelay 15
> 15:22:52.669977 802.1d config 07d0.00:30:84:1c:1c:92.8015 root 07d0.00:30:84:1c:1c:92 pathcost 0 age 0 max 20 hello 2 fdelay 15
> 15:22:54.560392 802.1d config 07d0.00:30:84:1c:1c:92.8015 root 07d0.00:30:84:1c:1c:92 pathcost 0 age 0 max 20 hello 2 fdelay 15
>
> And "tcpdump -i vlan0" output
> 15:22:45.738830 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:46.749436 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:47.760028 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:48.770633 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15
> 15:22:49.781246 arp who-has 192.168.3.100 (2e:2f:30:31:32:33) tell 192.168.3.15

Try this hack and let me know if it works for you.  Thanks!

Index: if_ethersubr.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v
retrieving revision 1.147
diff -u -r1.147 if_ethersubr.c
--- if_ethersubr.c	5 May 2003 09:15:50 -0000	1.147
+++ if_ethersubr.c	20 May 2003 15:06:50 -0000
@@ -625,6 +625,7 @@
 	if (rule)	/* packet was already bridged */
 		goto post_stats;

+#if 0
 	if (!(BDG_ACTIVE(ifp))) {
 		/*
 		 * Discard packet if upper layers shouldn't see it because it
@@ -641,6 +642,7 @@
 			    return;
 		}
 	}
+#endif

 	/* Discard packet if interface is not up */
 	if ((ifp->if_flags & IFF_UP) == 0) {
%%%

-- 
Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030609201828.L95896>