Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Find out VM subnet
    Code Block
    ifconfig eth0
    
    Note the IP address that this produces (aaa.bbb.ccc.ddd).
  2. Edit /etc/network/interfaces.static
    Code Block
    sudo nano /etc/network/interfaces.static
    
    and make sure it says the following (aaa.bbb.ccc are the values you got in previous step)
    Code Block
    address aaa.bbb.ccc.3
    netmask 255.255.255.0
    gateway aaa.bbb.ccc.1
    dns-nameservers aaa.bbb.ccc.2
    
  3. Point /etc/network/interfaces to your new configuration file
    Code Block
    sudo rm /etc/network/interfaces
    sudo ln -s /etc/network/interfaces.static /etc/network/interfaces.static
    
  4. Reboot your VM for changes to take effect
    Code Block
    sudo /sbin/reboot
    
  5. Test the new network configuration by running
    Code Block
    ifconfig eth0
    
    You should see aaa.bbb.ccc.3 as the IP address.
  6. Test external connectivity
    Code Block
    ping www.google.com
    

...