VirtualBOX上でvagrantを使用し、2個の仮想マシンA、B(CentOS 7)を作成しました。
仮想マシンAでのifconfigは
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.12.1.252 netmask 255.0.0.0 broadcast 10.255.255.255 ether 08:00:27:d9:83:35 txqueuelen 1000 (Ethernet) RX packets 531 bytes 53059 (51.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 439 bytes 52958 (51.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:00:00:00:00:01 txqueuelen 1000 (Ethernet) RX packets 18 bytes 6156 (6.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 52 bytes 9336 (9.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
仮想マシンBでのifconfigは
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.12.1.253 netmask 255.0.0.0 broadcast 10.255.255.255 ether 08:00:27:d9:83:35 txqueuelen 1000 (Ethernet) RX packets 522 bytes 52413 (51.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 422 bytes 51486 (50.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:00:00:00:00:02 txqueuelen 1000 (Ethernet) RX packets 20 bytes 6840 (6.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 51 bytes 8994 (8.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
となっています。
ここでお互いに「ping 10.12.1.252」「ping 10.12.1.253」と打ってみましたが、
PING 10.12.1.253 (10.12.1.253) 56(84) bytes of data.
From 10.12.1.252 icmp_seq=1 Destination Host Unreachable
From 10.12.1.252 icmp_seq=2 Destination Host Unreachable
From 10.12.1.252 icmp_seq=3 Destination Host Unreachable
From 10.12.1.252 icmp_seq=4 Destination Host Unreachable
となってエラーになってしまいます。
ググったところ「宛先ホストに到達できません」とのことですが、具体的な対策方法がわかりません。
どこを直せば対処できるでしょうか?
どこをみれば問題があるとわかるでしょうか?
すでに行ってみた対処方法として、仮想マシンA、B両方に対し「systemctl stop firewalld」でファイアウォール停止、
「/etc/selinux/config」を編集し、SELinux無効化は行いました。
念のため、変更後に「vagrant halt / up」で再起動も行いました。
追加情報です。
「VirtualBox VMs」内の「*vbox」ファイルのうち、<NetWork>タグは以下のようになっています。
<Network>
<Adapter slot="0" enabled="true" MACAddress="080027D98335" type="82540EM"> <NAT> <DNS use-proxy="true"/> <Forwarding name="ssh" proto="1" hostport="2241" guestport="22"/> </NAT> </Adapter> <Adapter slot="1" enabled="true" MACAddress="000000000001" type="82540EM"> <DisabledModes> <BridgedInterface name="eth1"/> <NATNetwork name="NatNetwork"/> </DisabledModes> <InternalNetwork name="intnet"/> </Adapter> </Network>