I have no problem connecting without the "dial-on-demand" option set. Neither do I use any chat script that I defined. I have attached a short log showing that pppd refuses to use the demand option without some kind of a connect script, while without it it works without a problem. In addition, if you take a look at the debug messages you can see that there are various prompts coming back from Netvision. My scenario is one in which I might not want to be connected to the ADSL line all the time, and I would the connection to kick in only on demand.
Yaacov Oleg Goldshmidt wrote: > > Yaacov Fenster - System Engineering Troubleshooting and other miracles ><[EMAIL PROTECTED]> writes: > > > Thanks for the scripts. However that is not what I am looking for. I > > have a Linux machine as a firewall/gateway (NATing) for the rest of the > > LAN. The issue of "dial on demand" is that whenever a packet comes in > > from the LAN destined for the outside, the dialer should kick in. When I > > set the "demand" option in /etc/ppp/options, pppd (being called by pptp) > > asks for a chat script to connect up. This is what I am looking for. I > > have no problem manually (or automatically) initiating a pptp connection > > to Netvision. I want one that is demand initiated. > > I understand what dial on demand is. What I didn't understand was why > bother if you have ADSL. > > I used to have a chat script for Netvision for a modem line, but I > seem to have lost it (used kppp for quite a while before I got > ADSL). As I wrote, it did not differ from whatever was written in the > appropriate HOWTO. Also see "man chat(8)". My guess is it will work > once you insert the right username from the ADSL-HOWTO. > > It will help if you send the chat script you are using to the list, > and tell us what's wrong, including debug information.
# # First let's try to connect with dial on demand enabled # gateway:~ # sh -x /tmp/c + pptp 10.0.0.138 --quirks=BEZEQ_ISRAEL debug user XXXXXX@INetvision remotename +'10.0.0.138 RELAY_PPP1' defaultroute mtu 1452 mru 1452 noauth /usr/sbin/pppd: connect script is required for demand-dialling gateway:~ # grep -v ^# /etc/ppp/options | sort -u asyncmap 0 crtscts debug defaultroute demand idle 360000 ipcp-accept-local ipcp-accept-remote kdebug 7 lcp-echo-failure 4 lcp-echo-interval 30 lock modem noauth nodetach noipx # # Now let's comment out the "demand" option. # Now it works... gateway:~ # vi /etc/ppp/options gateway:~ # grep -v ^# /etc/ppp/options | sort -u asyncmap 0 crtscts debug defaultroute idle 360000 ipcp-accept-local ipcp-accept-remote kdebug 7 lcp-echo-failure 4 lcp-echo-interval 30 lock modem noauth nodetach noipx gateway:~ # sh -x /tmp/c + pptp 10.0.0.138 --quirks=BEZEQ_ISRAEL debug user XXXXXX@INetvision remotename +'10.0.0.138 RELAY_PPP1' defaultroute mtu 1452 mru 1452 noauth using channel 2 Using interface ppp0 Connect: ppp0 <--> /dev/pts/3 sent [LCP ConfReq id=0x1 <mru 1452> <asyncmap 0x0> <magic 0xf1874bbd> <pcomp> <accomp>] sent [LCP ConfReq id=0x1 <mru 1452> <asyncmap 0x0> <magic 0xf1874bbd> <pcomp> <accomp>] rcvd [LCP ConfReq id=0x4e <mru 1500> <auth pap> <magic 0x4e27c9f>] sent [LCP ConfAck id=0x4e <mru 1500> <auth pap> <magic 0x4e27c9f>] rcvd [LCP ConfRej id=0x1 <asyncmap 0x0> <pcomp> <accomp>] sent [LCP ConfReq id=0x2 <mru 1452> <magic 0xf1874bbd>] rcvd [LCP ConfAck id=0x2 <mru 1452> <magic 0xf1874bbd>] sent [LCP EchoReq id=0x0 magic=0xf1874bbd] sent [PAP AuthReq id=0x1 user="XXXXXX@INetvision" password=<hidden>] rcvd [LCP EchoRep id=0x0 magic=0x4e27c9f] sent [PAP AuthReq id=0x2 user="XXXXXX@INetvision" password=<hidden>] rcvd [PAP AuthAck id=0x1 "Welcome to NetVision, YYYYYYYYY - Compugen Ltd.\r\n"] Remote message: Welcome to NetVision, YYYYYYYYY - Compugen Ltd.^M^J sent [IPCP ConfReq id=0x1 <addr 192.168.1.1> <compress VJ 0f 01>] sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>] rcvd [IPCP ConfReq id=0xee <addr 199.203.153.1>] sent [IPCP ConfAck id=0xee <addr 199.203.153.1>] rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>] sent [IPCP ConfReq id=0x2 <addr 192.168.1.1>] rcvd [LCP ProtRej id=0xea 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] rcvd [IPCP ConfNak id=0x2 <addr 199.203.153.55>] sent [IPCP ConfReq id=0x3 <addr 199.203.153.55>] rcvd [IPCP ConfAck id=0x3 <addr 199.203.153.55>] local IP address 199.203.153.55 remote IP address 199.203.153.1 Script /etc/ppp/ip-up started (pid 4883) Script /etc/ppp/ip-up finished (pid 4883), status = 0x0 Terminating on signal 2. Script /etc/ppp/ip-down started (pid 4898) sent [LCP TermReq id=0x3 "User request"] Terminating on signal 15. Script /etc/ppp/ip-down finished (pid 4898), status = 0x0 sent [LCP TermReq id=0x4 "User request"] Terminating on signal 15. Modem hangup Connection terminated. Connect time 0.3 minutes. Sent 110 bytes, received 40 bytes. gateway:~ # exit