element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Raspberry Pi Zero Ethernet Problem
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 32 replies
  • Answers 5 answers
  • Subscribers 666 subscribers
  • Views 5509 views
  • Users 0 members are here
  • ethernet
  • raspberry pi
Related

Raspberry Pi Zero Ethernet Problem

Former Member
Former Member over 9 years ago

I'm having trouble connecting my Raspberry Pi zero to ethernet.

 

I have a Raspberry Pi 3 and four Raspberry Pi zeros. I'm a grad student in mathematics and I do a whole lot of parallel computing. I'm trying to set these up as a cluster to test my distributed code before I send it up to the university's very expensive computing cluster. I bought a handful of uxcell ethernet to micro USB adapters that you can find here: Amazon.com: uxcell Micro USB to RJ45 Network Card Adapter Converter for Windows 98SE Me: Computers & Accessories

 

When I plug ethernet into the Pi zero using this cable, the Pi zero is not being assigned an IP address. Is this adapter incorrect? I was hoping to use these cheap adapters as the grad student stipend isn't exactly CEO pay image.  As an additional note, plugging the ethernet directly into the Pi 3 works fine. The Pi 3 instantly recognizes the ethernet and has no problem connecting to the network.

 

I have tried using ip link and dhcpcd to get the network going on the Pi Zeros, but i'm stuck as I can't get them to recognize the LAN. I'm also positive that it isn't an issue with the router as I have used multiple routers (at home and at the university) and neither has worked. Thank you in advance for your replies.

  • Sign in to reply
  • Cancel
