# Modem won't "connect"

## Twiggy794

I'm stuck with a strange problem.  My PCMCIA modem dials out okay, but I can't do anything after dialing up with wvdial.  The output from wvdial is all okay, no problems there.  But when I'm connected, I can't ping anything, connect to anything, nothin'.  I *do* have eth0 configured on this machine as well, so maybe there's a conflict here?

----------

## kevdoig

Is the problem that you cannot ping/connect at all when logged in as an ordinary user? try when logged in as root as this is sometimes just a permissions problem

----------

## Twiggy794

Regardless of whether or not it's a permissions problem, I should still be able to do this as my normal user.  I can dial out with Gnome-PPP or Wvdial and it connects, the logs and everything are normal.  But trying to connect to IRC, go to a web page, log onto Gaim, ping an IP, none of these things work.  It's like I'm not even connected at all.

----------

## nightblade

If you have your eth0 configured, then it's probably a routing problem.

When you connect to your ISP, you are given a default route. But if you have a default route already on eth0, the latter will be used.

Try:

```
route delete default
```

before launching wvdial.

If it doesn't work, please post the output of:

```

route -an

```

before and after launching wvdial

----------

## barlad

That's ppp0 that must be configured properly. What does ifconfig say about it once you have established conncetion?

----------

## Twiggy794

I would like to use both interfaces interchangeably if possible. I do this on my other box which is running Suse, so I know it's possible.

route -an says -a is an invalid option, so here's the output of route -n:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.11.13.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         10.11.13.1      0.0.0.0         UG    0      0        0 eth0

```

----------

## Twiggy794

 *Quote:*   

> That's ppp0 that must be configured properly. What does ifconfig say about it once you have established conncetion?

 

I'm at work right now so I can't grab this info, but I checked last night and it gave pretty straightforward output for my ppp0 connection.  I can post the exact output later tonight when I get home.  Didn't look like anything was out of the ordinary though.

----------

## nightblade

 *Twiggy794 wrote:*   

> I would like to use both interfaces interchangeably if possible. I do this on my other box which is running Suse, so I know it's possible.
> 
> route -an says -a is an invalid option, so here's the output of route -n:
> 
> ```
> ...

 

Yes, sorry.... the "a" was a typo.

That output is -before- the wvdial ? What do you have -after- ? Of course I assume that your ppp0 is up and running

----------

## barlad

 *Quote:*   

> 
> 
> I would like to use both interfaces interchangeably if possible.
> 
> 

 

What do you mean?  Is 10.11.13.1 a gateway to the net?

Nightblade is right, you will have to make sure you do not have two default routes or it will create problems. I believe you can put some scripts in the ppp directory to automatically modify the routing tbale at dial-in and dial-out. (i.e remove the previous default route at dial-in and restore it at dial-out).

Having some debug information from pppd to make sure everything works fine would be nice, unless you already did it. You can get those information by doing tail -f /var/log/messages | grep ppp (if you are using syslog) before running wvdial.

----------

## Twiggy794

 *Quote:*   

> What do you mean? Is 10.11.13.1 a gateway to the net? 

 

10.11.13.1 is my gateway at work.  Could this be causing a conflict?  I don't use a gateway on my Suse box and I can connect to the network at school with eth0 and then come home and dial-out without tweaking anything, (hence, interchangeable).

----------

## nightblade

 *Twiggy794 wrote:*   

>  *Quote:*   What do you mean? Is 10.11.13.1 a gateway to the net?  
> 
> 10.11.13.1 is my gateway at work.  Could this be causing a conflict?  I don't use a gateway on my Suse box and I can connect to the network at school with eth0 and then come home and dial-out without tweaking anything, (hence, interchangeable).

 

It should only be a matter of the ppp connection scripts, that in your Suse take care of deleting the default eth0-based route before setting up the ppp0.

As barlad suggested already, if you take a look at the /etc/ppp scripts on your Suse, you should be able to perform the same task on your gentoo.

----------

## Twiggy794

Cool, I'll poke around some tonight when I get home.  Thanks for the help!

----------

## barlad

EDIT: Nightblade types faster than I.

Yes that may create problems. I am not 100% positive about the way a system behaves when it has two routes to the same destination but Nightblade seemed to be sure it would not work. 

I have no experience with Suse but its scripts may very well do what I told you (remove previous default route at dial-in then restore it at dial-out). When you get back home, try to remove the default route before running wvdial. If that works, next step will be to make it so that you can interchangeably use both interfaces.

----------

## nightblade

 *barlad wrote:*   

> 
> 
> Yes that may create problems. I am not 100% positive about the way a system behaves when it has two routes to the same destination but Nightblade seemed to be sure it would not work. 
> 
> 

 

Well, I had the same problem when connecting via GPRS: I had to manually delete the eth0 default route (or shut down the eth0 interface) before connecting with ppp to my ISP.

But I haven't investigated the gory details at kernel level  :Smile: 

----------

## Twiggy794

I ran route default delete, but that didn't seem to do anything.

----------

## nightblade

 *Twiggy794 wrote:*   

> I ran route default delete, but that didn't seem to do anything.

 

it's:

```

route delete default

```

  :Smile: 

can you show the output of 'route -n' after the deletion of the default route and the ppp connection setup ?

----------

## JinxterX

I use pppconfig to setup dialup accounts, then use

```
pon provider
```

and

```
poff provider
```

I found with wvdial, it would do as you describe, connect but then no web access was possible, even though everything looked ok, using the pppconfig/pon/poff method yielded no such problems. Just something to consider anyway.  :Razz: 

----------

## Twiggy794

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

myipaddress      0.0.0.0         255.255.255.255   U     0      0        0 ppp0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         myipaddress      0.0.0.0         UG    0      0        0 ppp0 
```

^  did some cropping up there but that's what it says.   :Surprised: /

 *Quote:*   

> I use pppconfig to setup dialup accounts, then use
> 
> Code:
> 
> pon provider
> ...

 

Didn't work   :Confused: 

----------

## JinxterX

As root or superuser:

```
emerge pppconfig
```

then execute it

```
pppconfig
```

Create an account using the onscreen prompts, replacing "provider" with your isp name when it asks you, same with phone number, username and password etc, tell it where your modem is (e.g. /dev/modem) and what speed it is,select the option to finish and write files, quit pppconfig.

Check /etc/chatscripts/ for a file with the name you used for "provider", edit that file with appropriate AT commands for your modem, check /etc/ppp/peers/ and edit the file in there if you want to pass extra options to pppd.

Assuming your modem driver is installed and working correctly, then replacing "provider" with the name of your isp:

```
pon provider
```

should dial and connect the modem.

If you have done all this before and it didn't work, then you've made some fundamental errors somewhere else.

----------

## Twiggy794

 *Quote:*   

> Check /etc/chatscripts/ for a file with the name you used for "provider", edit that file with appropriate AT commands for your modem, check /etc/ppp/peers/ and edit the file in there if you want to pass extra options to pppd. 

 

Everything you said to do I had already done except for this.  How can I know what AT commands to use on my modem?  And what extra options might I want to use?

----------

## JinxterX

Check the modem manufacturers website for AT init strings for your modem, in my case I used the modem in Win98 first and copied the AT commands from the connect log file and inserted them into my chatscripts file,  extra options I used were to change MTU and MRU to values suitable for dialup (576 and 296 seem to work quite well).

----------

## Twiggy794

How would I grab the info out of Windows XP?  The modem is a bit old and not documented anymore.

----------

## barlad

I don't think that's coming from a poorly established connection (i.e no need to mess with pppd). Everything seems to be negotiated correctly and the routing table gets updated accordingly.

The last thing I am thinking of is a DNS problem. What do you have in /etc/resolv.conf ONCE you have established the ppp connection? (mask the IP). Can you ping the given IPs?

----------

## JinxterX

 *Twiggy794 wrote:*   

> How would I grab the info out of Windows XP?  The modem is a bit old and not documented anymore.

 

Make a dialup connection in XP, then look in /WINDOWS directory for a text file with extension ".log", the rest of filename will probably include the name of your modem, in that file you will see what AT commands are sent to the modem.

----------

## Twiggy794

 *Quote:*   

> The last thing I am thinking of is a DNS problem. What do you have in /etc/resolv.conf ONCE you have established the ppp connection? (mask the IP). Can you ping the given IPs?

 

Aha! I think we may have a winner.  Here's what my resolv.conf looks like:

```
domain linux

nameserver 192.168.x.x

```

192.168.x.x, that can't be right.  I dial straight into my ISP, so I'm not on any internal networks.  Here's the /etc/resolv.conf for my Suse box which dials out without a hitch:

```
domain site

nameserver 206.245.x.x

nameserver 209.92.x.x

```

So this looks like the problem, but it also looks like resolve.conf is dynamic?  So I'm not sure to go about fixing this.

[Edited the IP's obviously ]  :Wink: 

----------

## JinxterX

Oops, looks like I was leading you in the wrong direction, my ISP has a support section on it's site which lists the Primary and Secondary DNS numbers, they are in my /etc/resolv.conf, so check out your ISPs site.

----------

## Twiggy794

Can I just physically change the numbers then while connected to ppp0?  My ISP uses BSD but doesn't give Linux support  :Surprised: /

----------

## JinxterX

Umm, don't know, now I'm getting confused  :Razz:  All I did for my setup was edit /etc/resolv.conf and entered the Primary DNS and Secondary DNS numbers as nameservers, I connect with "pon" and it works.

----------

## Twiggy794

Oh  :Surprised: D  Well it's just that it appears that /etc/resolv.conf is dynamic, cus I get one set of nameservers when I'm connected with eth0 and that wrong one when I'm connected with ppp0.  So how can I get it to always use the correct ones?

----------

## JinxterX

Look in /etc/ppp/resolv/provider and put your nameserver numbers for ppp0 in there instead of /etc/resolv.conf, assuming you're using the "pon" method to connect.

----------

## Twiggy794

And it works!  Thanks for the help guys

----------

## JinxterX

Brilliant  :Razz: 

----------

## kevdoig

Hi, just got my gentoo box, which was completely set up and working, home where i don't have access to broadband. I have got myself a hardware 56k internal modem (Ebuyer if that helps). It installs in windows as an Intel56ep i believe, which works fine. Now i've read a few posts and tried booting a live CD, which doesn't seem to pick up the modem (or at least i cant see the module when i search). Does anyone fancy giving me a blow a blow by blow setup guide (lol, bet you love us nOObs in your forums!). I'm actually intending to run aol through Peng once its setup, but just setting up the moment would be great (sorry, thats a stupid a question and a mention of AOL in one post!). I don't really fancy downloading on the XP partition and then moving to distfiles as i'm aiming to lose the XP soon!

----------

## Twiggy794

It's not a Winmodem right?

On the other hand, you're brave for attempting to install Gentoo w/ dialup   :Very Happy: 

----------

## JinxterX

 *kevdoig wrote:*   

> Hi, just got my gentoo box, which was completely set up and working, home where i don't have access to broadband. I have got myself a hardware 56k internal modem (Ebuyer if that helps). It installs in windows as an Intel56ep i believe, which works fine. Now i've read a few posts and tried booting a live CD, which doesn't seem to pick up the modem (or at least i cant see the module when i search). Does anyone fancy giving me a blow a blow by blow setup guide (lol, bet you love us nOObs in your forums!). I'm actually intending to run aol through Peng once its setup, but just setting up the moment would be great (sorry, thats a stupid a question and a mention of AOL in one post!). I don't really fancy downloading on the XP partition and then moving to distfiles as i'm aiming to lose the XP soon!

 

I have this modem (Intel536ep) and got it working no problems, will post a guide in a few hours time. BTW it's not a hardware modem, it's a controllerless modem but it still works quite well in Linux.

----------

## kevdoig

cheers, much appreciated! Just to clarify twiggy, already got a gentoo system running, just need dial-up for updates/internet access. lol, think a dial-up install might be a bit much for me!

----------

## JinxterX

What kernel version are you using?

----------

## kevdoig

2.6.5 at the moment. I'll try 2.6.7 when i get this internet working. Is there much difference? Also i'm considering recomiling with gcc 3.4, an idea if there'll be a noticable difference? (lol, hoping in performance rather than stability)

----------

## JinxterX

Ok, look here : https://forums.gentoo.org/viewtopic.php?t=203605

----------

## kevdoig

lol, thanks, found it about an hour ago. I'm away to go try it now.

----------

## kevdoig

Excellent tutorial. Still having Problems. Whenever i try to dial the modem gets to "initialising modem", then just hangs there and does nothing. Any suggestions. I'm using the KDE dialer by the way (as i dont have pppconfig emerged).

----------

## JinxterX

 *kevdoig wrote:*   

> Excellent tutorial. Still having Problems. Whenever i try to dial the modem gets to "initialising modem", then just hangs there and does nothing. Any suggestions. I'm using the KDE dialer by the way (as i dont have pppconfig emerged).

 

I don't use KDE so hmm, try using the init string from the read.me file in the driver package, insert it into the KDE dialer script (assuming there is one).

----------

## kevdoig

cheers, i'll give it a go when i get back from work tonight

----------

