Fixed IP Address problem

Raspberry Pi related support

Fixed IP Address problem

Postby cfgr » 27 Jan 2020, 23:02

Hi all,

I'm running a fixed LAN with NO DHCP server active. All my computers and media 'stuff' is configured accordingly with a fixed IP address.
My problem: how to configure for fixed IP addres?

1 Thing i did so far succesfully: logged in as root (and with password ****) directly into the RPi via an USB AZERTY keyboard (i live in Belgium).
Allready figured out how to change the default US QWERTY keyboard at boot up to the native Belgian AZERTY version by editing the vconsole.conf file. For those interested: enter the line KEYMAP=be-latin1

My specific question however: what file do i need to edit to change from DHCP to fixed IP address?

Thanks in advance & enjoy life!

C
cfgr
 
Posts: 6
Joined: 27 Jan 2020, 22:14

Re: Fixed IP Address problem

Postby eea123 » 29 Jan 2020, 10:46

Under the Menu dropdown you should see Network. Go into Network and your connection should be shown there. I believe you need a wired connection for first time setup. Mine is DCHP, but when you click on it the option to change to Fixed IP shows up.
eea123
 
Posts: 100
Joined: 23 Dec 2017, 19:19

Re: Fixed IP Address problem

Postby cfgr » 29 Jan 2020, 15:32

eea123 wrote:Under the Menu dropdown you should see Network. Go into Network and your connection should be shown there. I believe you need a wired connection for first time setup. Mine is DCHP, but when you click on it the option to change to Fixed IP shows up.


That's the main problem: i do not have a DHCP service in my (music) LAN - hence i cannot login the RuneAudio server over the LAN in the first place. :-) I need to know how to edit (whatever file in the Rune Root is available) to configure a static IP address. (like the vconsole.conf i have configured to boot up in my BE AZERTY keyboard) - i tried editing the /etc/dhcpcd.conf file but this didn't work. :-( So may i need to edit another file to fix this?

As a last resort i maybe could "manage" (borrow) a friends router with the DHCP service enabled and put a computer in the same address range to connect to the RuneAudio server?

I have no problems in editing/configuring my 2 other Raspberry Pi's (Raspbian/Openelek-Kodi) with a static IP. But it seems impossible to do this in RuneOS. Maybe it is simply a question of editing the right file?

Any suggestions are welcome.
Enjoy Life!
C
cfgr
 
Posts: 6
Joined: 27 Jan 2020, 22:14

Re: Fixed IP Address problem

Postby R101 » 29 Jan 2020, 23:46

cfgr,

You do not say which RA version you are using, but putting a file in /etc/netctl named "Your SSID" usually works.

This file content works for me:

Description='wlan0 connection'
Interface=wlan0
Connection=wireless
Security=wpa-configsection
AutoWired=yes
ExcludeAuto=no
IP=static
Address=('192.168.1.6/24')
Gateway='192.168.1.1'
DNS=('8.8.8.8')
WPAConfigSection=(
'ssid="Your SSID"'
'scan_ssid=1'
'psk="Your Network Password"'
'key_mgmt=WPA-PSK'
'proto=RSN WPA'
'group=CCMP TKIP'
'pairwise=CCMP TKIP'
'priority=3'
)
(Pi 3B, RuneAudio+R e2, JLS I2S over USB)
R101
 
Posts: 252
Joined: 29 Apr 2016, 16:16

Re: Fixed IP Address problem

Postby cfgr » 30 Jan 2020, 10:16

Thanks! Great stuff for when i have a wireless LAN active later on and a working Wifi-dongle. :-)
But, until then, i only can use a wired ethernet connection (eth0) and need to configure the appropriate file to set a static IP address so, on the next power-on (boot or eboot) i still have the static IP address active. :-)

Things i did sofar: i used the /etc/dhcpcd in command mode (changing the dhcpcd.conf file didn't work)
- found a great helpfile in a BSD forum. I'm using the Raspberry B (2012) with the RuneAudio v0.3

- Logged in as: root [ENTER]
- Put in the Password: [ENTER] # rune, but it doesn't show :-)
- dir /etc [ENTER]
- dhcpcd -S ip_address=192.168.254.20 [ENTER] # this is the IP i want to use in my music LAN
- dhcpcd -S routers=192.168.254.63 [ENTER] # the non-dhcp gateway IP to the used router
- dhcpcd -S domain_name_servers=192.168.254.63 [ENTER] # the same as the router
- dhcpcd -S eth0 [ENTER]

For no obvious reason, when typing ifconfig i get the IP 169.254.184.44 assigend to eth0 # ????? no ideay whatever causes this
But anyway, when i configure my computer as 169.254.184.43 with gateway 169.254.184.44 i (finally) can connect to the RuneAudio server app. :-)

I can use the connected 8GB USB-memory stick with some MP3 files on it and the sound is comming from the AV out jack on the RPi! FINALLY SOME STUFF WORKING!!!

Went to the menu/network and changed the initially 169.254.184.44 into the wanted 192.168.254.20 (and the other stuff) and saved the changes. Went to reboot the whole stuff, changed my computer back to 192.168.254.5 with the usual 192.168.254.63 gateway en crossed my fingers.

Bad luck: nothing happened. :-( When logging in on the RPi and checking the ifconfig...to my astonischment all data is erased and no IP is assigned to the eth0. :-(

I'm stuck! :-(

Help wanted.

The (initial) question remains: what file to edit in RuneOS (RuneAudio) to get a permanent STATIC IP address that stick after a boor or reboot?

Thanks.
cfgr
 
Posts: 6
Joined: 27 Jan 2020, 22:14

Re: Fixed IP Address problem

Postby R101 » 30 Jan 2020, 11:48

If the /etc/netctl/examples/ethernet-static file does not help, I don't know what else to suggest.
(Pi 3B, RuneAudio+R e2, JLS I2S over USB)
R101
 
Posts: 252
Joined: 29 Apr 2016, 16:16

Re: Fixed IP Address problem

Postby cfgr » 30 Jan 2020, 19:02

Got some tips from FB group on Raspberry Pi:
Suggestion to use the following commands:

systemclt enable netctl-ifplugd@eth0

and

systemctl start netctl-ifplugd@eth0

Will test later this evening if this helps somewhat.

The history sofar: when using dhcpcd eth0 in command mode i'm able to assign the statics.
Checking with ifconfig confirms the settings.
And that worked! I could connect over the LAN to the RuneAudioUI....on the static address and play some music from the USB stick on the RPi.
Until reboot and all was lost again despite all info is correct in the dhcpcd.conf file. Apparantly it is not read on boot or overruled by another proces or file.

The search&learn continues... ^_^

Enjoy life!
cfgr
 
Posts: 6
Joined: 27 Jan 2020, 22:14

Re: Fixed IP Address problem

Postby cfgr » 31 Jan 2020, 11:11

Like a Pitbull i finally found the (working) answer.
When entering the static IP-stuff via dhcpcd 'command mode' it all worked fine until boot/reboot.

The simple answer: on boot/reboot the content of dhcpcd.conf is erased and overwritten with the content of dhcpcd.conf.pacnew.
So, simply, by editing this file and entering the static stuff on reboot it worked perfectly.

So anyone who wants to use a Raspberry Pi (model B) + RuneAudio with a fixed IP-address, only needs to put in the following into the dhcpcd.conf.pacnew file:

Connect a USB keyboard to the Raspberry Pi and a (hdmi) screen/monitor
Power on and wait for the login rompt:

runeaudio login: root [ENTER]
Password: rune [ENTER] #the password is not shown!

# If both are correct you will see the prompt: [root@runeaudio ~]#

nano /etc [ENTER]

nano dhcpcd.conf.pacnew [ENTER]

# define static IP parameters

profile static_eth0
static ip_address=[fixed IP here]/24 [ENTER] # in my case it was 192.168.254.20/24
static routers=[gateway IP here] [ENTER] # in my case it was 192.168.254.63
static domain_name_servers=[DNS IP 1 space DNS IP 2] [ENTER] # in my case this was 192.168.254.63 8.8.8.8

# Fallback lines

interface eth0 [ENTER]
fallback static_eth0 [ENTER]

[CTRL][O] + [ENTER] # nano command to save the content into the file
[Y] # to confirm the save

# check the eth0 parameters with:

ifconfig eth0 [ENTER]

# and finally doublecheck by rebooting and check again with ifconfig.
# enjoy life!
cfgr
 
Posts: 6
Joined: 27 Jan 2020, 22:14

Re: Fixed IP Address problem

Postby eea123 » 31 Jan 2020, 11:38

Good to hear that you are in business. I wondered about the PI operating system, but that pulls me out of my league. I'm using wired ethernet and let the router hand out IPs. It has bounced between local IP addresses XX.X.X.16 and XX.X.X.17 once or twice in the two years I've been up and running. Thought about going static, but if it's working - it's working :).
eea123
 
Posts: 100
Joined: 23 Dec 2017, 19:19

Re: Fixed IP Address problem

Postby nleikin » 20 Feb 2020, 17:08

Determine the IP address that is assigned to your server and then go onto the DHCP and set a DHCP reservation Liteblue for that server.
nleikin
 
Posts: 1
Joined: 20 Feb 2020, 17:06

support RuneAudio Donate with PayPal


Return to Raspberry Pi

Who is online

Users browsing this forum: cmh714 and 2 guests