LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 11-17-2009, 05:39 PM   #1
hda7
Member
 
Registered: May 2009
Distribution: Debian squeeze
Posts: 232

Rep: Reputation: 30
routing misconfiguration


I have three computers, A, B, and C. A and B are connected through ppp over a null modem cable. B and C are on an Ethernet network. A is address 10.0.0.2, B is 10.0.0.1 on the ppp network and 192.168.1.200 on the Ethernet. C is 192.168.1.220. A and B run Linux, C runs Windows. I am trying to route packates from A to C via B, but `ping 192.168.1.220' from A never gets a response, and traceroute doesn't find a route. Here is my routing configuration (from `ip route'):
Code:
A:
10.0.0.1 dev ppp0 src 10.0.0.2
default via 10.0.0.1 dev ppp0
127.0.0.0/8 dev lo

B:
10.0.0.2 dev ppp0
192.168.1.0/24 dev eth0
127.0.0.0/8 dev lo
C has its default gateway set to 192.168.1.200.

Anyone know what's wrong with my configuration?
 
Old 11-17-2009, 06:37 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,035

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
You'll need to add a route on 'A' for 192.168.1.0/24 via 10.0.0.2, you'll also need to ensure that 'B' is correctly configured to forward traffic between interfaces

cheers
 
Old 11-18-2009, 09:20 AM   #3
hda7
Member
 
Registered: May 2009
Distribution: Debian squeeze
Posts: 232

Original Poster
Rep: Reputation: 30
Did you mean via 10.0.0.1 (address of B).
I tried adding that route, but it didn't help. I would thing that the default route should be enough anyway.

What did you mean to set up routing between interfaces? Is there anything besides the ip routing tables that must be configured?
 
Old 11-18-2009, 04:53 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,035

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
You've listed the address of B as 10.0.0.2 not 10.0.0.1

Quote:
B:
10.0.0.2 dev ppp0
The default route will not be enough.

To set up ip forwarding on B you will need to edit /etc/sysctl.conf and look for these lines:

Code:
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
.. change from 0 to 1 to enable forwarding

Then run 'sysctl -p /etc/sysctl.conf' to activate the changes
 
Old 11-18-2009, 08:52 PM   #5
hda7
Member
 
Registered: May 2009
Distribution: Debian squeeze
Posts: 232

Original Poster
Rep: Reputation: 30
Thanks!

The adjustment to /etc/sysctl.conf (or rather the addition of such) fixed the problem.

I see where you got 10.0.0.2 for B. That was the routing table for B, no the address.

By the way, can you edit this setting using the /sys filesystem?

Last edited by hda7; 11-18-2009 at 08:53 PM.
 
Old 11-18-2009, 10:18 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,035

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
I can't say that I've tried... usually turn on ip forwarding temporarily using '/proc/sys/net/ipv4/ip_forward'
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
serious apache misconfiguration LAdProg2005 Linux - Software 5 12-15-2005 02:47 AM
DNS misconfiguration or what is wrong here? rebayona Linux - Networking 10 09-27-2005 04:32 AM
SSL CA misconfiguration -- HELP! Chuck23 Linux - Networking 1 01-24-2005 02:56 PM
PHP misconfiguration J_Szucs Linux - Software 0 09-12-2003 12:46 PM
another sendmail misconfiguration? GraemeK Linux - Networking 7 09-08-2003 02:58 PM


All times are GMT -5. The time now is 07:56 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration