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 5434 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
  • shabaz
    0 shabaz over 9 years ago in reply to Former Member

    That is normal, because most likely your home network is something like 192.168.0.x or 192.168.1.x and you can't connect something with 10.0.0.x to it (assuming you're plugging into the switch-ports on the back of your router).

    Something else is setting this (your /etc/network/interfaces file is set up to allow this), what do you observe if you use the desktop GUI to access the wireless network settings?

     

    Also, by the way, this is quite an inefficient way to perform parallel processing (anything else would be cheaper, even a single Pi 3 with 4 x Pi 3 cores are cheaper than 4 x (Pi zero+USB-Eth+SDcard), and

    better performing, but I'm guessing there is reasons for it.

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

    He is trying to test distributed code out before moving to a bigger environment.

    Clem

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

    Out of interest, doesn't this set up cater for a manual interface setup?

    If you are just issuing a "dhcpd" then I would assume it uses this conf file to check  what it needs to do which isn't a lot.

    I would initially try forcing it using dhcpd<interface> ....."dhcpd eth0" in t his case

    if not use ifconfig to set up eth0 manually and put it on the same network as the working RPI then see if you can at least ping that !

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

    Yes you are right Shabaz... That said if you want to do something like  this you would be better off spinning up a few VM's on your Laptop or what ever than getting all the Zeros involved and thus saving you the Networking costs if y  ou are trying to save cash

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

    Yes the reason that I'm doing things this way is because I already had the raspberry Pi's laying around, and have gotten into a little trouble "wasting resources" on the university cluster with trying to test my distributed code. All I had to purchase that I didn't already own for this were the Ethernet to Micro USB connectors. This project won't be doing any real "hefty" computation, I'm just hoping to test code on it so I no longer upset the people who run my university's cluster.

    • 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 Problemchild

    Using your suggestions I was able to ssh into the Pi zero's. However, now that I'm able to ssh into them, I decided to try using my ethernet switch that has been laying around in my box of toys to get them all on the network. For some reason they are all being assigned the same IP address. I tried editing the /etc/network/interfaces file to manually assign different static IP addresses, but they are still all being assigned the IP address defined in /etc/network/interfaces of whichever Pi I boot first. When I'm ssh'ed into a Pi, after a few seconds I get an error message saying "Broken Pipe." I have to remove the IP address from my list of known hosts, and then I can ssh into a Pi zero again, but when I go back in it is often a different Pi zero. It seems that they are fighting for the IP address, even though they are different machines being connected from separate ports of the ethernet switch at the same time.

     

    For reference this is what I put in the /etc/network/interfaces file

     

    iface eth0 inet static

         address 10.0.0.XX

         netmask 255.255.255.0

         network 10.0.0.0

         broadcast 10.0.0.255

         gateway 10.0.0.1

    • 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

    The Ethernet port is at the lower level(physical) and has not relation to IP address(at the TC/IP layer). See https://en.wikibooks.org/wiki/A-level_Computing/AQA/Computer_Components,_The_Stored_Program_Concept_and_the_Internet/Str…  &  https://en.wikipedia.org/wiki/OSI_model to understand.

    Clem

    • 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

    This doesn't make sense unfortunately.

    Get a single one working. No point experimenting with all 4 while you still have issues with a single one.

    Once you're at the stage that you can successfully use a single Pi plugged into your switch, then work on the second one.

     

    By "successfully use a single Pi" I mean you need to confirm that you can SSH into your Pi using your chosen IP address, see no unexpected behaviour like the broken pipe and see no issues with power supply fails/unintended reboots etc.

    Once all that works, add a second Pi, and take typical prudent engineering steps like using a separate power supply, confirming both function before adding a third, etc. After it all works, you can optimise to reduce supplies, etc.

    • 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 shabaz

    I should have been more specific in my last post. That is exactly what I'm doing. With any single pi plugged in I can successfully ssh into the Pi and stay logged in as long as I please. There are no reboots, and no "Broken Pipe" error messages. When I plug in a second Pi with a separate power source, it gets assigned the same IP address as the Pi that was already active and I had already been ssh'ed into. When the second Pi gets plugged in and assigned the same IP address as the first Pi, I get kicked out of ssh with the "Broken Pipe" error message, and when I attempt to ssh back in I get this message:

     

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

    Someone could be eavesdropping on you right now (man-in-the-middle attack)!

    It is also possible that a host key has just been changed.

    The fingerprint for the ECDSA key sent by the remote host is

    SHA256:Zl9WWVSRwUpIGG0k+y7I6nMUTL7/DUviVuYdiW3kGy0.

    Please contact your system administrator.

    Add correct host key in /home/william/.ssh/known_hosts to get rid of this message.

    Offending ECDSA key in /home/william/.ssh/known_hosts:9

      remove with:

      ssh-keygen -f "/home/william/.ssh/known_hosts" -R 10.0.0.31

    ECDSA host key for 10.0.0.31 has changed and you have requested strict checking.

    Host key verification failed.

     

     

    After seeing this error message I remove 10.0.0.31 from my known hosts and try to ssh to the same IP. After deleting this from the known hosts and using the same IP for ssh, I can successfully access a Pi again but it's the second Pi that was plugged in. With both of them connected, I can't stay logged into either Pi very long, before I get kicked out by the "Broken Pipe" error message. Every time I get the broken pipe message I see the same "REMOTE HOST IDENTIFICATION HAS CHANGED" error message, and it alternates which Pi I can access by using "ssh pi@10.0.0.31"

    • 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

    Are you assigning a different ip address for each of the Pi's? If you clone them, then you must change each one before a reboot.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<>
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