VLAN switching on freebsd

John-Mark Gurney jmg at funkthat.com
Fri May 2 18:34:29 UTC 2014


zkan KIRIK wrote this message on Fri, May 02, 2014 at 21:04 +0300:
> i need to create a virtual interface that forwards only defined vlan tags.
> Lets talk on a sample scenario :
> 
> Assume that VLAN 10, 20, 30, 40 tagged on switch connected to em0 interface.
> 
> create ngeth0 and ngeth1. ( i dont need netgraph interface, it can be a any
> virtual interface tap .. etc. )
> i want to see only VLAN 10, 20 tagged on ngeth0
> and VLAN 10, 30, 40 tagged on ngeth1
> 
> I tried many ways but no success.
> 
> Can you suggest a way to do this?

I'm not familar w/ netgraph, but it looks like you might be able to
do something simlar w/ ng_vlan and ng_bridge?  Though bridge could be
replaced w/ one2many, or hub depending upon requirements...  Also, is
this purely for snooping traffic? or do you want to be able to pass
traffic both ways?

                   em0
                    |
                  ng_vlan
         /        /     \     \
        10       20     30    40
         |        |      |     |
         |    ng_bridge  |     |
         \      /   \    |     |
          ng_vlan       ng_vlan
              |             |
           ngeth0         ngeth1

Not sure if this is exactly what you want, but I think it would...
Though I don't know if you tried this, since you didn't describe
anything you tried...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-net mailing list