LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-07-2015, 02:18 PM   #1
lmartinez073
LQ Newbie
 
Registered: Jan 2015
Posts: 1

Rep: Reputation: Disabled
How to connect two networks


Hi

I am trying to configure the communication between two networks, this is my description.

One server with two nic.
eth0:192.168.0.53 - public
eth1:192.168.1.53 - lan

when I get connected from my WiFi with IP 192.168.1.10 and I try to ping to 192.168.0.53 I can't, how can I configure this to let this two networks see each other?

Thank you for your help.
 
Old 01-08-2015, 05:53 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,510

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Taking eth0 as public, and eth1 as lan,
Try
Code:
route -vF add 192.168.1.0 eth0 
route -vF add 192.168.0.0 eth1
That should connect the networks. This makes presumptions about netmasks, etc. You may also need to specify those. (Man route)
 
Old 01-09-2015, 04:13 PM   #3
arre
Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Slackware 10.2 & Windows 98 & Windows XP Pro & ...
Posts: 30

Rep: Reputation: 4
Hi,

Assuming you have correctly set up the two networks (and so you can ping addresses in both networks from you linux box), you do not have to do any extra routing.
There are two things that I think of that still have to be done:

- Enable ip forwarding (e.g. by echo 1 > /proc/... (google it)
- Add routes (or a default route) on hosts on both networks to the IP address of your linux box. This is quite important too.

Gl!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how i connect in wireless networks ? hatebreeder666 Linux - Newbie 2 01-03-2009 03:11 PM
Can see networks, but cannot connect Shaggy1054 Linux - Wireless Networking 2 06-11-2008 12:14 PM
How to connect two private networks? veeruk101 Linux - Networking 10 07-17-2007 06:57 AM
Can see wirless networks but not connect abouelse Linux - Wireless Networking 2 02-03-2007 02:05 PM
Is there a way to connect to networks using Novell Wade Linux - Networking 1 03-09-2004 05:58 PM

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

All times are GMT -5. The time now is 07:43 AM.

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