戸川です。

FreeBSD 10.0-Rを使って、jailを複数立ち上げていました。
10.1-Rに上げたところ、起動時にこんなメッセージが出るようになりました。
----
epair1a: Ethernet address: 02:ff:00:00:04:0a
epair1b: Ethernet address: 02:ff:50:00:05:0b
epair1a: link state changed to UP
epair1b: link state changed to UP
epair2a: Ethernet address: 02:ff:00:00:06:0a
epair2b: Ethernet address: 02:ff:50:00:07:0b
epair2a: link state changed to UP
epair2b: link state changed to UP
epair1a: promiscuous mode enabled
epair3a: Ethernet address: 02:ff:00:00:08:0a
epair2a: promiscuous mode enabled
epair3b: Ethernet address: 02:ff:50:00:09:0b
epair3a: link state changed to UP
epair3b: link state changed to UP
epair3a: promiscuous mode enabled
epair4a: Ethernet address: 02:ff:00:00:05:0a
epair4b: Ethernet address: 02:ff:50:00:07:0b
epair4a: link state changed to UP
epair4b: link state changed to UP
epair4a: promiscuous mode enabled
epair4b: DAD detected duplicate IPv6 address fe80:2::ff:50ff:fe00:70b: NS 
in/out=0/0, NA in=0
epair4b: DAD complete for fe80:2::ff:50ff:fe00:70b - duplicate found
epair4b: manual intervention required
epair4b: possible hardware address duplication detected, disable IPv6
Cannot enable an interface with a link-local address marked duplicate.
Cannot enable an interface with a link-local address marked duplicate.
Cannot enable an interface with a link-local address marked duplicate.
----
確かにepair2bとepair4bのMACアドレスが重複するので、そこから生成される
IPv6アドレスが重複しているようです。

Webを調べてみたところ、 http://demon-lord.com/doku.php?id=vps:vps_01 にて
----
epairを一つ作成してjailerからprisonerに割り当ててから次のepairを作成すると
MACアドレスが重複する場合がある。この場合、それぞれのepairを同じbridgeに
接続するとMACアドレスが重複して通信が行えなくなる。問題を回避する為、
epairの作成は同時期に行う。
----
という記述がありましたが、現在の /etc/rc.d/jail の仕組みを使って、
この問題を解決するには、どうすれば良いのでしょうか?

現在の/etc/jail.conf は以下です。
----
allow.mount;
allow.sysvipc;
vnet;
vnet.interface="epair${if}b";

host.hostname = "${name}.example.com";
path = "/usr/jails/${name}";
exec.clean;
exec.system_user = "root";
exec.jail_user = "root";
exec.prestart += "ifconfig epair${if} create up > /dev/null";
exec.prestart += "ifconfig bridge0 addm epair${if}a";
exec.start += "/sbin/ifconfig epair${if}b ${ip4addr}/24";
exec.start += "/sbin/route add default 192.168.0.1";
exec.start += "/sbin/ifconfig epair${if}b inet6 accept_rtadv up";
exec.start += "/sbin/rtsol epair${if}b";
exec.start += "/sbin/ifconfig epair${if}b inet6 ${ip6addr} alias";
exec.start += "/sbin/ifconfig epair${if}b inet6 -ifdisabled";
exec.start += "/bin/sh /etc/rc";
exec.stop = "";
exec.poststop += "ifconfig epair${if}a destroy";
exec.consolelog = "/var/log/jail_${name}_console.log";
mount.devfs;
mount.fstab = "/etc/fstab.${name}";
mount.fdescfs;
mount +=  "procfs /usr/jails/${name}/proc procfs rw 0 0";

jail01 {
        $if     = 1;
        $ip4addr        = 192.168.0.101;
        $ip6addr        = 2001:380:e03:169::101;
}

jail02 {
        $if     = 2;
        $ip4addr        = 192.168.0.102;
        $ip6addr        = 2001:380:e03:169::102;
}

jail03 {
        $if     = 3;
        $ip4addr        = 192.168.0.103;
        $ip6addr        = 2001:380:e03:169::103;
}

jail04 {
        $if     = 4;
        $ip4addr        = 192.168.0.104;
        $ip6addr        = 2001:380:e03:169::104;
}
----
よろしくお願いします。

-- 
TOGAWA Satoshi <t...@puyo.org>
_______________________________________________
freebsd-users-jp@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-users-jp
To unsubscribe, send any mail to "freebsd-users-jp-unsubscr...@freebsd.org"

メールによる返信