[SOLVED]Setting IP static

Hello,

Does somebody can tell me how to set an IP static (LAN)?

it seems it’s dynamic by default.

thanks

Best regards

The best way to do this for now is in the Windows, Linux or OSX installer

Sam

Hello Sam,

thanks for your reply.

I don’t see anything about IP static when i’ve launched OSMC installer…

should I reinstall OSMC?

Best regards

jean-Baptiste

First of all many thanks to Sam and the team for all their work and effort. Looking forward to the RC when it comes.

I also wanted to have a wired static ip address. After searching for a while I found a post in a different forum that suggested this command:-
$connmanctl> config service --ipv4 manual ip address netmask gateway
On my Pi2 it looked like this:-
$connmanctl> config ethernet_b827eb055694_cable --ipv4 manual 192.168.178.20 255.255.255.0 192.168.178.1
To find the name of the service:-
§connmanctl>service

Is there a disadvantage in using this method?

It all depends on your previous linux experience. As you’re asking here I’m guessing it’ll be easier for you to just run the installer again.

On the “networking” page of the installer, choose your connection method (wired/wireless) and then tick the box for ‘configure network manually’, on the next page you’ll be able to set your static IP address and other settings.

Hello Sam,

Do you think this problem should fix in the RC?

If YES, i will wait the RC.

thx

Yes

Sam

Hello,

I rather not run the installer again. Can you please describe how to fix it anyway? I have a fairly good Linux experience.

When trying the command above from connmanctl I get
Error ethernet_b827eb098357_cable: Not supported

I’m also trying to set a static IP, and have tried connman and a method with preseed, neither seem to work. There is no option to set a static IP in the GUI. This is getting pretty frustrating. Any other way of configuring a static IP?

Uh, yes there is an option to set a static IP in the GUI, are you sure you’re installing RC3 ? The option to switch to static configuration is very obvious.

You’ve just replied to a post from March - which is prior to the Network GUI even being written.

My bad, I was running the Confluence skin - switched to OSMC and it was there…
Thanks, made the setting now.

You can access OSMC settings in any skin - just look under either Programs or Addons->Programs depending on the Skin. Some skins will let you add a shortcut directly to the home screen as well.

OSMC settings is just a program addon.

According to help the mask would be:
manual <address> <netmask> <gateway>

It seems OSMC uses connman, so in order to create an ethernet static IP:

  1. Create a config file with your editor:

    sudo vim /var/lib/connman/osmc.config
    
  2. Add the following contents:

    [global]
    Name = OSMC
    Description = OSMC static network configuration
    
    [service_osmc]
    Type = ethernet
    IPv4 = 192.168.0.21/255.255.255.0/192.168.0.1
    Nameservers = 8.8.8.8,8.8.4.4
    

    Make sure to change the IPv4 line to match your own network/netmask/gateway and Nameservers to use the ones you want.

  3. Reboot your RPi or restart the connman service:

    sudo systemctl restart connman
    

If you opt to restart connman, you’ll loose the connection.


Sources:

The MyOSMC addon network module makes this simple and painless in the GUI.

Have you considered to fix the IP with a dhcp reservation on your router?
If this is doable on your router interface it will take a matter of second to solve it w/o shange on the system

Guys this is a 1 year old thread that was just reactivated by someone for no reason.
Will be closed in 24 hours if no new post

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.