squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Pi as "network" (not sure what to say here)

Mon Nov 07, 2016 9:05 pm

Due to economic concerns after a hospital stay I need to cut my cable's broadband internet. I currently have a wireless printer and would like to be able to access it using wireless from my 2 computers. I followed some instructions on the net a few months ago and made a wifi range extender with a Pi so I was wondering if there is someway the Pi can be - and I don't know if this is what you call it or not - a network controller. Basically I'd like the Pi to supply a wireless network just for local use (obviously no internet) so my computers and my printer can all talk to each other. It would be great if I could also use the same Pi as a samba server but I already have one set up for that, so if I can get some kind of "local" network built around the Pi that would be great.

I'm not sure of any terminology or even how things are supposed to work so forgive me if this a dumb question.

Thanks!

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Pi as "network" (not sure what to say here)

Mon Nov 07, 2016 9:31 pm

Google wireless router, "AP mode", and "master mode". There are posts on setting up a Raspberry Pi as a wireless router. I tried and ended up buying a Wifi router for less than the cost of a Pi + Wifi.

Linux makes wired Ethernet easy. Ethernet to Wifi is a little more difficult. Wifi to Wifi another slight step up. In my case I wanted the Pi to connect to the Internet and route to the Internet, something that was way too difficult.

You have an access point working. I presume you used a Pi 3. The Pi 3 Wifi appears to work for everything within a limited range. Many of the plug in adapters do not have the right features. I needed range for my Pi router but could not find an adapter with the range and AP mode.

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Tue Nov 08, 2016 4:06 am

Thanks for the reply. So, lacking any real knowledge in this, I'm assuming that by creating the access point creates a "local" network and that since DNS is handled in that access point I will have a working network. I assume the only difference on the extender was that I was forwarding traffic to/from that access point and my internet connection. So, is it really that simple? Set up a Pi as an access point and then the printer, my PC's and my server can all "talk" on that local network without any need for a route to the internet?

Thanks again!

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Pi as "network" (not sure what to say here)

Tue Nov 08, 2016 5:02 am

squakie wrote:So, is it really that simple? Set up a Pi as an access point and then the printer, my PC's and my server can all "talk" on that local network without any need for a route to the internet?
People had networks long before they were generally allowed on the internet. In fact, many and probably most people who connected to the internet did so by dialling in and getting a unix command line.

But how is all your hardware hooked up right now? If you have a wifi router and cable modem combination, do you own it? It might be and probably is possible to just leave it hooked up, turn off the connection to the internet by telling them you don't want it on anymore and just leaving everything the way it is. Now that's simple.

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Tue Nov 08, 2016 5:27 am

Unfortunately I don't own the router. However, I can do the Pi as access point thing quite quickly I think. Thanks again to everyone!

castletonroad
Posts: 135
Joined: Sat Jul 25, 2015 11:23 pm

Re: Pi as "network" (not sure what to say here)

Tue Nov 08, 2016 10:13 am

I used this link to set up my Pi3 as a WiFI AP:
http://raspberrypihq.com/how-to-turn-a- ... fi-router/

Note, part of the tutorial states:
The last step in configuring the DHCP server is to configure a static ip address for the wireless network adapter. This is done in the file /etc/network/interfaces – before opening it make sure the WLAN interface is down. Do this with the following commands:
If you're using Raspbian Jessie, you'll need to comment out the wlan0 entry in /etc/dhcpcd.conf
Raspberry Pi 4 Model B | Raspberry Pi 3 Model B | Raspberry Pi 2 Model B

JMK8
Posts: 42
Joined: Tue Apr 28, 2015 10:00 am

Re: Pi as "network" (not sure what to say here)

Tue Nov 08, 2016 2:28 pm

I used DietPi to create a WAP some time ago - and it still runs flawlessly. It must have taken me all of 10 minutes to set it up and get it running - although I cannot remember the details. Try searching for DietPi on this forum.

tweak42
Posts: 531
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Pi as "network" (not sure what to say here)

Wed Nov 09, 2016 2:27 am

squakie wrote:Due to economic concerns after a hospital stay I need to cut my cable's broadband internet. I currently have a wireless printer and would like to be able to access it using wireless from my 2 computers. I followed some instructions on the net a few months ago and made a wifi range extender with a Pi so I was wondering if there is someway the Pi can be - and I don't know if this is what you call it or not - a network controller. Basically I'd like the Pi to supply a wireless network just for local use (obviously no internet) so my computers and my printer can all talk to each other. It would be great if I could also use the same Pi as a samba server but I already have one set up for that, so if I can get some kind of "local" network built around the Pi that would be great.

I'm not sure of any terminology or even how things are supposed to work so forgive me if this a dumb question.

Thanks!
Basic hardware terminology:
These devices are typically rolled into a single combo unit that you rent from the cable company for convenience, but can be made separate.
  • Cable modem - device that translates wired ethernet traffic to signals on coax cable
  • Router - device that manages/firewalls traffic connecting separate networks (typically home to cable company)
  • Access point - device is a master connection point for wireless traffic and can covert it to wired traffic
Software terminology:
These are typically associated with the Router configuration.
  • DNS - needed to translate internet URL names to IP addresses
  • DHCP - issues IP address leases to devices based on MAC address
  • MAC address - the permanent hardware address burned into the chip of network capable devices
So at the minimum you require an AP for your wireless devices to connect to and with DHCP server to issue them addresses. The Pi 3 wifi can be configured to AP mode.

Guides written specifically for the Pi 3:
https://frillip.com/using-your-raspberr ... h-hostapd/
http://www.raspberryconnect.com/network ... o-internet
https://gist.github.com/Lewiscowles1986 ... 5b2029c390

General all around guide with additional instructions for the Pi 3.
http://elinux.org/RPI-Wireless-Hotspot

The above mentioned DietPi hotspot. Note: I don't think this includes dhcp server, it can be installed and configured manually.
http://dietpi.com/phpbb/viewtopic.php?f ... 1207#p1207

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Wed Nov 09, 2016 4:20 am

Great - thanks! Basically it would be the same as the wifi extender I did but without the connection defined for wlan0. I seem to remember that the way the network is defined in Jessie is different than before but I also thought it still required an entry for a DNS server. Am I remembering correctly or can I just define it without DNS?

tweak42
Posts: 531
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Pi as "network" (not sure what to say here)

Thu Nov 10, 2016 4:35 am

squakie wrote:Great - thanks! Basically it would be the same as the wifi extender I did but without the connection defined for wlan0. I seem to remember that the way the network is defined in Jessie is different than before but I also thought it still required an entry for a DNS server. Am I remembering correctly or can I just define it without DNS?
DNS would be needed for internet access. It translates the URL you type into your web browsers (among others) to IP addresses.
It's not quite like your wifi extender because you require your own dhcp server. Formerly you were using the dns and dhcp from your cable company equipment.

The car analogy:
wifi AP/extender would give you blank roads
dhcp allocates where lanes and addresses
dns is the lookup address directory

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Thu Nov 10, 2016 3:07 pm

Thanks! I'm glad you mentioned DHCP as after reading that I do remember I had to set that up for the "extended" portion of the range extender - basically 1 net coming in and another going out with bridging. I guess I didn't have to set up DNS before as I do remember having to define the DNS servers as those on the broadband already. If I remember correctly Domain Name Server is what has the tables, or request over the net for unknowns, of domain names and their corresponding IP addresses and since everything is going to be on a local net that is why I don't need it? If I was going to mess around and try out some of the tools (again no idea what they are called, etc.) to set up documentation, etc., in web page format would I need my own local DNS to be able to access that from the server on my computers?

I'm getting ready to set this up. Network as access point with DHCP. Everything on the net will get it's IP address via DHCP on the Pi and everything will be visible on the net as far as my server, media center, computers and printer go. Exactly what I needed! Thanks so much!

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Pi as "network" (not sure what to say here)

Fri Nov 11, 2016 9:09 pm

For a small network, you can bypass DNS, DHCP. Give each machine a static IP address. Place the domain names and addresses in /etc/hosts on every machine. Any two machines on your network can communicate without DNS or DHCP.

This also has the advantage that any two machines can connect with one Ethernet cable, something I use for diagnostics, reconfiguration, backup, and when working in the car or on the beach.

User avatar
pi-anazazi
Posts: 716
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Pi as "network" (not sure what to say here)

Sat Nov 12, 2016 4:17 pm

Hi!

For raspi 1B (only! currently, should work with 2B from 2017...) there is a full router software available:

https://forum.opnsense.org/index.php?to ... 1#msg13161

..providing DNS, DHCP, etc. all with a modern GUI to configure via your browser on the LAN interface.

Just tried it with a cheap USB-RJ45 as WAN interface and did some surfing.

Raspi as a router based on FreeBSD! Very nice... :-D
Kind regards

anazazi

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Mon Nov 28, 2016 3:47 am

Sorry so late get back here. I've been out with a bad case of pneumonia. My broadband and any internet connection are gone from my apartment now. The only net access I have is on the shared computer for all of us in our senior's apartment building.

I basically need to have some way to do the following:
:-----------------------------:
pi media center -----------(wired)--------------------------------------------------: :
: Ethernet switch :
Linux desktop -------------(wired)--------------------------------------------------: :
: :
Pi "server" (Jessie with just some SMB shares) -----(wired)--------------: :
:-----------------------------:

I need those 3 devices to be able to see each other on a hard-wired local network.

In addition:

