LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2006, 02:21 AM   #1
kehkok
LQ Newbie
 
Registered: Nov 2005
Posts: 20

Rep: Reputation: 0
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.
 
Old 10-10-2006, 03:31 AM   #2
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
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
 
Old 10-10-2006, 04:30 AM   #3
kehkok
LQ Newbie
 
Registered: Nov 2005
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 10-10-2006, 04:41 AM   #4
Sertys
Member
 
Registered: Oct 2006
Posts: 42

Rep: Reputation: 15
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.
 
Old 10-10-2006, 08:30 AM   #5
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
...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
 
Old 10-11-2006, 01:51 AM   #6
kehkok
LQ Newbie
 
Registered: Nov 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you for your solution. I just want to share the printer between these two network, is it any other easier ways?
 
Old 10-11-2006, 02:16 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Pull the two routers and get one with dual wan ports.

Lazlow
 
Old 10-11-2006, 02:22 AM   #8
amsunaakage
LQ Newbie
 
Registered: Oct 2006
Posts: 18
Blog Entries: 1

Rep: Reputation: 0
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
 
Old 10-11-2006, 03:56 AM   #9
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
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
 
Old 10-11-2006, 07:21 AM   #10
kehkok
LQ Newbie
 
Registered: Nov 2005
Posts: 20

Original Poster
Rep: Reputation: 0
Can you tell me how your friend do it?
 
Old 10-11-2006, 07:06 PM   #11
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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
 
Old 10-15-2006, 09:15 AM   #12
kehkok
LQ Newbie
 
Registered: Nov 2005
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 09-19-2007, 11:37 PM   #13
UhhMaybe
Member
 
Registered: Jul 2004
Location: Salt Lake City, Utah
Distribution: Absolute 12.0 Studio 64 1.3.0
Posts: 470

Rep: Reputation: 30
Cool

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking Woes... Two Routers, One Network. Please Help CarryD General 4 09-02-2006 03:23 PM
Multiple routers on home network question grapnell Linux - Networking 4 04-09-2006 08:22 PM
how to get primary logon network, Access control,File sharing & printer sharing info dileepkk Linux - Networking 2 07-06-2004 06:54 AM
Simple Network Setup -- 2 Routers Apollo77 Linux - Networking 12 07-01-2003 09:14 AM
Questions on routers and network ZhiYi Linux - Networking 1 05-20-2003 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration