I first created two vlans, as follows:
I then created two jails as follows:
When I enter either jail, I expected it not to be able to ping or connect to the other jail, but it can. For example, why can vlan1 (10.1.0.0/24), talk to vlan2 (10.2.0.0/24). Is it because they both share em0? If so, doesn't that defeat the purpose of creating a VLAN to begin with? Please advise.
Thank you!
ifconfig vlan1 create vlan 1 vlandev em0
ifconfig vlan1 10.1.0.1/24
ifconfig vlan2 create vlan 2 vlandev em0
ifconfig vlan2 10.2.0.1/24
I then created two jails as follows:
Code:
vlan1 {
path = /usr/jail/vlan1;
allow.mount;
mount.devfs;
ip4.addr = 10.1.0.2/24;
interface = vlan1;
allow.raw_sockets;
allow.sysvipc;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
vlan2 {
path = /usr/jail/vlan2;
allow.mount;
mount.devfs;
ip4.addr = 10.2.0.2/24;
interface = vlan2;
allow.raw_sockets;
allow.sysvipc;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
When I enter either jail, I expected it not to be able to ping or connect to the other jail, but it can. For example, why can vlan1 (10.1.0.0/24), talk to vlan2 (10.2.0.0/24). Is it because they both share em0? If so, doesn't that defeat the purpose of creating a VLAN to begin with? Please advise.
Thank you!