Failing to set up Static IP despite wiki and tutorial

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Failing to set up Static IP despite wiki and tutorial

Postby Weasel » Mon Jun 10, 2013 8:42 am

Hi all,

Despite what is being told here:
https://wiki.archlinux.org/index.php/Sy ... et_network

And what is being explained here:
http://www.pontikis.net/blog/migration- ... -archlinux

I cannot seem to get a static IP to work.

System is a freshly installed (yesterday-evening) RPi, with only vim, irssi, clang, python and screen packages (and their deps).

Upon booting, the networking service is attempting to set itself up, and in the mean time I'm stuck in the year 1970. I already get the login prompt, but some time after that, if I don't log in or otherwise touch the keyboard, I get a nice error message:

$this->bbcode_second_pass_code('', '
Arch Linux 3.6.11-11-ARCH+ (tty1)

****** login: [TIME] Timed out waiting for device sys-subsystem-net-devices-multi-user.device.
[DEPEND] Dependency failed for Network Static IP for multi-user.
[OK] Reached Target Network.
Starting Network Time Service ...
[OK] Started Network Time Service.
[OK] Reached target Multi-User System.
[OK] Reached target Graphical Interface.
')

**** is censored....

Despite setting up a /etc/conf.d/network with:
$this->bbcode_second_pass_code('', '
address=192.168.1.160
netmask=24
broadcast=192.168.0.255
gateway=192.168.1.1
')

and a /etc/systemd/system/network@.service with
$this->bbcode_second_pass_code('', '
[Unit]
Description=Netowork Static IP for %i
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainsAfterExit=yes
ExecStart=/sbin/ip link set dev %i up
ExecStart=/sbin/ip addr add 192.168.1.160/24 dev %i
ExecStart=/sbin/ip route add default via 192.168.1.1

ExecStart=/sbin/ip addr flush dev %i
ExecStart=/sbin/ip link set dev %i down

[Install]
WantedBy=multi-user.target
')

# systemctl enable network@
gives no further output and accepts this in the commandline

# systemctl status network@eth0.service gives the output
$this->bbcode_second_pass_code('', '
network@eth0.service - Network Static IP for eth0
Loaded: loaded (/etc/systemd/system/network@.service; enabled)
Active: active (exited) since Thu 1970-01-01 -1:00:07 CET: 43 years 5 months ago
Main PID: 137 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/network@.service/network@etho.service
')
Yet ifconfig keeps telling met that my IP is still not set to bla.bla.bla.160
In the mean time, "date" now knows it's no longer seconds from the epoch, it seems that the time deamon/service is run after networking...

Does anyone have a hint for me here? I'm kind of stuck on this probably very small issue. A fresh install didn't do the trick either...
Weasel
 
Posts: 1
Joined: Mon Jun 10, 2013 8:38 am

Re: Failing to set up Static IP despite wiki and tutorial

Postby pepedog » Mon Jun 10, 2013 9:14 am

Which image did you use, the 6 6 2013 one?
I would try this on a fresh install
$this->bbcode_second_pass_code('', 'systemctl disable netctl-ifplugd@eth0
cp /etc/netctl/examples/ethernet-static /etc/netctl/ethernet-static
nano /etc/netctl/ethernet-static #edit to you liking
netctl enable ethernet-static')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Failing to set up Static IP despite wiki and tutorial

Postby Chrisjuh » Fri Jun 14, 2013 2:00 pm

Why don't you just assign a fixed IP using the DHCP server in your router?
Chrisjuh
 
Posts: 6
Joined: Thu Jun 13, 2013 10:32 am

Re: Failing to set up Static IP despite wiki and tutorial

Postby baseline » Sat Jun 15, 2013 12:04 pm

On a fresh install, trying to configure any networking with netctl fails for me, dhcp or static. And it's a godawful fail with nothing but code=exited status=1/failure to work from. I'm clueless.
baseline
 
Posts: 11
Joined: Mon Apr 15, 2013 6:33 pm

Re: Failing to set up Static IP despite wiki and tutorial

Postby pepedog » Sat Jun 15, 2013 12:20 pm

Is your serial number all zeros?
cat /proc/cpuinfo
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Failing to set up Static IP despite wiki and tutorial

Postby baseline » Sat Jun 15, 2013 12:34 pm

It's not, there's a large amount of 0s and a few hex numbers. Revision 000e.

I also seem to have no journal which is interesting. I'm doing this on a completely fresh image, maybe I'm jumping the gun a bit?
baseline
 
Posts: 11
Joined: Mon Apr 15, 2013 6:33 pm

Re: Failing to set up Static IP despite wiki and tutorial

Postby baseline » Sat Jun 15, 2013 12:55 pm

Storage=none is set in /etc/systemd/journal.conf ?
baseline
 
Posts: 11
Joined: Mon Apr 15, 2013 6:33 pm

Re: Failing to set up Static IP despite wiki and tutorial

Postby baseline » Sat Jun 15, 2013 1:20 pm

With journalling working I can now see that the network device is already up. The wiki is a bit jumbled at the moment with the systemd changes to networking, does anyone know what is actually configured to run by default that I should disable to use netctl?
baseline
 
Posts: 11
Joined: Mon Apr 15, 2013 6:33 pm

Re: Failing to set up Static IP despite wiki and tutorial

Postby pepedog » Sat Jun 15, 2013 1:49 pm

systemctl disable netctl-ifplugd@eth0
profile is /etc/netctl/ethernet-dhcp
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Failing to set up Static IP despite wiki and tutorial

Postby Mikeclark » Wed Jul 10, 2013 6:31 am

What happened to Weasel?
This is a shot in the dark, but it worked for me; reboot, and if you still have no network connection, enter
# dhcpcd
Mikeclark
 
Posts: 35
Joined: Thu Jun 21, 2012 8:21 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 2 guests