Set Static IP
#1
I know this just me being a bonehead, but I can't figure out how to set a static IP on the Pine64.  I managed to set the address once with no problems, but after I re-imaged the sd card and tried to set the address the next couple of times, I managed to screw it up so badly that I had to re-image the sd card after each attempt.

I tried a couple of ways that failed (I can't remember what I did the first successful time):
Edited /etc/network/interfaces

Added these lines:
auto eth0
iface eth0 inet static
address 192.168.1.206
netmask 255.255.255.0
gateway 192.168.1.1

This didn't work.

Then I noticed a strange (to me) lines in the interfaces file:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

So I edited the eth0 file in interfaces.d and added the lines above to it.

Didn't work either.

Anyone have an idea on what I am doing wrong?
Thanks.
#2
You didn't mention which OS. I am guessing it is Ubuntu/Debian.

From my experience (NOT on Pine64), newer Ubuntu/Debian uses a package called "network-manager" which sometimes(?) prevents reading the info on /etc/network/interfaces . The thing that worked for me is to uninstall it. So you can run "sudo apt-get remove network-manager", then reboot. Then it should use the IP from /etc/network/interfaces .

Not sure it will work for you. But it might be worth a try.
#3
(04-19-2016, 11:48 AM)rakib-hasan Wrote: You didn't mention which OS. I am guessing it is Ubuntu/Debian.

From my experience (NOT on Pine64), newer Ubuntu/Debian uses a package called "network-manager" which sometimes(?) prevents reading the info on /etc/network/interfaces . The thing that worked for me is to uninstall it. So you can run "sudo apt-get remove network-manager", then reboot. Then it should use the IP from /etc/network/interfaces .

Not sure it will work for you. But it might be worth a try.

Thanks.  Will give it a try.
#4
(04-19-2016, 12:41 PM)JCMPine64 Wrote:
(04-19-2016, 11:48 AM)rakib-hasan Wrote: You didn't mention which OS. I am guessing it is Ubuntu/Debian.

From my experience (NOT on Pine64), newer Ubuntu/Debian uses a package called "network-manager" which sometimes(?) prevents reading the info on /etc/network/interfaces . The thing that worked for me is to uninstall it. So you can run "sudo apt-get remove network-manager", then reboot. Then it should use the IP from /etc/network/interfaces .

Not sure it will work for you. But it might be worth a try.

Thanks.  Will give it a try.

Please do not just uninstall a software from your system just on a guess from someone else. If you have Network Manager installed, use it with the right settings and read the corresponding articles in the ubuntu-wiki if unsure what to do.
If Network Manager is not installed your problem has another reason...

Gesendet von meinem K00L mit Tapatalk
Still a linux newbie with several EEE-PCs, PI's, LattePanda and some Desktops/Laptops running Win10. Now also proudly using Pine64+ 2GB and gigabit LAN
#5
(04-19-2016, 01:01 PM)androsch Wrote:
(04-19-2016, 12:41 PM)JCMPine64 Wrote:
(04-19-2016, 11:48 AM)rakib-hasan Wrote: You didn't mention which OS. I am guessing it is Ubuntu/Debian.

From my experience (NOT on Pine64), newer Ubuntu/Debian uses a package called "network-manager" which sometimes(?) prevents reading the info on /etc/network/interfaces . The thing that worked for me is to uninstall it. So you can run "sudo apt-get remove network-manager", then reboot. Then it should use the IP from /etc/network/interfaces .

Not sure it will work for you. But it might be worth a try.

Thanks.  Will give it a try.

Plese do not just uninstall a software from your system just on a guess from someone else. If you have Network Manager installed, use it with the right settings and read the corresponding articles in the ubuntu-wiki if unsure what to do.
If Network Manager is not installed your problem has another reason...

Gesendet von meinem K00L mit Tapatalk

You are right. I was just suggesting that because he was already re-imaging the sd card over and over anyway to do this. 

I forgot to mention that I was also successful of changing the IP by using the network manager from the taskbar (if you have a monitor connected to it). But to do this via terminal, I had to uninstall the network manager.
#6
(04-19-2016, 01:10 PM)rakib-hasan Wrote: Please do not just uninstall a software from your system just on a guess from someone else. If you have Network Manager installed, use it with the right settings and read the corresponding articles in the ubuntu-wiki if unsure what to do.
If Network Manager is not installed your problem has another reason...

You are right. I was just suggesting that because he was already re-imaging the sd card over and over anyway to do this. 

I forgot to mention that I was also successful of changing the IP by using the network manager from the taskbar (if you have a monitor connected to it). But to do this via terminal, I had to uninstall the network manager.
[/quote]

There also is a documentation to use the correct settings in NM via console.....

Gesendet von meinem K00L mit Tapatalk
Still a linux newbie with several EEE-PCs, PI's, LattePanda and some Desktops/Laptops running Win10. Now also proudly using Pine64+ 2GB and gigabit LAN
#7
I still must be doing something wrong here.  I'm running Ubuntu 3.10.65-4-pine64-longsleep-16 and I can set the static IP address via nmtui, but every once in a while it will switch to dhcp and I'll get a random ip address, it seems to happen when I do a big package install.  This last time, I went into nmtui and checked the config and made sure it was activated, but the IP is still being set via dhcp.  Is nmtui the way to set a static IP address?
#8
Here might have some help.

http://forum.pine64.org/showthread.php?tid=770
#9
(05-05-2016, 05:32 AM)Leoncito81 Wrote: Here might have some help.

http://forum.pine64.org/showthread.php?tid=770

That seems to have worked.  Thanks!
#10
(04-19-2016, 07:58 AM)JCMPine64 Wrote: Anyone have an idea on what I am doing wrong?

You're using crappy/manipulated OS images. The simple reason is outlined here: http://forum.pine64.org/showthread.php?t...99#pid8199

And in case you're using Xubuntu or any of the other 'extended' featured OS images found in the wiki be prepared that Pine64 used as server will waste energy since moronically a screensaver will eat up all CPU resources and will lead even to throttling since the SoC starts overheating.


Forum Jump:


Users browsing this thread: 2 Guest(s)