On Sun, 2 Jul 2017 13:17:54 -0700 Freddie Cash <fjwcash_at_gmail.com> wrote: > On Jul 2, 2017 4:40 AM, "Hartmann, O." <ohartmann_at_walstatt.org> wrote: > > Fiddling around with a self-brewn router/firewall based on 12-CURRENT > and ipfw, I run into problems when setting up a trunk port with > different VLANs and static routes. > > The "router" has three NICs, igb0, igb1, igb2 (it is de facto an APU > 2C4 from PCengines). igb0 is attached to an external VDSL2+ Modem and > not connected at the moment. igb2 is also not connected yet. > > igb1 bears several VLANs: 2, 10, 100 (igb1.2, igb1.10 ...) and the > "native", untagged LAN (on igb1). > > > While it will sometimes work, I find that mixing tagged and untagged vlans > on a single interface leads to all kinds of silent failures and issues. > > Just make vlan 1 tagged on that interface and the switch port. Then ignore > igb1 completely, and only use the igb1.X interfaces for everything. A very good advice, but I didn't come that far since first I have to refactor the whole network and I didn't want to shoot myself into the foot. > > To not use a routing daemon due to the small size of my network, I > desided to use static routes, in rc.conf I placed the following > variables: > > static_routes="igb1.2 igb1.10" > route_igb1_2="-net 192.168.2.0/24 -interface igb1.2" > route_igb1_10="-net 192.168.10.0/24 -interface igb1.10" > > > You shouldn't need to add static routes as there routes will be added > automatically when you assign an IP/netmask to the interface. yes, I founf this out already - a bit disturbin, isn't it? The thinking behind my "solution" was not to route automatically. I think isolating networks needs to be done via ipfw then. Well, to be honest, the main issue is that there is the igb0 device, which will be attached to tun0 in case the VDSL modem is attached and receiving its IP from the ISP. FreeBSD's ppp client adds this device as the default route via add! default HISADDR add! default HISADDR6 The igb1.2 VLAN 2 in my scenario should be the interface for the VoIP facility - and it should be some kind restricted. The router itself is running NanoBSD 12-CURRENT and as soon as I have figured out to automatically create and install a small jail which then contains PBX, DNS et cetera, igb1.2 is then the jail's interface. And it should not interfere with my office's LAN by accident. > > Simplify things. Make everything tagged vlans, reduce your rc.conf to just > IP assignments to the sub interfaces, and see how things work. Build it up > from there. Good thinking. > > Cheers, > Freddie Thank you very much, OliverReceived on Mon Jul 03 2017 - 02:48:49 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC