LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2015, 10:09 AM   #1
iFunction
Member
 
Registered: Nov 2015
Posts: 206

Rep: Reputation: Disabled
Creating a network


Good afternoon,

I have a little project here which I know many of you would think simple, but to a novice it is somewhat of a challenge.

Basically, I am trying to network 4 raspberry pi's together with one being the main server the other three being clients in effect, there will eventually be 8 of these networks. The main reason for this is so that initially it is so I can send a shutdown command from just one raspberry pi which will shutdown the other three and itself and further along down the line, I eventually want to be able to run some sort of script that will automate what comes onto the screen of each pi at differing interval of the day.

The issue I am having is that I can't find any info on how to set up a network without a router. My impression of it was that I could set up one raspberry pi as a server, connect them all together through an ethernet switch and then have the server dish out IP addresses so I just use something like 192.168.10.1-4 for each of these little networks I am setting up.

If anyone could point me in the right direction for this I would very much appreciate it.

Kind regards
iFunc
 
Old 11-30-2015, 10:35 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,316

Rep: Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878
Quote:
Originally Posted by iFunction View Post
Good afternoon,
I have a little project here which I know many of you would think simple, but to a novice it is somewhat of a challenge.

Basically, I am trying to network 4 raspberry pi's together with one being the main server the other three being clients in effect, there will eventually be 8 of these networks. The main reason for this is so that initially it is so I can send a shutdown command from just one raspberry pi which will shutdown the other three and itself and further along down the line, I eventually want to be able to run some sort of script that will automate what comes onto the screen of each pi at differing interval of the day.

The issue I am having is that I can't find any info on how to set up a network without a router. My impression of it was that I could set up one raspberry pi as a server, connect them all together through an ethernet switch and then have the server dish out IP addresses so I just use something like 192.168.10.1-4 for each of these little networks I am setting up.

If anyone could point me in the right direction for this I would very much appreciate it.
If all this is for testing purposes, and you already have all 4 Pi's on a switch by themselves, all you *SHOULD* have to do is give each one an address in the same subnet, with a valid subnet mask. The typical subnet mask would be 255.255.255.0, and your IP addresses would be fine as you stated.

The "BUT" portion of the program comes into play, when you want to talk to devices on the 192.168.10.x network from a different network. This is where routes come into play. Say you have your 4 Pi's on a little switch...fine. You should be able to ping all of the Pi's from any of the others. But if you plug that little switch into ANOTHER switch on, say, 192.168.11.x, the devices on the 11 network have no idea about the 10 network, until you tell them. Assuming a box on the 11 network is running Linux, this has a good little tutorial:
http://www.thegeekstuff.com/2012/04/route-examples/

Short answer: you need a router, period.
Longer answer: you *CAN* make one of the boxes ACT LIKE a router: http://www.tecmint.com/setup-linux-as-router/

..but do you really WANT TO? You're doing a LOT of work to replace a cheap piece of gear (which will certainly be available in a production environment, if not in test).
 
1 members found this post helpful.
Old 11-30-2015, 11:06 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,244

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
You can assign each Pi a static IP address or configure one as the DHCP server which will assign IP address to the others. If it is a standalone network nothing else is really required.

http://www.ronnutter.com/raspberry-p...g-dhcp-server/
 
1 members found this post helpful.
Old 11-30-2015, 02:35 PM   #4
iFunction
Member
 
Registered: Nov 2015
Posts: 206

Original Poster
Rep: Reputation: Disabled
Brilliant, both of you thanks for that, I shall give it a go. Basically I have 32 computer monitors to deal with in groups of 4 and they want images or video on all of them. Raspberry Pi's was all I could think of to sort out this problem, so I had the idea of networking them in groups of 4 with the idea that I only had to deal with 8 clusters instead of 32 computers. One of the reasons is that I was going to make a small ups for each cluster and have them networked with a switch, so that if the power got cut, they would see they are no longer networked and send the shutdown command and shut down safely. This would make it so that you plug em in and they boot up, and if you unplug the main power, they would just shut down.

None of the networks will be able to communicate over wifi anyway and they don't need to.

Once again, thank you that really helps

iFunc
 
Old 12-01-2015, 09:16 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,316

Rep: Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878
Quote:
Originally Posted by iFunction View Post
Brilliant, both of you thanks for that, I shall give it a go. Basically I have 32 computer monitors to deal with in groups of 4 and they want images or video on all of them. Raspberry Pi's was all I could think of to sort out this problem, so I had the idea of networking them in groups of 4 with the idea that I only had to deal with 8 clusters instead of 32 computers. One of the reasons is that I was going to make a small ups for each cluster and have them networked with a switch, so that if the power got cut, they would see they are no longer networked and send the shutdown command and shut down safely. This would make it so that you plug em in and they boot up, and if you unplug the main power, they would just shut down. None of the networks will be able to communicate over wifi anyway and they don't need to.

Once again, thank you that really helps
Based on this, I'd almost suggest shelling out a few bucks for a quad-head capable video card for a generic PC. So one system can handle 4 monitors, and it will DRASTICALLY cut down on the number of systems. From there, you're running a generic Linux system...a single UPS for each system, and install NUT:
http://www.networkupstools.org/

...to monitor/shut them all down as needed. You go from 32 systems to 8.
 
Old 12-01-2015, 06:35 PM   #6
iFunction
Member
 
Registered: Nov 2015
Posts: 206

Original Poster
Rep: Reputation: Disabled
Yes, I agree, but I look at it two fold, firstly, the company I work for won't pay any form of budget for this as it's simply a client facing smoke and mirrors, and secondly space is an issue, with raspberry pi I can install this with some Velcro and it can all just stay set up inside the unit, which I wouldn't be able to do that with even laptops and secondly I wouldn't learn nearly as much as I have already. I love the fact that with a raspberry pi, you have no choice but to dive straight into the command line. Really, who learns bash if they don't have to, it's like reading Dostoevsky really hard to get into, but very satisfying eventually. The original plan was for there to be touch screen computers but they were five times the price and the way the events are run, they are only ever going to show a picture or running times or something.

As for the UPS, I was planning to build my own, all it has to do is supply 3A at 5V for a minute, that should make it a simple plug it in and unplug it kind of system. If I can work it it must be idiot proof! See, now I have to learn scripting so I can set the networks to all shut down at the close time, I could just walk past them all at the end of the day, job done.
 
Old 12-02-2015, 10:25 AM   #7
iFunction
Member
 
Registered: Nov 2015
Posts: 206

Original Poster
Rep: Reputation: Disabled
I do however have one more question. These small clusters of raspberry pi's are not connected to any one ISP, as they are part of a touring rig. Is there a way of being able to have the server one configured in such a way that it doesn't have a static IP address? so that it can connect to the internet connection that is supplied to us?
 
Old 12-02-2015, 11:32 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,244

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
Wired or wireless?

If wired you can add a USB ethernet adapter or try an IP alias on eth0.
 
Old 12-04-2015, 01:45 AM   #9
greeder
Member
 
Registered: Sep 2014
Posts: 31

Rep: Reputation: Disabled
To deal with the internet; just get an inexpensive consumer grade wi-fi router. Get into the router's web based GUI and turn off the wi-fi component. What you are left with is a router with (usually) a 4-port LAN switch, a DHCP server to dole out ip addresses to your R-pies, and a WAN port for the internet. I recently saw a Cisco/Linksys E1500 going for $25.00 in the clearance section of the Linksys web site. That's a pretty good price for a nice bit of kit.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Creating simultaneous network connections to a VPN and local area network. Reactor89 Linux - Networking 2 06-03-2010 01:52 AM
Creating new network interface jrtayloriv Linux - Networking 5 12-12-2006 12:10 AM
Creating a network blkmage Linux - Networking 3 05-15-2005 11:11 AM
creating X.25 network how? mchitrakar Linux - Networking 0 05-12-2004 04:37 AM
creating a network ?? neon Linux - Newbie 19 08-25-2003 06:15 AM


All times are GMT -5. The time now is 01:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration