WinXP as a PPP server, Linux client, failures, help needed - PPP

This is a discussion on WinXP as a PPP server, Linux client, failures, help needed - PPP ; Hi all, I'm old enough to remember configuring parity and stop bits on 300 baud modems connections to BBSes, but I have been a software engineer, not a sysadmin, for lo these past 20 years or so, and so I ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: WinXP as a PPP server, Linux client, failures, help needed

  1. WinXP as a PPP server, Linux client, failures, help needed

    Hi all,

    I'm old enough to remember configuring parity and stop bits on 300 baud
    modems connections to BBSes, but I have been a software engineer, not a
    sysadmin, for lo these past 20 years or so, and so I am out of my
    depth. Help would be greatly appreciated.

    I am tasked with getting a PPP connection working between an embedded
    device and a Windows XP system. The embedded device will have a 3-wire
    serial port and run pppd, but I am trying to do this in stages, since
    the device is not ready for testing yet:

    - I have an XP box running the server connection. I was able to piece
    together a cable with a null modem adapter and get another XP box to
    connect as a client. (Note that I am not using a modem -- just a serial
    cable). I'm calling this stage 1: prove that the XP box can act as a
    PPP client. This connection is configured as follows:

    - Incoming Connection under network connections/advanced connection,
    set up to use Communications cable between two computers (COM 1). The
    VPN checkbox is off. The port is set to 115200, no flow control, 8
    bits, no parity, 1 stop bit.

    - I had some difficulty getting the standard Guest account to work,
    so I have created a pppclient account with a password. I have disabled
    "Always allow directly connected... to connect without providing a
    password" and "Require all users to secure their passwords and data."
    The client provides a password, and uses its COM port configured the
    same way.

    - The TCP/IP configuration on the server box is set to "Allow callers
    to access my local area network" and "Assign TCP/IP addresses
    automatically using DHCP". This seems to work; ipconfig at the XP
    command line shows my regular network connection over Ethernet, and
    then a separate host address it is using for the dial-up connection. I
    have made some attempts to allow the host to share the upstream
    Internet connection, messing around with firewalls and ports and
    what-not, but this is not working yet. When the client is connected
    over the serial port, I _can_ ping the host address at least, even if I
    can't open a web page.

    - I note that if I open up a HyperTerminal window on the server
    instead of enabling the server connection, I get text like
    CLIENTCLIENTCLIENT from the client.

    OK, so partial success with stage 1: make sure I have a working XP
    server for my PPP connection; I still need to confirm that the client
    will be able to do things like telnet and FTP, but I can work on that
    more later.

    Now, on to stage 2: attempt to get a Linux box to connect as a client.
    I have a trash PC I found left for for garbage pickup with no hard
    drive running a Knoppix CD distro with a memory stick for my home
    directory. I'm attempting something like:

    pppd /dev/ttyS0 115200 debug nocrtscts noipdefault defaultroute
    -detacht

    I have turned on auth in /etc/ppp/options and attempted to provide a
    password in the chap-secrets file, although I may not be doing this
    correctly. I'm getting:

    sent [LCP ConfReq id=0x1
    ]

    repeatedly, until I get LCP: timeout sending Config-Requests.

    I tried running the terminal on the server to see what the client was
    sending, and, interestingly, instead of the client sending
    CLIENTCLIENTCLIENT it is sending blocks that look like ~ }#!}!}!}
    }4}"}&} } } } }

    so, clearly, the XP server is not getting what it expects.

    I have access to some HOWTOs and chapter 8 of the Linux Network
    Administrator's Guide, 2nd Edition, and so I think I could probably
    figure out how to set up a chat script, if that is what is required.
    But I don't know what the client is expecting. I could try to run a
    terminal window on the XP client during authentication, but I don't
    think that is possible because the port is in use. I suppose their
    might be a way to sniff the characters on the serial line but that
    seems like a whole new ball of worms.

    Thanks to anyone with advice!

    Paul R. Potts


  2. Re: WinXP as a PPP server, Linux client, failures, help needed

    paul@thepottshouse.org writes:
    > Now, on to stage 2: attempt to get a Linux box to connect as a client.
    > I have a trash PC I found left for for garbage pickup with no hard
    > drive running a Knoppix CD distro with a memory stick for my home
    > directory. I'm attempting something like:
    >
    > pppd /dev/ttyS0 115200 debug nocrtscts noipdefault defaultroute
    > -detacht


    Did you do any web searches on the issue?

    The problem is fairly well-known. Windows is a bit lame when it comes
    to PPP architecture: it assumes that there's always a modem there.
    Even when there's no modem present, there's one there, as far as
    Windows is concerned. It's just a "null" modem.

    Thus, you have to provide a chat script for this "null modem."
    Counter-intuitive in the extreme, I agree, but true.

    The answer is adding something like this to your pppd configuration:

    connect "chat CLIENT CLIENTSERVER"

    Here's one "howto" that discusses the issue:

    http://www.linux.com/howtos/Serial-L...OWTO/x24.shtml

    --
    James Carlson, KISS Network
    Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677

  3. Re: WinXP as a PPP server, Linux client, failures, help needed

    James Carlson wrote:
    > paul@thepottshouse.org writes:
    >> Now, on to stage 2: attempt to get a Linux box to connect as a client.
    >> I have a trash PC I found left for for garbage pickup with no hard
    >> drive running a Knoppix CD distro with a memory stick for my home
    >> directory. I'm attempting something like:
    >>
    >> pppd /dev/ttyS0 115200 debug nocrtscts noipdefault defaultroute
    >> -detacht


    > Did you do any web searches on the issue?


    > The problem is fairly well-known. Windows is a bit lame when it comes
    > to PPP architecture: it assumes that there's always a modem there.
    > Even when there's no modem present, there's one there, as far as
    > Windows is concerned. It's just a "null" modem.


    > Thus, you have to provide a chat script for this "null modem."
    > Counter-intuitive in the extreme, I agree, but true.


    > The answer is adding something like this to your pppd configuration:


    > connect "chat CLIENT CLIENTSERVER"


    Wouldn't using

    connect "chat -t 0 CLIENT CLIENTSERVER"

    be better (chat waits "forever")?

    Also using the pppd option "xonxoff" (and maybe "local" too?) might
    be a good idea for a 3-wire nullmodem. Using xonxoff makes nocrtscts
    (mentioned in the link) redundant.

    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    /* Bluffing in a poker game can win big; bluffing in a newsgroup
    only attracts sharks. */

  4. Re: WinXP as a PPP server, Linux client, failures, help needed

    Thanks to those who replied! I am getting traction and have a
    mostly-working solution using a Linux client; now on to trying to make
    the same configuration work on the embedded platform.

    Clifford Kite wrote:
    > James Carlson wrote:
    > > paul@thepottshouse.org writes:
    > >> Now, on to stage 2: attempt to get a Linux box to connect as a client.
    > >> I have a trash PC I found left for for garbage pickup with no hard
    > >> drive running a Knoppix CD distro with a memory stick for my home
    > >> directory. I'm attempting something like:
    > >>
    > >> pppd /dev/ttyS0 115200 debug nocrtscts noipdefault defaultroute
    > >> -detacht

    >
    > > Did you do any web searches on the issue?


    I hammered Google pretty hard. Adding more keywords ("pppd Windows XP
    serial null modem chat" etc.) altogether failed to narrow things down,
    but I scanned through as many results as I could. I found a couple of
    articles that seemed the most helpful, but they both actually describe
    initiating the connection from the XP side:

    http://windows.gumph.org/content/net...-to-linux.html

    http://www.linux-magazine.com/issue/...onnections.pdf

    There is also a Tivo-to-XP article floating around in various versions
    from various sources that got me started, although it appears that
    altering the modem scripts and using a third-party program to enable
    upstream routing of the internet connection are both entirely
    unnecessary for what I'm doing.

    > > The problem is fairly well-known. Windows is a bit lame when it comes
    > > to PPP architecture: it assumes that there's always a modem there.
    > > Even when there's no modem present, there's one there, as far as
    > > Windows is concerned. It's just a "null" modem.

    >
    > > Thus, you have to provide a chat script for this "null modem."
    > > Counter-intuitive in the extreme, I agree, but true.

    >
    > > The answer is adding something like this to your pppd configuration:

    >
    > > connect "chat CLIENT CLIENTSERVER"


    What I wound up doing is

    options.ttyS0:

    lock
    noauth
    asyncmap 0
    nocrtscts
    local
    defaultroute
    usepeerdns
    user pppclient
    1152000
    connect 'chat -v -f /etc/ppp/talk_to_win_server.chat'

    the chat script reads:

    TIMEOUT 3
    '' CLIENTCLIENT
    CLIENTSERVER

    The line "CLIENTCLIENT" should theoretically just read "CLIENT" but
    that doesn't work... unclear why.

    > Wouldn't using
    >
    > connect "chat -t 0 CLIENT CLIENTSERVER"
    >
    > be better (chat waits "forever")?


    I will try this and see if I can get it to catch "CLIENT"

    > Also using the pppd option "xonxoff" (and maybe "local" too?) might
    > be a good idea for a 3-wire nullmodem. Using xonxoff makes nocrtscts
    > (mentioned in the link) redundant.


    Will try these too, thanks. I don't know if I will be able to get flow
    control on the board, but will try.

    Paul


  5. Re: WinXP as a PPP server, Linux client, failures, help needed

    FYI:

    I looked up the HOWTO document. Helpful, has clearer examples on
    pap-secrets file, thanks!

    connect "chat CLIENT CLIENTSERVER"

    fails because this makes the client expect "CLIENT" instead of
    "CLIENTSERVER" (this works if the XP box initiates the connection). I
    could conceivably get pppd on the embedded device to connect properly
    if initiated from either end, but maybe later.

    connect "chat -t 0 CLIENT CLIENTSERVER" also fails. For some reason, I
    can't get it to work like this either:

    connect "chat -t 0 -v '' CLIENT CLIENTSERVER"

    (note the single quoted empty string). In theory this should expect
    nothing, send CLIENT, and then expect CLIENTSERVER. But if I modify it
    to send CLIENTCLIENT as follows:

    connect "chat -t 0 -v '' CLIENTCLIENT CLIENTSERVER"

    it works. It appears the server is losing a character or something.
    However today I can't tunnel my internet connection, which worked
    yesterday. Grrr...

    Paul


  6. Re: WinXP as a PPP server, Linux client, failures, help needed

    Paul wrote:
    > FYI:


    > I looked up the HOWTO document. Helpful, has clearer examples on
    > pap-secrets file, thanks!


    > connect "chat CLIENT CLIENTSERVER"


    > fails because this makes the client expect "CLIENT" instead of
    > "CLIENTSERVER" (this works if the XP box initiates the connection). I
    > could conceivably get pppd on the embedded device to connect properly
    > if initiated from either end, but maybe later.


    > connect "chat -t 0 CLIENT CLIENTSERVER" also fails. For some reason, I
    > can't get it to work like this either:


    > connect "chat -t 0 -v '' CLIENT CLIENTSERVER"


    If the XP side isn't active as a "server" then it won't work; the XP
    doesn't receive CLIENT and so cannot respond. If it's activated as
    as a server after CLIENT has been sent then it's too late.

    > (note the single quoted empty string). In theory this should expect
    > nothing, send CLIENT, and then expect CLIENTSERVER. But if I modify it
    > to send CLIENTCLIENT as follows:


    > connect "chat -t 0 -v '' CLIENTCLIENT CLIENTSERVER"


    Amusing.

    Weeel, I admit to being confused about which side was the caller -
    despite the post's title. Apparently MS considers the caller as a
    "client" and the callee as a "server." Since pppd is the caller,
    if the XP is active as a "server" then this may be all you need
    on pppd's side:

    connect "chat '' CLIENT CLIENTSERVER \c"

    (send CLIENT, then expect CLIENTSERVER and when it arrives send nothing.)

    > it works. It appears the server is losing a character or something.


    I think it's likely that the XP side is now acting as a server and
    the CLIENTCLIENT sent from chat is interpreted by the XP as CLIENT
    since CLIENTSERVER isn't matched. So the XP sends CLIENTSERVER which
    is caught by chat and real negotiations begin.

    Then again, I could be way off the mark since I've no practical
    experience with any nullmodem connections...

    > However today I can't tunnel my internet connection, which worked
    > yesterday. Grrr...


    > Paul


    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"

+ Reply to Thread