LinuxQuestions.org
Visit Jeremy's Blog.
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 03-23-2004, 12:26 AM   #1
palanisaravanan
Member
 
Registered: Oct 2003
Location: India
Distribution: Debian
Posts: 95

Rep: Reputation: 15
Routing problem


I have 3 Linux machines(Debian woody) A,B,C.
A and B are in same network.
C is in diffrent network.
I want to use B as the gateway for A for connecting to the C network.
-------------------------------------------------
A and B are in 192.168.1.0 network
A IPaddress - 192.168.1.2
Netmask 255.255.255.0

B IP address 192.168.1.1
Netmask 255.255.255.0


C is in 192.168.0.0 network
IP address -192.168.0.1
Netmask 255.255.255.0

Now I want to connect from 192.168.1.0 network to 192.168.0.0 network and vice versa.

For this In machine B I did a routing.
route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
and in Machine C
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

done.Now i am able to ping from machine B to C.

No I want to use my Machine B as Gateway for A to access the other network.
For this In Machine A in the routing entry I added

route add -net 192.168.0.0 netmask 255.255.255.0 gateway 192.168.1.1 dev eth0.
But I cud not ping or ssh to C from A .From C also I cud not ping to A .But I can access Machine B .
Why?.Am i did anything wrong?.
 
Old 03-23-2004, 01:33 AM   #2
jojuof
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
if B is your Gateway, B should have a IP in network 192.168.0.0 . you can create virtual interface on B and give it ip in network 192.168.0.0 and check
 
  


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
routing problem DRagonRage Debian 8 09-21-2005 03:29 PM
routing problem DRagonRage Linux - Networking 1 09-21-2005 01:02 PM
Routing problem Infernal211283 Linux - Networking 3 02-28-2005 02:59 AM
Another Routing problem Bambi Linux - Networking 2 06-03-2004 03:13 PM
routing problem nowonmai Linux - Networking 2 10-09-2003 07:59 AM

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

All times are GMT -5. The time now is 10:30 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