You are not logged in.
Pages: 1
I have a brand new install of Arch with gnome and gnome-extra installed.
I am trying to set a static ip address. I followed the wiki as shown below without success.
One thing that looked odd was the name of the systemd unit file. It is shown as /etc/.../network@.service should that be network@[interface].service ?
I did enable and start after following as well. I don't know how to troubleshoot.
Persistent configuration on boot using systemd and udev rules
First create a configuration file for the systemd service, replace interface with the proper network interface name:
/etc/conf.d/network@interface
address=192.168.0.15
netmask=24
broadcast=192.168.0.255
gateway=192.168.0.1
Create a systemd unit file:
/etc/systemd/system/network@.service
[Unit]
Description=Network connectivity (%i)
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/network@%i
ExecStart=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i
ExecStart=/usr/bin/sh -c 'test -z ${gateway} || /usr/bin/ip route add default via ${gateway}'
ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip route flush dev %i
ExecStop=/usr/bin/ip link set dev %i down
[Install]
WantedBy=multi-user.target
Enable and start the unit network@interface, passing your name of the interface.Offline
When I start by using systemctl start I get an error.
Below is journalctl -xn
-- Logs begin at Tue 2014-08-19 16:22:22 CDT, end at Tue 2014-08-19 19:36:39 CDT. --
Aug 19 19:24:50 Arch-Desktop-2014 epiphany.desktop[1028]: ** (WebKitWebProcess:2088): WARNING **: uri_tester_compile_regexp: Error while compiling regular expression -Banner-Ad)- at char 10: ) without openin
Aug 19 19:30:06 Arch-Desktop-2014 epiphany.desktop[1028]: (epiphany:1028): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Aug 19 19:30:06 Arch-Desktop-2014 epiphany.desktop[1028]: (epiphany:1028): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Aug 19 19:30:06 Arch-Desktop-2014 epiphany.desktop[1028]: (epiphany:1028): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Aug 19 19:30:06 Arch-Desktop-2014 epiphany.desktop[1028]: (epiphany:1028): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Aug 19 19:30:06 Arch-Desktop-2014 epiphany.desktop[1028]: (epiphany:1028): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
Aug 19 19:36:39 Arch-Desktop-2014 ip[2249]: RTNETLINK answers: File exists
Aug 19 19:36:39 Arch-Desktop-2014 systemd[1]: network@enp0s10.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 19 19:36:39 Arch-Desktop-2014 systemd[1]: Failed to start Network connectivity (enp0s10).
-- Subject: Unit network@enp0s10.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit network@enp0s10.service has failed.
--
-- The result is failed.
Aug 19 19:36:39 Arch-Desktop-2014 systemd[1]: Unit network@enp0s10.service entered failed state.Offline
systemctl status network@... shows this:
● network@enp0s10.service - Network connectivity (enp0s10)
Loaded: loaded (/etc/systemd/system/network@enp0s10.service; enabled)
Active: failed (Result: exit-code) since Tue 2014-08-19 19:39:42 CDT; 21s ago
Process: 2280 ExecStart=/usr/bin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev %i (code=exited, status=2)
Process: 2278 ExecStart=/usr/bin/ip link set dev %i up (code=exited, status=0/SUCCESS)
Main PID: 2280 (code=exited, status=2)
Aug 19 19:39:42 Arch-Desktop-2014 ip[2280]: RTNETLINK answers: File exists
Aug 19 19:39:42 Arch-Desktop-2014 systemd[1]: network@enp0s10.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 19 19:39:42 Arch-Desktop-2014 systemd[1]: Failed to start Network connectivity (enp0s10).
Aug 19 19:39:42 Arch-Desktop-2014 systemd[1]: Unit network@enp0s10.service entered failed state.Offline
I recommend that you use netctl.
% cat /etc/netctl/static
Description='A basic static ethernet connection using iproute'
Interface=eno1
Connection=ethernet
IP=static
Address='10.1.1.212/24'
Gateway='10.1.1.1'
DNS=('10.1.1.1')
ExecDownPre='/usr/bin/pkill sshd'Offline
I tried the netctl method and I think it worked, but I'm not certain.When I enter ip addr, I see two IP's with one being labeled secondary. What is that? How do I know which IP I am using? I've always used ifconfig (old school, I guess)
2: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:21:85:c5:55:2f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.117/24 brd 192.168.1.255 scope global enp0s10
valid_lft forever preferred_lft forever
inet 192.168.1.109/24 brd 192.168.1.255 scope global secondary enp0s10
valid_lft forever preferred_lft forever
inet6 fe80::c4f8:b4b4:5f7d:ab9e/64 scope link
valid_lft forever preferred_lft forever
inet6 fe80::221:85ff:fec5:552f/64 scope link
valid_lft forever preferred_lft foreverOffline
I bet you a cheesecake that you have created a
/etc/systemd/system/network@.servicein your early try with one of the two IPs in it and/or another for "network@enp0s10" which you have not disabled/removed; so now the netctl profile starts in parallel.
The painting in my profile is "Eros" by Paul Klee. He is credited in the lower left, but that got blurry during the downscale.
Offline
Pages: 1