Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Unless specified otherwise in `Vagrantfile`, the IP address of the host (the computer running Vagrant) from the perspective of the guest
  2. (the VM being run by Vagrant) is: **_`10.0.2.2`_**
  3.  
  4. If that IP address doesn't work, then examination of `Vagrantfile` should reveal directives that changed it from its default value.
  5.  
  6. If an IP address can't be found in `Vagrantfile`, then the following command will probably reveal it:
  7.  
  8. ```sh
  9. route -A inet
  10. ```
  11.  
  12. For example, the output may be:
  13.  
  14. ```text
  15. Kernel IP routing table
  16. Destination Gateway Genmask Flags Metric Ref Use Iface
  17. default 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
  18. 10.0.2.0 * 255.255.255.0 U 0 0 0 eth0
  19. 192.168.33.0 * 255.255.255.0 U 0 0 0 eth1
  20. ```
  21.  
  22. The desired IP address is the `Gateway` address of the `default` destination, which in this case is **_`10.0.2.2`_**.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement