PPP for dial out is not working

Hi,

With Freebsd FreeBSD 9.2, I just signed up a very simple dial-up service to a local ISP. I have tested the line is working with Windows 7. But it doesn't work in Freebsd FreeBSD.

The ppp.conf is shown as below:
Code:
default:
 set log Phase Chat Connect LCP tun command
 set device /dev/cuau0
 set speed 38400
 deny lqr
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
 #set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
 #          \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

myisp:
        set phone 01198308100
        set login
        set authname saidid
        set authkey 20071967
        add default HISADDR
        enable dns
Here is the ppp.log message:
Code:
Nov 15 21:32:34 bridge ppp[1738]: Phase: Using interface: tun0
Nov 15 21:32:34 bridge ppp[1738]: Phase: deflink: Created in closed state
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: default: set device /dev/cuau0
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: default: set speed 38400
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: default: deny lqr
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: default: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 "" ATE1Q0 OK-AT-OK \dATDT\T TIMEOUT 40 CONNECT
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: set phone 01198308100
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: set login
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: set authname saidid
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: set authkey ********
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: add default HISADDR
Nov 15 21:32:34 bridge ppp[1738]: tun0: Command: myisp: enable dns
Nov 15 21:32:34 bridge ppp[1739]: tun0: Phase: PPP Started (ddial mode).
Nov 15 21:32:34 bridge ppp[1739]: tun0: Phase: bundle: Establish
Nov 15 21:32:34 bridge ppp[1739]: tun0: Phase: deflink: closed -> opening
Nov 15 21:32:34 bridge ppp[1739]: tun0: Phase: deflink: Connected!
Nov 15 21:32:34 bridge ppp[1739]: tun0: Phase: deflink: opening -> dial
Nov 15 21:32:34 bridge ppp[1739]: tun0: Chat: Phone: 0198308100
Nov 15 21:32:34 bridge ppp[1739]: tun0: Chat: Send: ATE1Q0^M
Nov 15 21:32:34 bridge ppp[1739]: tun0: Chat: Expect(5): OK
Nov 15 21:32:39 bridge ppp[1739]: tun0: Chat: Expect timeout
Nov 15 21:32:39 bridge ppp[1739]: tun0: Chat: Send: AT^M
Nov 15 21:32:39 bridge ppp[1739]: tun0: Chat: Expect(5): OK
Nov 15 21:32:44 bridge ppp[1739]: tun0: Chat: Expect timeout
Nov 15 21:32:44 bridge ppp[1739]: tun0: Warning: Chat script failed
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: dial -> hangup
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: Disconnected!
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: Connect time: 10 secs: 0 octets in, 0 octets out
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: 0 packets in, 0 packets out
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Fri Nov 15 21:32:34 2013
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: hangup -> opening
Nov 15 21:32:44 bridge ppp[1739]: tun0: Phase: deflink: Enter pause (30) for redialing.

Any help is very much appreciated.

Thanks
Sam
 
What 56K dial up modem suitable for FreeBSD?

Dear All,

Could anyone tell me what 56K dial up modem is suitable for FreeBSD 9?
I found all of them are built with USB, would this work with FreeBSD 9?
Can FreeBSD ppp or pppd configured to work direct with the Phone socket without a dial up modem? I tried Windows 7 without any dial up modem, and it works. I only used a phone filter which one end connect to the phone socket, another end connect the ADSL socket to the phone socket on the computer, and it works. But when I do the same for FreeBSD, it shown up "Chat script error".

Here is the content of the ppp.conf file:

Code:
######### start of the ppp.conf file ##################
#
# Note: >
# Section header names start in position 1 like default: 
# All embedded commands start in position 2.
#
default:
# The default section is processed every time 
# user PPP is started. Everything set here applies 
# to all of the following sections.

 set log Phase Chat LCP IPCP CCP tun 
#set log Phase tun
#use to avoid excessive log sizes
 set speed 115200   # serial port speed for 56K modems
 set timeout 0      # no idle time, will not disconnect 

 disable pred1 deflate lqr    # compression features 
 deny    pred1 deflate lqr    # line quality reporting
 disable ipv6                 # turn off ipv6 challenge

# This label is the start of the commands 
# for auto logon to ISP provider. 
myisp:

# Ensure that set device statement references 
# the correct serial port for your modem. ;
# (External com1 = cuaa0,  com2 = cuaa1)
# PCI modem com5 = cuaa4
# Only needed for dial out device.

 set device /dev/cuau0

# This dial string is needed for ISP's which 
# use standard Unix style login. 
# Which is most all ISP's.
#
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
     \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

# Edit the next three lines and replace the values with 
# the values which have been assigned by your ISP.

 set phone 01198308100
 set authname sapassword
 set authkey 200719677

 set redial 10 4  
# if busy redial 4 times with 10 second pause
 
# If your ISP assigns you a (dynamic) different IP 
# address each time you log in, then use the following 
# statement. If your ISP issued you a (static never changes)
# IP address to use every time you log in, then comment 
# out the next statement and uncomment the statements 
# following it.

# Get dynamic IP address from ISP if that's how they do it.
 set ifaddr 0.0.0.0/0  0.0.0.0/0  0.0.0.0  0.0.0.0

# Use static IP address from ISP if that's how they do it.
# Set static IP address your ISP assigned to you.
# s.s.s.s = your static IP address

# set ifaddr s.s.s.s 0.0.0.0/0 0.0.0.0 0.0.0.0

 add default HISADDR    # Add Mandatory sticky default route 
                        # Gets the ISP's DNS IP address 
                        # places them in resolv.conf for 
                        # reference by FBSD.

 disable iface-alias    # Stop adding old IP address as alias
                        # when ppp redials because line was 
                        # lost. These old IPs showed using
                        # ifconfig -a on tun0.

 iface clear             # Remove all previous IP addresses

##########  END OF PPP.CONF      ##########################


And here is the log message from ppp.log file:

Code:
Nov 16 09:09:11 bridge ppp[1586]: Phase: Using interface: tun0
Nov 16 09:09:11 bridge ppp[1586]: Phase: deflink: Created in closed state
Nov 16 09:09:11 bridge ppp[1590]: tun0: Phase: PPP Started (ddial mode).
Nov 16 09:09:11 bridge ppp[1590]: tun0: Phase: bundle: Establish
Nov 16 09:09:11 bridge ppp[1590]: tun0: Phase: deflink: closed -> opening
Nov 16 09:09:11 bridge ppp[1590]: tun0: Phase: deflink: Connected!
Nov 16 09:09:11 bridge ppp[1590]: tun0: Phase: deflink: opening -> dial
Nov 16 09:09:11 bridge ppp[1590]: tun0: Chat: Phone: 01198308100
Nov 16 09:09:11 bridge ppp[1590]: tun0: Chat: Send: AT^M
Nov 16 09:09:11 bridge ppp[1590]: tun0: Chat: Expect(5): OK
Nov 16 09:09:16 bridge ppp[1590]: tun0: Chat: Expect timeout
Nov 16 09:09:16 bridge ppp[1590]: tun0: Chat: Send: AT^M
Nov 16 09:09:16 bridge ppp[1590]: tun0: Chat: Expect(5): OK
Nov 16 09:09:21 bridge ppp[1590]: tun0: Chat: Expect timeout
Nov 16 09:09:21 bridge ppp[1590]: tun0: Warning: Chat script failed
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: dial -> hangup
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: Disconnected!
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: Connect time: 10 secs: 0 octets in, 0 octets out
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: 0 packets in, 0 packets out
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Sat Nov 16 09:09:11 2013
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: hangup -> opening
Nov 16 09:09:21 bridge ppp[1590]: tun0: Phase: deflink: Enter pause (10) for redialing.


Here is the devices:

Code:
# ls -l /dev/cuau*
crw-rw----  1 uucp  dialer  0x2c Nov 16 08:55 /dev/cuau0
crw-rw----  1 uucp  dialer  0x2d Nov 16 08:55 /dev/cuau0.init
crw-rw----  1 uucp  dialer  0x2e Nov 16 08:55 /dev/cuau0.lock

Output from ifconfig:

Code:
# ifconfig
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
        ether 00:14:22:d2:fe:d6
        inet 192.168.1.222 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::214:22ff:fed2:fed6%bge0 prefixlen 64 scopeid 0x1 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:16:6f:19:c5:85
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
tun0: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>


Any help is very much appreciated.

Thank you for reading.
Sam
 
good-beastie said:
Hi,

Does your computer have an internal or 'built in' modem?

I don't know. It is a Dell laptop, there is a built-in phone socket built in to it (just like all other laptop does).

Best regards
Sam
 
I don't know. It is a Dell laptop, there is a built-in phone socket built in to it (just like all other laptop does).

Ok.

That Dell must have an internal modem if you were able to use the internet with the Windows setup.

Try to dial in with quotes in ppp.conf

Code:
set authname "pppLogin"
Code:
set authkey "MyPassword"

The code is from /usr/src/share/examples/ppp/ppp.conf.sample
 
The built-in modem is probably a Winmodem. There is no support for these any more on FreeBSD. Serial hardware modems will work, I've used them. USB hardware modems should also work, but I have not tried those.

But let's step back for a second. If you have DSL, why not connect Ethernet from the FreeBSD system to the DSL modem? That is much easier than dealing with PPP and dialup, and much faster also.
 
wblock@ said:
The built-in modem is probably a Winmodem. There is no support for these any more on FreeBSD. Serial hardware modems will work, I've used them. USB hardware modems should also work, but I have not tried those.

But let's step back for a second. If you have DSL, why not connect Ethernet from the FreeBSD system to the DSL modem? That is much easier than dealing with PPP and dialup, and much faster also.

Hi thank you for your suggestion.
Where can I get a DSL modem that compatible with the 56k dial up service that provided by the isp?

Thanks
Sam
 
samsam9988 said:
Hi thank you for your suggestion.
Where can I get a DSL modem that compatible with the 56k dial up service that provided by the isp?

Sorry, I don't understand why there would be any dialup service on DSL. It's a digital line already, doing dialup over it is odd.

Isn't there a DSL modem in the house? Every one I've seen has both standard POTS phone jacks and an Ethernet port.
 
wblock@ said:
Sorry, I don't understand why there would be any dialup service on DSL. It's a digital line already, doing dialup over it is odd.

Isn't there a DSL modem in the house? Every one I've seen has both standard POTS phone jacks and an Ethernet port.

Hi,

I signed a 56k modem dial up service, I was given a phone number, login and password. Then I used these information to dial up from my Windows 7 without using any modem (just direct connect the phone socket on my laptop to the phone socket, and it works.

Now, I assumed it also works with freeBSD, but with the ppp.conf I got, it apparently does not.

In the past hour, I configured a DSL iConnect Access 621 modem in bridge mode, connect its ethernet port from the modem to the ethernet port on my freeBSD FreeBSD laptop. When I run the script with command ppp -ddial myisp, ppp.log shows this error:
Code:
Network Unreachable

Here is the updated PPP configuration I use:

Code:
# cat ppp.conf
default:
 set log Phase Chat LCP IPCP CCP tun command
 ##set device /dev/cua00
 set device PPPoE:bge0 # replace xl1 with your Ethernet device
 set speed 115200
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

myisp:
 set phone 01198308100
 set authname saidid
 set authkey 200719677
 #set login "ABORT NO\\sCARRIER TIMEOUT 5 rname:--rname: ppp word: ppp"
 set timeout 120
 add default HISADDR
 enable dns

ifconfig output:

Code:
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
        ether 00:14:22:d2:fe:d6
        inet 192.168.1.104 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

ppp.log error:

Code:
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: set phone 01198308100
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: set authname saidid
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: set authkey ********
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: set timeout 120
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: add default HISADDR
Nov 16 16:09:24 bridge ppp[1615]: tun0: Command: myisp: enable dns
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: PPP Started (ddial mode).
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: bundle: Establish
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: closed -> opening
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: Connected!
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: opening -> dial
Nov 16 16:09:24 bridge ppp[1620]: tun0: Chat: Phone: 01198308100
Nov 16 16:09:24 bridge ppp[1620]: tun0: Chat: Send: AT^M
Nov 16 16:09:24 bridge ppp[1620]: tun0: Warning: chat_Write: Network is unreachable
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: Disconnected!
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: dial -> logout
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: logout -> hangup
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: Disconnected!
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: Connect time: 0 secs: 0 octets in, 0 octets out
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: 0 packets in, 0 packets out
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase:  total 0 bytes/sec, peak 0 bytes/sec on Sat Nov 16 16:09:24 2013
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: hangup -> opening
Nov 16 16:09:24 bridge ppp[1620]: tun0: Phase: deflink: Enter pause (30) for redialing.

Thanks
Sam
 
I can't really help you with this problem, but just to try and clarify something. The problem here is, as @wblock@ already mentioned, most likely your 'winmodem' or "software modem" ("softmodem").

The trouble is that it's not a real modem in the sense of a serial device which you can use to send specific AT commands to. Instead it's a very limited piece of hardware which doesn't necessarily respond to AT commands but instead is fully depending on the software to actually make it work. Or put differently; a normal modem ("MOdulator / DEModulator") "translates" computer signals into an audible signal, which can then be send across a phone line.

A Winmodem, or softmodem, usually relies on the underlying software (basically the drivers for it) to provide the actual modulation support. As such you need more than merely the classic AT commands to make it work; you actually need to tell it how to do it's job.

And considering that most of those drivers are closed source and haven't been actively shared by their manufacturers (not even on Linux) it's pretty much impossible to make it work on an operating system outside of Windows (which, obviously, does provide these drivers). And in general only because some hardware vendors thought the idea of saving on production costs to be quite appealing.

There are exceptions of course, but in general I've always approached winmodems with "Doesn't work outside Windows".
 
Last edited by a moderator:
I have realised it is problematic with this setup, therefore I used a DSL modem. But it shows 'Network unreachable ' error.
 
Does your laptop have a serial port? If it does you can get an external modem and not have to worry about drivers. USB or PCMCIA would work too.
 
samsam9988 said:
I have realised it is problematic with this setup, therefore I used a DSL modem. But it shows 'Network unreachable ' error.

You need to connect to the phone system. DSL is not the same a POTS.
 
OJ said:
Does your laptop have a serial port? If it does you can get an external modem and not have to worry about drivers. USB or PCMCIA would work too.

Yes the laptop has a serial com port. But the DSL modem doesn't have one. Physically, how do I connect the COM port on my laptop to the phone socket? And do I have to recompile FreeBSD 9 kernel so that it include the following setting:

Code:
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET

Thanks,
Sam
 
samsam9988 said:
Yes the laptop have a serial com port. But the DSL modem doesn't have.
Physically, how do I connect the com port on my laptop to the phone socket?

I think you are confused. First, DSL and telephone service are not related, except by using the same wires. The DSL modem is of no use to you whatsoever if indeed you wish to use a dialup account. You need a modem to connect to the telephone system.

As was explained earlier, the built-in winmodem is for MS-Windows only, and is not a real modem. Since you likely cannot replace it, the alternative is to add an external modem. This takes three forms. The traditional form with a serial port. You use a cable to connect between the serial port on your computer and the serial port on the external modem.

You can also get an external modem which connects with USB but I have no experience with these.

For laptops there is also the option to put in a PCMCIA card. I don't know if your laptop has these slots, but it is easy to get a modem that plugs in there.

It's actually very simple, I just think you got confused by the fact that the DSL modem plugs into the same wires as the phone. :)
 
Is this an external or internal modem? Try setting the speed to 115200 and test with cu(1) if you can send AT commands to the modem. It should, at the very least, respond to "ATI3" and "ATI4".
 
samsam9988 said:
Hi,
I signed a 56k modem dial up service, I was given a phone number, login and password.
Then I used these information to dial up from my Windows 7 without using any modem (just direct connect the phone socket on my laptop to the phone socket, and it works.

Well, it used the internal Winmodem.

In the past 1 hour, I configured a DSL iConnect Access 621 modem in bridge mode, connect its ethernet port from the modem to the ethernet port on my freeBSD laptop. When I run the script with command "ppp -ddial myisp", ppp.log shown error: "Network Unreachable".

Try, as root, just dhclient bge0. If that works, there is no reason to mess with PPP at all.
 
Back
Top