Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
4
votes
1
answers
1428
views
SSH access broken; probably due to my dislike of 'NetworkManager'
I've apparently "broken" network access to one of my Debian 'bookworm' systems that run on Raspberry Pi hardware. This resulted from my apparent lack of understanding of details wrt how the various "network tools" operate. The broken system is a "headless" unit; I can no longer make an SSH connectio...
I've apparently "broken" network access to one of my Debian 'bookworm' systems that run on Raspberry Pi hardware. This resulted from my apparent lack of understanding of details wrt how the various "network tools" operate. The broken system is a "headless" unit; I can no longer make an SSH connection to it. It doesn't even respond to a
ping
.
I'm raising this question here in the faint hope someone can explain if there's a way to regain SSH access without making any changes to the system. My current recourse is to remove the NVME SSD, and mount it on another system to correct the configuration error, or connect a monitor & keyboard, but these are difficult due to lack of hardware/cables, etc.
What I did:
Got "fed up" with NM's arcane nmcli
interface, and thought, "there's got to be a better way". I read [this page on Debian's website](https://wiki.debian.org/NetworkManager) ; specifically:
>NetworkManager will only handle interfaces not declared in /etc/network/interfaces
I interpreted this to mean that if I declared my WiFi interface (wlan0
) in /etc/network/interfaces
, then NetworkManager
would "step away", and systemd
would use ifup
, ifdown
, etc to manage wlan0
IAW the contents I added to /etc/network/interfaces
. Here's the contents of the interfaces
file I created:
iface wlan0 inet static
address 192.168.1.222
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
After a reboot
I found I could no longer access this system via SSH.
I have two questions:
1. Is there any way to regain SSH access without making changes to the system?
2. Why did the data I entered in /etc/network/interfaces
fail to yield a working wifi connection?
Seamus
(3772 rep)
Feb 24, 2025, 09:26 PM
• Last activity: Feb 25, 2025, 09:27 AM
0
votes
1
answers
146
views
Why can't ifupdown find dhcpcd?
So I have an embedded system I've built with yocto. I'm trying to enable DHCPv6. But when I try to bring the interface online, ifup says it can't find DHCPv6 software, even though dhcpcd is installed. And dhcpcd works if I run it manually. ``` root@1234:~# cat /etc/network/interfaces auto lo iface l...
So I have an embedded system I've built with yocto. I'm trying to enable DHCPv6. But when I try to bring the interface online, ifup says it can't find DHCPv6 software, even though dhcpcd is installed. And dhcpcd works if I run it manually.
root@1234:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.5.80
netmask 255.255.255.0
gateway 192.168.5.1
iface eth1 inet6 dhcp
root@1234:~# ip a show dev eth1
8: eth1: mtu 1500 qdisc noqueue qlen 1000
link/ether ce:e6:83:59:f1:93 brd ff:ff:ff:ff:ff:ff
inet 169.254.23.45/16 brd 169.254.255.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::468b:6249:e50b:a437/64 scope link
valid_lft forever preferred_lft forever
root@1234:~# which dhcpcd
/sbin/dhcpcd
root@1234:~# ifup eth1
No DHCPv6 client software found!
ifup: failed to bring up eth1
root@1234:~#
Note that eth1 is just a dummy interface for now, so that I don't break my ssh connection messing with eth0, which is really where I want to add DHCPv6.
Dave
(45 rep)
Jan 10, 2025, 01:25 PM
• Last activity: Jan 11, 2025, 05:19 PM
1
votes
1
answers
165
views
Debian Ifupdown /etc/network/interfaces : network vs netmask
I came accross the following bit of network conf and the part I don't get is the keyword **network**. Given that netmask is fed, what is the purpose of network ? Disclaimer : I'm not a guru of network configuration, so sorry i the question seems dumb. On Debian Jessie(8) ```conf auto eth0 iface eth0...
I came accross the following bit of network conf and the part I don't get is the keyword **network**.
Given that netmask is fed, what is the purpose of network ?
Disclaimer : I'm not a guru of network configuration, so sorry i the question seems dumb.
On Debian Jessie(8)
auto eth0
iface eth0 inet static
address xx.201.4.132
netmask 255.255.255.192
network xx.201.4.128
gateway xx.201.4.129
auto eth1
iface eth1 inet static
address xx.201.69.4
netmask 255.255.255.192
network xx.201.69.0
I searched thoroughly in the manpage, this keyword is never mentionned.
I've seen a mention of it in the Debian Wiki page on Network Comfiguration but that's all:
> ### Configuring the interface manually
>
> If you're configuring it manually then something like this will set the default gateway (network, broadcast and gateway are optional):
creatldd1 creatldd1
(197 rep)
Aug 14, 2024, 07:29 AM
• Last activity: Aug 14, 2024, 08:14 AM
0
votes
1
answers
141
views
How can I configure isc-dhcp-client differently according to the chosen logical interface?
I am using debian `ifupdown`’s mappings, with `guessnet`, to connect to the “right” WiFi network wherever I am. Here is an excerpt of my `/etc/network/interface`: mapping wlp2s0 script /usr/sbin/guessnet-ifupdown map autofilter: true map default: wlp2s0-default iface wlp2s0-tgv-inoui inet dhcp guess...
I am using debian
ifupdown
’s mappings, with guessnet
, to connect to the “right” WiFi network wherever I am. Here is an excerpt of my /etc/network/interface
:
mapping wlp2s0
script /usr/sbin/guessnet-ifupdown
map autofilter: true
map default: wlp2s0-default
iface wlp2s0-tgv-inoui inet dhcp
guessnet test wireless essid _SNCF_WIFI_INOUI
wpa-conf /etc/wpa_supplicant/wpa_supplicant_minimal.conf
wpa-driver nl80211,wext
wpa-ssid _SNCF_WIFI_INOUI
wpa-key-mgmt NONE
openvpn home_client
I also use unbound
as a local caching DNS resolver.
When I am connected to the _SNCF_WIFI_INOUI
WiFi network, I’d like to forward DNS requests for the sncf.
zones to the resolver provided by the DHCP server, since it provides different answers from the public servers (which I need to get the information specific to the train I am traveling in).
As far as I know, isc-dhcp-client
uses hooks that can be called when it gets answers for the DHCP server. I guess I could write one to configure unbound
as needed.
But how can I ensure this only happens for the wlp2s0-tgv-inoui
logical interface? Is there a way I can get the logical interface when running the hook?
user2233709
(1709 rep)
Jul 30, 2024, 12:08 PM
• Last activity: Aug 8, 2024, 09:10 AM
0
votes
1
answers
404
views
ifdown: interface end0 not configured. RTNETLINK answers: File exists. ifup: interface end0 already configured when setting static and DHCP interface
In a device with Debian BookWorm 12.5, I want to enable and disable a static IP using a Node application at runtime. The `/etc/network/interfaces` is the following : auto lo iface lo inet loopback `ifconfig` gives the following output : ~# ifconfig end0: flags=4163 mtu 1500 inet 192.168.109.176 netm...
In a device with Debian BookWorm 12.5, I want to enable and disable a static IP using a Node application at runtime. The
/etc/network/interfaces
is the following :
auto lo
iface lo inet loopback
ifconfig
gives the following output :
~# ifconfig
end0: flags=4163 mtu 1500
inet 192.168.109.176 netmask 255.255.255.0 broadcast 192.168.109.255
inet6 fe80::7376:77ae:719e:249f prefixlen 64 scopeid 0x20
ether f8:dc:7a:3e:8d:bb txqueuelen 1000 (Ethernet)
RX packets 1155 bytes 392299 (383.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 519 bytes 84713 (82.7 KiB)
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 344 bytes 23930 (23.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 344 bytes 23930 (23.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Trying to turn-down the end0
interface, I get the following :
~# ifdown end0
ifdown: interface end0 not configured
Then, I modify the /etc/network/interfaces
as following :
auto lo
iface lo inet loopback
auto end0
iface end0 inet static
address 192.168.0.15
netmask 255.255.255.0
gateway 192.168.109.254
Trying to turn-up the interface with ifup end0
, I get no error but the ifconfig
output is the same as before. Trying again with ifup
, I get the following :
~# ifup end0
ifup: interface end0 already configured
and ifconfig
gives the same output as before.
I tried also to mess things up using ifconfig end0 down
, service NetworkManager restart
and service networking restart
, but I continue to get undetermined behaviour, specially if I try to turn it down and up again when changing the interfaces file rolling back to dhcp configuration (i.e. without any reference to end0).
What am i missing?
M.Liscio
(230 rep)
Jun 27, 2024, 07:09 PM
2
votes
1
answers
587
views
default gateway not set when using bond0 interface
This is my `/etc/network/interfaces` file: auto bond0 iface bond0 inet manual address 10.66.7.11/24 gateway 10.66.7.1 bond-mode 802.3ad bond-slaves eth2 eth3 bond-miimon 100 bond-downdelay 200 bond-updelay 400 bond-lacp-rate 1 up ifconfig bond0 10.66.7.11/24 up when I bring the bond0 interface up, i...
This is my
/etc/network/interfaces
file:
auto bond0
iface bond0 inet manual
address 10.66.7.11/24
gateway 10.66.7.1
bond-mode 802.3ad
bond-slaves eth2 eth3
bond-miimon 100
bond-downdelay 200
bond-updelay 400
bond-lacp-rate 1
up ifconfig bond0 10.66.7.11/24 up
when I bring the bond0 interface up, it works, but the default gateway is not set
# route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
10.66.7.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
I have to set the default gateway manually, and then everything works fine:
route add default gw 10.66.7.1 bond0
#route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.66.7.1 0.0.0.0 UG 0 0 0 bond0
10.66.7.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
why is my default gateway not set automatically, when I have it defined in the /etc/network/interfaces
file ?
Martin Vegter
(586 rep)
Nov 7, 2023, 09:40 AM
• Last activity: Nov 7, 2023, 11:25 AM
12
votes
3
answers
68317
views
Why are post-up commands in /etc/network/interfaces ran multiple times at boot?
Here is the content of `/etc/network/interfaces`: auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp post-up /etc/network/if-up.d/sshstart And `sshstart` is a script with the following in it: curl something something darkside send a file over ftps in the background & /usr/bin/autossh -M 0...
Here is the content of
As suggested bellow I have modified my interfaces file as follow (removed the empty lines above post-up): auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp post-up /etc/network/if-up.d/sshstart And added the following line to sshstart: echo $(date)>>/run/shm/sshstart.log Here is the content of
/etc/network/interfaces
:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
post-up /etc/network/if-up.d/sshstart
And sshstart
is a script with the following in it:
curl something something darkside send a file over ftps in the background &
/usr/bin/autossh -M 0 -f -N -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -R 127.0.0.1:2005:127.0.0.1:22 -R 192.168.1.10:2006:192.168.2.110:1912 -L 127.0.0.1:5249:192.168.1.212:5249 username@17.16.15.2 -p 8080
When the machine reboots, the curl
command is executed multiple times, the file ends up 2 or 3 times on the ftp server and when I look at the processes it seems like there are multiple instances of autossh running... Not sure if this is how autossh does things or not, but for sure curl shouldn't upload the file multiple times.
My hunch is that the whole sshstart
script is ran multiple times but I don't understand why.
I tried searching for details on the network setup process at boot but all I could find was syntax information for the interfaces file.
Can someone help please?
Thank you.
**---Edit---**As suggested bellow I have modified my interfaces file as follow (removed the empty lines above post-up): auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp post-up /etc/network/if-up.d/sshstart And added the following line to sshstart: echo $(date)>>/run/shm/sshstart.log Here is the content of
/run/shm/sshstart.log
after a reboot:
Wed Oct 29 08:07:00 EDT 2014
Wed Oct 29 08:07:07 EDT 2014
Wed Oct 29 08:07:07 EDT 2014
Wed Oct 29 08:07:07 EDT 2014
So its been ran 4 times :( what's going on?
TCZ8
(1109 rep)
Oct 28, 2014, 06:25 PM
• Last activity: Oct 30, 2023, 05:23 PM
0
votes
1
answers
318
views
dhclient process messes up the wrong interface
I'm using Debian Buster and I have two interfaces configured: eth0 and wwan0 (broadband modem). Here's the relevant part of my interfaces file: ``` # The primary network interface auto eth0 iface eth0 inet dhcp # Do not bring up wwan0 automatically allow-hotplug wwan0 iface wwan0 inet dhcp pre-up un...
I'm using Debian Buster and I have two interfaces configured: eth0 and wwan0 (broadband modem). Here's the relevant part of my interfaces file:
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Do not bring up wwan0 automatically
allow-hotplug wwan0
iface wwan0 inet dhcp
pre-up until [ -h /dev/ublox00 ]; do sleep 1; done && echo $'AT+UCEDATA=1,0\r\n' > /dev/ublox00 && sleep 2
post-down echo $'AT+CGACT=0\r\n' > /dev/ublox00
I've noticed that when I want to bring wwan0 down, it also releases the IP address for eth0:
$ sudo ifdown -v wwan0
ifdown: configuring interface wwan0=wwan0 (inet)
/bin/run-parts --verbose /etc/network/if-down.d
run-parts: executing /etc/network/if-down.d/wpasupplicant
/sbin/dhclient -4 -v -i -r -pf /run/dhclient.wwan0.pid -lf /var/lib/dhcp/dhclient.wwan0.leases -I -df /var/lib/dhcp/dhclient6.wwan0.leases wwan0
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/98:f0:7b:98:7a:89
Sending on LPF/eth0/98:f0:7b:98:7a:89
Listening on LPF/wwan0/ee:bc:6c:be:6d:7c
Sending on LPF/wwan0/ee:bc:6c:be:6d:7c
Sending on Socket/fallback
DHCPRELEASE of 192.168.1.101 on eth0 to 192.168.1.1 port 67
DHCPRELEASE of 100.68.214.247 on wwan0 to 100.68.214.248 port 67
/sbin/ip link set dev wwan0 down
/bin/run-parts --verbose /etc/network/if-post-down.d
run-parts: executing /etc/network/if-post-down.d/hostapd
run-parts: executing /etc/network/if-post-down.d/wireless-tools
run-parts: executing /etc/network/if-post-down.d/wpasupplicant
echo $'AT+CGACT=0\r\n' > /dev/ublox00
And requests it again after bringing the interface up:
$ sudo ifup -v wwan0
ifup: configuring interface wwan0=wwan0 (inet)
until [ -h /dev/ublox00 ]; do sleep 1; done && echo $'AT+UCEDATA=1,0\r\n' > /dev/ublox00 && sleep 2
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/hostapd
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
/sbin/dhclient -4 -v -i -pf /run/dhclient.wwan0.pid -lf /var/lib/dhcp/dhclient.wwan0.leases -I -df /var/lib/dhcp/dhclient6.wwan0.leases wwan0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/98:f0:7b:98:7a:89
Sending on LPF/eth0/98:f0:7b:98:7a:89
Listening on LPF/wwan0/ee:bc:6c:be:6d:7c
Sending on LPF/wwan0/ee:bc:6c:be:6d:7c
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wwan0 to 255.255.255.255 port 67 interval 6
DHCPOFFER of 192.168.1.101 from 192.168.1.1
DHCPREQUEST for 192.168.1.101 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 100.68.214.247 from 100.68.214.248
DHCPREQUEST for 100.68.214.247 on wwan0 to 255.255.255.255 port 67
DHCPACK of 100.68.214.247 from 100.68.214.248
bound to 100.68.214.247 -- renewal in 74796 seconds.
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/wpasupplicant
The commands sudo ifdown eth0
and sudo ifup eth0
operate on eth0 only as expected. Please help me find the problem.
My ifupdown version is 0.8.35.
Alexandr Zarubkin
(173 rep)
Apr 6, 2023, 02:18 PM
• Last activity: Apr 20, 2023, 02:01 PM
21
votes
1
answers
8759
views
DNS broken when using ifupdown and systemd-resolved after upgrade to Ubuntu 22.04
TL;DR ``` sudo cp -p /etc/network/if-up.d/resolved /etc/network/if-up.d/.resolved.broken-orig #Edit /etc/network/if-up.d/resolved and take out the extraneous quotes on lines 48 and 52 #The fix looks like: diff /etc/network/if-up.d/.resolved.broken-orig /etc/network/if-up.d/resolved 48c48 $DNS="$NEW_...
TL;DR
sudo cp -p /etc/network/if-up.d/resolved /etc/network/if-up.d/.resolved.broken-orig
#Edit /etc/network/if-up.d/resolved and take out the extraneous quotes on lines 48 and 52
#The fix looks like:
diff /etc/network/if-up.d/.resolved.broken-orig /etc/network/if-up.d/resolved
48c48
$DNS="$NEW_DNS"
52c52
$DOMAINS="$NEW_DOMAINS"
At least, this appears to be effective.
----
Recently upgraded an older system to Ubuntu 22.04.1 LTS via do-release-upgrade
and ran into DNS issues, error messages were:
nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find google.com: SERVFAIL
and
/etc/network/if-down.d/resolved: 12: mystatedir: not found
/etc/network/if-up.d/resolved: 71: DNS: not found
/etc/network/if-up.d/resolved: 1: /run/network/ifupdown-inet-em1: DNS=8.8.8.8: not found
/etc/network/if-up.d/resolved: 2: /run/network/ifupdown-inet-em1: DOMAINS=local_search_domain.com: not found
Failed to parse DNS server address: DNS
Failed to set DNS configuration: Invalid argument
when attempting to run an nslookup
via a network connection (em1) defined in /etc/network/interfaces prior to the system upgrade.
After a period of self-soothing I located https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1981103 and https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1910273 which helped enhance my calm. It appears that, at a minimum, the errors encountered were due to a pair of typos in /etc/network/if-up.d/resolved which are easily fixed with a text editor; after manually removing the extraneous quotes I am able to bring up the network interface and query DNS servers. It's unclear to me if there are other issues with the ifupdown
package currently shipped by Ubuntu 22.04.1 LTS (0.8.36+nmu1ubuntu3) or the manual edit I described above. Are there any documented fixes that don't involve editing lines 48 and 52 of /etc/network/if-up.d/resolved or is this the best workaround currently available for legacy systems that have been upgraded to Ubuntu 22.04.1 LTS?
Spokane_is_actually_kinda_okay
(213 rep)
Aug 25, 2022, 10:57 PM
• Last activity: Mar 9, 2023, 06:50 AM
5
votes
1
answers
1428
views
How can i find out which network interface managing solution is used on a given linux distribution in an easy and robust way?
I frequently find myself sitting in front of various different Linux installations and need to check or change network settings. They are different versions from different distributions (mostly debian and opensuse, but also ubuntu and derived variants) in varying states of customization, which means...
I frequently find myself sitting in front of various different Linux installations and need to check or change network settings.
They are different versions from different distributions (mostly debian and opensuse, but also ubuntu and derived variants) in varying states of customization, which means i can't make reliable assumptions about their configurations.
So how can i find out in a easy and robust (that is distro and version independent) way, which service is used to manage network interfaces and related network settings. (like NetworkManager, Systemd-networkd or ifup/down)
-> Ideally with basic system tools
The System can find out which service is to be used/started at system startup, so there has to be either a command that tells me or a config file where i can look it up.
I am aware, that similar questions have been asked numerous times, but all answers i could find boil down to one of two not very helpful gists:
- either the author mentioned their distro/version and someone told them, which program is probably used
- or they were told to basically try each possibility until they found the running manager
both of which i consider neither very reliable nor safe. (not to mention that trial and error is very time consuming)
Sorontik
(51 rep)
Dec 14, 2021, 03:55 PM
• Last activity: Jan 14, 2023, 04:42 PM
0
votes
0
answers
376
views
Bridge won't get DHCP address if network available AFTER boot
I have 2 ethernet ports bridged as follows (/etc/network/interfaces.d/br0): ``` auto br0 iface br0 inet dhcp bridge_ports enp1s0 enp2s0 bridge_fd 0 bridge_waitport 0 bridge_stp off auto br0:1 iface br0:1 inet static address 169.254.10.50 netmask 255.255.255.0 ``` In this instance, a PC and router ar...
I have 2 ethernet ports bridged as follows (/etc/network/interfaces.d/br0):
auto br0
iface br0 inet dhcp
bridge_ports enp1s0 enp2s0
bridge_fd 0
bridge_waitport 0
bridge_stp off
auto br0:1
iface br0:1 inet static
address 169.254.10.50
netmask 255.255.255.0
In this instance, a PC and router are always in a combined unit. The router has DHCP enabled, but takes longer to boot than the PC.
enp1s0 is in LAN port of the router, enp2s0 is connected to another device that will ALWAYS have an IP address of 169.254.10.49.
When the combined unit is rebooted, if the router does not finish its boot process before the PC has booted, br0 will never be assigned an IP address.
What I need to happen, ideally, is that at any point after the system has booted, if a DHCP server is available, br0 will be assigned an IP address.
Can I configure the bridge to get an IP address after the DHCP server becomes available?
Lewis Smith
(11 rep)
Nov 14, 2022, 08:33 PM
• Last activity: Nov 14, 2022, 09:20 PM
1
votes
0
answers
25
views
Building a lab, interfaces file issue, networking service won't restart because of ifup
Hello (beginner to linux networking), I'm trying to build a lab in VirtualBox with a Debian GLPI server for school, the VM has 2 network interfaces : a NAT one in dhcp (eth0) and the other one (intern) is in static for local network (eth1). Dumb question but what is the difference between enp0s and...
Hello (beginner to linux networking),
I'm trying to build a lab in VirtualBox with a Debian GLPI server for school, the VM has 2 network interfaces : a NAT one in dhcp (eth0) and the other one (intern) is in static for local network (eth1).
Dumb question but what is the difference between enp0s and eth ?
I tried this config :
auto eth0
iface eth0 inet dhcp
allow-hotplug eth0
auto eth1
iface eth1 inet static
allow-hotplug eth1
address 172.16.2.56
netmask 255.255.255.192
network 172.16.2.0
gateway 172.16.2.62
broadcast 172.16.2.63
I lost internet when making changes to the eth1 card which is unfortunate cause i need it to build GLPI, i tried different confs but cannot make the networking service restart, ifup is breaking on the address line : misplaced option.
Basically i want my NAT to come back and stay up so i can have internet on my VM + having eth1 for local purpose and hosting the GLPI ITSM service.
I don't know if i made it clear, if asked i will give you details, thanks for your help in advance.
arty0m
(11 rep)
Oct 31, 2022, 08:58 AM
0
votes
1
answers
931
views
ifupdown change parameters dhclient
I have Ubuntu 20.04 where I gave all network functions to ifupdown. 1 of my interface got network parameters by dhclient: ``` #/etc/network/interfaces allow-hotplug enp2s0 auto enp2s0 iface enp2s0 inet dhcp ``` Dhclient starts with such parameters: ``` #ps -Af | grep dhclient /sbin/dhclient -1 -4 -v...
I have Ubuntu 20.04 where I gave all network functions to ifupdown.
1 of my interface got network parameters by dhclient:
#/etc/network/interfaces
allow-hotplug enp2s0
auto enp2s0
iface enp2s0 inet dhcp
Dhclient starts with such parameters:
#ps -Af | grep dhclient
/sbin/dhclient -1 -4 -v -i -pf /run/dhclient.enp2s0.pid -lf /var/lib/dhcp/dhclient.enp2s0.leases -I -df /var/lib/dhcp/dhclient6.enp2s0.leases enp2s0
Dhclient version:
# dhclient --version
isc-dhclient-4.4.1
Client config:
# cat /etc/dhcp/dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
timeout 60;
retry 60;
reboot 10;
reject 10.100.0.2;
Tired to google how to change parameters for dhclient start(I want to start it without -1 and in daemon mode), like this:
/sbin/dhclient -nw -4 -v -pf /run/dhclient.enp2s0.pid -lf /var/lib/dhcp/dhclient.enp2s0.leases -I -df /var/lib/dhcp/dhclient6.enp2s0.leases enp2s0
How I can do it?
Thank you!
KonstantinKuklin
(205 rep)
Apr 17, 2022, 03:49 PM
• Last activity: Apr 18, 2022, 06:08 PM
0
votes
0
answers
66
views
Bringing up ethernet device under Debian riscv64
I have a [Sipeed RV 86][1] device, which is a RISCV 64bit. On this,I run a minimal Debian OS, that let's me log in via the USB interface, as the device shows up as `ttyUSB0` on the host Linux PC. When I then try to bring up networking, I stumble on this error: ``` # ifconfig lo: flags=73 mtu 65536 i...
I have a Sipeed RV 86 device, which is a RISCV 64bit. On this,I run a minimal Debian OS, that let's me log in via the USB interface, as the device shows up as
ttyUSB0
on the host Linux PC.
When I then try to bring up networking, I stumble on this error:
# ifconfig
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 1630 bytes 89377 (87.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1630 bytes 89377 (87.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
usb0: flags=4099 mtu 1500
ether e2:95:8c:23:89:85 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
# ifup usb0
ifup: unknown interface usb0
After making the interface known in /etc/network/interfaces.d/usb0
using:
auto usb0
iface usb0 inet dhcp
...I get:
# ifup usb0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/usb0/e2:95:8c:23:89:85
Sending on LPF/usb0/e2:95:8c:23:89:85
Sending on Socket/fallback
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on usb0 to 255.255.255.255 port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
root@licheerv:/etc/network/interfaces.d#
I know that my DHCP server is running, and working, as other clients work fine. I also see the network LED on the device blink, so there is activity.
How can I get networking going on this device?
UPDATE 1
========
During boot, I also see this:
[ **] A start job is running for Raise network interfaces (27s / 5min 15s)
[ 33.761420] ldob: disabling
UPDATE 2
========
Unfortunately, the TPLINK dhcp server logging is severely lacking... it doesn't display much, other than:

Bram
(989 rep)
Apr 13, 2022, 06:27 PM
• Last activity: Apr 13, 2022, 06:43 PM
0
votes
1
answers
924
views
Adding a VLAN-transparent bridge to Linux (Debian)
On my current Debian system I use VLAN tagging and I create bridges br-wan and br-lan that I use for LXC containers: auto lo br-lan br-wan iface lo inet loopback iface br-wan inet manual     bridge_ports eth0.3     bridge_maxwait 0 iface br-lan inet static   &...
On my current Debian system I use VLAN tagging and I create bridges br-wan and br-lan that I use for LXC containers:
auto lo br-lan br-wan
iface lo inet loopback
iface br-wan inet manual
bridge_ports eth0.3
bridge_maxwait 0
iface br-lan inet static
address 192.168.200.10
netmask 255.255.255.0
gateway 192.168.200.1
bridge_ports eth0.2
bridge_maxwait 0
iface eth0.1 inet static
address 10.7.1.10
netmask 255.255.255.0
Now I would like to add a KVM guest that gets transparent access to eth0 and in turn uses VLAN tagging internally (for example, to create a virtualized router routing between eth0.2 and eth0.3). To test, I did the following:
brctl addbr br-master
brctl addif eth0
And then I created a KVM guest with
--network=bridge=br-master,model=virtio
which creates an interface vnet0 that is also added as bridge port to br-master. Inside the guest added the VLAN interfaces.
On the host, I see tagged packets in vnet0 (tcpdump -i vnet0 -e vlan
) and br-master (tcpdump -i br-master -e vlan
).
However, the traffic never reaches eth0 on the host.
I am sure the story is not that simple.
How can I add such a VLAN-transparent "master bridge" to my system, without disrupting my old config?
divB
(218 rep)
Nov 27, 2021, 09:58 PM
• Last activity: Nov 27, 2021, 11:21 PM
0
votes
1
answers
6082
views
ifdown: interface enp0s3 not configured. RTNETLINK answers: File exists. ifup: failed to bring up enp0s3
I have a virtual box (6.1) with ubuntu minimal. in the settings of the virtual machine in the network section, "Bridged Adapter" is selected. root@ubuntu:/home/mista# dmesg -T|head -1 [Sun Oct 24 10:56:10 2021] Linux version 5.4.0-89-generic (buildd@lgw01-amd64-044) (gcc version 9.3.0 (Ubuntu 9.3.0-...
I have a virtual box (6.1) with ubuntu minimal. in the settings of the virtual machine in the network section, "Bridged Adapter" is selected.
root@ubuntu:/home/mista# dmesg -T|head -1
[Sun Oct 24 10:56:10 2021] Linux version 5.4.0-89-generic (buildd@lgw01-amd64-044) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 (Ubuntu 5.4.0-89.100-generic 5.4.143)
root@ubuntu:/home/mista# 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
2: enp0s3: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:1e:5b:6d brd ff:ff:ff:ff:ff:ff
inet 192.168.88.236/24 brd 192.168.88.255 scope global dynamic enp0s3
valid_lft 473sec preferred_lft 473sec
inet6 fe80::a00:27ff:fe1e:5b6d/64 scope link
valid_lft forever preferred_lft forever
root@ubuntu:/home/mista# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.88.236
netmask 255.255.255.0
gateway 192.168.88.1
root@ubuntu:/home/mista# ifdown enp0s3
ifdown: interface enp0s3 not configured
root@ubuntu:/home/mista# ifup enp0s3
RTNETLINK answers: File exists
ifup: failed to bring up enp0s3
root@ubuntu:/home/mista# systemctl status networking
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-10-24 11:24:35 MSK; 1min 39s ago
Docs: man:interfaces(5)
Process: 826 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Main PID: 826 (code=exited, status=1/FAILURE)
Oct 24 11:24:35 ubuntu systemd: Starting Raise network interfaces...
Oct 24 11:24:35 ubuntu ifup: RTNETLINK answers: File exists
Oct 24 11:24:35 ubuntu ifup: ifup: failed to bring up enp0s3
Oct 24 11:24:35 ubuntu systemd: networking.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 11:24:35 ubuntu systemd: networking.service: Failed with result 'exit-code'.
Oct 24 11:24:35 ubuntu systemd: Failed to start Raise network interfaces.
root@ubuntu:/home/mista# cat /run/network/ifstate
lo=lo
I tried to add the string "enp0s3=enp0s3" to /run/network/ifstate but it doesn't work. But /run - it's a virtual file system and the string with enp0s3 will be delete after reload daemons or reboot the server.
Some people say that all configured interfaces should be displayed in /run/network/ifstate. But why, then, the enp0s3 interface is not displayed in the /run/network/ifstate if it is registered in the config ?
And may be I have some mistake in config file?
after reboot, the address 192.168.88.236/24 rises, but these commands do not work:
ifup enp0s3
ifdown enp0s3
I don't understand why errors are coming out:
root@ubuntu:/home/mista# ifdown enp0s3
ifdown: interface enp0s3 not configured
root@ubuntu:/home/mista# ifup enp0s3
RTNETLINK answers: File exists
ifup: failed to bring up enp0s3
Where ifup and ifdown can get the config to work with the interface except for the file /etc/network/interfaces?
The file /etc/networks is empty.
Mexanizm456
(41 rep)
Oct 24, 2021, 09:23 AM
• Last activity: Oct 24, 2021, 01:31 PM
1
votes
1
answers
1425
views
How can I figure out why my network configuration is simply ignored?
I have been running Debian 10 a.k.a. Buster without issues. My problems started when all of a sudden, network connectivity dropped. At that point, NetworkManager was active. I stopped and disabled the service to exclude its interference. This PC runs KVM VMs in a bridged configuration: ``` $ sudo br...
I have been running Debian 10 a.k.a. Buster without issues. My problems started when all of a sudden, network connectivity dropped. At that point, NetworkManager was active. I stopped and disabled the service to exclude its interference.
This PC runs KVM VMs in a bridged configuration:
$ sudo brctl show
bridge name bridge id STP enabled interfaces
br1 8000.7446a0a0d47b no eno1
vnet0
vnet1
vnet2
vnet3
My interfaces file looks like this (leaving out a few comments):
$ cat /etc/network/interfaces
(...)
# The loopback network interface
auto lo
iface lo inet loopback
#auto eno1
#iface eno1 inet manual
auto br1
iface br1 inet manual
bridge_ports eno1
address 192.168.1.27
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.16, 1.1.1.1
When I run systemctl restart networking
, or ifdown br1; ifup br1
, br1
ends up with no IP address, both eno1
and br1
are down, and there is no default route. Removing the hash signs on the eno1 lines has no effect.
In my desperation, I added this line to the interfaces file: this line is illegal
. When it comes **before** the loopback block, it causes an expected error message:
ifup: /etc/network/interfaces:7: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
When it comes **after** it, it doesn't. It's as if ifupdown
stopped reading after the loopback configuration. But putting the loopback block at the end of the file still doesn't configure br1
. I haven't detected any non-printable characters or otherwise strange characters in the file.
To cross the T's, here is the journal:
$ sudo journalctl -u -e networking
(...)
-- Reboot --
May 21 09:29:58 jupiter systemd: Starting Raise network interfaces...
May 21 09:29:59 jupiter ifup: Waiting for br1 to get ready (MAXWAIT is 32 seconds).
May 21 09:30:00 jupiter systemd: Started Raise network interfaces.
And setting STP on the bridge doesn't change the behaviour. How about ifup?
# type ifup
ifup is /usr/sbin/ifup
# file /usr/sbin/ifup
/usr/sbin/ifup: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9ac8619bfa91d2b8901228595fa390826c9682c7, stripped
**How can I figure out why my network configuration is simply ignored?**
berndbausch
(3695 rep)
May 21, 2021, 01:15 AM
• Last activity: May 21, 2021, 06:46 AM
Showing page 1 of 17 total questions