PPP on NetBSD/VAX

I put this together for Gunnar awhile back in September.
I have not seen it posted on the FAQ yet, I know time slips away on me so I am not throwing rocks but if anyone else out there can benefit....

Intended for the FAQ:

5.5.1 Can I run PPP on NetBSD/VAX yet and if so how?

A: Yes, Depending on your hardware configuration, if you're running V1.1 or later (serial line support is now included). If you're running V1.0A you're out of luck though:

Specifically, it depends on which Asynchronous Mux you are running.  It can be done. Easily -when you look back on it. It seems a little confusing at first.

The following section describes a successful set up!

Credit for the next section really belongs to the folks who always seem
to help me: Ronny Svedman., Erno Palonheimo, John Wilson , Emannuel Dreyfus, David Brownlee, J.S. Havard, Dave McGuire, Jonas Oberg, Carl Lowenstien, der Mouse, Ken Wellsch, Geoff Roberts, J. Buck Caldwell, Jamie Lovick, Tom Ivar Helbekkmo, Hubert Feyrer, Jim Bender (who put the DHV specs online to help), Johnny Billquist,
Ragge, and of course Gunnar Helliesen,

5.5.1.1 Is there a working example of how to set up PPP on NetBSD VAX?

YES! Here is a configuration that works (uVaxII): KA630, 16MB mem, DEQNA, DHV11 (M3106), CMD Scsi Interface, RQDX3, and TK50. I am running NetBSD versions 1.3b and later versions (upto 1.3.2G).

I did a MAKEDEV dhv and got the resulting ttyS0 on up to ttyS15 in /dev.
The modem is a GVC external 14.4.

o Mux Set Up - Or how do I know the mux is working? DHV is compiled into
the kernel, I had to do a MAKEDEV though!.

Speed is limited to 38.4Kb. See the Troubleshooting section.

o The address I set up was (the default detected by netbsd): 7760440

o The switches looklike this: (to be provided)

o DHV to Bulkhead Connector Cables: DHV has two 50-pin connectors. They are labeled TH1 and TH2. The cables can be plugged to the board with the red stripe (pin1) up toward ceiling or down toward the floor.

The connector is layed out so that it does not injure the DHV if you plug it in one way or the other. The four DB25 bulk head adapter connects to the flat cable. I put it in so that
the cable connector is on the top, the red stripe is toward the right (on top) and I have ttyS0 connection on the bottom set of the 4!!!!

o Modem Cable - a straight thru modem cable that supports modem control leads (i.e. DSR, DTR, RTS, CTS, CD, SD, RD, Ground, etc.) is what I used.

o Directories and Files I set up:

/etc/ppp (directory)
/etc/ppp/chat-myisp (file)
/etc/ppp/peers (directory)
/etc/ppp/peers/myisp (file)

The files I used that work with fixed IP addresses (more or less) (and watch the quotation marks! Note that the commands have to be single quotes.):

o chat-myisp file (in the /etc/ppp directory)
#chat-myisp file
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
'' 'atz'
'OK' 'atdt##########'
'CONNECT' ''
'REPORT' 'CONNECT'
'TIMEOUT' '120'
'ogin:' 'xxxxxxxx'
'word:' 'xxxxxxxxxx'
'mode' 'ppp' <Note that in this one I expect the response 'mode' from my isp.

o myisp file (with static IPs in the /etc/ppp/peers directory)
#myisp file /dev/ttyS0 38400 crtscts
23.1.1.16:23.1.10.254 <I used network 23 here cause I like Max Headroom>
ipcp-accept-local ipcp-accept-remote
idle 120
connect '/usr/sbin/chat -v -f /etc/ppp/chat-myisp'
noauth

(Remember: plug in your own IP addresses. I used the
ipcp-accept functions because my distant end changes occaisionally!).
===============

And with Dynamic IP addressesing:
#Dynamic IP chat-myisp file
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY" ABORT "Username/Password Incorrect"
'' 'atz'
'OK' 'atdt##########'
'CONNECT' ''
'REPORT' 'CONNECT'
'TIMEOUT' '120'
'ogin:' 'xxxxxxxxxx'
'word:' 'xxxxxxxxx'
'TIMEOUT' '3'
'' 'ppp' <note that there is no response specified in this line, that
works with my
ISP, yours might be different!

# Dynamic IP myisp file setup data
ttyS0 38400 crtscts
ipcp-accept-local
ipcp-accept-remote
connect '/usr/sbin/chat -v -f /etc/ppp/chat-myisp'
defaultroute
noauth

o Routing
In the static IP example, I have the default route set up in my boot up script.
In the dynamic IP example, I have default route function in the script.
I had to build my routes manually, I don't have arp or rip running.

o What is missing/not done:
Connection shut down - I just let it timeout for now but I need to work
this.
o A scheme to do the routing setup depending on which ISP I use!

o Trouble shooting -
I wanted to make sure the DHV ports were working. I figured I would use a PC as a terminal, and login via the ttyS0 port.  I have a few BC03M and other home made null modem cables. I set up  /dev/ttyS0 in my /etc/ttys file (I copied the tty00 entry and editted it to be ttyS0). I did a kill -1 1 (to get init restarted and thus a getty for ttyS0). I could not get a log in prompt on what I thought was the ttyS0 connector.

That was the key!

I did not have the specs on the DHV cabling, and had picked the wrong RS232 conncector (DB25) out of the 8 on the bulkhead. I got my hands on a breakout box with LEDs. I found no DTR on the port I thought was ttyS0!
Then I found the right port. I also found that my cables did not pass all the proper signals the right way. I rigged my breakout box as the null modem for me.
Got a login prompt.
Then I hooked the up the modem.
Played with my scripts,
failed.
Did a dejanews search on netbsd and ppp. Found an Amiga posting that had a script.
The quotes were different (I had used double quotes!) and when I changed them I was suddenly almost online! I found I needed to add the delay in the script and then I was online!!

--
real address is shsrms at erols dot com
The Herbal Gypsy and the Tinker.