Date: Mon, 5 Mar 2012 08:21:04 +0330 From: h bagade <bagadeh@gmail.com> To: Rozhuk.IM@gmail.com Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: problem with vlan interfaces tagging/untagging in a simulated switch box Message-ID: <CAKWOZ6U0rJzt1pRRHg8zoMQsZoTaz7s6Zgyz4rOgjtEzxkioqA@mail.gmail.com> In-Reply-To: <CAKWOZ6UmH9FP1GBR=NRUfvt6i478bK8J3SoZke13Ja3A5doDMA@mail.gmail.com> References: <CAKWOZ6VH5Jv9kd-QuCM3oiukwTUajMAOvmGeg1uofNa4A3UXjA@mail.gmail.com> <4f5344cc.51e4cc0a.522a.1a15@mx.google.com> <CAKWOZ6UmH9FP1GBR=NRUfvt6i478bK8J3SoZke13Ja3A5doDMA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
if you can not get the image, I've tried to draw text form here with commands: ###################### [system 1]------#--[eth0]---- # # |-- [hub0]------[vlan2] # [system 2]------#--[eth2]---- | # # | # # [eth1] # #################|##### | netgraph commands are: ncgtl mkpeer eth0: hub lower lower0 ngctl name eth0:lower hub0 ngctl connect eth2: hub0: lower lower2 ngct mkpeer hub0: vlan vlan2 vlan2 ngctl name hub0:vlan2 vlan2 ngct connect vlan2: eth1: downstream lower ngctl msg vlan2: addfilter '{vlan=2 hook="vlan2"}' ifconfig commands: ifconfig bridge0 create ifconfig bridge0 addm eth0 addm eth2 On 3/5/12, h bagade <bagadeh@gmail.com> wrote: > I've tried netgraph nodes too! but stuck on the next step and asked > the problem on this forum and received no answer:( my netgraph > scenario is described below: > > I have designed a topology(attached) using netgraph to add vlan2 > tag to the frames coming from eth0(vlan port) and send it to > eth1(trunk port) to go out of the box. it works fine. > > Then I tried to add another interface like eth0 which named eth2(vlan > port) to be > tagged vlan2 too. After that, I bridged eth0 and eth2 using > ifconfig(as vlan ports are connected to each other on same vlan id). > When traffic comes from eth0(system1) to the destination > eth2(system2), all traffic also sent out eth1 which is not suitable! > > In the mentioned scenario, I don't want the traffic pass to the eth1. Is > there any way that eth1 recognize which mac addresses don't belong to this > box then sends the traffic out? I mean I want to send taraffic out of eth1 > when the destination is not accessible via FreeBSD box so it should be sent > out to be find out. > > On 3/4/12, rozhuk.im@gmail.com <rozhuk.im@gmail.com> wrote: >> >> Use netgraph nodes. >> >> >>> -----Original Message----- >>> From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- >>> net@freebsd.org] On Behalf Of h bagade >>> Sent: Sunday, March 04, 2012 3:31 PM >>> To: freebsd-net >>> Subject: problem with vlan interfaces tagging/untagging in a simulated >>> switch box >>> >>> Hi all, >>> >>> I have problems with vlan interfaces on freebsd. I want to make my >>> system like a switch with vlan ports and also a trunk port in >>> conjuction with other switches. I thought that vlan interfaces would >>> help me tagging traffic when traffic is going out the trunk port(or >>> when it receives on vlan ports). >>> The problem, I've encountered is that vlan interafaces on freebsd do >>> tagging/untagging when the traffic is sourced/destined from/to them >>> which in this case they should be assigned IP addresses. In other words >>> they won't tag the traffic passing through their parent interface which >>> I need to. >>> >>> In my case to be acting like a switch, interfaces on system won't have >>> ip addresses and I need to tag the traffic coming from for example >>> interface1 when passing through interfaceN(acting as trunk port). >>> How could I reach this? would it be possible to use vlan interfaces to >>> do so? >>> >>> I've tried many many ways to simulate the case but no success achieved! >>> I'm really interested to find the proper solution for my config. >>> >>> Any comments or hints are really apperciated. >>> _______________________________________________ >>> freebsd-net@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKWOZ6U0rJzt1pRRHg8zoMQsZoTaz7s6Zgyz4rOgjtEzxkioqA>