LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Two routers sharing the network (https://www.linuxquestions.org/questions/linux-networking-3/two-routers-sharing-the-network-491045/)

kehkok 10-10-2006 02:21 AM

Two routers sharing the network
 
Hi all,

I have two routers, 3com and dlink 624. The purpose to have two routers which is there are two broadband connections in our office. So, there are two network segments which are 192.168.0.1 and 192.168.1.1.

When I am in 192.168.0.1 network, I couldn't use the share printer which is connecting to 192.168.1.1 network.

Can you recommend the method to hook up this two network?

Thank you.

bonowax 10-10-2006 03:31 AM

Hi;

You have to add a gateway connecting both the networks... It may be a dedicated router or a PC running linux for instance... Your default gateways on each network must also be configured to forward packets, destined to the other local net, to that new gateway...

Cheers

kehkok 10-10-2006 04:30 AM

do you mean add another PC (redhat 9) as a router, then using it to do bridging two different segment "192.168.0.1" and "192.168.1.1"?

Thx.

-KK

Sertys 10-10-2006 04:41 AM

You might wanna build up tunneling, e.g. VPN(with bridging) in order to make those shared printers appear in the same logical segment. But i'm sure those routers won't support bridging with their ipsec capabilities. The other way around is to use a WINS server which would hold the NETBIOS machine/share list on both those networks and route them between of course. I wouldn't write iptables/route/ip cause i'm damn lazy. You should've gotten the idea.

bonowax 10-10-2006 08:30 AM

...Yes, it could be a PC running any flavor of Linux or a dedicated router...
In the case of a Linux PC it would have two ethernet nics and ip forwarding turned on.

Cheers

kehkok 10-11-2006 01:51 AM

Thank you for your solution. I just want to share the printer between these two network, is it any other easier ways?

lazlow 10-11-2006 02:16 AM

Pull the two routers and get one with dual wan ports.

Lazlow

amsunaakage 10-11-2006 02:22 AM

i think that there should be no problem as a friend of mine had two routers on his lan and he had a printer shared and everything worked well i dont know whats your problem

bonowax 10-11-2006 03:56 AM

You have two distinct subnets, and you want packets to travel from one to the other and vice-versa. It's called routing and I don't think it can become any easier than that... :P

Cheers

kehkok 10-11-2006 07:21 AM

Can you tell me how your friend do it?

lazlow 10-11-2006 07:06 PM

I suspect he either had a switch and a router, or had one router just acting like a switch(referring to post #8). Sometimes you can pick up a used router cheaper than a switch. We had four routers in use at one point (3 as switches and one actually as a router).

Lazlow

kehkok 10-15-2006 09:15 AM

I solved it in a quick way. As I turn off the second router DHCP, and I used just one subnet. So, if I want to use the second network, I just specify the fix IP with the second gateway IP address. So, if the client PC in DHCP, it will go to the first network.

However, I still feel interesting to find out to connect to different subnet.

UhhMaybe 09-19-2007 11:37 PM

Here are two suggestions. A) "ifconfig" will change the subnet. Possibly tiresome. B) Use two separate Distros and boot into the option from Boot Menu in Boot Loader.


All times are GMT -5. The time now is 04:36 AM.