ewleonardspock
Posts: 3
Joined: Wed Jan 23, 2013 10:00 pm

(Question) Using Raspberry Pi to share internet connection

Wed Jan 23, 2013 10:07 pm

I just recently received my Raspberry Pi in the mail and I am trying to set it up to share an internet connection. I am currently a college student and there is only one port per person in the dorm rooms and no WiFi. We aren't allowed to plug routers into the network, only computers, etc. I am currently getting WiFi from my MacBook Pro which is connected and sharing. I suppose, what I'm getting at is, how would I go about connecting the Raspberry Pi to the university network with en0 and then sharing that connection to an external USB ethernet device? This is the USB ethernet adapter I currently have: http://www.amazon.com/HP-Essentials-Rep ... replicator .

Any help would be much appreciated,



Eric

User avatar
Jim JKla
Posts: 2219
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: (Question) Using Raspberry Pi to share internet connecti

Thu Jan 24, 2013 12:24 am

You may end up with issues of plugging the RPi into your University network but it is possible to piggy back the RPi on to your MAC I can't help with the detail the MAC lies outside my comfort zone.

On a technicality the RPi connects to your MAC not the network. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

ewleonardspock
Posts: 3
Joined: Wed Jan 23, 2013 10:00 pm

Re: (Question) Using Raspberry Pi to share internet connecti

Thu Jan 24, 2013 3:59 am

I have no problem connecting it to the network, I'm trying to get it so that it shares the connection from en0 to an external ethernet adapter. Essentially, I want other devices to be able to piggy-back off of the Raspberry Pi.

User avatar
Jim JKla
Posts: 2219
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: (Question) Using Raspberry Pi to share internet connecti

Thu Jan 24, 2013 7:56 am

Heres some ideas as speculation.

The normal method with a PC would be to fit another network card and normally with the RPi you could do that with a wireless connection As you have allready said wireless is not an option a simple method could be to use a USB to ethernet device of this type

http://www.maplin.co.uk/gigabit-usb-2.0 ... tor-350301

then an unmanaged switch http://www.maplin.co.uk/netgear-8-port- ... tch-222456 on to that.

Of course it may be easier to just plug your unmanaged switch into your Uni connection.

It does sound like you want the RPi to behave just like an unmanaged switch. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

ewleonardspock
Posts: 3
Joined: Wed Jan 23, 2013 10:00 pm

Re: (Question) Using Raspberry Pi to share internet connecti

Fri Jan 25, 2013 12:16 am

Yep, that's what I'm trying to do. I already have a USB ethernet device ( I put a link in the original post), and it seems like the Raspberry Pi recognizes it (because it shows a second device with a different MAC address when it is connected) but it doesn't seem to be able to connect to the network through the USB ethernet so I'm still trying to figure that out.

As for the unmanaged switch, I actually already have a Netgear 24-port 10/100 ethernet switch. Unfortunately, we aren't allowed to connect any such thing to the Longwood network (no routers, switches, hubs, etc.) they were quite explicit about that. And their hardware it too smart anyway (I tried connecting it once as a proof of concept and once I plugged the second device into it the switch in my dorm shut down the ports in my room for a few minutes).

I'll have to look into a different USB ethernet device because this one might not be compatible.

Even if it were, I'm still not entirely sure how to go about bridging the connection.

I have attached a photo of my current setup. As you can see, I want the Raspberry Pi to replace the MacBook Pro.

EDIT:

It wouldn't let me upload the picture so I just posted it to my website: http://ewleonardspock.wordpress.com/other/raspberry-pi/

User avatar
Jim JKla
Posts: 2219
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: (Question) Using Raspberry Pi to share internet connecti

Fri Jan 25, 2013 8:24 am

I suspect you will have issues with the RPi I fear it may not be sophisticated enough to fool the network all it would be doing is mimicking an unmanaged hub. It does sound like your Mac is effectively running an Intranet where it takes anything from a second device and packages it as it's own.

The RPi should be capable of the same but actually how to set this up will take some research. Your MAC will also have a lot more processing resources to throw at the problem.

Do the rules explicitly restrict "Wireless Routers" I presume If it is specifically restricted to routers then you could connect your RPi to the port and use a wifi n150 to communicate with equipment in your room.

It does sound like it's an effort to restrict bandwidth use.

While your efforts to circumnavigate this restriction could be seen as tying to subvert the policy I would consider the policy a little short sighted on their part unfortunately my support is of little help to you.

I would recommend caution in your experiments. University politics can end up being convoluted at best.

I would however investigate one of these http://www.maplin.co.uk/gigabit-usb-2.0 ... tor-350301 if you could borrow one for experimentation connect your RPi to the wall port with the ethernet and your unmanaged hub to this USB Ethernet adaptor. I suspect you are going to get a bandwidth restricted by the USB and your probably going to need a USB Hub with a fairly meaty power supply although you could drop the load if you were planning on running the RPi headless (No keyboard or mouse using ssh).

Here I would see the RPi acting as a filter between the wall port and your unmanaged hub as the Uni network would only see the one MAC address provided the RPi has some sort of firewall.

While there has to be a solution if you are able to do this with the MAC a description of your MAC solution could be useful. It will probably be gibberish to me but we may get someone who can help (I am Windows XP Linux).

I have to emphasise caution again the University may see this as attempted breach of policy. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

CarsnGadgets
Posts: 25
Joined: Sun Jan 06, 2013 5:34 pm
Location: Dorset UK

Re: (Question) Using Raspberry Pi to share internet connecti

Fri Jan 25, 2013 2:22 pm

not really the solution that your after,

but if you are just looking to have simultaneous internet on your laptop and pi, if you own a mifi type device http://en.wikipedia.org/wiki/MiFi or an android phone, you can create your own wifi hotspot and then use that to connect one of your devices to the net. Useful if your only after web access for a quick apt-get or something?

I have a Edimax EW-7811UN Wireless 802.11b/g/n 150Mbps Nano USB Adaptor connected to my pi and it works perfectly.

http://www.amazon.co.uk/Edimax-EW-7811U ... 540&sr=8-2
do, or do not, there is no try!

Return to “Networking and servers”