Networking Forums

Networking Forums > Computer Networking > Linux Networking > I want to link 2 lans at home

Reply
Thread Tools Display Modes

I want to link 2 lans at home

 
 
Panama Red
Guest
Posts: n/a

 
      05-22-2004, 02:22 AM
Hello,

I need some help with a networking problem that
my roomate and myself cannot figure out.

We each have a linksys 4 port router and a small
lan. We cannot share one router because we each want
to provide ftp and some other services.

However we cannot figure out how to "link" the
networks so that we can browse each other's networks
and see each others samba shares, for example.

Here is a basic diagram of our setup:


INTERNET
|
DSL/SWITCH
/ \
/ \
/ \
/ \
[Linksys router] [Linksys router]
[192.168.1.*] [192.168.2.*]
/ | \ / | \
pc1 pc2 pc3 pc4 pc5 pc6


Can anyone suggest a way to accomplish this?
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      05-22-2004, 03:33 AM
Panama Red <(E-Mail Removed)> wrote:

> However we cannot figure out how to "link" the
> networks so that we can browse each other's networks
> and see each others samba shares, for example.
>
> Here is a basic diagram of our setup:


To link the two networks, you can just run a (crossover) cable between
the two routers, and turn on RIP dynamic routing on each router.

Actually, you don't even need a crossover cable, as they are already
connected.

However, you may find that you get into trouble with SMB.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      05-22-2004, 11:52 AM
Cameron Kerr wrote:

> Panama Red <(E-Mail Removed)> wrote:
>
>> However we cannot figure out how to "link" the
>> networks so that we can browse each other's networks
>> and see each others samba shares, for example.
>>
>> Here is a basic diagram of our setup:

>
> To link the two networks, you can just run a (crossover) cable between
> the two routers, and turn on RIP dynamic routing on each router.
>
> Actually, you don't even need a crossover cable, as they are already
> connected.
>
> However, you may find that you get into trouble with SMB.


He'll also have two dhcp servers & two default routes etc., to sort out.

--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
Panama Red
Guest
Posts: n/a

 
      05-22-2004, 04:22 PM
I believe it was James Knott who said...
> Cameron Kerr wrote:
>
>> Panama Red <(E-Mail Removed)> wrote:
>>
>>> However we cannot figure out how to "link" the
>>> networks so that we can browse each other's networks
>>> and see each others samba shares, for example.
>>>
>>> Here is a basic diagram of our setup:

>>
>> To link the two networks, you can just run a (crossover) cable between
>> the two routers, and turn on RIP dynamic routing on each router.
>>
>> Actually, you don't even need a crossover cable, as they are already
>> connected.
>>
>> However, you may find that you get into trouble with SMB.

>
> He'll also have two dhcp servers & two default routes etc., to sort out.


All the machines on both lans are using static IP's, but how would
the machines on the 192.168.1.* lan know the addresses of the boxes on
the 192.168.2.* lan?
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      05-22-2004, 05:14 PM
Panama Red wrote:

>> He'll also have two dhcp servers & two default routes etc., to sort out.

>
> All the machines on both lans are using static IP's, but how would
> the machines on the 192.168.1.* lan know the addresses of the boxes on
> the 192.168.2.* lan?
>


If you're using static configureation, you can do that. Use a subnet mask
of 255.255.254.0, instead of 255.255.255.0. That way, all computers will
be able to see the others. Just configure them to use the appropriate
default route, DNS etc. The two routers should be able to connect to any
computer within their subnet, but not the other. If the routers can be
configured to use other than x.x.x.1, they can both be used on the same
subnet.

--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
Ralf Herrmann
Guest
Posts: n/a

 
      05-23-2004, 09:42 PM
Hi,


>> All the machines on both lans are using static IP's, but how would
>>the machines on the 192.168.1.* lan know the addresses of the boxes on
>>the 192.168.2.* lan?
>>

>
>
> If you're using static configureation, you can do that. Use a subnet mask
> of 255.255.254.0, instead of 255.255.255.0.


This is a good idea, if the two subnets shall really be joined into one subnet.
But since the net's IP ranges are 192.168.1.X and 192.168.2.X the netmask should
be 255.255.252.0 if i'm right.

Ok, to the OP:

If it is not wanted to join the two subnets, there will be some further
configuration issues.

The first thing is the DSL/switch mentioned in the OP.
It needs to get correct route entry enries for the subnets
(route .1.x-Packets to the local interface, where the .1.x is connected,
the same with .2.x-packets).
I think it is a DSL Router rather than a switch (it surely has switch
functionalty built in though).
How this can be done, depends on your device. See it's manuals.

Ok, the next thing is samba. The M$ Network Client uses broadcast
to get to know the other machines you see in your Network Neighbourhood.
At least broadcast is used to determine a NetBIOS name server (or kind of
a master machine.....in fact, each time a machine is connected, a master
election is oerformed), which lists (NetBIOS-) host names and their IPs.

Ok, since the subnets are not connected, the broadcast will not find the
machines on the other net.
A Way to work around this issue may be to make one samba server a "wins-server",
or maybe even a "domain controller". You can set up the other machines
(in both linux and Windows) to talk to this wins-server and you should be
able to see machnines accross subnets (well, the above mentioned routing
has to work, e.g. all machines must be able to ping each other/the wins-server).
How to do this, you should find in some samba documentation.
See www.sambs.org or man smb.conf.

HTH

Ralf
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      05-24-2004, 12:31 AM
Ralf Herrmann wrote:

