Vagrant Networking Configuration
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=d3wrp2BEvuE
Networking with Vagrant • • Networking in Vagrant is simple, powerful and easy! In this video I will talk you through setting up three different network configurations running in Ubuntu 14.04 (Trusty Tahr) 64-bit. • • We will be looking at; • 1. Port Forwarding (you can read more from the official documentation: https://docs.vagrantup.com/v2/network... ). • 2. Dynamic IP address allocation from your DHCP server ( https://docs.vagrantup.com/v2/network... ). • 3. Static IP address that we will set ourself ( https://docs.vagrantup.com/v2/network... ). • 4. As a bonus we will look at mapping a host name to our new static IP address so we can visit it through the vagrant.test domain. • • I mention about the private address range in parts of the video and here is some more information. The three private address blocks are; • 10.0.0.0 - 10.255.255.255 • 172.16.0.0 - 172.31.255.255 • 192.168.0.0 - 192.168.255.55 • You can find more inforation about them here: https://en.wikipedia.org/wiki/Private... • Here is a list of commands used in the video (in chronological order): • • 1. vagrant init • 2. sudo nano Vagrantfile • 3. vagrant up • 4. vagrant ssh • 5. sudo apt-get install -y nginx • 6. exit • 7. sensible-browser http://localhost:8085 • 8. sudo nano Vagrantfile • 9. config.vm.network private_network , type: dhcp • 10. vagrant reload • 11. vagrant ssh • 12. ifconifg (eth1) • 13. sensible-browser http://172.28.128.3 • 14. sudo nano Vagrantfile • 15. config.vm.network private_network , ip: 10.0.0.10 • 16. vagrant reload • 17. sensible-browser http://10.0.0.10 • 18. sudo nano /etc/hosts • 19. 10.0.0.10 vagrant.test • 20. sensible-browser http://vagrant.test • Here is the snippet(s) of code I write in the Vagrant file: • • config.vm.box = ubuntu/trusty64 • config.vm.network forwarded_port , guest: 80, host: 8089 • config.vm.network private_network , type: dhcp • config.vm.network private_network , ip: 10.0.0.10 • Thanks for watching - I hope this video has helped you out. If you have any questions or feedback please leave a comment below. • • DISCLAIMER: I take no responsibility in any damage to your machine this video may cause.
#############################
