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 ad hoc Netzwerk mit Raspberry Pi Model B
  • 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
  • Replies 17 replies
  • Subscribers 664 subscribers
  • Views 1946 views
  • Users 0 members are here
  • adhoc
  • raspberry
  • arp
  • routing
  • manet
Related

ad hoc Netzwerk mit Raspberry Pi Model B

Former Member
Former Member over 10 years ago

Hallo

 

Ich versuche ein Ad-hoc Meshnetz mittels 4 Raspberry Pi's Model B aufzubauen. Hier sind die Hardware Eigenschaften:

  • 4x Raspberry Pi Model B ( Raspbian Debian Wheezy 3.18)
  • 4x Edimax EW-7811Un USB WiFi Adapter (RTL8188cus)
  • 1x Laptop mit Win 8.1 um auf die RPi's über SSH (PuTTY) zuzugreifen

 

 

ich habe die RPi Netzwerkeinstellungen wie folgend konfiguriert:

/etc/network/interfaces

RPi1

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.21
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc

 

RPi2

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.22
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc

 

RPi3

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.23
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc

 

RPi4

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.24
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc

 

Laptop

IP: 192.168.1.20
Subnet: 255.255.255.0
Mode: Ad-hoc

 


Das pingen vom Laptop --> RPi's funktioniert

C:\> ping 192.168.1.21

Ping wird ausgeführt für 192.168.1.21 mit 32 Bytes Daten:
Antwort von 192.168.1.21: Bytes=32 Zeit=1ms TTL=64
Antwort von 192.168.1.21: Bytes=32 Zeit=1ms TTL=64
Antwort von 192.168.1.21: Bytes=32 Zeit=2ms TTL=64
Antwort von 192.168.1.21: Bytes=32 Zeit=1ms TTL=64

Ping-Statistik für 192.168.1.21:
    Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0
    (0% Verlust),
Ca. Zeitangaben in Millisek.:
    Minimum = 1ms, Maximum = 2ms, Mittelwert = 1ms

 

das Pingen vom RPi --> Laptop funktioniert auch

pi@rpi1 ~ $ ping 192.168.1.20
PING 192.168.1.20 (192.168.1.20) 56(84) bytes of data.
64 bytes from 192.168.1.20: icmp_req=1 ttl=128 time=1.37 ms
64 bytes from 192.168.1.20: icmp_req=2 ttl=128 time=1.24 ms
64 bytes from 192.168.1.20: icmp_req=3 ttl=128 time=1.25 ms
64 bytes from 192.168.1.20: icmp_req=4 ttl=128 time=15.6 ms
64 bytes from 192.168.1.20: icmp_req=5 ttl=128 time=1.42 ms
64 bytes from 192.168.1.20: icmp_req=6 ttl=128 time=1.28 ms
^C
--- 192.168.1.20 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 1.242/3.710/15.683/5.354 ms

 

Das Problem ist, dass ich von einem RPi zum anderen nicht direkt pingen kann.

pi@rpi1 ~ $ ping 192.168.1.22
PING 192.168.1.22 (192.168.1.22) 56(84) bytes of data.
From 192.168.1.21 icmp_seq=1 Destination Host Unreachable
From 192.168.1.21 icmp_seq=2 Destination Host Unreachable
From 192.168.1.21 icmp_seq=3 Destination Host Unreachable
From 192.168.1.21 icmp_seq=4 Destination Host Unreachable
From 192.168.1.21 icmp_seq=5 Destination Host Unreachable
From 192.168.1.21 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.1.22 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6004ms
pipe 3

 

Hat jemand vielleicht eine Idee wie ich die RPi's mit einander zu kommunizieren bringen könnte? vielen dank im voraus


Attachments:
image
  • Sign in to reply
  • Cancel
Parents
  • clem57
    clem57 over 10 years ago

    Add to each RPi:

    gateway: 192.168.1.20

    Now that will work.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to clem57

    The reason is routing in TCP/IP is two way and you are missing the return path because the Pi's do not know. Silly this is. But that is the rules of the protocol.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • clem57
    clem57 over 10 years ago in reply to clem57

    The reason is routing in TCP/IP is two way and you are missing the return path because the Pi's do not know. Silly this is. But that is the rules of the protocol.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 10 years ago in reply to clem57

    Sorry to ask again. Does that mean that it wouldn't be possible to get a MANET working with RPis ?

    what if I used a routing protocol (OLSR, B.A.T.M.A.N. or Babel) ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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