Hello All,
I would like too set up an iocage jail with vnet but can't make my way forward with it. I have followed the iocage documentation but have the following problem.
The jail in on the host with IP 192.168.1.1 which faces LAN. There is another physical interface on the host which faces WAN.
I have put this into /etc/sysctl.conf
and this into /etc/rc.conf
This is the ifconfig output
The 192.168.1.100-103 are other non-vnet jails
Then I set up an iocage jail with the following adjustments
But when I try to start the jail I get the following error
Why is this happening? I have other jails on the same host without VNET which use 192.168.1.1 gateway without a a problem as other computers on the LAN which do the same?
Best regards,
T
I would like too set up an iocage jail with vnet but can't make my way forward with it. I have followed the iocage documentation but have the following problem.
The jail in on the host with IP 192.168.1.1 which faces LAN. There is another physical interface on the host which faces WAN.
I have put this into /etc/sysctl.conf
Code:
net.inet.ip.forwarding=1
net.link.bridge.pfil_onlyip=0
net.link.bridge.pfil_bridge=0
net.link.bridge.pfil_member=0
and this into /etc/rc.conf
Code:
ifconfig_igb0="inet 192.168.1.1 netmask 255.255.255.0"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm igb0 up"
This is the ifconfig output
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER>
ether 90:1b:0e:89:41:e9
inet 172.20.1.0 netmask 0xfffffff8 broadcast 172.20.1.7
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether 90:1b:0e:6b:c6:d4
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.103 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<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=21<PERFORMNUD,AUTO_LINKLOCAL>
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
options=80000<LINKSTATE>
inet X.X.X.X--> Y.Y.Y.Y netmask 0xffffffff
groups: tun
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 705
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:e3:8d:a8:06:00
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto stp-rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
The 192.168.1.100-103 are other non-vnet jails
Then I set up an iocage jail with the following adjustments
Code:
sudo iocage set vnet=on JAIL
sudo iocage set defaultrouter=192.168.1.1 JAIL
sudo iocage set ip4_addr="vnet0|191.168.1.104/24" JAIL
But when I try to start the jail I get the following error
Code:
No default gateway found for ipv6.
* Starting JAIL
+ Started OK
+ Using devfs_ruleset: 1004 (iocage generated default)
+ Configuring VNET FAILED
route: writing to routing socket: Network is unreachable
add net default: gateway 192.168.1.1 fib 0: Network is unreachable
Stopped JAIL due to VNET failure
Why is this happening? I have other jails on the same host without VNET which use 192.168.1.1 gateway without a a problem as other computers on the LAN which do the same?
Best regards,
T