Networking Forums

Networking Forums > Computer Networking > Linux Networking > how can I connect 2 lan ?

Reply
Thread Tools Display Modes

how can I connect 2 lan ?

 
 
Charly
Guest
Posts: n/a

 
      08-01-2005, 12:58 PM
Hi guys,
could you help me in this problem ?

WAN
|
Router(192.168.1.1)---------computer1(192.168.1.22)
|
|
Eth0 (192.168.1.250)
|
LINUX BOX
|
Eth1 (192.168.2.1)----------computer2(192.168.2.44)

I want to put in contact computer1 and computer2

Woudl be great if you can tell me how to do it becouse I really didn't
understan...

Thanks



 
Reply With Quote
 
 
 
 
CL (dnoyeB) Gilbert
Guest
Posts: n/a

 
      08-01-2005, 02:41 PM
Charly wrote:
> Hi guys,
> could you help me in this problem ?
>
> WAN
> |
> Router(192.168.1.1)---------computer1(192.168.1.22)
> |
> |
> Eth0 (192.168.1.250)
> |
> LINUX BOX
> |
> Eth1 (192.168.2.1)----------computer2(192.168.2.44)
>
> I want to put in contact computer1 and computer2
>
> Woudl be great if you can tell me how to do it becouse I really didn't
> understan...
>
> Thanks
>
>
>


The Linux box is not doing NAT is it?

What do you mean by 'in contact?' Ping, NetBIOS, what?

--
Respectfully,


CL Gilbert
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-01-2005, 05:59 PM
In comp.os.linux.networking Charly <(E-Mail Removed)>:
> Hi guys,
> could you help me in this problem ?


> WAN
> |
> Router(192.168.1.1)---------computer1(192.168.1.22)
> |
> |
> Eth0 (192.168.1.250)
> |
> LINUX BOX
> |
> Eth1 (192.168.2.1)----------computer2(192.168.2.44)


> I want to put in contact computer1 and computer2


> Woudl be great if you can tell me how to do it becouse I really didn't
> understan...


Switch on IP forwarding 'echo 1 > /proc/sys/net/ipv4/ip_forward'
as root. Systems on both LANs need to have a routing entry to
reach the other through 192.168.1.250/192.168.2.1 or their
default gateway must know it.

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 174: Backbone adjustment
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      08-01-2005, 07:31 PM
In the Usenet newsgroup comp.os.linux.networking, in article
<W%oHe.23972$(E-Mail Removed)>, Charly wrote:

>could you help me in this problem ?


206074 Aug 25 2003 Ethernet-HOWTO
40490 Jun 22 2000 Home-Network-mini-HOWTO
45620 Jul 10 2000 Networking-Overview-HOWTO
22582 Feb 6 2004 Reading-List-HOWTO
71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO

>I want to put in contact computer1 and computer2


[computer1 ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 17 eth0
192.168.2.0 192.168.1.250 255.255.255.0 UG 0 0 17 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 20 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 15 eth0
[computer1 ~]$

[computer2 ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 17 eth0
192.168.1.0 192.168.2.1 255.255.255.0 UG 0 0 17 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 20 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 15 eth0
[computer2 ~]$

[linux_box ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 17 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 17 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 20 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 15 eth0
[linux_box ~]$ cat /proc/sys/net/ipv4/ip_forward
1
[linux_box ~]$

[router ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
82.57.64.0 0.0.0.0 255.255.255.0 U 0 0 17 wan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 17 eth0
192.168.2.0 192.168.1.250 255.255.255.0 UG 0 0 17 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 20 lo
0.0.0.0 82.57.64.1 0.0.0.0 UG 0 0 33 wan0
[router ~]$

NOTES:
1. This assumes all boxes run Linux. windoze boxes will be similar, but
the command will be different, and the display more confusing.
2. You don't mention distributions or versions, so I can't tell you what
file to edit, or what tool to use to get the above configuration.
3. On computer2, the route to 192.168.1.0 isn't really _required_ as it
is covered by the default.
4. The router must be forwarding packets AND MASQUERADING (also called
NAT) to allow packets out to the world.

>Woudl be great if you can tell me how to do it becouse I really didn't
>understan...


http://tldp.org/guides.html
http://ibiblio.org/pub/linux/docs/linux-doc-project/

-rw-rw-r-- 1 gferg ldp 705493 Jan 5 2001 nag2.html.tar.gz
-rw-rw-r-- 1 gferg ldp 1604859 Feb 27 2001 nag2.pdf
-rw-rw-r-- 1 gferg ldp 1069355 Feb 27 2001 nag2.ps.gz
-rw-rw-r-- 1 gferg ldp 635097 Jan 5 2001 nag2.sgml.tar.gz

The 'nag2' is the second edition of the "Linux Network Administrator's
Guide", about a 500 page book in the dead tree version (O'Reilly and
Assoc., ISBN 1-56592-400-2, US$35), but yours for the free download.

Old guy
 
Reply With Quote
 
G_r_a_n_t_@dodo.com.au
Guest
Posts: n/a

 
      08-01-2005, 08:26 PM
On Mon, 1 Aug 2005 19:59:26 +0200, Michael Heiming <michael+(E-Mail Removed)> wrote:

> In comp.os.linux.networking Charly <(E-Mail Removed)>:
> > Hi guys,
> > could you help me in this problem ?

>
> > WAN
> > |
> > Router(192.168.1.1)---------computer1(192.168.1.22)
> > |
> > |
> > Eth0 (192.168.1.250)
> > |
> > LINUX BOX
> > |
> > Eth1 (192.168.2.1)----------computer2(192.168.2.44)

>
> > I want to put in contact computer1 and computer2


# network topology
# `````````````````
# ---------------- ------------ LAN
# ( ) Phone | | Machines
# ( Big Bad Internet )--------| ADSL Modem |
# ( ) Line | | 100-Base-T ------
# ---------------- ------------ Switch | |
# | ------| |
# Public IP | X_WORLD | | |
# X_LOCAL2 | | |_| ------
# 192.168.2.0/24 ------------- | /
# 10-Base-2 coax | ppp0/eth1 | ---/ ------
# | | | \ | | |
# c=o=---------=o=---------=|eth2 eth0|------|/ /|----| |
# | | | | | \ | | |
# ----- ----- | Firewall | ---\ ------
# | | | | ------------- | \
# | | | | | |_| ------
# ----- ----- | | |
# ------| |
# X_LOCAL | |
# 192.168.1.0/24 ------
#

Combination of having a localnet controller in firewall, then
consider nameserver, router control. I use iptables based
firewall + dnsmasq for nameserver and DHCP server to windoze
boxen.

Grant.

--
Whom computers would destroy, they must first drive mad.
 
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
Connect to Wireless Network, Advanced & Connect greyed out? William P.N. Smith Wireless Internet 1 10-16-2004 02:25 PM
RE: Client can't connect to internet but can connect to SBS2003 =?Utf-8?B?QmVuIEZpbmtsZWE=?= Windows Networking 0 07-29-2004 08:21 PM
unable to connect to internet, can connect to other PC through router doug mccausland Windows Networking 2 01-25-2004 02:26 PM
Win2K install SP4 = can't connect to MSN and slow connect to others =?Utf-8?B?TE1C?= Windows Networking 0 12-31-2003 06:01 PM
Help! Fail to connect a windows XP laptop via a wireless connect to Dlink router! Stan Wireless Internet 1 11-30-2003 04:14 AM



1 2 3 4 5 6 7 8 9 10 11