8. Communication and Networking

Contents of this section

Please note that this section is rather sparse because it is waiting for a few HOWTO's to be written.

8.1 How do I set up networking under NetBSD?

There are several sources of information about this. If you already have networking running under Mac OS, then you will probably want to check out the HOWTO page for information on adapting your MacTCP or Open Transport settings to NetBSD: http://www.macbsd.com/macbsd/howto/

On the other hand, if you are looking at a fairly in-depth treatment of NetBSD networking, you can take a look at the Beginner's Guide to TCP/IP Networking and Networking FAQ for NetBSD/amiga: http://www.feyrer.de/NetBSD/NWF/nwf_toc.html

Thanks to Henry B. Hotz (h.b.hotz@jpl.nasa.gov) for providing the above information.

8.2 I'm trying to use cu to establish a SLIP connection, but everytime I try, I get an error message and am disconnected from the serial port. How can I fix this?

If you're having problems with cu working, one can use PPP or SLIP via dip instead.

The dip program is in the NetBSD Packages Collection, see:


For information on how to set up a PPP connection, see the FAQ on PPP .

8.3 How do I set up a connection using PPP?

One way is to read the manual pages for the chat program and pppd, but perhaps the easiest way to do this is to get the PPP-kit put together by Bill Studenmund (wrstuden@loki.stanford.edu):


Since the kit is located in a subdirectory of the /private FTP directory, you must cd directly to Bill's directory. Otherwise you may get permissions problems due to the fact that read permission is turned off on /private.

The kit includes instructions on how to set it up and use it. It should be untarred in the /etc directory, or else have its contents moved there before you use it. Bill admonishes that the modem init string needs to be changed to work with your modem, though.

Paul Goyette (paul@pgoyette.bdt.com) has contributed a newer PPP kit which supports demand-dial PPP . See below for more details.

8.4 Does NetBSD include demand-dial PPP?

NetBSD has included support demand-dial PPP since the 1.2 release. For information on how to set it up, you can either read the pppd(8) manual page for more information on this option, or you can get the new dial-on-demand PPP kit contributed by Paul Goyette (paul@pgoyette.bdt.com):


Since the kit is located in a subdirectory of the /private FTP directory, you must cd directly to Paul's directory. Otherwise you may get permissions problems due to the fact that read permission is turned off on /private.

The kit includes all the files you need, including a HOWTO on getting PPP up and running on your system.

Keep in mind that demand-dial PPP requires that your ISP give you a static IP address.

8.5 Does anyone have any idea how to use PAP with chat or pppd?

From Bill Studenmund (wrstuden@loki.stanford.edu):

chat does nothing w/ PAP. pppd can use it, and you don't need special scripts to do it.
To make PAP work, see the man pages on pppd.
The basic idea is you make a file /etc/ppp/pap-secrets which contains the secrets for authentication. Each line has a server & client field (who's authenticating to whom) and a secret.
The only possable changes needed to use PAP are (AFAIK) you must have the chat script end right where the PAP authentication will happen (as pppd does it, not chat). And your options must not disalow it. pppd will allow autentication if requested by default, so when the other side asks, it will receive.
Here are suggestions for how to change the ppp.setup scripts. As I've not used PAP, I'm depending on the list to correct anything I get wrong. :-)
1) Delete everything in the chat script after the "CONNECT" line. Once chat sees CONNECT, it's done. Leave the "" at the end of the line.
Thus all the login ID and password stuff will disapear from the chat file. You can leave the things in /etc/ppp/ppp-login. They won't hurt anything after you change the chat script.
2) Make a /etc/ppp/pap-secrets file and put in it:
* * <your password>
3) Add a line to /etc/ppp/options which contains:
user (your user name)
I think this should cover everything.

8.6 Does anyone have a PPP setup that works with an ISP that doesn't allocate static IP addresses?

From Bill Studenmund (wrstuden@loki.stanford.edu):

If you have a working ppp setup, YOU have a setup which works w/ dynamic addresses. Just don't have an IP address set in your options file and the other end will tell you your address. Unless you do something silly like tell ppp to not negotiate the address.
ppp works fine w/ dynamic addresses. Oh, and do set the "defaultroute" option for your dialup connection, and pppd will make it all work right. When you dial up, you will get a default route. When you quit the ppp link, the default route will go away. When you dial up again, you will get a (different but correct) default route again.
To recap, your ppp chat file should end with the connection ready for pppd to take over. If you are using account name & password logins, the chat script should send them (possably with magic to keep others from seeing the pw in a text file). If you are using PAP or CHAP, the chat script should end just when PAP or CHAP authentication will happen.

Bill's PPP kit on puma should work just fine with dynamic addresses. Keep in mind that demand-dial PPP requires static IP addresses, though.

8.7 Is there any documentation on PPP other than the manual pages?

Yes. O'Reilly and Associates happens to have the chapter on PPP configuration from the Linux Network Administrator's Guide available on the web:

Although it was not written for NetBSD, most of it still applies, and the section on PAP/CHAP authentication is quite helpful.

You might also want to try Mark Andres' (mark@ratbert.aisol.net) page on how he setup PPP for his system:


8.8 Why won't my network interface work now that I've upgraded to NetBSD 1.3?

This is because the network interface file format and naming convention have changed. Instead of hostname.ae0, you now have a file named ifconfig.xxN where xx is one of ae, sn, or mc depending on your networking hardware, and N is the number of the interface (probably 0 unless you have multiple interfaces of the same type). The contents of this new file are simply the arguments that you would give to the ifconfig command to bring up the interface manually. Please see the Networking Howto for more info:


8.9 I know that Netatalk is now supported in the kernel, but where can I find the userland utilities?

They are not currently integrated in the NetBSD distribution (although this is tentatively planned to happen by the 1.4 release). A version of Netatalk userland which has been patched to work with NetBSD is available at:

ftp://ftp.macbsd.com/pub/NetBSD/contrib/netatalk/ and ftp://ftp.NetBSD.org/pub/NetBSD/misc/netatalk/

The next release of Netatalk should include the NetBSD-specific patches.

8.10 Since the kernel understands AppleTalk now, does this mean I can use LocalTalk on my serial ports?

No. LocalTalk support isn't in the kernel quite yet. However, Bill Studenmund (wrstuden@loki.stanford.edu) is working on this when he has time.

Next Chapter | Previous Chapter

Table of contents of this chapter, General table of contents

Beginning of this Chapter

(Contact us) $NetBSD: faq-8.html,v 1.2 2007/06/09 20:18:05 dsieger Exp $
Copyright © 1994-2003 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.