You are not logged in.

#1 2021-03-28 22:20:32

kernelbootw
Member
Registered: 2021-03-28
Posts: 1

How to configure static IP during Arch installation?

Hi,
I have to specify Address/Gateway to access internet, I have no DHCP. How can I configure network interface to get internet access during Arch Linux installation?
I found a manual on the Internet that uses netctl. But I have no netctl installed in my Arch Linux installation medium. I don't know why, but I have not netctl command and /etc/netctl path. The installation medium have been installed a few days ago. the latest version.
Thanks in advance!

Offline

#2 2021-03-28 23:07:02

loqs
Member
Registered: 2014-03-06
Posts: 17,324

Re: How to configure static IP during Arch installation?

Network_configuration#Static_IP_address shows how to do it using the ip command.
Or you could try Systemd-networkd#Wired_adapter_using_a_static_IP.

Offline

#3 2021-03-28 23:18:06

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

Re: How to configure static IP during Arch installation?

kernelbootw wrote:

Hi,
I found a manual on the Internet that uses netctl.

You should be using the official Installation Guide, which has a section on network configuration, which explicitly links to the Static IP configuration instructions loqs pointed you to. Please do not use random internet "manuals" - we cannot and do not support them on the forums.

Offline

#4 2021-03-31 06:49:08

alicavus
Member
From: $HOME, /home/$USER
Registered: 2020-12-01
Posts: 6

Re: How to configure static IP during Arch installation?

I had similar issue. To solve it after booting from the Installation medium I:

  1. - manually stopped  systemd-networkd.service and systemd-resolved.service services

    systemctl stop systemd-networkd.service systemd-resolved.service
  2. - removed any auto-associated ip addr / ip routes.

    ip address del 192.168.0.55/24 dev enp0s2
    ip route del 192.168.0.0/24 via 192.168.43.223 dev enp0s2
  3. - configured static IP address with dhcpcd:

dhcpcd -S ip_address=192.168.1.23/24 -S routers=192.168.1.1 -S domain_name_servers=192.168.1.1 -s 192.168.1.23/24 enp0s2

And tada! Everything worked as expected.

Offline

#5 2021-04-04 05:26:18

LiNkz
Banned
Registered: 2020-11-25
Posts: 12

Re: How to configure static IP during Arch installation?

I found out before by of all things reading the wiki that the live usb uses systemd-networkd.

So simply editing the .network file to have your static ip instead of dhcp takes like a minute instead of a bunch of screwing around for no reason.

https://wiki.archlinux.org/index.php/Sy … _static_IP

/etc/systemd/network/20-wired.network(it will be named differently but will still be a .network file)

[Match]
Name=xxx(name of your network interface ie enpxx ethxx)

[Network]
Address=xxxx/xx(your static ip
Gateway=xxxx(your gateway)
DNS=xxxx

The exact name of the file escapes me but I am pretty sure it is the only one there.

Offline

Board footer

Powered by FluxBB