Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
7458
views
Enable networkmanager after Arch installation
I'm new to arch and am trying to enable the networkmanager. I'm using a laptop without a ethernet port therefor trying to connect wirlessly. I looked on the wiki and seem to be stuck. I've just installed arch manually, rebooted and realised I couldn't install any packages. I used ```ping -c 5 8.8.8....
I'm new to arch and am trying to enable the networkmanager.
I'm using a laptop without a ethernet port therefor trying to connect wirlessly. I looked on the wiki and seem to be stuck.
I've just installed arch manually, rebooted and realised I couldn't install any packages.
I used
I've used
I've tried
-c 5 8.8.8.8
to check if it was network connection and received **Network is unreachable**.
I've checked the driver status with -k

| grep usbcore
. When I use link
, it only has the loopback **lo:**

dev
but it doesn't recognise the command.
Does anyone have any suggestions?
inspectorconfusion
(1 rep)
Jun 30, 2022, 12:04 AM
• Last activity: Aug 10, 2025, 04:04 AM
4
votes
2
answers
1873
views
SoftIRQs and Fast Packet Processing on Linux network
I have been reading about performance tuning of Linux to get the fastest packet processing times when receiving financial market data. I see that when the NIC receives a packet, it puts it in memory via DMA, then raises a HardIRQ - which in turn sets some NAPI settings and raises a SoftIRQ. The Soft...
I have been reading about performance tuning of Linux to get the fastest packet processing times when receiving financial market data. I see that when the NIC receives a packet, it puts it in memory via DMA, then raises a HardIRQ - which in turn sets some NAPI settings and raises a SoftIRQ. The SoftIRQ then uses NAPI/device drivers to read data from the RX Buffers via polling, but this is only run for some limited time (net.core.netdev_budget, defaulted to 300 packets).
These are in reference to a real server running ubuntu, with a solarflare NIC
My questions are below:
1. If each HardIRQ raises a SoftIRQ, and the Device Driver reads multiple packets in 1 go (netdev_budget), what happens to the SoftIRQs raised by each of the packets that were drained from the RX buffer in 1 go (Each pack received will raise a hard and then soft irq)? Are these queued?
2. Why does the NAPI use polling to drain the RX_buffer? The system has just generated a SoftIRQ and is reading the RX buffer, then why the polling?
3. Presumably, draining of the RX_Buffer via the softirq, will only happen from 1 specific RX_Buffer and not across multiple RX_Buffers? If so, then increasing the netdev_budget can delay the processing/draining of other RX_buffers? Or can this be mitigated by assigning different RX_buffers to different cores?
4. There are settings to ensure that HardIRQs are immediately raised and handled. However, SoftIRQs may be processed at a later time. Are there settings/configs to ensure that SoftIRQs related to network RX are also handled at top priority and without delays?
Nidhi
(41 rep)
Jun 22, 2016, 12:27 PM
• Last activity: Aug 8, 2025, 06:04 AM
6
votes
3
answers
15053
views
How do I disable network interfaces from loading at boot without Network Manager?
The machine I'm using has 4 network interfaces, only one of which is currently being used (the other 3 are not plugged in at all). Currently when the machine is restarted it is delayed by a few minutes trying to bring up interfaces 2-4. This is a pretty significant annoyance because this machine is...
The machine I'm using has 4 network interfaces, only one of which is currently being used (the other 3 are not plugged in at all). Currently when the machine is restarted it is delayed by a few minutes trying to bring up interfaces 2-4. This is a pretty significant annoyance because this machine is restarted very often.
Running dmesg I see that:
IPv6 ADDRCONF(NETDEV_UP): eth1: link is not ready
IPv6 ADDRCONF(NETDEV_UP): eth2: link is not ready
IPv6 ADDRCONF(NETDEV_UP): eth3: link is not ready
...
seeing as these interfaces are not being used and taking up a lot of time I'd like to simply disable them from trying to start up, but I would be open to other options that would reduce the time wasted on these interfaces.
I've checked
/etc/sysctrl.conf
and IPv6 is disabled, so I wouldn't think it to try IPv6.
In the network-scripts directory I created scripts for interface 2-4 that just contain their interface name and ONBOOT=no
.
Also I've looked in /sys/class/net/ethX/device/power/control
for each interface, all of them contain "on" so I tried:
echo off > /sys/class/net/ethX/device/power/control
But I get write error: Invalid argument
, whereas echoing on
works fine. I haven't been able to find a reference for changing this file but I feel as though turning the interfaces off entirely would be a little extreme.
I do not have network manager installed and would prefer to keep it that way if at all possible (prefer configuration over throwing more packages at the problem).
----------
I have since moved on from this issue, however for the sake of others that might experience this I'll mention that the fact dmesg
is reporting these long waits suggests that the kernel is what's trying to enable these interfaces. So possibly kernel parameters would be an avenue to pursue, or it might just be a kernel bug. Configurations in Linux itself is unlikely to solve the problem, either the grub
config or changes to the kernel itself might do it.
--------------
**UPDATE**
The self-answer I posted I actually did get a chance to test, but it didn't work out. However, posting what I tried.
Noticing that the messages from dmesg
suggests the kernel is performing the action I looked through the kernel paramaters documentation: https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
I found there is an option for configuring IPv6 on interfaces: https://www.kernel.org/doc/Documentation/networking/ipv6.txt .
------------------
The page outlines the following kernel options:
disable=
0 loads the IPv6 module (default), 1 does not load the IPv6 module
autoconf=
0 disables IPv6 auto-configuration on all interfaces, 1 enables auto-configuration on all interfaces (default)
disable_ipv6=
0 enables IPv6 on all interfaces (default), 1 disables IPv6 on all interfaces
However, none of these options addressed the issue.
Centimane
(4520 rep)
Apr 22, 2015, 12:37 PM
• Last activity: Aug 7, 2025, 03:04 AM
0
votes
1
answers
2415
views
Needing to reboot after adding/removing same gateway route
As a matter of study I'm using VirtualBox with Debian 8 to learn basics of networking with the interface in bridge mode. I deactivated `dhcp` of my network interface `eth0` on `/etc/network/interfaces`: # ... # iface eth0 inet manual Now I'm configuring the interface by my own: # ifconfig eth0 192.1...
As a matter of study I'm using VirtualBox with Debian 8 to learn basics of networking with the interface in bridge mode.
I deactivated
dhcp
of my network interface eth0
on /etc/network/interfaces
:
# ...
# iface eth0 inet manual
Now I'm configuring the interface by my own:
# ifconfig eth0 192.168.0.99/24
And then, I test my gateway (which is 192.168.0.1) with ping
and it works perfectly.
Then I add the default gateway to my routes table:
# route add default gateway 192.168.0.1 netmask 255.255.255.0 dev eth0
After some tests, downloads, etc. I see that everything is OK.
Then decided to learn how to delete routes and tested it with my default gateway. It works.
### Here is my problem
After trying to add my gateway again with the same line above I got the "**SIOCADDRT: Network is unreachable**" error.
### What I tried to solve?
1. ifdown
and ifup
my interface;
2. Reconfigure the interface with ifconfig
;
3. Restarting the networking
daemon.
The only thing that works is **restarting** the machine.
**Is there a way to add my route again without the need of restarting the machine?**
llanfair
(113 rep)
Jan 28, 2017, 11:03 PM
• Last activity: Aug 2, 2025, 06:07 PM
0
votes
1
answers
4019
views
Add .ucode driver in Debian installer
When I install Debian, installer request network connection. But Debian can't found my Ethernet card (Intel(R) Dual Band Wireless-AC 8260). I use non-free [installer][1] and try put `.ucode` file in `/firmware/` folder on USB (from [here][2]), but it not work! I also try renamed `iwlwifi-8000` in iw...
When I install Debian, installer request network connection. But Debian can't found my Ethernet card (Intel(R) Dual Band Wireless-AC 8260).
I use non-free installer and try put
.ucode
file in /firmware/
folder on USB (from here ), but it not work!
I also try renamed iwlwifi-8000
in iwlwifi-8260, but it also not work.
Big thanks for your response!
Nikita Kulikov
(3 rep)
Oct 22, 2016, 05:23 AM
• Last activity: Aug 1, 2025, 06:02 PM
0
votes
3
answers
1055
views
KVM VM on bridge to host not getting IP address
I have a host with 4 ethernet ports. I want to assign eno1 to VM1, eno2 to VM2 and so on... eno1, eno2 , eno3 and eno4 each have static IPs. I want VM01 to have the static IP of eno2. For that purpose I setup a bridge and added eno2 to the bridge. upto this point it looks ok. After that I installed...
I have a host with 4 ethernet ports. I want to assign eno1 to VM1, eno2 to VM2 and so on...
eno1, eno2 , eno3 and eno4 each have static IPs. I want VM01 to have the static IP of eno2. For that purpose I setup a bridge and added eno2 to the bridge. upto this point it looks ok.
After that I installed VM using cockpit. during install I let the config as default to enp1s0 (with DHCP for IPv4).
After install on boot up the interface did not get IP address. I am expecting eno2 IP which shows up on bridge after eno2 was added to bridge, should show up for this interface.
**on VM client**
**nmcli connection status**
**From KVM host: I believe the vnet0 came from VM install. relevant output below:**
# ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eno2: mtu 1500 qdisc mq master br2 state UP group default qlen 1000
link/ether 20:67:7c:d6:07:a5 brd ff:ff:ff:ff:ff:ff
19: br2: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 20:67:7c:d6:07:a5 brd ff:ff:ff:ff:ff:ff
inet 123.112.147.147/26 brd 135.193.167.191 scope global noprefixroute br2
valid_lft forever preferred_lft forever
22: vnet0: mtu 1500 qdisc fq_codel master br2 state UNKNOWN group default qlen 1000
link/ether fe:54:00:e6:ef:b1 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fee6:efb1/64 scope link
valid_lft forever preferred_lft forever
# bridge link show
3: eno2: mtu 1500 master br2 state forwarding priority 32 cost 100
22: vnet0: mtu 1500 master br2 state forwarding priority 32 cost 100
here is the xml portion from VM:



Rajeev
(258 rep)
Jan 2, 2024, 02:14 AM
• Last activity: Aug 1, 2025, 12:39 PM
2
votes
2
answers
3620
views
Cannot change UDP fragmentation offload
I have a Dell PowerEdge R740 server with an Intel Corporation Ethernet Controller x710 for 10GbE SFP+ network interface. I have installed RHEL 8 on it. I am trying to enable UDP Fragmentation Offload (UFO): $ sudo ethtool --offload eno1 ufo on I get this message: ``` Cannot change UDP fragmentation...
I have a Dell PowerEdge R740 server with an Intel Corporation Ethernet Controller x710 for 10GbE SFP+ network interface. I have installed RHEL 8 on it.
I am trying to enable UDP Fragmentation Offload (UFO):
$ sudo ethtool --offload eno1 ufo on
I get this message:
Cannot change UDP fragmentation offload
Cannot change any device features.
eno1
has SFP+ DAC cable. Is the issue because of SFP+ cable? or any driver that I might be missing?
Ramzah Rehman
(21 rep)
Nov 13, 2019, 11:16 AM
• Last activity: Jul 28, 2025, 12:01 PM
3
votes
1
answers
3821
views
Route incoming traffic on openVPN server to client
I have a VPS with a public IP that is running OpenVPN and a local server that is the only VPN client on this. Is it possible to route incoming traffic on lets say port 80 to the client? My local server runs on mobile data where I do not get a public IP. The result im looking for is a simple website...
I have a VPS with a public IP that is running OpenVPN and a local server that is the only VPN client on this.
Is it possible to route incoming traffic on lets say port 80 to the client?
My local server runs on mobile data where I do not get a public IP.
The result im looking for is a simple website displaying data which I can access by browsing to the VPNs IP.
Stantastic
(53 rep)
Dec 23, 2019, 05:32 PM
• Last activity: Jul 23, 2025, 12:07 PM
2
votes
1
answers
47
views
Creating a virtual interface type macvlan
I have a Raspberry Pi OS Lite system installed. It has the following interfaces available ``` ip l 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group de...
I have a Raspberry Pi OS Lite system installed. It has the following interfaces available
ip l
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether bd:1e:96:ac:a3:40 brd ff:ff:ff:ff:ff:ff
3: wlan0: mtu 1500 qdisc noop state DOWN mode DORMANT group default qlen 1000
link/ether 29:a8:78:cd:57:6d brd ff:ff:ff:ff:ff:ff
I need to create a virtual interface type macvlan. I have a question about how to implement this correctly.
I have three options.
1. Add to the file /etc/network/interfaces
auto lan0
iface lan0 inet dhcp
pre-up ip link set eth0 up
pre-up ip link add link eth0 $IFACE type macvlan
post-down ip link delete $IFACE type macvlan
2. Create a file named lan0 in the /etc/network/interfaces.d directory with the following content
auto lan0
iface lan0 inet dhcp
pre-up ip link set eth0 up
pre-up ip link add link eth0 $IFACE type macvlan
post-down ip link delete $IFACE type macvlan
3. Create a file named lan0 in the /etc/network/if-up.d directory with the following content
#!/bin/sh
IPBIN=/usr/sbin/ip
test -x $IPBIN || exit 0
[ "$IFACE" != "eth0" ] && exit 0
$IPBIN link add link $IFACE lan0 type macvlan
$IPBIN link set dev lan0 up
However, in option 3, the IP address is not obtained automatically.
Raalgepis
(21 rep)
Jul 14, 2025, 08:33 AM
• Last activity: Jul 16, 2025, 11:16 AM
0
votes
1
answers
5503
views
How to read iw allowed interface lists?
I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep yo...
I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but:
[loren@Gazp9 ~]$ iw dev wlp3s0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
[loren@Gazp9 ~]$ iw phy wlp3s0 interface add mon0 type monitor
command failed: No such file or directory (-2)
[loren@Gazp9 ~]$ iw phy
Wiphy phy0
[loren@Gazp9 ~]$ iw phy phy0 interface add mon0 type monitor
command failed: Operation not permitted (-1)
(That's Antergos 4.19.8-arch1-1-ARCH, if it matters.)
So I dug deeper, including
https://unix.stackexchange.com/questions/401464/deciphering-the-output-of-iw-list-valid-interface-combinations
here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response:
phy0 Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* P2P-client
* P2P-GO
* P2P-device
Supported commands:
* new_interface
(nothing about add interface)
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ managed } sudo iw dev wlan1 station get
and
> sudo iw dev wlan0 set power_save on
show the use of sudo? None of the "add" commands show it:
> iw dev wlan0 interface add fish0 type monitor flags none
But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project.
LorenAmelang
(31 rep)
Jan 15, 2019, 04:59 AM
• Last activity: Jul 16, 2025, 11:01 AM
1
votes
1
answers
1890
views
Cannot find bridge device with ifupdown
Please note that I am using Void Linux. Here is my `/etc/network/interfaces.d/br0` file: ``` auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_stp off bridge_waitport 0 bridge_fd 0 ``` However on boot I get this error: ``` => Bringing up the network Internet Systems Consortium DHCP Client 4.4.2...
Please note that I am using Void Linux.
Here is my
/etc/network/interfaces.d/br0
file:
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_waitport 0
bridge_fd 0
However on boot I get this error:
=> Bringing up the network
Internet Systems Consortium DHCP Client 4.4.2
Copyright 2004-2020 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Cannot find device "br0"
Failed to get interface index: No such device
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.
exiting.
ifup: failed to bring up br0
I have confirmed that I have bridge-utils
installed. I am at a loss for what the problem here is. I would appreciate help.
Nicholas Hubbard
(111 rep)
Feb 13, 2021, 04:23 PM
• Last activity: Jul 15, 2025, 04:46 AM
3
votes
1
answers
2334
views
"ndd" equivalent of "ethtool" on Solaris
I've to restore a large file from a NAS backup on Solaris 10 ZFS. I'm using this following command: rsync -av user@xxx.xxx.xxx.xxx:from/NAS/files/system to/solaris/files/system And I've got this error: Disconnecting: Corrupted MAC on input. rsync: connection unexpectedly closed (3778664937 bytes rec...
I've to restore a large file from a NAS backup on Solaris 10 ZFS. I'm using this following command:
rsync -av user@xxx.xxx.xxx.xxx:from/NAS/files/system to/solaris/files/system
And I've got this error:
Disconnecting: Corrupted MAC on input.
rsync: connection unexpectedly closed (3778664937 bytes received so far) [receiver]
rsync: [generator] write error: Broken pipe (32)
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.0]
rsync error: error in socket IO (code 10) at io.c(837) [generator=3.1.0
rsync Disconnecting: Corrupted MAC on input.
After a little research the solution should be:
ethtool -K eth0 tx off rx off
As the ethtool command doesn't exist on Solaris, I should use the ndd utility in interactive mode. I didn't find any good explanation and the man page is poor, for getting the equivalent of the command line above. I'm missing something maybe.
dubis
(1480 rep)
Jun 28, 2016, 07:28 AM
• Last activity: Jul 14, 2025, 12:03 AM
3
votes
2
answers
3328
views
Enabling networking in a systemd-nspawn container
I'm trying to setup container that has access to the internet but have been unsuccessful so far. # sudo systemd-nspawn -nb -M debian-tree # systemctl enable --now systemd-networkd systemd-resolved # ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf # ip link 1: lo: mtu 65536 qdisc noqueue sta...
I'm trying to setup container that has access to the internet but have been unsuccessful so far.
# sudo systemd-nspawn -nb -M debian-tree
# systemctl enable --now systemd-networkd systemd-resolved
# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
# ip link
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: host0@if8: mtu 1500 qdisc noqueue state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 42:ca:d5:8c:af:60 brd ff:ff:ff:ff:ff:ff link-netnsid 0
# ping google.com
ping: google.com: Temporary failure in name resolution
On the host
# ip link
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp1s0: mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 7c:7a:91:ae:7d:47 brd ff:ff:ff:ff:ff:ff
8: ve-debian-tree@if2: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 92:f7:e1:4b:c6:6f brd ff:ff:ff:ff:ff:ff link-netnsid 0
Any ideas why it's not working?
Ava
(143 rep)
Jul 27, 2017, 11:15 PM
• Last activity: Jul 13, 2025, 11:06 PM
5
votes
1
answers
3520
views
Maintain ip link settings across reboot
Every time I turn on my computer, I have to manually set `# ip link set wlp5s0 up` in order to use my wireless card. Is there a way to maintain this setting across reboots? So if I set the interface `up` it stays up until I turn it off. I'd like to avoid using a 3rd-party network manager if at all p...
Every time I turn on my computer, I have to manually set
# ip link set wlp5s0 up
in order to use my wireless card. Is there a way to maintain this setting across reboots? So if I set the interface up
it stays up until I turn it off.
I'd like to avoid using a 3rd-party network manager if at all possible. Using Arch.
Canyon
(151 rep)
Aug 30, 2016, 03:52 AM
• Last activity: Jul 13, 2025, 07:06 AM
0
votes
0
answers
27
views
Linux bridge forwarding from/to TAP interfaces
As explained [here][1] in my own Q&A, reconsider the following scenario. A Linux host with a two port Linux `bridge` and two Linux guest `VMs` connected to it: the first bridge's port is connected to `TAP` interface `tap0` while the second to `tap1`. `tap0` and `tap1` are backend `TAP` interfaces as...
As explained here in my own Q&A, reconsider the following scenario.
A Linux host with a two port Linux
bridge
and two Linux guest VMs
connected to it: the first bridge's port is connected to TAP
interface tap0
while the second to tap1
. tap0
and tap1
are backend TAP
interfaces associated to virtio-net
(frontend) interfaces each exposed to a QEMU
based VM
(lets say VM0
and VM1
).
As far as I can tell, when VM0
sends a frame/packet targeted to VM1
, VM0
QEMU
process's userland code calls write()
syscall on the fd
virtio-net
interface is associated to. From tap0
driver-code viewpoint, the RX
path is involved (basically tap0
is receiving a packet/frame from its "logical wires"), hence for instance the kernel netif_receive_skb()
function is executed in the context of VM0
QEMU
's process.
Furthermore the packet/frame is forwarded from the Linux bridge to the tap1
interface hence, from tap1
driver-code viewpoint, the TX
path is involved (basically tap1
is transmitting a packet/frame on its "logical wires"), hence for instance the kernel net_dev_xmit()
function is executed/run in the context of VM0
QEMU
's process as well.
Does it makes sense ? Thanks.
CarloC
(385 rep)
Jul 11, 2025, 10:19 AM
• Last activity: Jul 11, 2025, 11:58 AM
2
votes
1
answers
2045
views
Allowing a non-root user to create TUN/TAP interfaces
I have a situation where I need a non-root user to be allowed to create TUN/TAP interfaces. I understand that this requires the CAP_NET_ADMIN capability. There have been [other questions][1] about this, but the answers seem to focus on granting the CAP_NET_ADMIN capability to a **file**/**program**,...
I have a situation where I need a non-root user to be allowed to create TUN/TAP interfaces. I understand that this requires the CAP_NET_ADMIN capability.
There have been other questions about this, but the answers seem to focus on granting the CAP_NET_ADMIN capability to a **file**/**program**, not to the user. In my case, I need the capability to be assigned to the **user**, so they can use whatever tool they see fit to create the interfaces (i.e. not restricted to a specific file/program used to create them).
Is this possible in Linux? Specifically, I'm using Ubuntu 22.04.
For context, the reason for this is that I'm creating the TUN interface through a custom program that makes the system calls, and I need this to work while debugging it. Since it builds a new binary every time I run the debugger, switching to root and assigning the capability to the binary and then switching back to debug the binary is not feasible.
Jordan
(131 rep)
Apr 24, 2023, 02:21 PM
• Last activity: Jul 6, 2025, 06:03 AM
1
votes
1
answers
1896
views
How does bind(2) choose a network device?
**Background** I'm looking to write kernel-space implementations of a non-IP network protocol and associated network device driver (non-ethernet hardware). I found some resources on developing the protocol and the driver, though I'm having difficulty understanding how to associate sockets using my p...
**Background**
I'm looking to write kernel-space implementations of a non-IP network protocol and associated network device driver (non-ethernet hardware). I found some resources on developing the protocol and the driver, though I'm having difficulty understanding how to associate sockets using my protocol with my driver.
The aim is to have it working such that a program in userspace would only need to call
bind(socket(AF_TERRIBLE_IDEA, ...), ...);
and be good to go.
The aim is to get more familiar developing for kernel-space simultaneously, so moving to userspace is not ideal.
**Question**
when a *bind* call is made, how does the kernel know which device (and therefore device driver) to associate a socket to?
Kenneth Hau
(21 rep)
Sep 23, 2018, 01:32 AM
• Last activity: Jul 4, 2025, 09:00 AM
1
votes
1
answers
3429
views
How to make an iproute2 bridge setup permanent?
I've set up an archlinux inside a Oracle Virtual Box. To be able to reach the VM from the LAN I have added a bridge adapter and configured the guest system following the instructions from the Arch Linux Wiki: [Network bridge | With iproute2][1]. I used the following commands to successfully set up t...
I've set up an archlinux inside a Oracle Virtual Box. To be able to reach the VM from the LAN I have added a bridge adapter and configured the guest system following the instructions from the Arch Linux Wiki: Network bridge | With iproute2 .
I used the following commands to successfully set up the network:
ip link add name lan_bridge type bridge
ip link set lan_bridge up
ip link enp0s8 up
ip link set enp0s8 master lan_bridge
systemctl start dhcpcd@lan_bridge
After those steps I'm able to login into the guest via SSH. Trying to make the changes persistent using:
systemctl enable dhcpcd@lan_bridge
does not work, though. I'd like systemd to create the exact same setup on startup automatically. Of course I could just paste those commands into a shell script and run it at startup, but I think there should be a proper way to do so. Help is greatly appreciated.
norritt
(85 rep)
Feb 4, 2016, 11:17 PM
• Last activity: Jul 3, 2025, 03:04 AM
0
votes
3
answers
14872
views
Arch Linux install: wlan0 is up but not connecting to Wi-Fi
I'm trying to install Arch Linux on a Lenovo Harman/Kardon IdeaCentre, and I can't start a working internet connection. ``` $ ping archlinux.org ping: archlinux.org: Name or service not known $ ping 8.8.8.8 ping: connect: Network is unreachable ``` This is after I have connected to my home Wi-Fi. I...
I'm trying to install Arch Linux on a Lenovo Harman/Kardon IdeaCentre, and I can't start a working internet connection.
$ ping archlinux.org
ping: archlinux.org: Name or service not known
$ ping 8.8.8.8
ping: connect: Network is unreachable
This is after I have connected to my home Wi-Fi. I tried using an external network interface but that did not work, I also tried running
$ systemctl start dchpcd@wlan0
Job for dhcpcd@wlan0.service failed because the control process exited with error code.
I have watched a couple of videos and nothing seemed to help. I tried running ip link set wlan0 up
but that didn't seem to do anything. I have rebooted several times and that also didn't help. This is what comes up for wlan0
interface when I run ip link
:
4: wlan0: mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
link/ether 11:22:33:44:55:66 brd ff:ff:ff:ff:ff:ff
tstjean
(1 rep)
Oct 18, 2020, 02:11 AM
• Last activity: Jun 25, 2025, 11:00 AM
3
votes
3
answers
12382
views
Force programs bind to an interface, not IP address
I have a machine with two network interfaces and two different internet connections. I know there are multiple routing tables and stuff like that. However I have a very easy scenario. Outgoing ssh application should always go via wlan0. So why doing so complicated stuff? First testing with curl whic...
I have a machine with two network interfaces and two different internet connections. I know there are multiple routing tables and stuff like that. However I have a very easy scenario. Outgoing ssh application should always go via wlan0. So why doing so complicated stuff?
First testing with curl which does its job perfect:
curl --interface wlan0 ifconfig.me
185.107.XX.XX
curl --interface eth0 ifconfig.me
62.226.XX.XX
So without setting up any special routing rules for two interfaces, it works exactly as I want. eth0 is the default route
ip route
default via 192.168.178.1 dev eth0 proto dhcp src 192.168.178.21 metric 202
default via 172.16.1.1 dev wlan0 proto dhcp src 172.16.1.88 metric 303
172.16.1.0/24 dev wlan0 proto dhcp scope link src 172.16.1.88 metric 303
192.168.178.0/24 dev eth0 proto dhcp scope link src 192.168.178.21 metric 202
Now try to do the same with wget. Wget is ideal for debugging as it has with --bind-address
the same option as ssh with -b
.
wget -O- --bind-address=192.168.178.21 ifconfig.me 2> /dev/null
62.226.XX.XX
You get the same output when omitting --bind-address
wget -O- --bind-address=172.16.1.88 ifconfig.me 2> /dev/null
This command just hangs for about 9 (!) minutes and outputs nothing at the end, like ssh will do.
I know this https://unix.stackexchange.com/questions/210982/bind-unix-program-to-specific-network-interface thread. However even if the title is "Bind unix program to specific network interface" all solutions working with LD_PRELOAD bind to an IP adress. This feature is already supported by ssh, but does not help here.
Firejail could solve this, but as explained in other topic has still the bug not working that way via Wifi.
So how can one really force an appliation to use a specific interface without all that complicated routing, netns or iptables rules? LD_PRELOAD looks very promising, however so far this code only focuses on changing bind IP not bindinterface.
Hannes
(395 rep)
May 8, 2021, 01:05 AM
• Last activity: Jun 25, 2025, 06:30 AM
Showing page 1 of 20 total questions