4

I am setting up an Arch/Manjaro-based machine that only occasionally will be connected to network. I.e. most of the time its Ethernet card is disconnected.

I run into this curious problem - when I try to use networking commands the interface is down (I sit next to it with my laptop that has a Wi-Fi Internet connection). So I am not sure if it is working properly.

  • How do I set up the network without an Ethernet connection present so that when I finally plug in a cable I can be sure that the address will be 192.168.1.1?

I found the answer: use SkipNoCarrier=yes in the netctl profile. It is in Manjaro StaticIP wiki and in Arch netctl page.

  • 1
    on a side note, you can configure network interface to get a DHCP address, but have the server always send you same IP. check with your modem (if at home) or network admin. on a side side note home modem are likely to give you same IP if you connect on a regular basis. – Archemar Feb 25 '17 at 9:17
  • In my setting network admins are very remote and unavailable. My machine will be standalone data collector (surveys) and I will periodically connect to it via crossover cable to siphon off new data. – r0berts Feb 25 '17 at 9:27
  • well then If have nothing to add to @maunlinglaws's answer. – Archemar Feb 25 '17 at 9:30
6

Like this for example:

For a static IP configuration copy the /etc/netctl/examples/ethernet-static example profile to /etc/netctl and modify Interface, Address, Gateway and DNS) as needed.

For example:

/etc/netctl/my_static_profile

Interface=enp1s0
Connection=ethernet
IP=static
Address=('10.1.10.2/24')
Gateway=('10.1.10.1')
DNS=('10.1.10.1')

Link to the official Arch Wiki here.

This of course only works if you don't use Network Manager or something similar to control your network.

  • Thanks, this is where it gets also confusing. Am I understanding right that netctl is the most basic method? This is what I want. But I think nm was installed by default; perhaps I need to uninstall it? If I understand correctly nm is useful mainly for managing wifi connections, but for basic server it is not needed. How do I select which method is in charge of the nic? – r0berts Feb 25 '17 at 9:10
  • Network Manager is not installed by default on Arch. I don't know if it is in Manjaro however, it's been quite a while since I used that distro. Personally, I always use netctl in Arch. – maulinglawns Feb 25 '17 at 9:11
  • I think it is. As I want simplicity and basics there, I probably should remove networkmanager or else I do not know if it is interfering or not? – r0berts Feb 25 '17 at 9:20
  • @r0berts netctl isn't the most basic method. As stated in the wiki page, it uses profiles to manage network connections. Those profiles are started/stopped by systemd services. See this for a more general idea. To manage WiFi connections you can use wifi-menu, which works with netctl. You can just disable the NetworkManager.service. – goetzc Feb 25 '17 at 16:09
  • I found the parameter to ensure address is always on even if cable not connected - you have to put SkipNoCarrier=yes in the profile. – r0berts Apr 2 '17 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.