Setting Static IP Address

mascenzi
mascenzi New Member Posts: 1

Hello,
New to the forum. I'm having some issues regarding setting a static IP Address running Ubilinux.

here's where I'm at.

The general information that I've found has said that by editing /etc/network/interfaces with an address, mask, and gateway it is all that really needs to be done. However, no matter what directions I follow it never uses the IP address I assign. It always defaults to the dhcp address.

here is the current configuration of /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto enp1s0
iface enp1s0 inet static
address 10.4.0.253
netmask 255.255.255.0
gateway 10.4.0.1

I also followed here https://linuxconfig.org/how-to-setup-a-static-ip-address-on-debian-linux with no success.

I've never attempted to make the changes with the GUI, as I need to make it work via the cmdline as I won't have access to the UI at all.

Anyone, any ideas????

Comments

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @mascenzi ,

    Did you try to restart your service?
    sudo systemctl restart isc-dhcp-server

    Cheers!

  • Chetan
    Chetan New Member Posts: 6

    hi @ccalde getting error. failed to restart isc-dhcp-server.service: Unit isc-dhcp-server.service not found.

    I am also facing the same problem. not able to set static IP address. I want to configure wifi on local network

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @Chetan

    Could you try this adding your own IP and network?
    Edit: sudo nano /etc/network/interfaces

    Defining your own Network:
    auto enp2s0
    iface enp2s0 inet static
    address 192.168.1.150
    netmask 255.255.255.0

    Edit: sudo nano /etc/default/isc-dhcp-server Add your network interface:
    INTERFACES="enp2s0"

    Restart dhcp server:

    sudo systemctl restart isc-dhcp-server

  • Chetan
    Chetan New Member Posts: 6

    hi @ccalde I have connected wifi adapter to up board. but it is not able to connect. don't know why this is happening, I have installed ubilinux 4. can you please help me out to connect wifi adapter and configure wifi on up board?

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @Chetan,

    Could you please send the WiFi adapter model/ specifications that you are using?
    Some chips are not supported for UP board.

    Thanks!

  • singhv
    singhv New Member Posts: 1

    Hi ,
    i want to connect my up board to wifi without display and then ssh into UP terminal from ubuntu over wifi rather than ethernet. any help?

  • Sil
    Sil New Member Posts: 29 ✭✭

    Hi everybody.

    Note that with Ublinux, the network is managed by ConnMan and you MUST set your network option onlu using the GUI. If you make modifications on the classic file_ /etc/network/interface_, the new settings are ignored by the ConnMan. The actual settings are stores somewhere else but I actually do not know.

    If you want to change the network settings using the /etc/network/interfaces file, you must uninstall ConnMan with the command apt-get remove ConnMan. After that you are not able to configure the network using the GUI, but the file interfaces is the real file with all the network settings.

    Furthermore it is necessary to create a file_ /etc/resolv.conf_ with a simple text editor (vim, nano, ...) including the dns of the system. This file is very simple and contain a row for each nameserver as in the following:
    nameserver xxx.xxx.xxx.xxx
    nameserver yyy.yyy.yyy.yyy

    Reboot the system and everything works.

    I experimented this and my system works perfectly.

    Silvano

    Eng. Silvano Bertoldo, PhD