Date: Fri, 17 May 2019 10:58:49 +0200 From: Christian Baer <chris@debilux.org> To: "Patrick M. Hausen" <hausen@punkt.de> Cc: Artem Viklenko via freebsd-net <freebsd-net@freebsd.org> Subject: Re: VLANs for use with jails Message-ID: <409EF41B-FB07-4735-8405-01657C9797D9@debilux.org> In-Reply-To: <F8CB82FD-E6E1-4FA5-8F26-2DF5F31F9C1D@punkt.de> References: <2BE6B69D-FB37-49BA-AAA1-67531A4BE064@debilux.org> <F8CB82FD-E6E1-4FA5-8F26-2DF5F31F9C1D@punkt.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, i still can=E2=80=99t get it to work. My rc.conf looks like this: defaultrouter=3D"10.0.3.1" ifconfig_igb0=3D"inet 10.0.3.11/24 -rxcsum -rxcsum6 -txcsum -txcsum6 = -lro -tso -vlanhwtso" ifconfig_igb1=3D"up -rxcsum -rxcsum6 -txcsum -txcsum6 -lro -tso = -vlanhwtso" cloned_interfaces=3D"vlan30 vlan40 vlan50 vlan60" ifconfig_vlan30=3D"inet 10.0.3.12/24 vlan 30 vlandev igb1 description = LAN" ifconfig_vlan40=3D"inet 10.0.4.12/24 vlan 40 vlandev igb1 description = IoT" ifconfig_vlan50=3D"inet 10.0.5.12/24 vlan 50 vlandev igb1 description = Guest" ifconfig_vlan60=3D"inet 10.0.6.12/24 vlan 60 vlandev igb1 description = VOIP=E2=80=9C ifconfig says: # ifconfig igb0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 = options=3D8100b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILT= ER> ether ac:1f:6b:63:37:b0 inet 10.0.3.11 netmask 0xffffff00 broadcast 10.0.3.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> igb1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu = 1500 = options=3D8100b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWFILT= ER> ether ac:1f:6b:63:37:b1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL> vlan30: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 = mtu 1500 description: LAN ether ac:1f:6b:63:37:b1 inet 10.0.3.12 netmask 0xffffff00 broadcast 10.0.3.255 groups: vlan vlan: 30 vlanpcp: 0 parent interface: igb1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> vlan40: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 = mtu 1500 description: IoT ether ac:1f:6b:63:37:b1 inet 10.0.4.12 netmask 0xffffff00 broadcast 10.0.4.255 groups: vlan vlan: 40 vlanpcp: 0 parent interface: igb1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> vlan50: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 = mtu 1500 description: Guest ether ac:1f:6b:63:37:b1 inet 10.0.5.12 netmask 0xffffff00 broadcast 10.0.5.255 groups: vlan vlan: 50 vlanpcp: 0 parent interface: igb1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> vlan60: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 = mtu 1500 description: VOIP ether ac:1f:6b:63:37:b1 inet 10.0.6.12 netmask 0xffffff00 broadcast 10.0.6.255 groups: vlan vlan: 60 vlanpcp: 0 parent interface: igb1 media: Ethernet autoselect (1000baseT <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> When I try to bring up a jail on a freshly installed iocage it quits = with an error. # iocage create -n "vlantest" -r LATEST defaultrouter=3D"10.0.6.1" = vnet=3D"on" allow_raw_sockets=3D"1" boot=3D"on" = interfaces=3D"vnet0:vlan60" ip4_addr=3D"vnet0|10.0.6.13/24" vlantest successfully created! * Starting vlantest + Started OK + Using devfs_ruleset: 5 + Configuring VNET FAILED ifconfig: BRDGADD vnet0.5: Invalid argument Stopped vlantest due to VNET failure What am I doning wrong?=20 Best regards, Chris --=20 E-Mail: chris@debilux.org Web: https://christianbaer.me > Am 14.05.2019 um 09:01 schrieb Patrick M. Hausen <hausen@punkt.de>: >=20 > Hi! >=20 > Not tested, minor typos possible ... >=20 >> Am 10.05.2019 um 23:02 schrieb Christian Baer <chris@debilux.org>: >> ifconfig_igb1=3D"inet 10.0.3.12/24 -rxcsum -rxcsum6 -txcsum -txcsum6 = -lro -tso -vlanhwtso" >> ifconfig_igb1_ipv6=3D"inet6 accept_rtadv -lro -tso=E2=80=9C=20 >> [...] >> What's the proper way to set up igb1 to be untagged (and so be in the = management vlan) and create the different VLANs on it and use it with = the jails? On of the VLANs should also be in the management VLAN (to = move my Unifi controller from a Pi to a jail). >=20 > ifconfig_igb1=3D=E2=80=9Cup -rxcsum -rxcsum6 -txcsum -txcsum6 -lro = -tso -vlanhwtso=E2=80=9C > cloned_interfaces=3D"vlan3 vlan4=E2=80=9C >=20 > ifconfig_vlan3=3D"inet 10.0.3.12/24 vlan 3 vlandev igb1=E2=80=9C > ifconfig_vlan4=3D"inet 10.0.4.12/24 vlan 4 vlandev igb1=E2=80=9C >=20 > iocage set vlan3jail interfaces=3D"vnet0:vlan3" > iocage set vlan3jail ip4_addr=3D"vnet0|10.0.3.13/24" >=20 > iocage set vlan4jail interfaces=3D"vnet0:vlan4" > iocage set vlan4jail ip4_addr=3D"vnet0|10.0.4.13/24" >=20 > HTH, > Patrick > --=20 > punkt.de GmbH Internet - Dienstleistungen - Beratung > Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100 > 76133 Karlsruhe info@punkt.de http://punkt.de > AG Mannheim 108285 Gf: Juergen Egeling >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?409EF41B-FB07-4735-8405-01657C9797D9>