2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

virtualboxにて、hostonlyで立ち上げたVMにpingが通らない

Last updated at Posted at 2015-09-02

macにて、docker-machine create --driver virtualbox hogeしてるのに、
一向に成功せず、いろいろ調べた結果virtualbox上のVM(192.168.99.107)にpingが飛んでいないことがわかった。
セグメント指定でinterface指定したらどうにかなった。

# 接続したいインターフェイスを確認
% ifconfig vboxnet3
vboxnet3: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether 0a:00:27:00:00:03
        inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255

# ルーティング追加
% sudo route add -net 192.168.99.0/24 -interface vboxnet3
 
# 確認コマンド
% netstat -rn
Routing tables
Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH             14  1354634     lo0
192.168.99         link#15            UCSc            5        0 vboxnet <= 追加されてる!!!
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?