You are not logged in.

#1 2012-09-13 18:18:10

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Static IP wired internet with specific DNS Systemd (Working!)

Within the systemd wiki is the following notation far down the menu of systemd datas:

"If you need a static Ethernet configuration, but don't want to use netcfg, there is a custom service file available on the Systemd/Services page. "

This file is indeed listed therein (far down the menu again) and provides for two modes of static ip.

Utilizing the systemd/system/network.service file, which sets up eth0 and its addresses, seems to require that it be included in /etc/systemd/system/ multi remote.service (or some such file).

Is the file provided in custom service file to be copied into the multi remote services file of systemd/system and therein edited?  This isn't specifically stated anywhere.

If the user is to copy that data file into /etc/systemd/system/multi remote, what happens to what is already provided in that target file?  It is not an empty file.

Is this conjecture correct for utilizing the remote service file for static ip with link set eth0 up?

Will this entry permit internet connection via static eth0 using ...systemctl/network.service.... or is a special command required for this special remote service?

In general, it seems backward not to set up the internet firstly rather than way down the menu.

All IMHO...

Last edited by lilsirecho (2012-09-16 16:46:09)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2012-09-13 18:45:34

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Static IP wired internet with specific DNS Systemd (Working!)

Why not use the network settings from rc.conf and add the DNS IP addresses to resolv.conf ?

https://wiki.archlinux.org/index.php/Be … de#Wired_2


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-09-13 20:52:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Static IP wired internet with specific DNS Systemd (Working!)

Wiki for systemd arranges things in the named order to establish static IP as described but it leaves the main system wiki to establish custom static network.  How does the user to know what to do next?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2012-09-16 06:27:04

dobie2564
Member
Registered: 2011-09-05
Posts: 27

Re: Static IP wired internet with specific DNS Systemd (Working!)

DSpider wrote:

Why not use the network settings from rc.conf and add the DNS IP addresses to resolv.conf ?

https://wiki.archlinux.org/index.php/Be … de#Wired_2

This would not seem to address the OP's question since in a pure SystemD configuration, there is no rc.conf.

Offline

#5 2012-09-16 12:07:52

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Static IP wired internet with specific DNS Systemd (Working!)

File: /etc/dhcpcd.conf: 

nohook resolv.conf

Or just use /etc/resolv.conf.head


Sidenote: don't use the rc.conf compability crud. (arch-daemons.target and so on) Remove initscripts and use systemd-sysvcompat instead.

Last edited by Mr.Elendig (2012-09-16 12:12:44)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2012-09-16 12:23:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Static IP wired internet with specific DNS Systemd (Working!)

Create /etc/conf.d/network and /etc/systemd/system/network.service as per that wiki page, with the appropriate ip address etc for your configuration in the conf.d file. Edit /etc/resolv.conf to include your required dns server addresses. To start the network, do

systemctl start network.service

To start it automatically at boot-time, do

systemctl enable network.service

That's all there is to it.

Systemd brings a lot of changes, but the man and wiki pages really do cover it all. Read, learn, take your time.

Last edited by tomk (2012-09-16 12:23:47)

Offline

#7 2012-09-16 14:35:39

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Static IP wired internet with specific DNS Systemd (Working!)

Tomk:

Many thanks for the clarification.

The basic method for network is usually dhcp and the install of systemd seems bent in that direction.

I utilized the note for stsic IP located way down the wiki menu which sends me to another page called System Services.

Therein is contained a static ip setup service which can be edited for my ip needs.  However, I know not what to do with it.  I understand that /etc/systemd/system contains service files but in looking at the contents of that address, there are several folders.  Which,if any, do I put the service file called network.service or do I just add the file as a file to the system directory?

I have utilized the ldm service file from SystemServices and it performs correctly.  I tried several places to install that file until it worked.

Wherein do I put the network.service file as generated by editing the SystemServices file provided?

This file is the standard...ip link set eth0 up.... arranged as a service file.  Do I include the title as given in that file?

At present, I have systemd installed permanently and use an ip set up file  on my desktop to enable internet via terminal.  This post via that method.

One additional problem involves xfce4.  There seems to be no service file for that desktop system to open upon booting which was performed by rc.local in initcripts archlinux. I am able to initiate it manually for now.

I appreciate the support and find the response given to be more on target.

Its a learning process for a completely new nomenclature and procedure in an embrionic methodology.

I am up in systemd but not fully and still not aware as to where the service files are placed.

MY present systemd is raid0 bootable grub2 two partitions ext3 with free space ahead of the partitions.  This systemd is on an 8GB Compact Flash device .

EDIT:  Performed ; systemctl enable network.service....result :

[root@n6re ~]# systemctl enable network.service
Failed to issue method call: No such file or directory
[root@n6re ~]# 

EDIT2: file:///etc/systemd/system/multi-user.target.wants/ldm.service
file:///etc/systemd/system/multi-user.target.wants/multi-user.wants
file:///etc/systemd/system/multi-user.target.wants/rc.local.pacsave.service
file:///etc/systemd/system/multi-user.target.wants/rc.local.service
file:///etc/systemd/system/multi-user.target.wants/remote-fs.target

have placed the network unit service file in multi-user.target =.wants/multi-user wants.

EDIT3:  Contents of /etc/conf.d network.......

:ip link set eth0 up
ip addr add xxx.xx.xxxxxx/xx dev eth0
ip route add default via xxx.xx.xxx.x

Last edited by lilsirecho (2012-09-16 15:11:10)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2012-09-16 15:17:53

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Static IP wired internet with specific DNS Systemd (Working!)

You seriously need to learn to follow instructions!

Again do _exactly_ what the wiki states, and which is what tomk outlined for you before!

If you use google, it's also listed here with examples!

https://bbs.archlinux.org/viewtopic.php?pid=1155091

Offline

#9 2012-09-16 15:38:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Static IP wired internet with specific DNS Systemd (Working!)

mhertz:

The wiki states to go to System Services and get the staticIP service file.  The file needs editing of course but no mention is made of where to put it.  Thus the wiki is incomplete with a dead end for static ip.

Please bear with me, I have done what I interpret needs to be done as I have described previously.  I have ..network ... in /etc/conf.d.... and a network.service file in ...systemd/system... but probably not in the right folder?

As you can see from my EDIT the systemctl command fails.

This means to me that the network.service file isn't recognized.....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#10 2012-09-16 15:47:58

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Static IP wired internet with specific DNS Systemd (Working!)

The wiki section that both you and I are looking at provides the full and exact paths for the files that you need to create. So you create a file called 'network' in the directory called '/etc/conf.d/', and a file called 'network.service' in the directory called '/etc/systemd/system/'.

This is very basic stuff, which has nothing to do with systemd, and everything to do with elementary file management operations.

Offline

#11 2012-09-16 16:40:33

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Static IP wired internet with specific DNS Systemd (Working!)

Tomk:

I have a network file established with content as described.

I have a service file created from SYSTEM SERVICES with static ip info which is an option provided in the wiki.  It is not apparent where that file as edited should be inserted in/etc systemd/system/folders.

I have placed it in multi-user.target.wants and performed the command:

systemctl enable network.service
[

This command gives a fail reply...no such file or directory.  I assume that this means it isn't enabled. 

Suspecting that is incorrect, I rebooted.

Upon reaching desktop, I ran:

pacman -Syy

The repos synced properly and therefore the internet is established.

I have fought this problem for a week or two assuming that what I had attempted to do with the network.service file I created was wrong (error reported) for whatever reason so I never rebooted to find out if it was enabled but chased some other place to put the file( which has to be a correct service file).

It may be that I must first run: systemctl start network.service..... and then run the enable command but that is not apparent to me.  The commands are separate and distinct, the enable using  the daemon to enable.

At any rate, my enable command did enable the internet network daemon even though it reported an error.

Perhaps I didn't follow the wiki correctly in doing this network.service which caused the error messages over and over again.

So the problem is partially solved so to speak.  Thanks for the support.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#12 2012-09-16 17:41:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Static IP wired internet with specific DNS Systemd (Working!)

lilsirecho wrote:

It is not apparent where that file as edited should be inserted in/etc systemd/system/folders.

For the last time - the wiki page says "/etc/systemd/system/network.service" - how is it not apparent? Why on earth would you put that file anywhere except /etc/systemd/system?

Offline

#13 2012-09-16 18:22:02

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Static IP wired internet with specific DNS Systemd (Working!)

Sorry for the misunderstanding I exhibit but there are many folders in systemd/system and that confuses me no end!!!!

Merely entering the file from SYSTEM SERVICES in /systemd/system produces the same error of no such file or directory when applying the ......systemctl enable network.service...command so I assumed it was wrong due to the failure.

This occurs still but it kept me asking for help because it wasn't apparent that it did enable. I eventually discovered that it did but I have the service file in one of the folders in ...systemd/system.... at this time.

I assume this isn't necessarily the activity that is required for enabling since the file in /etc/rc.d is the daemon fdr network.

I also have ldm service entered into the same folder and it performs as well with an entry in /etc/rc.d daemon.

Again, the error message consistently misled me and still wonder why it appears even with the file copied in the folder of systemd/system.

Thanks for your comments.

EDIT:  The following commands were issued a few moments ago:

[root@n6re ~]# systemctl start network.service
[root@n6re ~]# systemctl enable network.service
Failed to issue method call: No such file or directory
[root@n6re ~]# 

As you can see from these entries, there is no indication that network.service was "started" nor was it enabled with my present setup, as is stated by the error message.

It is in truth enabled when I reboot, contrary to the statement given in response to the command to enable.

I have now repeatied what I have stated over and over.

The error message has me buffaloed.!!

As to following the wiki, I think I did what it requires but the error message persists!

I am in systemd hoping for an xfce4 service file to appear and a file for /etc/rc.d to enable the daemon.

Last edited by lilsirecho (2012-09-16 18:41:01)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB