LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 05-09-2013, 07:52 PM   #1
linux555
LQ Newbie
 
Registered: May 2013
Posts: 14

Rep: Reputation: Disabled
Arch Liux: netctl failure for static IP


hello all

Righ now I am using dhcpcd to setup my network. I want to setup a static IP but it is not as intuitive when arch was using systemV and rc.conf

I followed the arch wiki to no avail
https://wiki.archlinux.org/index.php/Netctl

Here is the error I get

Code:
netctl start mynetwork
Job for netctl@mynetwork.service failed. See 'systemctl status netctl@mynetwork.service' and 'journalctl -xn' for details.

If you had successfully configured a static IP with arch systemd please show me how. Thanks

Last edited by linux555; 05-09-2013 at 07:56 PM.
 
Old 05-14-2013, 09:30 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
/etc/netctl/mynetwork
Code:
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=192.168.0.8/24
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway=192.168.0.1
DNS=8.8.8.8
Code:
# netctl start mynetwork
Code:
# netctl status mynetwork
netctl@mynetwork.service - A basic static ethernet connection
   Loaded: loaded (/etc/systemd/system/netctl@mynetwork.service; enabled)
Code:
# netctl enable mynetwork
 
Old 05-21-2013, 12:02 PM   #3
ToK
Member
 
Registered: Nov 2005
Posts: 108

Rep: Reputation: 17
I needed to set a different Interface. You will get it from /sys/class/net and sounds something like enpXsY (where X and Y are numbers). So my configuration is

Quote:
Description='A basic static ethernet connection'
Interface=enp5s0
Connection=ethernet
IP=static
Address=('192.168.2.100/24')
Gateway='192.168.2.1'
DNS=('192.168.2.1 8.8.8.8 81.3.3.81 81.3.4.76 81.209.130.140')
 
Old 06-06-2013, 01:39 AM   #4
Screwbacca
LQ Newbie
 
Registered: Jun 2013
Location: In my house
Distribution: Arch
Posts: 1

Rep: Reputation: Disabled
To solve this problem I do:

Code:
ip link set <interface> down
Then

Code:
netctl start <my-network>

Last edited by Screwbacca; 06-06-2013 at 01:49 AM.
 
Old 06-21-2013, 05:48 AM   #5
JuliusS
LQ Newbie
 
Registered: Jun 2013
Posts: 1

Rep: Reputation: Disabled
Hi, I`m a newbie with linux arch and I`m experimenting with installing arch on a virtual machine but I don`t succeed in establishing an internet connection. I have read the documentation about netctl and I`ve tried the commands but it didn`t work. I guess maybe I`m using them in a wrong way./etc/netctl/mynetwork gives me the error msg : no such file or directory.

I appreciate all help I can get on this topic
 
Old 06-23-2013, 04:08 PM   #6
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Did you copy the example static file to 'mynetwork' ?

https://wiki.archlinux.org/index.php...uide#Static_IP

Edit: Ah. In this guide, the file is called "my-network".

But same principle. Copy the static-example file. Edit it (change the interface to match your interface), save it, then `netctl enable my-network`

Last edited by Hangaber; 06-23-2013 at 04:10 PM.
 
Old 08-26-2013, 12:01 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I just ran through a Virtualbox install of the latest Arch,

Code:
cd /etc/netctl/
cp examples/ethernet-dhcp my-network
netctl enable my-network
is all I did and it worked.
No edit, just copied and enabled per the Instructions

I did run
Code:
systemctl enable dhcpcd.service
because I have a router.
 
Old 02-27-2014, 08:08 AM   #8
glnds
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
For static ip profiles you should specify: AutoWired=yes

"netctl-ifplugd@interface.service will prefer profiles which use DHCP. To prefer a profile with a static IP, you can use AutoWired=yes"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown problem in mint liux leo5111 Linux - Hardware 3 12-19-2011 02:50 PM
How to define alias in liux vishwajeet Linux - Newbie 3 03-03-2011 06:32 AM
Is there liux software that can do this robrecc Linux - Software 4 01-27-2006 10:01 AM
boot to to liux from ipod as hardrive secret_squirrel Linux - General 3 04-18-2005 04:55 PM
Stuck on Box running Liux jeep99899 Linux - Newbie 4 02-15-2005 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 09:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration