LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   connecting to net by pppd - problems (https://www.linuxquestions.org/questions/slackware-14/connecting-to-net-by-pppd-problems-138086/)

archish 01-24-2004 06:16 AM

connecting to net by pppd - problems
 
I am using Slackware 9.1 & I have problem getting my computer configured for internet access. I have an external modem(mobile phone connected to usb port) which gets connected but I am unable to browse. I am using the following command to connect to the internet

pppd /dev/modem 115200 debug usepeerdns defaultroute connect '/usr/sbin/chat -v "" at+cta=30 OK "atdt#777" CONNECT' mtu 264

I have checked the /etc/resolv.conf also in /etc/ppp/resolv.conf and found the following entries of my isp dns no:

nameserver 202.138.103.100
nameserver 202.138.96.2

The problem is it gets connected but I am unable to browse. I did ifconfig and got the following output

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:156 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11452 (11.1 Kb) TX bytes:11452 (11.1 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:220.226.12.75 P-t-P:97.236.2.14 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:264 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:167 (167.0 b) TX bytes:119 (119.0 b)

I am using this ppp0 connection only, then what is this lo one?
I have connecting the same way in other distros and it gets connected, its not working in slackware only. I badly need help on this one as I have been trying this for more than an month.
I am using the following options in the etc/ppp/options file.

lock
asyncmap 0
crtscts
modem
defaultroute
usepeerdns
name soman
noauth
/dev/modem 115200

kindly help me.

born4linux 01-24-2004 09:30 AM

check your routes:

route -n

u should have at least one route at the bottom which looks like this:

0.0.0.0 xxx.yyy.zzz.xyz 0.0.0.0 UG 0 0 0 ppp0

ping your DNS servers to see if you can reach them.

archish 01-24-2004 09:53 AM

pinging to the dns works, so what might be the problem?
I will check up the route one and post

archish 01-24-2004 10:21 AM

when i did route -n i got the following

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
97.236.2.14 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 97.236.2.14 0.0.0.0 UG 0 0 0 ppp0

citrus 01-24-2004 01:19 PM

try adding a search in your resolv.conf file

nameserver (dns)
search (dns)


this is what i just had to do on my slackware machine

it worked for me

archish 01-25-2004 08:02 AM

i did what you said still the problem is there :(
What is the problem is cannot find?

born4linux 01-25-2004 08:15 AM

try adding your isp's domain in /etc/resolv.conf:

nameserver 202.138.103.100
nameserver 202.138.96.2
search yourisp.com

archish 01-25-2004 08:48 PM

nope it still aint working :(

gnashley 01-26-2004 02:16 AM

Put the line for search first, then nameserver. Since you have the addresses for the nameservers you can leave out usepeerdns. For static dns /etc/ppp/resolv.conf shouldn't exist. But, if you want to use dynamic dns then leave usepeerdns in there, but you must remove etc/ppp/resolv.conf each time and make a link from /etc/resolv.conf to /etc/ppp/resolv.conf. You may also need to ping the server periodically so the connection stays up.
For usepeerdns to work, put this in /etc/ppp/ip-up:
(ping -i 60 $5 &) >/dev/null 2>&1
ln -s /etc/ppp/resolv.conf /etc/resolv.conf

and put this in /etc/ppp/ip-down:
killall ping 2>/dev/null
rm -f /etc/ppp/resolv.conf
rm -r /etc/resolv.conf

Since you know the addresses maybe it would be easiest just to run pppsetup and then connect/disconnect using the ppp-on/ppp-off scripts. It won't put the MTU references in there, but you can add them later.
If you want to use dynamic dns do a search here for dynamic dns and you'll find my script, which is an adaptation of pppsetup that will set you up for dynamic dns. Actually it would be a great help to me if you tried it, as I've been wanting to know if it works with other setups than my own.
here's the link:
http://www.linuxquestions.org/questi...ht=dynamic+dns

archish 01-26-2004 07:53 AM

didnt work neither ur script nor the mod u told me
it gives error in the last line of the script and exits

gnashley 01-26-2004 08:04 AM

Try running pppsetup and then use ppp-on
You might also check your /etc/hosts file to make sure it agrees with your HOSTNAME

archish 01-26-2004 08:09 AM

I have tried that pppsetup earlier and it dosent work either same problems.
I will check the Host file and how do i know if it agrees with my HOSTNAME?
The strange thing is this ting works in all other distros, i follow the same in slackware and it dosent work.

citrus 01-26-2004 02:53 PM

make sure that your gateway isn't the same as your ip
it should be say if your ip is xxx.xxx.xxx.xxx then your gateway SHOULD be
xxx.xxx.xxx.1
don't quote me on this tho
this is just what i experience with my isps

i hope i am correct on this issue
to change the gateway do
# route add default gw xxx.xxx.xxx.1

archish 01-27-2004 02:46 AM

my hostname is darkster

born4linux 01-27-2004 07:14 PM

can u do a dig first in the console? ie dig mail.yahoo.com if there are answers to your query, try pinging mail.yahoo.com

if you can ping it, then check your browser settings.


All times are GMT -5. The time now is 10:27 PM.