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 (10.1.1.1) 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.


Cheers,

J :)
LVL 19
joolsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
helverConnect With a Mentor Commented:
Thank you, sir.
0
 
HalldorGCommented:
The solution may be to not add your default route to
the eth0 interface.
Only have net 10.0.0.0 255.0.0.0 there
and use the defaultroute parameter with the ppp connection
0
 
joolsAuthor Commented:
Yes I know but how?? If it were another Unix I'd know how but this linux networking thing just baffles me!

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
stefanxCommented:
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)
0
 
stefanxCommented:
Incidentally, to prevent DNS lookups, rather say netstat -nr ;)
0
 
joolsAuthor Commented:
Thanks for the inifo.

I'll give it a go tonight, let you know tomorrow....
0
 
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 *               255.255.255.255 UH     1500 0          0 ppp0
127.0.0.0       *               255.0.0.0       U      3584 0          0 lo
10.0.0.0        *               255.0.0.0       U      1500 0          0 eth0
default         cortizone.dialu 0.0.0.0         UG     1500 0          0 ppp0
default         scratchy        0.0.0.0         UG     1500 0          0 eth0

ifconfig output

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:35123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0

eth0      Link encap:Ethernet  HWaddr 00:60:97:D9:47:A9  
          inet addr:10.1.1.1  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          Interrupt:11 Base address:0x6000

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:62.136.58.228  P-t-P:195.92.68.154  Mask:255.0.0.0
          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
          collisions:0
          Memory:26f9038-26f9c04




0
 
helverCommented:
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.
0
 
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.
0
 
helverCommented:
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 0.0.0.0 you make it so that the system doesn't initially assign a default route.
0
 
joolsAuthor Commented:
Thanks for that, if you send an answer response, you'll get the points.

J :)
0
All Courses

From novice to tech pro — start learning today.