Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2414
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
1038
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
(256 rep)
Jan 2, 2024, 02:14 AM
• Last activity: Aug 1, 2025, 12:39 PM
2
votes
2
answers
3611
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
3818
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
45
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
5499
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
1888
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
2333
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
3320
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
3519
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
24
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
2038
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
1886
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
3427
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
14834
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
12361
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
8
votes
1
answers
686
views
setting MTU size for performance "today"?
Redhat-8 when configuring Network Settings has MTU set to automatic, which results in the traditional **MTU=1500**. Is this good or bad ? when.... `ip -d link list` reports a **maxmtu** value for your interfaces. On mine having a quad-port NIC with two SFP's that are 10GbE and two rj-45 ports that a...
Redhat-8 when configuring Network Settings has MTU set to automatic, which results in the traditional **MTU=1500**. Is this good or bad ? when....
ip -d link list
reports a **maxmtu** value for your interfaces. On mine having a quad-port NIC with two SFP's that are 10GbE and two rj-45 ports that are 1gbps, along with mellanox HDR infinifband:
- 10gbE interfaces maxmtu = 9600
- 1gbps interfaces maxmtu = 9000
- ib0 interface maxmtu = 65520
doing ifconfig
or ip a
will reveal the currently set MTU value for the interface.
Should I be going the extra step of manually/explicitly setting MTU in the network settings gui for my interfaces that are in use?
**Is there a way to validate this change from 1500 to 9000/9600/65520 for the given interface, if so how?** Would a simple scp
(which reports transfer rate) for the single ~50gb tar file show a performance bump in transfer rate?
**Is anybody messing with MTU settings these days, or did we all just forget about it and left it at 1500 for the last however many years?** I ask this because articles you currently can find on the issue don't seem to recognize current hardware and Linux (today's date, RHEL 8/9+, latest kernel, etc) and just pander on the topic.
Any technical info on the topic that can be posted would be appreciated, such as why the +600 on my 10gbe ports vs the 1gbps on the same NIC? Who/what/where decides that value? Why can't it be 65520? How does the ib0
get to have a maxmtu of 65520 what makes it so special?
I am interested in increasing performance/throughput on interfaces where NFS v4.2 is in use to export & mount folders, as well as having samba-server running on a 1gbps port for which users connect to a data share from win11 clients on a LAN/WAN. Would a high MTU mess up samba?
ron
(8647 rep)
Jun 23, 2025, 06:58 PM
• Last activity: Jun 23, 2025, 07:23 PM
5
votes
2
answers
409
views
Router with public IP towards ISP and public IP on the second interface, traffic problem
I need help with my network and router setup again. The router is running Ubuntu and has two interfaces with public IP addresses. We are renting a public IP address pool: 198.51.100.0/24. One external interface, eth0, uses the public address 198.51.100.2 and connects to the ISP. The ISP is assigned...
I need help with my network and router setup again. The router is running Ubuntu and has two interfaces with public IP addresses. We are renting a public IP address pool: 198.51.100.0/24. One external interface, eth0, uses the public address 198.51.100.2 and connects to the ISP. The ISP is assigned the address 198.51.100.240. The second interface, eth1, uses 198.51.100.1 and connects to the local network, where our servers are located. All servers have public IP addresses. One of the servers acts as a proxy for the internal network.
How should I properly configure routing between the interfaces so that all clients on eth1 can access the internet and are also accessible from the internet? Currently, if I set a /24 subnet mask on all router interfaces, I can access the router but not the servers. If I set a /32 subnet mask on the external interface eth0, which makes sense, I get access from one of the servers to the router.
**When the hosts behind eth1 are unreachable at the IP level, arpping is still able to reach them.**
+------+ +---+ +---------+ +-------------+
| +---+-----+--+| | | | MAIL |
| | | +--++ | +--v--+ +->| 198.51.100.3| +------+ +---+
+--+---+ ISP | | +---+-----+--+ | +-------------+ | +---+-----+--+|
|198.51.100.240|| SW || 198.51.100.5| +--->| 172.16.0.0 |
| +----+-----+-+ | +---+-----+--+ | +----+ | +-------------+ | +-+----+ +-+-+
+------+ +---+ |198.51.100.1| | | +-------------+ | | | | | | |
| |eth1 | | | | | FW/PROXY | | | +----+-----+-+ |
+---+-----+--+ | +->| 198.51.100.7|<--+ +------+ +---+
+--^--+ | | 172.16.0.1 |
| | +-------------+
+--------+
eth0
address 198.51.100.2
netmask 24
gateway 198.51.100.240
eth1
address 198.51.100.1
netmask 24
.ipv4.ip_forward = 1
# /etc/nftables.conf
table inet filter {
chain input {
type filter hook input priority 0;
policy drop;
# Allow loopback
iif "lo" accept
# Allow established/related
ct state established,related accept
iif "enp3s0" ip saddr 198.51.100.0/24 accept
iif "enp6s0" ip saddr 198.51.100.0/24 accept
# Allow SSH to router from anywhere
tcp dport 22 accept
# Allow ICMP (ping)
ip protocol icmp accept
# Log and drop everything else
log prefix "nftables input drop: " flags all counter drop
}
chain forward {
type filter hook forward priority 0;
policy drop;
# Allow established/related
ct state established,related accept
# Allow forwarding between interfaces for the public subnet
iif "enp3s0" oif "enp6s0" ip saddr 195.19.139.0/24 ip daddr 195.19.139.0/24 accept
iif "enp6s0" oif "enp3s0" ip saddr 195.19.139.0/24 ip daddr 195.19.139.0/24 accept
# Log and drop everything else
log prefix "nftables forward drop: " flags all counter drop
}
chain output {
type filter hook output priority 0;
policy accept;
}
}
E Malinowski
(61 rep)
Jun 19, 2025, 04:50 PM
• Last activity: Jun 20, 2025, 02:33 PM
0
votes
1
answers
4936
views
How to get D-link DWA-131 Wireless-N Nano USB Adapter work on CentOS 7?
I am on CentOS 7. I have **D-link DWA-131 Wireless-N USB Nano *Hardware revision* E1** adapter. I have downloaded and compiled it's drivers from ftp://files.dlink.com.au/products/DWA-131/REV_E/Drivers/DWA-131_Linux_driver_v4.3.1.1.zip. After installing and inserting the module **8192eu.ko** my devic...
I am on CentOS 7. I have **D-link DWA-131 Wireless-N USB Nano *Hardware revision* E1** adapter. I have downloaded and compiled it's drivers from ftp://files.dlink.com.au/products/DWA-131/REV_E/Drivers/DWA-131_Linux_driver_v4.3.1.1.zip. After installing and inserting the module **8192eu.ko** my device is detected as **USB Ethernet**. How can i get it recognized as a wireless device, so that I can connect to a wireless network **abc** having password **12345678**.
result of **uname -a** is
Linux linux-centos 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
result of **ifconfig -a** is
enp0s20u3: flags=4099 mtu 1500
ether 54:2a:a2:47:dd:f6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 7729 bytes 664831 (649.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7729 bytes 664831 (649.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
p4p2: flags=4099 mtu 1500
ether f8:ca:b8:06:55:c0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099 mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:1c:39:9e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098 mtu 1500
ether 52:54:00:1c:39:9e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp6s0: flags=4163 mtu 1500
inet 192.168.1.22 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::374e:5cb2:ec50:9c4d prefixlen 64 scopeid 0x20
ether 78:0c:b8:36:8e:31 txqueuelen 1000 (Ethernet)
RX packets 122333 bytes 155288565 (148.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 84226 bytes 10510089 (10.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
**enp0s20u3** is my USB device. It only shows up when I load **8192eu.ko** using **modprobe** or **insmod**.
Device shown as wifi is 'internal wifi', but, the USB device is detected as USB Ethernet.

Manjeet
(1 rep)
Nov 23, 2017, 06:23 AM
• Last activity: Jun 18, 2025, 10:08 AM
Showing page 1 of 20 total questions