Static IP on an Ubuntu 16 Server and VirtualBox



  • Hello,

    I am trying to set up FOG with an Ubuntu 16.04 LTS Server running on a VirtualBox.

    After reading a guide I followed the instructions and all worked really well until I had to set up a static IP.

    I use the command nano /etc/network/interfaces

    But after editing the files, my Ubuntu server loses connection to the internet.

    I change from
    alt text

    to

    alt text

    The numbers are different, of course.
    The address and netmask stays the same. The gateway and dns-nameservers are found out by using ipconfig /all an my Windows PC.

    Can anyone help me, please?



  • @george1421

    I found my mistake

    • The IP was wrong
    • the old VM snapshot had NAT instead of bridged network interface enabled

    Thank you very much for the fast support.

    alt text


  • Moderator

    Did you happen to notice the differences in subnet between dhcp and static?

    Under dhcp you had a 10.x.x.xx subnet. That makes me think you are using a nat interface under virtualbox and not a bridged network interface.



  • ip addr show
    

    for dhcp
    alt text

    for static
    alt text

    ping 8.8.8.8
    

    for a static IP address
    alt text

    ping www.dell.com
    

    alt text

    My two variants of the interfaces file look like this:
    static
    alt text
    dhcp
    alt text


  • Moderator

    With your fog server configured in dhcp mode it would be interesting to compare the output of ip addr show using dhcp vs what you have configured for a static interface.

    Then once you are in static mode see if you can ping 8.8.8.8

    And lastly see if you can ping www.dell.com

    That will properly test your network connectivity.

    Also be aware if you have a virtual box VM.

    1. You must bridge the FOG server nic to the physical NIC.
    2. You install FOG after you have a static NIC defined. FOG does not like the IP address of the FOG server to change after FOG is installed.

Log in to reply
 

446
Online

6.2k
Users

13.6k
Topics

128.1k
Posts