@nevj :
Hi Neville,
thanks a lot for summarizing the problem you´re facing at present.
O.K., but I consulted it anyway. Hope you won´t mind.
Trying to get some help from whatever source is something worth while, I hope.
Of course feel free to ignore the following, if it might not be purposeful.
It seems Neville has successfully managed connman
in antiX by blacklisting one NIC and configuring it manually via /etc/network/interfaces
.
However, Artix, which is Arch-based, does not use the traditional Debian-style /etc/network/interfaces
.
Instead, it relies on other mechanisms like connman
itself or systemd-networkd
(in most Arch-based setups).
Let’s tackle this step by step for Artix:
1. Handling Multiple NICs in Artix with connman
In Artix, connman
should still allow you to manage multiple interfaces. The key is to:
- Assign a static IP without making the interface the default route.
- Configure the other NIC for dynamic or primary usage.
Steps:
- List Interfaces and Services:
connmanctl services
This will show all detected interfaces (e.g., ethernet_abc123
, ethernet_xyz456
, etc.).
- Configure the Static NIC Without a Default Route: Use
connmanctl
to assign a static IP without specifying a gateway. The absence of a gateway ensures no default route is created for this NIC:
connmanctl config ethernet_abc123 --ipv4 manual <STATIC_IP> <NETMASK> ""
Example:
connmanctl config ethernet_abc123 --ipv4 manual 192.168.2.2 255.255.255.0 ""
- Ensure the Other NIC is Used for the Default Route: Set the other NIC (
eth1
, for example) to use DHCP or static IP with a gateway:
connmanctl config ethernet_xyz456 --ipv4 dhcp
Or for a static IP with a gateway:
connmanctl config ethernet_xyz456 --ipv4 manual <IP> <NETMASK> <GATEWAY>
Example:
connmanctl config ethernet_xyz456 --ipv4 manual 192.168.1.100 255.255.255.0 192.168.1.1
- Prioritize Interfaces: If
connman
still behaves unpredictably, explicitly set priorities:
connmanctl config ethernet_abc123 --priority 2
connmanctl config ethernet_xyz456 --priority 1
This ensures the NIC connected to the internet (e.g., eth1
) is used preferentially.
- Restart
connman
: After making changes, restart connman
:
sudo service connman restart
2. Manually Configuring NICs Without connman
(Artix-Specific)
If connman
continues to misbehave, Neville can configure the NICs manually in Artix. Since Artix doesn’t use /etc/network/interfaces
, he can use one of the following approaches:
a) Using systemd-networkd
(if enabled):
- Create a network configuration file for each NIC in
/etc/systemd/network/
.For the static NIC (eth0
):
sudo nano /etc/systemd/network/10-eth0.network
Add:
[Match]
Name=eth0
[Network]
Address=192.168.2.2/24
For the dynamic NIC (eth1
):
sudo nano /etc/systemd/network/20-eth1.network
Add:
[Match]
Name=eth1
[Network]
DHCP=ipv4
- Enable and start
systemd-networkd
(if not already active):
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkd
b) Using ip
Commands in a Script:
If Neville prefers to bypass network managers entirely:
- Create a script to configure NICs on boot:
sudo nano /etc/local.d/network.start
Add:
#!/bin/sh
ip addr add 192.168.2.2/24 dev eth0
ip link set eth0 up
ip addr add 192.168.1.100/24 dev eth1
ip route add default via 192.168.1.1 dev eth1
- Make the script executable:
sudo chmod +x /etc/local.d/network.start
- Restart networking or reboot to apply changes.
3. Debugging connman
’s Behavior
If Neville wants to debug why connman
is making the static link a default route:
journalctl -u connman
- Ensure no conflicts in
/var/lib/connman/settings
.
Let Neville know these options, and I’m here if more clarification is needed!
O.K., that´s it so far.
Good luck, Neville, and all the best from Rosika
P.S.:
ChatGPT sends you its regards:
All the best to you and Neville!