0

I needed to add a wifi-USB module to my RPi 3. Originally, there is a wired NIC built in it. So, I could find 'eth0' and 'lo' from response of 'ifconfig' command. I installed wifi driver by 'apt-get install firmware-realtek' and then I can see wlan0 appearing at 'ifconfig'. The problem is then that I couldn't find IP address for wlan0 in resposne list of ifconfig.

After some effort of having wlan0 showing IP address, I found 'eth0' and 'wlan0' vanished unexpectedly. It shows 'error fetching interface information: Device not found' for command "ifconfig wlan0" How can I recover them? Before I found the trouble, I already made wlan0 appearing at response of ifconfig. I also found all Wifi APs at my office shown at response of iwlist.

I used command 'systemctl status networking.service', I got response of ....

 Loaded: loaded (/lib/systemd/system/neworking.service: enabled: vendor preset:enabled)
    Active: failed (Result: exit-code) since Thu 2020-06-04 22:33:12 BST: 1h 21min agon
   Docs:man: interfaces(5)
Process: 844 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)

....

I can't remember what I did cause such trouble. What can I do to make eth0 and wlan0 back again?

  • When I used command 'ifconfig -a', I got

    enxb827eb63f456: flags=1098<BROADCAST,MULTICAST> mtu 1500 ether b8:27:...... ..... lo: flags=.....

    wlx08bcac028337: flags=.... ....

    The strange is that there are two devices: enxxxx and wlxxxx which should be eth0 and wlan0 respectively instead.

    – Stan Huang at Taiwan Jun 08 '20 at 06:27

1 Answers1

0

That's my mistake. The two devices, eth0 and wlan0, didn't disappear. They were just renamed by raspi-config as enxxxxxxxxxxxx and wlwwwwwwwwwwww; where xxxx* and www* are their MAC addresses respectively. I mistook them as wrong devices. I used the method at renaming network interface in Ubuntu 16.04 with systemd fails to rename them back to eth0 and wlan0.