wireless printer --{{{{{{{{{{{{{{{{{{{{{{{
{ {
{ {
wireless laptops --{ local "cloud" {
wireless tablets --{ { All these devices need to "see" each other an
{ { via bridging "see" the hard-wired network. The
{ { wireless "cloud" would be from an access point
wireless phones --{ { on the desktop using a wireless adapter
{ {
{{{{{{{{{{{{{{{{{{{{{{{{

So the "cloud" portion would come from what I set up making a wireless extender. I know it had dhcp setup to allocate ip addresses to the devices connecting from the local "cloud". I know how to bridge that access point to the wired network. But this is a big "don't know" - how/can I also setup dhcp on the eth0 wired network or perhaps gain the dchp services via some sort of link the the wireless access point?

I need to get this all working first, then I'll start another thread for something else I need to do.

So, the final BIG question: I only have internet access now via a Windows 10 PC that is shared by everyone in my senior's (that's age ;) ) apartment building. How do I know what packages I need and how can I get them downloaded via the Windows PC then installed "off-line" to the Pi's?

Thanks!

tweak42
Posts: 531
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Pi as "network" (not sure what to say here)

Tue Nov 29, 2016 4:54 am

I get that you are on a budget, but is there no way to procure an old 802.11g wifi router? They've been around for over 10 years now, and many are just tossed in the recycle trash but still work. You don't have your location in your profile, but where I am, thrift shops, second hand stores, craigslist as well as computer clubs are a source for old equipment. Finding a old wifi router for free or less than $20 is pretty common.

If you can get a wifi router, you could possibly haul part of your setup down to the shared Windows computer and hijack it's ethernet connection temporarily and get everything configured running.

Also is there free wifi nearby? Long range usb wifi adapters exist that can pull in signals that your regular wifi adapters can't even see.

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Fri Dec 02, 2016 1:36 am

Right now I have the Pi's as well as a separate Linux desktop I could use for the functions I want. Setting up a wireless access point on the Linux desktop is simple. The wired connection however is not seen and I don't know how to bridge to a network I can't see. Right now I really can't afford the $20 or so for a used router (here in North Dakota they are going in the $35 range).

No internet to hijack here. The community PC is wireless to the managers office and everything in Windows 10 regarding that connection is locked away since the only account we get access to is a non-administrator account and we don't know what password the manager may have set on the administrator account. I have no way of knowing the wireless password.

No local "free" internet sites - all of the them need a wpa2 key/passphrase to get on.

Is there no way to do this on a Pi? I want to have dhcp running on the eth0 interface so the other wired devices can get their IP addresses and be managed. I know I can set the wifi access point - wlan0 - to use dhcp from the eth0 interface. I also want any given node to know any other node's name - server1, mediacenter3, etc.. I guess I don't have a clue about this because it seems like something that should be that hard - all kinds of companies have intranets for years.

tweak42
Posts: 531
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Pi as "network" (not sure what to say here)

Fri Dec 02, 2016 3:34 am

squakie wrote:Right now I have the Pi's as well as a separate Linux desktop I could use for the functions I want. Setting up a wireless access point on the Linux desktop is simple. The wired connection however is not seen and I don't know how to bridge to a network I can't see. Right now I really can't afford the $20 or so for a used router (here in North Dakota they are going in the $35 range).

No internet to hijack here. The community PC is wireless to the managers office and everything in Windows 10 regarding that connection is locked away since the only account we get access to is a non-administrator account and we don't know what password the manager may have set on the administrator account. I have no way of knowing the wireless password.

No local "free" internet sites - all of the them need a wpa2 key/passphrase to get on.

Is there no way to do this on a Pi? I want to have dhcp running on the eth0 interface so the other wired devices can get their IP addresses and be managed. I know I can set the wifi access point - wlan0 - to use dhcp from the eth0 interface. I also want any given node to know any other node's name - server1, mediacenter3, etc.. I guess I don't have a clue about this because it seems like something that should be that hard - all kinds of companies have intranets for years.
It's definitely possible to do on a Pi, but all the instructions I can find require an internet connection to download and configure packages after the initial SD card image. Hence if you can take your Pi somewhere where there is internet (or borrow a smartphone wifi hotspot) you can download and configure the packages.

After some searching, DietPi might work for your situation without needing additional downloads. According to Fourdee https://github.com/Fourdee/DietPi/issues/78 the wifi hotspot package includes a dhcp server. You could try asking either on the dietpi forum or in the dietpi thread here: viewtopic.php?f=63&t=100976

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Mon Dec 12, 2016 9:55 pm

Thank you! Going to give that a try!

james-at-lo-tech
Posts: 45
Joined: Sat Oct 04, 2014 1:07 pm

Re: Pi as "network" (not sure what to say here)

Mon Dec 12, 2016 10:05 pm

It might be cheaper and easier to get something like a TP Link WN702N. If you feel like you need more control, though it will do everything needed out the box, it can also run Open WRT.

squakie
Posts: 79
Joined: Fri Jul 26, 2013 8:55 pm

Re: Pi as "network" (not sure what to say here)

Tue Jan 24, 2017 8:41 pm

Tried using an old B/G wireless router I picked up at a thrift store. Worked great for what I needed until I added a Lenovo IdeaCentre stick computer to the mix - then transfers slowed and if doing it on the IdeaCentre stick it would freeze. Tried many things to get around this but to no avail. Reading on the net it appears this is a problem for the wireless adapter built-in to the IdeaCentre. I ended up buying a new router than does more and everything works now.

Return to “Beginners”