OpenBSD supports two different sorts of Point-to-Point Protocol:
OpenBSD supports two different sorts of Point-to-Point Protocol: user PPP and kernel PPP. Kernel PPP has very low overhead, but not many features. User PPP is much easier to work with, and it has more features but more overhead in the system. We will discuss user PPP. The user PPP program is extremely configurable. You can set your system up to allow multiple users to dial particular service providers, or to allow incoming calls to access your system, or to provide address translation services. If you’re interested in any of that, you want to check ppp(8) for the full details. Most people who are using OpenBSD over a dial-up line either are using it as a workstation or as an Internet access device for a corporate network, so that is where we’re going to concentrate our attention. The configuration is identical in both cases. The /etc/ppp/ppp.conf file is the heart of PPP configuration. While it is possible to explicitly include other files, by default everything is in here. OpenBSD does not include ppp.conf by default, but it does include an /etc/ppp/ppp.conf.sample. This file makes a good place to start. You can create your own ppp.conf from scratch, but it’s much easier to use the sample and trim out everything you don’t want. Copy it to /etc/ppp/ppp.conf and open it in your favorite text editor. ppp.conf is divided into sections, by labels. A label is a single word followed by a colon, and it marks the beginning of a section. Sections continue until the next label. As you might guess, any line beginning with a pound sign is a comment. Default Entry The “default” entry is a special label that is used to set up basic characteristics of your modem. Every other connection uses the default entry, unless told specifically not to. This allows you to configure your modem’s base characteristics once, and use the same configuration to set up dial-up connections from multiple ISPs. default: set log Phase Chat LCP IPCP CCP tun command 1 set device /dev/cua01 2 set speed 115200 3 set dial “ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 “” AT OK-AT-OK ATE1Q0 OK \ dATDT\T TIMEOUT 40 CONNECT” 4 At the beginning, 1 we tell PPP to log events in the listed categories. You can read ppp(8) if you’re interested in what all of these mean. For the most part these are generally sensible things to log and will provide most of the debugging information you might need. Then we tell PPP 2 which serial port is attached to the modem. This is the only line you might realistically have to change to dial up to a modern ISP. Modems always run on a serial port. In this example, the modem is attached to serial port number 2. If your modem is attached to serial 1, you will want to change this line to read: set device /dev/cua00 As you should be able to guess, COM3 is /dev/cua02, and so on. Then we tell PPP what 3 speed the serial port is running at. 115,200 bits per second, or 144 Kbps, is the maximum speed a standard serial port will run at. Your modem might run at only 56 Kbps, but you don’t want to slow down your internal system for the modem. Let the modem and phone line throttle your bandwidth, if it’s going to. This setting gives you enough speed in PPP to support an external ISDN terminal adapter, if you have one. The last bit 4 is the connect string. This tells PPP how to handle the modem, what characters to expect when it connects, and various modem commands to connect your modem to a standard Internet dial-up account. Because the default will cover almost any circumstance where you’re connecting to the Internet, we’re not going to cut it to pieces. Again, you can find pretty full documentation of connect strings in ppp(8). Connection Configuration Page 179
Note: If you are looking for cheapest and affordable webspace to host and run your servlet application check Astra servlet hosting services