[arch-general] manually configure network

David C. Rankin drankinatty at suddenlinkmail.com
Sun Jul 16 07:40:42 UTC 2017


On 07/12/2017 10:37 PM, mick howe via arch-general wrote:
> On 13 July 2017 at 03:14, Rich <rich-mail at octoxol.com> wrote:
> 
>> You are probably using dhcpcd. This is what is installed when initially
>> setting up the OS. Depending on exactly what settings are being reverted to
>> default it may be normal behavior. What you need to do is find out exactly
>> which network manager you are using and exactly what settings are not
>> sticking across a reboot. The fix is probably not difficult but need more
>> info to be able to make intelligent suggestions. I had a problem with
>> dhcpcd reverting my DNS servers to the ISP defaults on every restart.
>>
>> --Rich
>>
> ​I tried it when I first started with linux in 1994​ and now avoid it like
> the plague, I'd rather do it manually. It was simple until somebody decided
> I need a string of cascading daemons to do everything.
> 
> mick stressed out and frustrated in frozen glen innes
> 

  There was a simple elegance in rc.conf, e.g.:

interface=eth0
address=192.168.1.17
netmask=255.255.255.0
broadcast=192.168.1.255
gateway=192.168.1.11

  But with netctl, (https://wiki.archlinux.org/index.php/Netctl) it's not that
much different. Instead of rc.conf, find your network interface with `ip addr`
(enp0s10 below), create a profile in /etc/netctl (say /etc/netctl/mystaticip).
You can pull an example of a static setup from /etc/netctl/examples. A minimal
example (for ipv4) a static IP is something like:

Description='A basic static ethernet connection'
Interface=enp0s10
Connection=ethernet
IP=static
Address=('192.168.1.16/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')   ## I don't use
Gateway='192.168.1.13'
DNS=('192.168.1.16')

Then (after testing with e.g. 'netctl start mystaticip'), all you need to do
to have it set each time you boot is issue the command

 # netctl enable mystaticip

which will essentially create the hook required to activate your connection in
/etc/systemd/system.

Hopefully that will relieve some stress and frustration.

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list