You are not logged in.

#1 2013-04-10 18:21:25

Hellrespawn
Member
From: The Netherlands
Registered: 2011-10-17
Posts: 7
Website

[SOLVED] Static IP wired connection doesn't work with netctl

I've tried to replace netcfg with netctl, but my new profile doesn't work.

My old netcfg profile, which still works, is:

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='enp2s0'
IP='static'
ADDR='192.168.0.200'
#ROUTES=('192.168.0.0/24 via 192.168.1.2')
GATEWAY='192.168.0.1'
DNS=('192.168.0.1')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6='static'
#ADDR6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#ROUTES6=('abcd::1234')
#GATEWAY6='1234:0:123::abcd'

The netctl profile I made is:

Description='A basic static ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=static
Address='192.168.1.200'
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.0.1'
DNS=('192.168.0.1')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

Which gives me the following errors:

netctl@ethernet\x2dstatic.service - Networking for netctl profile ethernet-static
          Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
          Active: failed (Result: exit-code) since Wed 2013-04-10 20:11:44 CEST; 53s ago
            Docs: man:netctl.profile(5)
         Process: 720 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

Apr 10 20:11:42 Duat systemd[1]: Starting Networking for netctl profile ethernet-static...
Apr 10 20:11:42 Duat network[720]: Starting network profile 'ethernet-static'...
Apr 10 20:11:44 Duat network[720]: RTNETLINK answers: Network is unreachable
Apr 10 20:11:44 Duat network[720]: Could not set gateway '192.168.0.1' on interface 'enp2s0'
Apr 10 20:11:44 Duat network[720]: Failed to bring the network up for profile 'ethernet-static'
Apr 10 20:11:44 Duat systemd[1]: netctl@ethernet\x2dstatic.service: main process exited, code=exited, status=1/FAILURE
Apr 10 20:11:44 Duat systemd[1]: Failed to start Networking for netctl profile ethernet-static.
Apr 10 20:11:44 Duat systemd[1]: Unit netctl@ethernet\x2dstatic.service entered failed state

The strange thing is, if I copy the ethernet-dhcp example, it works immediately. If I remove netctl and reinstall netcfg, my old profile also works immediately. One odd thing I've noticed is that all dashes (-) in my profile filename are replaced by \x2d by netctl.

Any help is appreciated.

Last edited by Hellrespawn (2013-04-11 10:55:48)

Offline

#2 2013-04-10 19:58:29

incorrigible
Member
Registered: 2013-04-10
Posts: 2

Re: [SOLVED] Static IP wired connection doesn't work with netctl

I ran into the same problem. My solution was to add /24 to the address as seen in the examples. The relevant part of the netctl.profile manpage is:

Address=() [requires IP=static]
           An array of IP addresses suffixed with ‘/<netmask>’. Leaving out brackets for arrays
           consisting of a single element is accepted in the Bash syntax.

Last edited by incorrigible (2013-04-10 19:59:41)

Offline

#3 2013-04-11 10:55:29

Hellrespawn
Member
From: The Netherlands
Registered: 2011-10-17
Posts: 7
Website

Re: [SOLVED] Static IP wired connection doesn't work with netctl

It worked, thanks very much! I've marked the thread solved.

Offline

#4 2013-04-13 08:31:22

Ekber
Member
From: Germany & Turkey
Registered: 2008-10-03
Posts: 25

Re: [SOLVED] Static IP wired connection doesn't work with netctl

Hi
i switched to netctl too but replacing with netcfg profile don't work. I think my solution is with ip adress.

it solved smile i insert Address='192.168.178.78/24' netmask/24, now bootup is faster then netcfg little bit smile

regards from Germany

ekber

Last edited by Ekber (2013-04-14 17:52:18)

Offline

#5 2013-04-17 05:24:24

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 264

Re: [SOLVED] Static IP wired connection doesn't work with netctl

Could you show your solved profile, I've the similar problem, But still can not work.


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages, old project Arch on colinux,

Offline

#6 2013-04-26 16:49:52

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] Static IP wired connection doesn't work with netctl

Netctl's ethernet-static isn't connecting to internet for me. Is there anything wrong with following config?

cat ethstatic
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.0.86/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.0.1'
DNS=('8.8.8.8' '8.8.4.4')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

netctl start ethstatic
Interface is up but can't connect to internet.

systemctl enable netctl-ipluged@ethstatic.service
Message on boot

[TIME]Timed out waiting for device sys-subsstem-net-devices-ethstatic.device.
[DEFEND] Dependency failed for Automatic wired network connection using netctl profiles
cat ifplugd.conf
# -*-sh-*-
# $Id: ifplugd.conf 43 2003-09-13 11:25:11Z lennart $

# This file is part of ifplugd.
#
# ifplugd is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# ifplugd is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with ifplugd; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# ifplugd configuration file

# Please note that this is a bourne shell fragment sourced by the
# init script of ifplugd.

# Specify the interfaces to control here, separated by spaces.
# Ifplugd processes will be started for each of these interfaces when
# the ifplugd init script is called with the "start" argument. You may
# use the magic string "auto" to make the init script start or stop
# ifplugd processes for ALL eth and wlan interfaces that are available
# according to /proc/net/dev. Note that the list of interfaces
# appearing in /proc/net/dev may depend on which kernel modules you
# have loaded.
INTERFACES="eth0"

# Additional parameters for ifplugd.
# (Run "ifplugd -h" for further information.)
ARGS="-fwI -u0 -d10"

# Additional parameters for ifplugd for the specified interface.  Note
# that $ARGS is ignored, when a variable like this is set for an
# interface
#ARGS_wlan0="-MwI -u5 -d5"

ethernet-dhcp profile works fine. Static is broadcasting desired ip but won't connect to internet unless I do sudo dhcpd

This is on Raspberry Pi. I know this is not arm forum but netctl is new and I just wanted to see if my config is fine.

Offline

#7 2013-04-26 17:35:03

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 264

Re: [SOLVED] Static IP wired connection doesn't work with netctl

In my case, after remove wicd in systemctl, my static network works.


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages, old project Arch on colinux,

Offline

#8 2013-05-04 22:14:54

danilo741
Member
From: Cuenca - Ecuador
Registered: 2012-02-13
Posts: 2

Re: [SOLVED] Static IP wired connection doesn't work with netctl

I have profile file ok, but does'nt work

solution:

# systemctl disable dhcpcd


*netctl can't load profile if interface its already configured


Greetins from Ecuador

Offline

#9 2013-07-28 09:42:56

miles969
Member
Registered: 2013-02-03
Posts: 16

Re: [SOLVED] Static IP wired connection doesn't work with netctl

incorrigible wrote:

I ran into the same problem. My solution was to add /24 to the address as seen in the examples. The relevant part of the netctl.profile manpage is:

Address=() [requires IP=static]
           An array of IP addresses suffixed with ‘/<netmask>’. Leaving out brackets for arrays
           consisting of a single element is accepted in the Bash syntax.

many thanks!

i was having problems with my raspberry pi connection with archarm. this solved it quicksmart big_smile

regards,
M.

Offline

Board footer

Powered by FluxBB