vagrantfileの以下を有効化しました。ホスト部は他とかぶってません。
config.vm.network "public_network", ip: "192.168.33.100"
ゲストマシンに接続して ifconfig
の結果です。
[vagrant@localhost ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::907d:2b24:c79d:29a9 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:37:f8:46 txqueuelen 1000 (Ethernet)
RX packets 958 bytes 117229 (114.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 690 bytes 128780 (125.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.33.100 netmask 255.255.255.0 broadcast 192.168.33.255
inet6 fe80::a00:27ff:fe82:b4 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:82:00:b4 txqueuelen 1000 (Ethernet)
RX packets 27 bytes 4020 (3.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17 bytes 1354 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 84 bytes 7232 (7.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 84 bytes 7232 (7.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
以上を確認して別機から ssh [email protected]
しましたが、タイムアウトしてしまいます。原因は何でしょうか?