Networking Forums

Networking Forums > Computer Networking > Linux Networking > Automatically use PPP when it is on

Reply
Thread Tools Display Modes

Automatically use PPP when it is on

 
 
Ync750s02
Guest
Posts: n/a

 
      10-03-2003, 05:44 PM
Hi,

What is the general procedure to use PPP connection? What is the standard
way to configure my linux' DHCP/DNS/Gateway from the PPP connection?

For my old computer, I used to manually edit the /etc/resolv.conf for my
DNS. The trouble is that whenever I switch my ISP, which I did often, I had
to edit it manually again.

Now, I'm getting into more trouble. I can't even get onto the Internet. My
current situation is that, I have a ethernet card, and was using it to
connect to Internet previously. Now I'm falling back to use my modem to
dialup. The problem is that, all my DNS/Gateway settings are not
automatically configured when the PPP connection is on:

I connected correctly to my ISP:

- - - - >8 - - - -
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:95:37:6D:13
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:116 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:14140 (13.8 Kb)
Interrupt:11 Base address:0xd400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:53 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6413 (6.2 Kb) TX bytes:6413 (6.2 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:64.7.158.155 P-t-P:64.7.158.15 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:66 (66.0 b) TX bytes:84 (84.0 b)
- - - - >8 - - - -

And I am able to ping my ISP's gateway:

- - - - >8 - - - -
$ ping 64.7.158.15
PING 64.7.158.15 (64.7.158.15) from 64.7.158.143 : 56(84) bytes of data.
64 bytes from 64.7.158.15: icmp_seq=1 ttl=255 time=177 ms
- - - - >8 - - - -

But nowhere else:

- - - - >8 - - - -
$ ping 24.153.23.66
PING 24.153.23.66 (24.153.23.66) from 192.168.0.100 : 56(84) bytes of data.
From 192.168.0.100 icmp_seq=1 Destination Host Unreachable
- - - - >8 - - - -

The reason is that my DNS/routing settings are not updated when the PPP is on:

- - - - >8 - - - -
$ cat /etc/resolv.conf
nameserver 192.168.0.1

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
64.7.158.15 * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
- - - - >8 - - - -

I know what the problem is, but don't know how to fix it. Please
help. Thanks


 
Reply With Quote
 
 
 
 
Clifford Kite
Guest
Posts: n/a

 
      10-03-2003, 07:21 PM
Ync750s02 <(E-Mail Removed)> wrote:

> The reason is that my DNS/routing settings are not updated when
> the PPP is on:


> $ cat /etc/resolv.conf
> nameserver 192.168.0.1


> $ route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 64.7.158.15 * 255.255.255.255 UH 0 0 0 ppp0
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


Yes, that is the problem. You almost certainly don't need a default
route to eth0 and pppd won't replace an existing default route with one
through the PPP interface. Just configure the LAN routing so that there
is no default route to eth0.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      10-03-2003, 07:44 PM
On 03 Oct 2003 17:44:48 GMT, Ync750s02
<(E-Mail Removed)> wrote:
>
> And I am able to ping my ISP's gateway:
>
> - - - - >8 - - - -
> $ ping 64.7.158.15
> PING 64.7.158.15 (64.7.158.15) from 64.7.158.143 : 56(84) bytes of data.
> 64 bytes from 64.7.158.15: icmp_seq=1 ttl=255 time=177 ms
> - - - - >8 - - - -
>
> But nowhere else:
>
> - - - - >8 - - - -
> $ ping 24.153.23.66
> PING 24.153.23.66 (24.153.23.66) from 192.168.0.100 : 56(84) bytes of data.
> From 192.168.0.100 icmp_seq=1 Destination Host Unreachable
> - - - - >8 - - - -
>
> The reason is that my DNS/routing settings are not updated when the PPP is on:
>
> - - - - >8 - - - -
> $ cat /etc/resolv.conf
> nameserver 192.168.0.1
>
> $ route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 64.7.158.15 * 255.255.255.255 UH 0 0 0 ppp0
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
> - - - - >8 - - - -
>
> I know what the problem is, but don't know how to fix it. Please
> help. Thanks
>

You need to delete the default route to eth0. Pppd will not set a
default route if another one exists.


--
Commander Spiral Pyjama Pseudo-Rhinocerous Feline Thingamajig Bill Marcum
(the First)
Ozy and Millie Name Generator http://heifong.phase.org/omname.php
 
Reply With Quote
 
Horst Knobloch
Guest
Posts: n/a

 
      10-03-2003, 07:54 PM
Ync750s02 <(E-Mail Removed)> wrote:

> What is the general procedure to use PPP connection? What is the standard
> way to configure my linux' DHCP/DNS/Gateway from the PPP connection?
>
> For my old computer, I used to manually edit the /etc/resolv.conf for my
> DNS. The trouble is that whenever I switch my ISP, which I did often, I
> had to edit it manually again.

[...]
>
> - - - - >8 - - - -
> $ cat /etc/resolv.conf
> nameserver 192.168.0.1
>
> $ route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 64.7.158.15 * 255.255.255.255 UH 0 0 0
> ppp0
> 192.168.0.0 * 255.255.255.0 U 0 0 0
> eth0
> 127.0.0.0 * 255.0.0.0 U 0 0 0
> lo
> default 192.168.0.1 0.0.0.0 UG 0 0 0
> eth0 - - - - >8 - - - -
>
> I know what the problem is, but don't know how to fix it. Please
> help. Thanks


Make sure that you use the PPP options "defaultroute" and
"usepeerdns", and that /etc/resolv.conf is a link to
/etc/ppp/resolv.conf

If you have done this and the wrong default route entry is not
replaced by ppp, you need to remove the (wrong) static default
route to 192.168.0.1 manually from your configuration.

HTH

Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
Ync750s02
Guest
Posts: n/a

 
      10-04-2003, 01:39 AM
Thank you all who replied! I am now able to connect via PPP.

Another question, how can I removed the static gateway setting?
I set my static gateway via linuxconf. I don't have linuxconf now,
and I don't know where linuxconf stores the static gateway setting.
I'm just using 'route del' to remove default routing temporally. How to remove
it permenatly?

Thanks


 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      10-04-2003, 01:44 AM
On 04 Oct 2003 01:39:49 GMT, Ync750s02 wrote:
> Thank you all who replied! I am now able to connect via PPP.
>
> Another question, how can I removed the static gateway setting?
> I set my static gateway via linuxconf. I don't have linuxconf now,
> and I don't know where linuxconf stores the static gateway setting.
> I'm just using 'route del' to remove default routing temporally. How to remove

If Redhat or Mandrake you could look in
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      10-06-2003, 11:30 AM
(E-Mail Removed) (Ync750s02) writes:

]Hi,

]What is the general procedure to use PPP connection? What is the standard
]way to configure my linux' DHCP/DNS/Gateway from the PPP connection?