>> If you're using static configureation, you can do that. Use a subnet
>> mask of 255.255.254.0, instead of 255.255.255.0.

>
> This is a good idea, if the two subnets shall really be joined into one
> subnet. But since the net's IP ranges are 192.168.1.X and 192.168.2.X the
> netmask should be 255.255.252.0 if i'm right.
>


Those firewall/router boxes generally use a sub net mask of 255.255.255.0,
though some can be configured differently. This provides a range of 256
addresses (including network and broadcast). To get a range of 512, you
have to change the least significant bit of the sub net mask. This means
the octet goes from 255 to 254. Using 252 means you've changed two bits,
not one.


--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
patrick
Guest
Posts: n/a

 
      05-24-2004, 04:11 AM
James Knott wrote:
> Ralf Herrmann wrote:
>
>
>>>If you're using static configureation, you can do that. Use a subnet
>>>mask of 255.255.254.0, instead of 255.255.255.0.

>>
>>This is a good idea, if the two subnets shall really be joined into one
>>subnet. But since the net's IP ranges are 192.168.1.X and 192.168.2.X the
>>netmask should be 255.255.252.0 if i'm right.
>>

>
>
> Those firewall/router boxes generally use a sub net mask of 255.255.255.0,
> though some can be configured differently. This provides a range of 256
> addresses (including network and broadcast). To get a range of 512, you
> have to change the least significant bit of the sub net mask. This means
> the octet goes from 255 to 254. Using 252 means you've changed two bits,
> not one.
>
>

To use a mask of /23, the two networks would have to be 192.168.0/24 and
192.168.1/24. So that for the original poster to add the two networks
192.168.1/24 and 192.168.2/24, there must be two bits to include four
networks.

Anyway, if the two linksys' were just routers, just changing the subnet
mask for the pc's will not do the trick. Routers are not bridges, so
each router just needs a route to the other, learned via rip are just
statically configured.

However, this is more complicated because the linksys' are more than
just plain old layer 3 routers. They are firewalls that do pat, so
somehow you must 'expose' the private networks behind them. If you only
want one machine to be reached for a particular service, wins for
example, you can forward the appropriate ports to the server. If you
want every machine to be able to see everything on the other network,
then you will have to create a tunnel. Depending on your model of
linksys, they might have this capability. If not, this can be done with
your linux machines. You can go for a VPN, which would probably be
overkill in the case, or the simplier GRE tunnel. On linux, I have used
freeswan as a point to point VPN with some limited success and I have
not setup a GRE using linux.

You would probably be better off getting rid of one of the routers and
puttin everything on a /22 subnet as discussed previously in the thread.
Also, do yourself a favor and go to DHCP.


 
Reply With Quote
 
Douglas Mayne
Guest
Posts: n/a

 
      05-24-2004, 04:18 AM
On Sat, 22 May 2004 02:22:49 +0000, Panama Red wrote:

> Hello,
>
> I need some help with a networking problem that
> my roomate and myself cannot figure out.
>
> We each have a linksys 4 port router and a small
> lan. We cannot share one router because we each want
> to provide ftp and some other services.
>
> However we cannot figure out how to "link" the
> networks so that we can browse each other's networks
> and see each others samba shares, for example.
>
> Here is a basic diagram of our setup:
>
>
> INTERNET
> |
> DSL/SWITCH

192.168.0.1
> / \
> / \
> / \
> / \

192.168.0.101 192.168.0.102
> [Linksys router] [Linksys router]
> [192.168.1.*] [192.168.2.*]
> / | \ / | \
> pc1 pc2 pc3 pc4 pc5 pc6
>
>
> Can anyone suggest a way to accomplish this?
>

Caveat: I don't have a linksys router.

Your graphic only shows part of the problem. I assume the LAN sided of
the DSL modem is using the 192.168.0.0/24 network, and that each linksys
router is issued an address on that network. I have added numbers for my
assumptions of your network (above).

The solution is to modify the static routes on each of the linksys
routers. This may or may not be possible.

The router at 192.168.0.101 needs a default route to the 192.168.2.0/24
network; the gateway is 192.168.0.102.

The router at 192.168.0.102 needs a default route to the 192.168.1.0/24
network; the gateway is 192.168.0.101.

The default route provided by the DSL modem remains the default
route for other networks (internet).

The other part of the problem is that the linksys devices may "firewall"
incoming requests from their "WAN" side. The firewall features of the
linksys devices may need modification, or be totally disabled.

--
When you stop to smell the flowers, are they afraid?
http://us.imdb.com/title/tt0093886/quotes

 
Reply With Quote
 
Panama Red
Guest
Posts: n/a

 
      05-24-2004, 06:22 AM
I believe it was patrick who said...
>
> You would probably be better off getting rid of one of the routers and
> puttin everything on a /22 subnet as discussed previously in the thread.


This is a hassle because it would be convenient if we both could
service port 80 and port 21...but not out of the question.

> Also, do yourself a favor and go to DHCP.


Why?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link printer in home wireless network New to wireless Wireless Networks 6 04-15-2005 09:14 PM
video link from hotel to home Suz Broadband 47 11-04-2004 09:34 PM
Issue with: Home XP, SP2, and D-Link DWL-650 David Windows Networking 0 10-20-2004 09:27 PM
RF home water meters: potential for interference with wireless LANS? Timo Wireless Internet 3 08-16-2004 01:09 PM
NB: Home networking -- router D-Link DI-514 and what to do with it? Matej Cepl Linux Networking 0 10-04-2003 05:24 AM



1 2 3 4 5 6 7 8 9 10 11