Routing, gating


10 posts
by thexeno » Mon Jan 07, 2013 1:26 pm
Hi,
In these days i'm out of home and i use an internet key for browsing.
I've bring with me the rasp and i'd like to share the internet connection with it.

This is a general network problem, not necessary related to raspberry it self.

I'd like to share the internet connection (an internet key it,s a dial up connection type, under windows) thru my ethernet cable so that rasp can use it.
I've found some tutorials about sharing the cnnection with two eth interfaces, but only using linux. In my case I need to configure a pc running windows 7 and the rasp (linux).
Without using the internet key, i can share my connection using a second router in gated mode, but this stop the internet access from my pc. The same thing with internet key is not possible in this way under windows, and i'm stucked and now the rasp has not an internet access.

I think that is not a difficult thing to do, with a pc and one router (not connected to the internet) available for experimenting. But i don't know how, and google seems to be my enemy this time :D

Thanks in advantage!
Posts: 62
Joined: Thu Jan 03, 2013 1:23 am
by Jim JKla » Mon Jan 07, 2013 1:47 pm
The Keyword here is BRIDGE

There is a trick where you can use your PC as a bridge all you need is two network connections on your PC now this becomes easy if you are using a USB conection for your Internet connection on the PC because you probably have a network connection as well.

When you say an internet key do you mean a USB dongle that connects to the internet using the mobilephone network.

In the past could connect two computers using an Ethernet 10BaseT crossover cable these days connection auto senses and does that automatically.

What you want to be looking for is information on using either your Windows7 as a bridge or a router as a bridge.

A bridge is any equipment that connects two networks.

In the scenario above the USB dongla end the mobile phone network are one and the Network interfaces (10BaseT rj45) on your RPi and Windows7 represent the other and the PC acts as a bridge between them.

If you were using a direct connection to a cable modem using your network connection on the Windows7 you could make it into a bridge by adding a second network card. ;)

Yes it is posible to have multiple network cards.
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
User avatar
Posts: 2195
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by pksato » Mon Jan 07, 2013 2:08 pm
Check here how to share a connection.
http://windows.microsoft.com/en-US/wind ... on-Sharing

Bridge is a another kind of sharing (it is for pure Ethernet connection), but not apply on this case.
Posts: 117
Joined: Fri Aug 03, 2012 5:25 pm
by Jim JKla » Mon Jan 07, 2013 2:24 pm
I stand corrected no doubt the the principle remains and the term should help. ;)
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
User avatar
Posts: 2195
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by thexeno » Mon Jan 07, 2013 5:40 pm
I tried the ICS method. I used it to share a kind of lame wifi ( suddenly i used an external program to share this, but basically it does the same).
But with an eth, i need a router gateway (i've this one) not connected to the internet (because i don't have any cable connection). I'll try better this part in these days, last time the gating pc wasn,t able to connect it to the internet, but the rasp does.
If i remember well, i was able even to connect dirctly the rasp to the eth of the pc, something like Jim was talking about, if i understand. But i don't know what the rasp IP is when it's connected, then i'm not able to use an ssh connection. Am I missing something? :ugeek:
Posts: 62
Joined: Thu Jan 03, 2013 1:23 am
by Jim JKla » Mon Jan 07, 2013 9:57 pm
Normally I would interrogate the router to find the IP but you know what your using google that and default IP and you may just pick up an answer ;)

Tell us how you get onit could help someone else.
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
User avatar
Posts: 2195
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by thexeno » Fri Jan 11, 2013 12:53 am
For the internet access I solved setting an ICS in Windows, sharing my LAN2 (which is the network created by the USB Dongle 3G). After that Windows has automatically assigned the IP 192.168.137.1 to my LAN (which is my real LAN port), on Rasp I wrote
Code: Select all
sudo dhclient -v eth0
and both PCs has the internet connection.

BUT if I disconnect the LAN cable, I've to rewrite the command. And I don't know why.

OT: After that, I'd like to set a full network. Even unsecured (the security does not come first :D). But for that, I need some little help: I've tried one time, one day, to use and configure samba. I've even did that work: but I'm completely less on theory, I don't want to set some random numbers... On the other side, I can't share any directory from windows.
Posts: 62
Joined: Thu Jan 03, 2013 1:23 am
by W. H. Heydt » Fri Jan 11, 2013 2:47 am
Jim JKla wrote:A bridge is any equipment that connects two networks.


Making a couple of finer distinctions...

A "bridge" connects two networks and echos packets on each network to the other network. (It's a fairly *stupid* connection.)

A "router" only copies packets to the other network (either direction) if they are not local to the incoming network. (Does what a bridge does, but in a much smarter way).

Likewise, a "hub" echoes all packets to all ports, while a "switch" only send packets to the port that leads to the destination device. Thus, a switch is a smart hub.

The general thing to keep track of is:

Routers are to bridges as switches are to hubs.

Nearly all SOHO "routers" are a router combined with a switch. (That's why the LAN side has multiple connectors.)
Posts: 1550
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by Jim JKla » Fri Jan 11, 2013 7:18 am
Which to a noob is going to be totall gobbledygook gibberish :D

Don't take it as a criticism I am just pointing out that to the Noob end of our community sometimes all you need to know is if you do a particular set of actions it works and if you think of it this way you are more likely to remember it.

It's like Gigaabytes in a computer memory is Engine capacity in a van and Gigabytes on the drive is the capacity of the box on the back of the van. ;)
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
User avatar
Posts: 2195
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by thexeno » Sat Jan 12, 2013 4:30 pm
Well, IMHO if we can combine asnwers of Heydt and summarise them as Jim do, everything is better for the noob and anyone who want to know a little more. So, thanks to both.

Btw, I still wondering if someone has a little help for networks (under an academic point of view, not professional at all). Maybe I only need to search with more emphasis :D
Posts: 62
Joined: Thu Jan 03, 2013 1:23 am