My host's network interface is em0. I would like to assign the host an IP address on 192.168.1.* range (VLAN1) and create jails that are on VLAN20. The host is on a trunk. As of now, host's IP address is static and declared in the /etc/rc.conf file as follows:
em0bridge is the bridge for the jails. It was created by bastille while creating a VNET jail.
I cannot create a jail with a working network on VLAN20 using bastille. I can do the same for jails that are on VLAN1 though.
In Debian, I was able to accomplish this by creating a bridge (something like em0.1bridge) and actually assigning the host's IP address to that bridge rather than to em0. Would that be the right way to do it in FreeBSD as well? If so, how can I accomplish this? Specifially, how can I design it in the /etc/rc.conf file?
Otherwise, I followed the documentation in Bastille website with still no success after spending hours on it. Please see the thread here. Any input will be greatly appreciated!
Code:
ifconfig_em0="inet 192.168.1.203 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
# ifconfig gives the following output:
Code:
em0: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=4e520bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
ether 3c:ec:ef:8f:53:18
inet 192.168.1.203 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
em0bridge: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=0
ether 58:9c:fc:10:ff:8f
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 2 priority 128 path cost 20000
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
I cannot create a jail with a working network on VLAN20 using bastille. I can do the same for jails that are on VLAN1 though.
In Debian, I was able to accomplish this by creating a bridge (something like em0.1bridge) and actually assigning the host's IP address to that bridge rather than to em0. Would that be the right way to do it in FreeBSD as well? If so, how can I accomplish this? Specifially, how can I design it in the /etc/rc.conf file?
Otherwise, I followed the documentation in Bastille website with still no success after spending hours on it. Please see the thread here. Any input will be greatly appreciated!