PPP Routing table entries

I have Linux (Redhat 5.2) networked with two other PC's and now want to connect to my freeserve account. I have configured CHAP and the modem dials to the server and connects.

If I do "ifconfig -a" I have three interfaces appear; loopback, eth0 and ppp0, I can ping all three addresses but cannot ping or nslookup any other address. I think this is something to do with the default route setting ( but can't seem to be able to change the default route to the ppp interface, nslookup and netstat -r appear to "hang" but this may be trying to resolve addresses.

Can anyone point me in the right direction and what files need to be edited blah blah.


J :)
LVL 19
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The solution may be to not add your default route to
the eth0 interface.
Only have net there
and use the defaultroute parameter with the ppp connection
joolsAuthor Commented:
Yes I know but how?? If it were another Unix I'd know how but this linux networking thing just baffles me!

Edit /etc/rd.c/rc.inet1 and comment out the line that says something like:

route add default gw xxx.xxx.xxx.xxx

(xxx.xxx.xxx.xxx) is an IP address on your eth0 subnet
Then, when you establish the ppp connection say :

route -add default gw ppp0

(I don't know if ppp0 is allowed here and I don't have a Linux box here to check, but I think you get the idea)
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Incidentally, to prevent DNS lookups, rather say netstat -nr ;)
joolsAuthor Commented:
Thanks for the inifo.

I'll give it a go tonight, let you know tomorrow....
joolsAuthor Commented:
Nearly there, I am now using netscape from linux, you comments weren't accurate for Redhat but certainly pointed me in the right direction.

The dial up connection doesn't add the default route automatically but after netstat -r resolves ok (see below)

If you can assist with the routing information to be added automatically, the points are your's

I'll post more infor here when done...

netstat -r output

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
cortizone.dialu *      UH     1500 0          0 ppp0       *            U      3584 0          0 lo        *            U      1500 0          0 eth0
default         cortizone.dialu         UG     1500 0          0 ppp0
default         scratchy         UG     1500 0          0 eth0

ifconfig output

lo        Link encap:Local Loopback  
          inet addr:  Bcast:  Mask:
          RX packets:35123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35123 errors:0 dropped:0 overruns:0 carrier:0

eth0      Link encap:Ethernet  HWaddr 00:60:97:D9:47:A9  
          inet addr:  Bcast:  Mask:
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
          Interrupt:11 Base address:0x6000

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:  P-t-P:  Mask:
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:477 errors:0 dropped:0 overruns:0 frame:0
          TX packets:459 errors:0 dropped:0 overruns:0 carrier:0

Couple things I see that could be issues here:

First, I think traditionally a non-connected network uses 192.168.* for its IP addresses... I guess 10.* might be the class A variety, but 192.168.* is more common for people with your size network.

Second it looks like your networking scripts assign a default route to the eth0 device.  This will likely cause problems and will conflict with your true default route out ppp0.  So long as you have a defined route to your local network through eth0, you shouldn't need a default route that points there.  So basically line 5 of your netstat output shouldn't be there.
joolsAuthor Commented:
I use the 10.* IP address range because these tend to be anonymous address which are ideal for my uses, although I can use whatever I want as long as I don't setup some sort of gateway between the my local network and the internet...might upset someone!

I know there is a duplicate routing entry but I can't seem to find the correct file to edit it from. The HOW-TO's seem a bit vague or unclear, this is what I meant to say when I mentioned (above) the automatic routing information entries.

What I need is the default route to be added to the ppp0 interface and a static route for local traffic, although there may not be any need to have a local route at all as it is in the same subnet at the moment, I'm still trying to find the right files to edit to make this happen.
A kludgey solution would be delete the current default route just before you add the ppp0 default route:

route delete default

Another thing you may want to check out is /etc/sysconfig/network.  I think that by setting GATEWAY to you make it so that the system doesn't initially assign a default route.
joolsAuthor Commented:
Thanks for that, if you send an answer response, you'll get the points.

J :)
Thank you, sir.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.