LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Connecting 3 systems to a network through 1 node (https://www.linuxquestions.org/questions/linux-networking-3/connecting-3-systems-to-a-network-through-1-node-427309/)

arjun_sh 03-22-2006 10:37 AM

Connecting 3 systems to a network through 1 node
 
Me and my 2 roommates now share a single connection to our college intranet, since two of the connections got damaged. However two of us have notebooks with wireless _and_ wired NICs. So to get around this problem, I am hoping to set up a sort of _chain_ of this sort:

[Desktop|eth0]-[eth0|NotebookA|eth1]-[eth1|NotebookB|eth0]-[LAN]

"eth0"s are wired NICs, and "eth1"s are wireless.

The requirement is that the whole connection should be transparent to the indirectly connected systems, so that packets to their _global_ IP (global IPs in the sense that computers on the college intranet know them by these IPs, which would be IPs belonging to the subnet to which all the college intranet's computers belong) reach them.

It is not possible to set NotebookB as a gateway between our 'chain' and the college intranet.

How do I go about this?

Darin 03-22-2006 01:06 PM

Solution: buy a cheap switch (or hub) and plug all the systems into it. If you need wireless because systems can't be reached with wires, buy a wireless "router" but turn off it's DHCP server and plug the college LAN connection into a normal port instead of the "uplink" or "ISP" port.

Since you need all the systems to resolve to IP addresses on the college LAN (IP subnet) the best solution is to put them all on a switch, as noted above. If you try some esoteric method, like you suggested, it would require all systems to be set up to either bridge or proxy ARP between interfaces. Either of those two methods are not for the feint at heart, but you could google for those terms and the word Linux if you feel the sadistic need to set it up that way.

arjun_sh 03-23-2006 08:25 AM

There are two reasons why I need to try the wierd plan I have:

1. The college is located in a village and the nearest 'city' where I can get a hub is hours away. _And_ a 'cheap' switch is pretty costly by Indian standards.

2. It would certainly be interesting to try out something of that sort. A learning experience.

So, well, I'll google and learn up, and hopefully I'll find my answer here before I'm done.

corbintechboy 03-23-2006 08:44 AM

I am doing this off the top of my head. Warning: I have never tried this, so chances are I could be wrong.

machine A = internet gateway
machine B = connect through gateway + make DNS server
machine C = connect throught machine B

Plus you could make machine b a router of sorts. Then machine c would have its own internal ip address asigned from machine b.

arjun_sh 03-23-2006 08:56 AM

thanks!
i'll go through that stuff and get back if i have problems (and also if it works). i've been using linux for some while now, but never really tried screwing around with it like this.

Darin 03-23-2006 11:20 AM

Quote:

Originally Posted by arjun_sh
The requirement is that the whole connection should be transparent to the indirectly connected systems, so that packets to their _global_ IP (global IPs in the sense that computers on the college intranet know them by these IPs, which would be IPs belonging to the subnet to which all the college intranet's computers belong) reach them.

Once you make one of the systems a "router" or "gateway" or use "NAT" you no longer have each machine using it's College assigned IP address. If that doesn't matter, you can set up the system plugged into the College LAN as a NAT router/firewall and as far as the College LAN can see it looks like just one busy system. If that's not an option I would still suggest the hub but barring that it would probably be easier if one system was set up in a star configuration with multiple NICs and everyone attached to it. Like buying a switch, this requires getting more hardware which sounds like it would be a constraint for you.

What sort of options do you have for online purchasing there? There are US companies that sell networking hardware online and a cheap switch can go for less than a 6-pack of soda. I'm not sure what the conversion rate would come out to but are there online places you can order from that would come out inexpensive anyhow, not neccessarily US ones either?

arjun_sh 03-23-2006 10:34 PM

Well, its possible to buy a cheap switch, but that will take a month before we save up enough. Most of my pocketmoney goes into buying sodas, which cost about 10 Rupees (thats 5 sodas for a US Dollar), and other stuff. Did you know reasonably good lunch here costs about half a dollar, and that many people actually earn monthly 'packets' of 40USD? Well, this is not the place to discuss economic limitations (I bought my notebook with a loan that I have to pay off after I graduate :)), so well, lets just say I _have_ a sadistic need to set it up that way. How? Can you point me to a resource atleast, if it's too long and scary to discuss here? I'm willing to learn, and learn quick. And I'll post my misery and success here as and when I come across it. Maybe we can write a HOWTO (or better still, a HOW-not-TO) on crazy network ideas.

Darin 03-24-2006 10:11 AM

I was simply curious and thought the economic factor was an interesting side discussion, I hope you aren't offended by it.

That aside, I guess the main question that will affect the complexity of setting things up is do all of the systems need to "show" individual IP addresses that the college assigns? If that isn't a requirement then it would be simple to set up Firewall/NAT on a few, or every system in the chain. When set up like this all systems will appear under just the IP address of the one plugged directly into the College network. This type of setup is documented on The Net and is also one that many here have experience with.

arjun_sh 03-25-2006 03:56 AM

Unfortunately, that _is_ a requirement. The problem is that most of the systems in the hostel (all computers on the subnet are located in the hostel and belong to students) use Windows as the primary OS, and a few of them dual boot with one or the other flavour of linux. So, for file sharing SMB is the overwhelmingly dominant technique.
The computer at the end of our 'chain' is also a windows system (thank god one of the other two isnt!), so if someone else connects to that end-of-chain PC, he will have to set up my notebook (the one directly connected to the LAN) as a gateway for connecting to the end-of-chain PC, isn't it? That is not possible, because there are over two hundered computers on the subnet and it's not possible to configure each of them to connect to our end-of-chain PC through a gateway. Moreover, they don't belong to me, and I can't administer them.
Correct me if I'm wrong here.

If there is another, easier way, for my windows roomie to share files and play LAN games (as a server and as a client), there is nothing like it. Also, there is a squid proxy server that our college runs on our subnet, and I have a feeling that if we use one IP for all three connections, it will slow things down (does such a server equally divide bandwidth among different hosts?)

arjun_sh 03-25-2006 03:57 AM

I think I need to clarify here. If it is possible for my widows roomie (who is the last one connected in the 'chain') to act as an SMB server and client, to _all_ other systems on our hostel, by _any_ technique, without having to change anything on the other systems connected to the LAN, it's fine.

But then, the way I wanted to do it earlier is the ay I still want to do it. It seems to me to be a whole lot cleaner.


All times are GMT -5. The time now is 12:52 PM.