Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pppd to use tcp-ip:port ???

510 views
Skip to first unread message

Steph

unread,
Jan 12, 2002, 5:49:17 PM1/12/02
to
Is it possible to make pppd connect to a IP address and port?
For example, instead of hanging modems off of serial ports directly
connected to the backend of a linux server, I would to connect to a
modem rack that I have using IP and port. 10.10.10.1 port 3600. I
can't find an easy way to do this.
For fun, I ended up setting DecNET lat up on a DigitalUnix system
creating specail devices in /dev/lat/tty'X' that specifically points
to a terminal server connected to a rack of modems. Very sick and
twisted but works. The way to add LAT special devices in OSF/1:
/usr/sbin/latcp -A -P/dev/lat/tty01 -HCOM100 -RPORT_16
A. Where -HCOM100 resolves to 10.10.10.1 AND
B. Where -RPORT_16 resolves to port 3600

Now pppd thinks I have a modem hanging off the system using
/dev/latp/tty01. The problem is, I need to use a LINUX server for a
specific application and need to make pppd use TCP:PORT...
Help?

Thanks for your help and time,
Stephan
ab...@earthlink.net

Michael Mueller

unread,
Jan 13, 2002, 6:16:23 AM1/13/02
to
Hi Steph,

you wrote:
> Is it possible to make pppd connect to a IP address and port?

See the option "pty" for pppd and the program "netcat". E.g.

pppd pty "netcat 10.10.10.1 3600"


Michael

James Carlson

unread,
Jan 14, 2002, 6:55:16 AM1/14/02
to
ab...@earthlink.net (Steph) writes:
> Is it possible to make pppd connect to a IP address and port?

It's one of the sadly undocumented options in pppd.

Use "socket host:port" to do this. As in:

socket 10.10.10.1:3600

--
James Carlson, Solaris Networking <james.d...@east.sun.com>
SUN Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

Steph

unread,
Jan 16, 2002, 8:18:32 PM1/16/02
to
Wow, thank you for the light:) I was able to use netcat, (nc) to
create a connection for me but would get garbage not to mention chat
(expect) wouldn't want to play nice. When I use "socket" to connect
below is my pppd and chat command:
pppd socket 10.10.10.1:3600/tcp connect 'chat -v "" AT OK
ATDTXXXXXXXXXX ogin: test word: testing1' modem crtscts
In /var/log/messages I recieve:
send (AT^M)
expect (OK)
BUT that's it. I can telnet to my terminal server and show port 16
(which is tcp port 3600) and it displays that it is connected. For
some reason I can't get the darn thing to take any AT commands. If I
just execute a plane old telnet 10.10.10.1 3600 I get:
Trying 10.10.10.1...
Connected to com100
Escape character is '^]'.
AT

OK
From here I can simply type in AT and recieve an "OK" response back...
I don't want to sound like a bonehead, but I've read all man pages and
have resorted to information on the web, but I can't seem to find
useful information. This newsgroup has a wealth of informaton thanks
to people like you:=)

I'll keep playing around but if there is anything that anyone can
think of to help me, I would truley appreciate it. When it's working
(hopefully soon) I'll post what I have learned and done.

Thanks again,
Stephan
ab...@earthlink.net


On 14 Jan 2002 06:55:16 -0500, James Carlson <james.d...@sun.com>
wrote:

Stephan Kraus

unread,
Jan 18, 2002, 2:29:45 PM1/18/02
to
ab...@earthlink.net (Steph) wrote in message news:<3c46225e...@news.qwest.net>...

> Wow, thank you for the light:) I was able to use netcat, (nc) to
> create a connection for me but would get garbage not to mention chat
> (expect) wouldn't want to play nice. When I use "socket" to connect
> below is my pppd and chat command:
> pppd socket 10.10.10.1:3600/tcp connect 'chat -v "" AT OK
> ATDTXXXXXXXXXX ogin: test word: testing1' modem crtscts
> In /var/log/messages I recieve:
> send (AT^M)
> expect (OK)
> BUT that's it. I can telnet to my terminal server and show port 16
> (which is tcp port 3600) and it displays that it is connected. For
> some reason I can't get the darn thing to take any AT commands. If I
> just execute a plane old telnet 10.10.10.1 3600 I get:
> Trying 10.10.10.1...
> Connected to com100
> Escape character is '^]'.
> AT
>
> OK
So the scoop is, if I don't have local echo enabled on the connected
modem, I just sit there. Now, I can actually get the thing to dial!
BUT Good'OL LCP is killing me again!!! Here's what I get now:

$ pppd connect-delay 6000 lcp-max-configure 30 socket ttlcntl:6004
connect
'chat -v "" AT OK ATDTPHONENUMBER ogin: test word: testing' modem
crtscts

Jan 17 17:32:49 dazed pppd[7144]: pppd 2.4.1 started by xxx, uid 29
Jan 17 17:32:49 dazed chat[7146]: send (AT^M)
Jan 17 17:32:49 dazed chat[7146]: expect (OK)
Jan 17 17:32:49 dazed chat[7146]: ^?}^C^?{^C^?{^AAT^M^@^M^@
Jan 17 17:32:49 dazed chat[7146]: OK
Jan 17 17:32:49 dazed chat[7146]: -- got it
Jan 17 17:32:49 dazed chat[7146]: send (ATDTPHONNUMBER^M)
Jan 17 17:32:49 dazed chat[7146]: expect (ogin:)
Jan 17 17:32:49 dazed chat[7146]: ^M^@
Jan 17 17:33:04 dazed chat[7146]: ATDTPHONENUMBER^M^@^M^@
Jan 17 17:33:04 dazed chat[7146]: CONNECT^M^@
Jan 17 17:33:06 dazed chat[7146]: ^M^@
Jan 17 17:33:06 dazed chat[7146]: login:
Jan 17 17:33:06 dazed chat[7146]: -- got it
Jan 17 17:33:06 dazed chat[7146]: send (test^M)
Jan 17 17:33:06 dazed chat[7146]: expect (word:)
Jan 17 17:33:07 dazed chat[7146]: test^M^@
Jan 17 17:33:07 dazed chat[7146]: Password:
Jan 17 17:33:07 dazed chat[7146]: -- got it
Jan 17 17:33:07 dazed chat[7146]: send (testing^M)
Jan 17 17:33:07 dazed pppd[7144]: Serial connection established.
Jan 17 17:33:07 dazed pppd[7144]: Using interface ppp0
Jan 17 17:33:07 dazed pppd[7144]: Connect: ppp0 <--> /dev/pts/2
Jan 17 17:33:43 dazed pppd[7144]: LCP: timeout sending Config-Requests
Jan 17 17:34:04 dazed pppd[7144]: Terminating on signal 15.
Jan 17 17:34:04 dazed pppd[7144]: Connection terminated.

Like I said, I'm going to keep updating until I get this thing to
work!!
Any help still would be nice:)

C-YA,
Stephan

0 new messages