LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Disappearing eth0 (https://www.linuxquestions.org/questions/slackware-14/disappearing-eth0-4175589696/)

apolinsky 09-18-2016 07:40 PM

Disappearing eth0
 
I have a computer in the country running Slackware14.1 that acts as a server. I just updated it to the latest patches, using slackpkg and have a weird problem. It runs dhcpd for the rest of the network, and also is the connection to the internet, being connected with its wireless usb port. Until the update, thee were no problems, but after it, the invocation of dhcpd fails. after some investigation I found the eth0 no longer had a static address even though it is set in /etc/rc.d/rc.inet1.conf. I tried to force the issue in /etc/rc.local by issuing an ipconfig eth0 192.168.0.10 (its address) but the dhcpd still fails. If I issue it once more after the completion of /etc/rc.local, it succeeds. What have I done wrong?

trollog 09-18-2016 11:59 PM

Is NetworkManager running? Wicd can also cause similar trouble.

Those two really work best when there is a meat bag sitting in front of the keyboard.
They serve a certain purpose on the desktop. But for servers, less so.

Stop wicd or network manager by executing the rc. script in /etc/rc.d, then
configure the NICS the way you like.

If you are really brave, stop the applicable daemon, then remove executability
in /etc/rc.d for rc.wicd & rc.networkmanager (whichever are applicable),
configure /etc/rc.d/rc.inet1.conf then reboot. This may involve an unplanned
drive to the country, so choose carefully & wisely.

Otherwise, just stop network manager (or wicd, or both. dunno what you have installed there..)
and configure eth0 via rc.inet1.conf or iw/ifutils without reboot.

Those utils sometimes "fight" for control over the network cards. Both are useful in their places
but can also be rather insidious. being daemons, you'll set the ipaddress manually, then one or
both (wicd or NM) will change the settings on you quietly at periodic intervals. Annoying at times.




.

apolinsky 09-19-2016 03:48 AM

I had assumed that the lack of an ip address might be caused by NetworkManager, so I disabled it, using a chmod -x, to see if that would help. No luck, I was still left without an ip address. (I did not comment out any references to wlan0 in rc.inet1.conf which might be contributing to the problem.) I tried to reboot the machine using the prior kernel, but realized that when Slackware installs a new one, it removes references to prior kernels, or at least re-locates them away from /boot. I can get things functioning manually by adding the ip address, using ifconfig eth0 192.168.0.10 and then starting dhcpd. I did try to have /etc/rc.d/rc.local reference a secondary script with those commands but was left witht he same result.

jostber 09-19-2016 05:10 AM

Can you show the output of this?

Code:

cat /etc/udev/rules.d/70-persistent-net.rules

apolinsky 09-19-2016 07:32 AM

Unfortunately, that will take awhile. I won't have access to the computer for about a month. I'll check and report back as soon as possible.

apolinsky 09-19-2016 07:57 AM

I was just re-thinking my response, and don't think cat /etc/udev/rules.d/70-persistent-net.rules would apply to the Ethernet card. I am under the impression that the /etc/udev rules apply to removable devices. Obviously the usb wireless device is there, but I don't recall ever seeing an Ethernet card.

jostber 09-19-2016 08:54 AM

A couple of threads with more details here:

https://www.centos.org/forums/viewtopic.php?t=42758
http://askubuntu.com/questions/68907...0-udev-changes

apolinsky 09-19-2016 10:20 AM

Thank you very much for your suggestions. I'm a bit confused as to why udev would be involved in the issue but I'll give a try as soon as possible.

lupe 09-19-2016 06:01 PM

I am trying to configure lxc networking and had the same problem as you. eth0 was getting a dynamic address instead of the fixed one set on /etc/rc.d/rc.inet1.conf

In /etc/rc.d/rc.inet1.conf I had a bridge set up:
Code:

IFNAME[0]="br0"
BRNICS[0]="eth1"
IPADDR[0]="192.168.2.1"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

After commenting all these lines and restarting /etc/rc.d/rc.inet1 restart, eth0 got again the static address set on rc.inet1.conf.

apolinsky 09-19-2016 07:04 PM

Thanks for your input. Unfortunately I have no bridge in /etc/rc.d/rc.inet1.conf. This is the relevant section:

# Config information for eth0:
IPADDR[0]="192.168.0.10"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

bassmadrigal 09-19-2016 07:35 PM

Can you post your whole /etc/rc.d/rc.inet1.conf and the output of the following command?

Code:

ls -la /etc/rc.d/rc.{networkmanager,wicd}
Also, can you give us a better rundown of your network? What network device is listed as what on the computer, and what does each one do? Which are served by a DHCP and which are statically set? From the sounds of it, you have a USB device that connects to your internet, and then another device that connects to the rest of your LAN. Is that correct?

apolinsky 09-19-2016 07:47 PM

I no longer have wicd; I had tried it but it was unable to allow the wireless connection and the wired connection to be simultaneously active. NetworkManager is running. Until the most recent update of slackware which installed a new version of the kernel, I had none of these problems. As I mentioned in an earlier comment, I will not have access to the computer in question for about a month. I can say that it has information about each of the interfaces, eth0 and wlan0, the former being assigned a static address of 192.168.0.10, and the latter getting an address using dhcp from a Verizon connected cellphone. This machine had been acting as a router for a very simple network. I run dhcp on this machine to throw out addresses on the network in the range of 192.168.0.100 - 192.168.0.200. The address I get from Verizon for wlan0 is in the range of 192.168/.43.xxx. For some reason I have to put a "route default" statement into /etc/rc.d/rc.local in order to get routing to work properly for the overall network.

trollog 09-20-2016 04:56 AM

I'de still try disabling Network Manager (stop the daemon then chmod the rc.file 644) and see if that doesn't make the cards play nicer. NM has it's place, but if it's a server
and you are connecting to the same verizon phone etc. and the situation is relatively static there's not much need for what NM does. NM
misbehaves a lot like wicd does with multiple nics, even though technically neither one is supposed to. My spidey sense is telling me NM is the culprit here. Something is
getting in the way here. Over the years I have rarely needed to have recourse to rc.local for anything on a properly configured system.

apolinsky 09-20-2016 05:05 AM

Thank yo for your suggestion, but unfortunately it did not work. NetworkManager was my first thought, so (if you check some of my earlier comments) I DID temporarily disable it. There were no changes with the result.

lupe 09-20-2016 09:41 AM

Quote:

Originally Posted by trollog (Post 5607655)
I'de still try disabling Network Manager (stop the daemon then chmod the rc.file 644) and see if that doesn't make the cards play nicer.

I've never enabled network manager but the misbehavior has shown up as well, just FYI.


All times are GMT -5. The time now is 01:07 AM.