Parents
  • clem57
    0 clem57 over 9 years ago

    Just a quick check is the otg  plugged to a powered hub with enough current? Mine was not because I needed more than 100 mA which was not provided as my picture setup showed.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to clem57

    Actually I am having a lot of trouble with my USB hub, and I'll be purchasing another one. However when I plug the ethernet into one of the Pi zero's ports and the power into the other, it still doesn't show up on the network. To be clear I plugged the ethernet straight from my router to the Pi zero and used the other port to power on the zero. With this setup I probed the network from my laptop and found no IP for the Raspberry Pi.

     

    That being said I wrote a little shell script to sleep 2m, then run the commands that you suggested I post the output of. Since I'm having trouble with the USB hub, I photographed the output of the three commands you suggested I try. They are as follows:

     

    imageimageimage

     

    A little unorthodox, I know, but it's the best I can think to do without the functional USB hub. Hopefully I'll have that new hub tomorrow or Monday.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 9 years ago in reply to Former Member

    By the way, out of curiosity, please can you paste the output of:

    ifconfig -a 

     

    For the Pi before and after you plug the second one in, and when then second pi takes over as you say.

     

    Something like:

     

    Step 1. Only Pi A connected

     

    Step 2. Plug in Pi B

     

    Step 3. wait until broken pipe and then delete from known_hosts and then reconnect

     

    Step 4.  unplug pi A

     

     

    After each step, record the following:

    ssh pi@ip_address_A

    cat /etc/hostname    (so we can see exactly which Pi you're connected to)

    ifconfig -a

     

    ssh pi@ip_address_B

    cat /etc/hostname

    ifconfig -a

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to shabaz

    Just so you know, for some reason the Pi that I'm trying to set to IP address 10.0.0.30 is for some reason getting assigned 10.0.0.31. Also I have an arris 2 in 1 modem/router, so there's no way to take my router out of the equation. But yes Clem I do have a router being used. That being said, here's all the output that you requested:

     

    The contents of /etc/network/interfaces on Pi number 1 (ssh pi@10.0.0.31 with cat /etc/hostname showing pizero1):

     

    # interfaces(5) file used by ifup(8) and ifdown(8)

     

     

    # Please note that this file is written to be used with dhcpcd

    # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

     

     

    # Include files from /etc/network/interfaces.d:

    source-directory /etc/network/interfaces.d

     

     

    auto lo

    iface lo inet loopback

     

     

    iface eth0 inet static

      address 10.0.0.30

      netmask 255.255.255.0

      network 10.0.0.0

      broadcast 10.0.0.255

      gateway 10.0.0.1

     

     

    allow-hotplug wlan0

    iface wlan0 inet manual

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

     

     

    allow-hotplug wlan1

    iface wlan1 inet manual

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

     

    The contents of /etc/network/interfaces on Pi number 2 (ssh pi@10.0.0.31 with cat /etc/hostname showing raspberrypi):

     

    # interfaces(5) file used by ifup(8) and ifdown(8)

     

     

    # Please note that this file is written to be used with dhcpcd

    # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

     

     

    # Include files from /etc/network/interfaces.d:

    source-directory /etc/network/interfaces.d

     

     

    auto lo

    iface lo inet loopback

     

     

    iface eth0 inet static

            address 10.0.0.31

            netmask 255.255.255.0

            network 10.0.0.0

            broadcast 10.0.0.255

            gateway 10.0.0.1

     

     

    allow-hotplug wlan0

    iface wlan0 inet manual

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

     

     

    allow-hotplug wlan1

    iface wlan1 inet manual

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

     

    The results of ifconfig -a with only Pi number 1 plugged in (ssh pi@10.0.0.31 with cat /etc/hostname showing pizero1):

     

    eth0      Link encap:Ethernet  HWaddr 00:e0:4c:53:44:58

              inet addr:10.0.0.31  Bcast:10.0.0.255  Mask:255.255.255.0

              inet6 addr: fe80::26a5:b629:f948:92c3/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

              RX packets:204 errors:1 dropped:1 overruns:1 frame:2

              TX packets:164 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:1000

              RX bytes:19673 (19.2 KiB)  TX bytes:23792 (23.2 KiB)

     

     

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              inet6 addr: ::1/128 Scope:Host

              UP LOOPBACK RUNNING  MTU:65536  Metric:1

              RX packets:200 errors:0 dropped:0 overruns:0 frame:0

              TX packets:200 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:0

              RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

     

    The output of ifconfig -a on Pi number 1 after plugging in Pi number 2 (ssh pi@10.0.0.31 with cat /etc/hostname showing pizero1):

     

    eth0      Link encap:Ethernet  HWaddr 00:e0:4c:53:44:58

              inet addr:10.0.0.31  Bcast:10.0.0.255  Mask:255.255.255.0

              inet6 addr: fe80::26a5:b629:f948:92c3/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

              RX packets:1134 errors:1 dropped:3 overruns:1 frame:2

              TX packets:329 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:1000

              RX bytes:96791 (94.5 KiB)  TX bytes:42976 (41.9 KiB)

     

     

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              inet6 addr: ::1/128 Scope:Host

              UP LOOPBACK RUNNING  MTU:65536  Metric:1

              RX packets:200 errors:0 dropped:0 overruns:0 frame:0

              TX packets:200 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:0

              RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

     

    The output of ifconfig -a on Pi number 2 after "taking over" with Pi number 1 still plugged in (ssh pi@10.0.0.31 with cat /etc/hostname showing raspberrypi):

     

    eth0      Link encap:Ethernet  HWaddr 00:e0:4c:53:44:58

              inet addr:10.0.0.31  Bcast:10.0.0.255  Mask:255.255.255.0

              inet6 addr: fe80::26a5:b629:f948:92c3/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

              RX packets:3566 errors:0 dropped:0 overruns:0 frame:0

              TX packets:767 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:1000

              RX bytes:239048 (233.4 KiB)  TX bytes:101124 (98.7 KiB)

     

     

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              inet6 addr: ::1/128 Scope:Host

              UP LOOPBACK RUNNING  MTU:65536  Metric:1

              RX packets:200 errors:0 dropped:0 overruns:0 frame:0

              TX packets:200 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:0

              RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

     

    The output of ifconfig -a on Pi number 2 after unplugging Pi number 1 (ssh pi@10.0.0.31 with cat /etc/hostname showing rasperrypi):

     

    eth0      Link encap:Ethernet  HWaddr 00:e0:4c:53:44:58

              inet addr:10.0.0.31  Bcast:10.0.0.255  Mask:255.255.255.0

              inet6 addr: fe80::26a5:b629:f948:92c3/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

              RX packets:3618 errors:0 dropped:0 overruns:0 frame:0

              TX packets:793 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:1000

              RX bytes:243745 (238.0 KiB)  TX bytes:105906 (103.4 KiB)

     

     

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              inet6 addr: ::1/128 Scope:Host

              UP LOOPBACK RUNNING  MTU:65536  Metric:1

              RX packets:200 errors:0 dropped:0 overruns:0 frame:0

              TX packets:200 errors:0 dropped:0 overruns:0 carrier:0

              collisions:0 txqueuelen:0

              RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

     

    A picture of my setup:

     

    image

     

    Where the source of the blue ethernet cable to the ethernet switch is coming straight from the back of the modem/router unit.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 9 years ago in reply to Former Member

    Oh my gosh, I see the problem: they all have the same mac address 00:e0:4c:53:44:58 from Amazon.com: uxcell Micro USB to RJ45 Network Card

    Which means the Chinese did not care to imprint unique ones for each adapter. I hope you can complain to where you got these.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • bwelsby
    0 bwelsby over 9 years ago in reply to Former Member

    shabaz  clem57

     

    That's strange,  eth0 on both are showing the same hardware MAC address HWaddr 00:e0:4c:53:44:58

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • bwelsby
    0 bwelsby over 9 years ago in reply to clem57

    You saw it too image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 9 years ago in reply to Former Member

    A couple of points:

    First, you've got some typo in either your description, or in your config, because you first stated 10.0.0.31 but the file says 10.0.0.30 (see red highlights here)

    Just so you know, for some reason the Pi that I'm trying to set to IP address 10.0.0.30 is for some reason getting assigned 10.0.0.31. Also I have an arris 2 in 1 modem/router, so there's no way to take my router out of the equation. But yes Clem I do have a router being used. That being said, here's all the output that you requested:

     

    The contents of /etc/network/interfaces on Pi number 1 (ssh pi@10.0.0.31 with cat /etc/hostname showing pizero1):

     

    # interfaces(5) file used by ifup(8) and ifdown(8)

     

     

    # Please note that this file is written to be used with dhcpcd

    # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

     

     

    # Include files from /etc/network/interfaces.d:

    source-directory /etc/network/interfaces.d

     

     

    auto lo

    iface lo inet loopback

     

     

    iface eth0 inet static

      address 10.0.0.30

      netmask 255.255.255.0

      network 10.0.0.0

      broadcast 10.0.0.255

      gateway 10.0.0.1

     

    Secondly, when you believe that you're connected to the second Pi by mistake, take a look at the ifconfig -a output, and examine the HW address (also known as the MAC address):

    eth0      Link encap:Ethernet  HWaddr 00:e0:4c:53:44:58

     

    According to the output that you pasted, this MAC address is identical for Pi1 and Pi 2's network interface. This is not allowed. You may have cheap devices that (incorrectly) have the same MAC address. The manufacturer ought to supply them with totally unique numbers. If they are not unique, you cannot use them on the same network.

    The driver or some utility for your network interface may have some way of programming a new MAC address, but I don't know anything about this area.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to clem57

    Wow you're right. I'll see what I can do about complaining to Amazon. They usually have excellent customer service.

     

    Thanks everybody for your help!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Problemchild
    0 Problemchild over 9 years ago in reply to clem57

    Um, yeah some rely on the fact it's unlikely that some one will have a load of these modules

    Any way before you rush off you can try setting the MAC manually which may be easier than sending the whole lot back

    Check the manuals but the command will be something like

    ifconfig eth0 hw ether <mac address>

    obviously as root

     

    set the MACs to different values and you should be OK

    Also you will need this to run each time you boot or insert the NIC

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 9 years ago in reply to Problemchild

    Problemchildis correct. Try to force the mac address read How to set the mac address from /etc/network/interfaces in Debian | YourITronics .

    When you load the network information the device should use the hwaddress. But be careful not to dupicate any address . I would change the last part from 01-ff range.

    Like:

    hwaddress ether 00:e0:4c:53:44:68 ### -> next one 00:e0:4c:53:44:78 etc.

     

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 9 years ago in reply to clem57

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • gadget.iom
    0 gadget.iom over 9 years ago in reply to clem57

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube