1

I am using a new RPi Zero, running Stretch Lite OS. I am not running X11.org. I am in the process of configuring my Pi Zero. I have two USB networking interfaces on wired and one wireless. My final configuration will only include the wireless adapter. However, I have been working primarily with the wired ethernet adapter due to ease of use while following these instructions.

Throughout my configuration, I had both my wireless and my wired network adapters plugged into the Pi Zero through a powered USB hub. When I had both adapters plugged into the Pi, both network interfaces were able to acquire DHCP leases from my router.

#ifconfig
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last Login: Fri Nov 10 17:50:12 2017
guy@rpi5:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.126  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::1004:51ed:dd4a:afb1  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:53:44:58  txqueuelen 1000  (Ethernet)
        RX packets 238  bytes 21795 (21.2) KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 98  bytes 12524 (12.2) KiB)
        TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host
        loop  txqueuelen 1  (Local Loopback)
        RX packets 8  bytes 312 (312.0) B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 312 (312.00) B)
        TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0

rename3: 4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.131  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::63b7:510d:eac5:2e04  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::8826:3fd9:48c5:8ab5  prefixlen 64  scopeid 0x20<link>
        ether 8c:b8:2b:00:52:12  txqueuelen 1000  (Ethernet)
        RX packets 414  bytes 56976 (55.6) KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 10758 (10.5) KiB)
        TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0

However, since I do not intend on using the wired interface going forward, I disconnected it and rebooted the Pi Zero.

Upon reboot, only the lo interface shows on ifconfig even though the WiFi USB adapter is still plugged into the USB hub.

Any help in identifying the reason why my WiFi adapter seems to obtain a DHCP leased address while the Ethernet adapter is plugged in, but seems to be entirely missing from the network interface list when my Ethernet adapter is unplugged will be greatly appreciated.

EDIT 1 : Update systemctl status dhcpcd

guy@rpi5:~ $ sudo systemctl status dhcpcd
\u25cf dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: e
  Drop-In: /etc/systemd/system/dhcpcd.service.d
           \u2514\u2500wait.conf
   Active: active (running) since Fri 2017-11-10 17:50:00 IST; 2 days ago
  Process: 242 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=0/SU
 Main PID: 508 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           \u2514\u2500508 /sbin/dhcpcd -q -w

Nov 10 17:59:55 rpi5 dhcpcd[508]: rename3: deleting address fe80::63b7:510d:eac5
Nov 10 17:59:55 rpi5 dhcpcd[508]: rename3: carrier acquired
Nov 10 17:59:56 rpi5 dhcpcd[508]: rename3: IAID 2b:00:52:12
Nov 10 17:59:56 rpi5 dhcpcd[508]: rename3: adding address fe80::63b7:510d:eac5:2
Nov 10 17:59:56 rpi5 dhcpcd[508]: rename3: probing address 192.168.2.117/24
Nov 10 17:59:56 rpi5 dhcpcd[508]: rename3: soliciting an IPv6 router
Nov 10 18:00:01 rpi5 dhcpcd[508]: rename3: using static address 192.168.2.117/24
Nov 10 18:00:01 rpi5 dhcpcd[508]: rename3: adding route to 192.168.2.0/24
Nov 10 18:00:01 rpi5 dhcpcd[508]: rename3: adding default route via 192.168.2.1
Nov 10 18:00:09 rpi5 dhcpcd[508]: rename3: no IPv6 Routers available

EDIT 2: /etc/dhcpcd.conf

guy@rpi5:~ $ cat /etc/dhcpcd.conf 

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# Example static IP configuration:
interface eth0
static ip_address=192.168.2.115/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.2.1
static domain_name_servers=192.168.2.1 #8.8.8.8 fd51:42f8:caae:d92e::1

interface rename3
static ip_address=192.168.2.117/24
static routers=192.168.2.1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile

#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
  • Pre-formatted text is much better... copy/paste indent 4 spaces. – RubberStamp Nov 11 '17 at 13:53
  • @RubberStamp - Ok, guess you are right. – Guy . D Nov 11 '17 at 13:55
  • Is this a RPi Zero WiFi or a plain RPi Zero? ... How do you have both a wired and wireless adapter? Are they separate USB dongles connected to the Pi via a USB hub? – RubberStamp Nov 11 '17 at 15:02
  • Only Zero. Using USB hub. – Guy . D Nov 11 '17 at 15:03
  • When tried to connect using USB wifi, I tried both : via hub ( without wired ethernet ) , and directly to pi's microusb port – Guy . D Nov 11 '17 at 15:04
1

So, from your comments, let me see if I can reframe your question:

  • You have both the WiFi adapter and the Wired Ethernet adapter plugged into a USB hub simulateously
  • And then plug the Ethernet cable in
  • Then both the WiFi and the Wired interface are assigned an address via your router's dhcp server
  • And since the WiFi adapter seems to be a little flaky it is now on the 4th interface name (0,1,2,3) as well as the 4th or 5th sequential dhcp lease
  • Disconnect the Ethernet ?dongle? or ?just Ethernet cable? from the USB hub.
  • Upon reboot there are no network interfaces listed with ifconfig except lo

And you would like to know why there are no interfaces listed even though you still have the WiFi dongle attached to the system...

There are a few questions:

  1. Is the USB hub powered or unpowered?

    powered

  2. What is the output sudo systemctl status dhcpcd

    TBD

  3. What is the output of cat /etc/dhcpcd.conf

    TBD

But there may be clues in the system logs and configuration.

  • Last bullet- not exactly: After reboot and disconnecting wired ethernet, running ifconfig shows only "loopback" interface. regrading your questions: 1) powered. still as I wrote before, I also tried connect wifi dongle directly to rpi microUSB, same results. so ihas nothing to do with power 2) at what state ? both or only wifi? 3) same – Guy . D Nov 11 '17 at 17:34
  • @Guy.D: The /etc/dhcpcd.conf file shouldn't change between reboots. It contains the configuration of your network interfaces... the command systemctl status dhcpcd should show the log history of what your network interfaces have been doing since boot time. So, a "good" network connection with wired Ethernet plugged in, and a "bad" network connection when only the lo interface appears in ifconfig will should be helpful. – RubberStamp Nov 11 '17 at 17:50
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – tlhIngan Nov 13 '17 at 0:00
  • @tlhIngan: I agree... it doesn't answer the question. However, the question is missing pertinent information. Unfortunately, the comment system is difficult to utilize in order to convey complex changes that are required to a question to make that question clear enough to answer.... If the OP would prefer, I will edit the question to match what seems to be the posed problem... The OP is free to copy and paste my thoughts, but as I made a suggestion to the OP which was acknowledged, but not acted upon... it's doubtful that the OP will modify the question to clarify the problem. – RubberStamp Nov 13 '17 at 0:07
  • @RubberStamp Good faith edit of the original question is preferable. Feel free to do that. :) – tlhIngan Nov 13 '17 at 0:12
0

After formatting and re-installing ( all the same ) - it works perfectly, including: 1) assigning a static IP, 2) wlan0 is working without wired LAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.