LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-15-2008, 06:12 PM   #1
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Rep: Reputation: 30
route between to ethernet


Hi every body
I have linux machine with 2 ethernet with network addresses 192.168.1.0and 192.168.2.0, I want to my stations on 192.168.2.0 access to station on 192.168.1.0 and vice versa. my routing table is :
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.1.2 255.255.255.0 UG 0 0 0 eth1

I have enabled forwarding in kernel but stations on tow network does not see another.
please guide me
thanks for any guidance and instruction
 
Old 11-15-2008, 09:54 PM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
try making the netmask 255.255.0.0
 
Old 11-16-2008, 01:37 PM   #3
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Tuttle View Post
try making the netmask 255.255.0.0
thanks for your attention
But every ethernet is related to one network, I can not combine these networks, is disturbed my network design
thanks for any help or guidance
 
Old 11-16-2008, 06:28 PM   #4
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
If you already have forwarding on then what you need to do is set the route for the other network to point to that box in the other machines or set the route for the other in the gateway for that network. (wow that sounds confusing when I read it back)


for example:
In machine 192.168.2.24 you'd need to add a route for 192.168.1.0/24 that points to the box bridging the networks

or you'd need to have the default gateway router/box for 192.168.2.0 have a route for 192.168.1.0/24 that points to the box bridging the networks

and you need to do the same thing on the other network
 
Old 11-17-2008, 06:03 AM   #5
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by estabroo View Post
If you already have forwarding on then what you need to do is set the route for the other network to point to that box in the other machines or set the route for the other in the gateway for that network. (wow that sounds confusing when I read it back)


for example:
In machine 192.168.2.24 you'd need to add a route for 192.168.1.0/24 that points to the box bridging the networks

or you'd need to have the default gateway router/box for 192.168.2.0 have a route for 192.168.1.0/24 that points to the box bridging the networks

and you need to do the same thing on the other network
thanks for your guidance, will try it
 
  


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
iproute2 (ip route), pppoe and default route lorddoskias Linux - Networking 0 05-09-2007 11:04 AM
strange ethernet issue - route -n doesn't correspond to actual interface availability echowarpt Slackware 1 01-28-2007 09:24 AM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM

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