By changing /etc/resolv.conf. Some ISPs will give you the DNS if you ask
for it ( add the line
usepeerdns
to /etc/ppp/options
which may get the other side to supply the dns addresses and write them
to /etc/ppp/resolv.conf, from where you can copy them to
/etc/resolv.conf vi a script in /etc/ppp/ip-up
)



]For my old computer, I used to manually edit the /etc/resolv.conf for my
]DNS. The trouble is that whenever I switch my ISP, which I did often, I had
]to edit it manually again.

]Now, I'm getting into more trouble. I can't even get onto the Internet. My
]current situation is that, I have a ethernet card, and was using it to

By default, most distributions assign the default dns to the ethernet
card, and pppd will not change that. Thus yuou need to either erase the
default route befor running pppd and use the defaultroute option to
pppd, or erase it and add the new default route to /etc/ppp/ip-up.



 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      10-06-2003, 11:32 AM
(E-Mail Removed) (Ync750s02) writes:

]Thank you all who replied! I am now able to connect via PPP.

]Another question, how can I removed the static gateway setting?
]I set my static gateway via linuxconf. I don't have linuxconf now,
]and I don't know where linuxconf stores the static gateway setting.
]I'm just using 'route del' to remove default routing temporally. How to remove
]it permenatly?


route del default removes it permanantly. Eg put that line into the end
of /etc/rc.d/rc.local
Or, go to /etc/sysconfig/network and remove the GATEWAY line.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEP key automatically. rishav Wireless Internet 1 01-22-2008 06:16 PM
The key is provided for me automatically .. sot Wireless Networks 1 03-01-2007 03:56 PM
fixed IP, but get DNS automatically ?? Frank Windows Networking 3 05-24-2006 08:26 AM
Subnet automatically changes phil Windows Networking 0 06-16-2004 02:46 PM
How can I reconnect automatically? [Huge] Broadband 2 09-12-2003 04:25 PM



1 2 3 4 5 6 7 8 9 10 11