You are not logged in.

#1 2012-11-08 08:34:50

Linux4life
Member
Registered: 2012-11-08
Posts: 4

Static IP Configuration - A simple , clean and clear solution ?

Hi

I've been trying out Arch for the last couple of days, got it installed and working, and then started configuring
my network. I find it very powerful and fast but there is one HUGE issue that's keeping from actually using the OS.

This issue is Networking. There seems to be various way's to configure your network , but i went through all of them
and I can't find a CLEAR, SIMPLE way to configure my networking to be static and remembered at boot. I can't express enough frustration
because configuring my network on linux has never been harder than this.....

Got it working with netcfg, but that only lasted 2 reboots, now im left
with no networking  , cause the " ip link set <ip> dev eth0 up" and "ip addr add <ip/netmask/> dev eth0"  (Which is the manual connect method) doesn't even work. 
The manual method worked for the install BTW. Im so confused as to what the correct/arch way really is, cause the way of configuring the network seems to change
too often for me to know which method to follow and which method is actually valid at the time of install.

If there is anyone out there that knows a simple , viable and reliable method of doing this please help me out!!!
Oh and btw , network card is fine , got a second network card to make sure. And I did the install without any issues - like I said
my networking was working.I followed the arch wiki , Begginer's guide as well as the official detailed guide and tons of posts in the forums.

THANKS IN ADVANCE

Offline

#2 2012-11-08 08:39:50

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Static IP Configuration - A simple , clean and clear solution ?

What is actually going wrong?  What have you done and what are the errors?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2012-11-08 09:01:00

Linux4life
Member
Registered: 2012-11-08
Posts: 4

Re: Static IP Configuration - A simple , clean and clear solution ?

Thanks for the quick response

Firstly I configured my network using the rc.conf method which is deprecated . When that didn't work ,
I configured the network using the method : https://wiki.archlinux.org/index.php/Netcfg ( Scroll down to Automatic Operation with 1 IP )
After that it was working , then I rebooted twice within a few minutes. Upon login I ping and get  : connect : Network is unreachable

I did also remove ifplugd , but I'm not 100% convinced that this might be the problem. Now I want to manually connect , using the method explained above ( which should according to me , work instantly , with no issues ) as it had done before the problem occurred.

What to do now , and how to proceed to get network access again is my problem.

Offline

#4 2012-11-08 09:02:11

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,538

Re: Static IP Configuration - A simple , clean and clear solution ?

There are 5 machines on my network with static IPs.  netcfg works fine

Offline

#5 2012-11-08 09:13:00

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

Re: Static IP Configuration - A simple , clean and clear solution ?

Check your logs for related errors. Based on the few details you have provided, my guess is you have a problem with your network card and/or driver.

FYI, your thread title is misleading - we already have a number of solutions for static ip configuration, one of which you have already chosen. The failure of both the automated (netcfg) and manual (ip ... ) solutions should alert you to the presence of a more fundamental issue.

Offline

#6 2012-11-08 22:08:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: Static IP Configuration - A simple , clean and clear solution ?

tomk wrote:

The failure of both the automated (netcfg) and manual (ip ... ) solutions should alert you to the presence of a more fundamental issue.

This.

Your post at the moment is a rant with minimal information for us to be able to assist you. Provide us with your configuration and error message so we can actually attempt to help you out with the issues.

Offline

#7 2012-11-09 00:12:52

vrg
Member
Registered: 2012-06-18
Posts: 36

Re: Static IP Configuration - A simple , clean and clear solution ?

With the given information, this is a bit of a guess, but it should be as simple as this:

1) Forget about the "ip link set...", "ip addr add...", etc.
2) Create a new network profile:

# cp /etc/network.d/examples/ethernet-static /etc/network.d/newprofile

3) Edit the file with the appropriate IP, Gateway, and DNS.
4) Disable your other netcfg profile, if any:

# systemctl stop netcfg@otherprofile
# systemctl disable netcfg@otherprofile

5) Enable your new profile:

# systemctl enable netcfg@newprofile
# systemctl start netcfg@newprofile

The network should be correctly set up after reboot.

Offline

#8 2012-11-09 06:54:48

Linux4life
Member
Registered: 2012-11-08
Posts: 4

Re: Static IP Configuration - A simple , clean and clear solution ?

Thanks vrg

That's what I need to know - What I meant by a simple , clear way to configure it.
Gonna try it like that with a fresh install , and will let you know if
everything works as it should.

Offline

#9 2012-11-09 07:03:17

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

Re: Static IP Configuration - A simple , clean and clear solution ?

vrg, creating a new profile is unlikely to help, for reasons I have already explained.

Linux4life, reinstalling is never the answer. You should identify the cause of the problem.

Offline

#10 2012-11-09 09:21:58

Linux4life
Member
Registered: 2012-11-08
Posts: 4

Re: Static IP Configuration - A simple , clean and clear solution ?

So I re-installed , did only what you said vrg. It is working now . no rc.conf or conf.d .. Thats what I meant by confusing

Thank you.

Offline

#11 2012-11-09 09:43:51

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 222

Re: Static IP Configuration - A simple , clean and clear solution ?

vrg wrote:

With the given information, this is a bit of a guess, but it should be as simple as this:

1) Forget about the "ip link set...", "ip addr add...", etc.
2) Create a new network profile:

# cp /etc/network.d/examples/ethernet-static /etc/network.d/newprofile

3) Edit the file with the appropriate IP, Gateway, and DNS.
4) Disable your other netcfg profile, if any:

# systemctl stop netcfg@otherprofile
# systemctl disable netcfg@otherprofile

5) Enable your new profile:

# systemctl enable netcfg@newprofile
# systemctl start netcfg@newprofile

The network should be correctly set up after reboot.

or cp /etc/network.d/examples/ethernet-static /etc/network.d/newprofile
pacman -S ifplugd
systemctl enable net-auto-wired

Offline

#12 2013-01-22 23:03:24

DislikeYou
Member
Registered: 2013-01-03
Posts: 9

Re: Static IP Configuration - A simple , clean and clear solution ?

I can't get this to work. I did:

# cp /etc/network.d/examples/ethernet-static /etc/network.d/ethernet-static

# nano /etc/network.d/ethernet-static

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eno1'
IP='static'
ADDR='192.168.0.101'
NETMASK='255.255.255.0'
GATEWAY='192.168.0.1'
DNS=('8.8.8.8' '8.8.4.4')

# systemctl enable netcfg@ethernet-static
# systemctl start netcfg@ethernet-static

It works but after reboot i have to manually type "systemctl start netcfg@ethernet-static" or "netcfg ethernet-static" for network to get activated.

What i am doing wrong?

Edit:Solved it. Had to edit /etc/systemd/system/mutli-user.target.wants/netcfg@ethernet-static.service and add this to the unit section:

After=sys-subsystem-net-devices-eno1.device
Requires=sys-subsystem-net-devices-eno1.device

Last edited by DislikeYou (2013-01-25 08:05:53)

Offline

Board footer

Powered by FluxBB