[an error occurred while processing this directive] FreeBSD Handbook : PPP and SLIP : Setting up user PPP : PPP Configuration
Previous: Check the tun device
Next: PPP and static IP addresses

11.1.4. PPP Configuration

The meat of the problem.

Confusingly, it appears that both user ppp and pppd (the kernel level implementation of PPP) both assume configuration files kept in /etc/ppp. However, the sample configuration files provided are good for user ppp, so keep them around for reference. The easiest way to do this is:

# cd /etc
# mv ppp ppp.orig
# mkdir ppp
Configuring ppp requires that you edit somewhere between one and three files, depending on your requirements. What you put in them depends to some extent on whether your ISP allocates IP addresses statically (i.e., you get given one IP address, and always use that one) or dynamically (i.e., your IP address can be different during different PPP sessions).

However, there are a few things that you should do first, regardless of whether you are using static or dynamic IP addresses.

11.1.4.1. Configure the resolver(5)

The resolver is the part of the networking system that turns IP addresses into hostnames. It can be configured to look for maps that describe IP to hostname mappings in one of two places.

The first is a file called /etc/hosts (man 5 hosts). The second is the Internet Domain Name Service, a distributed data base, the discussion of which is beyond the realm of this document.

The resolver is a set of system calls that do the mappings, and you have to tell them where to get their information from. You do this by editing the file /etc/host.conf. Do not call this file /etc/hosts.conf (note the extra ``s'') as the results can be confusing.

This file should contain the following two lines,

hosts
bind
which instruct the resolver to look in the file /etc/hosts first, and then to consult the DNS if the name was not found in the /etc/hosts file.

It's probably a good idea to make sure you are not running the ``named'' service. Check your /etc/sysconfig file for the line that refers to ``namedflags'', and make sure the line reads

namedflags="NO"

11.1.4.2. Create the /etc/hosts(5) file

This file should contain the IP addresses and names of machines on your network. At a bare minimum it should contain entries for the machine which will be running ppp. Assuming that you're machine is called foo.bar.com with the IP address 10.0.0.1, /etc/hosts should contain:

127.0.0.1    localhost
10.0.0.1     foo.bar.com	       foo
The first line defines the alias ``localhost'' as a synonym for the current machine. Regardless of your own IP address, the IP address for this line should always be 127.0.0.1. The second line maps the name ``foo.bar.com'' (and the shorthand ``foo'') to the IP address 10.0.0.1.

If your provider allocates you a static IP address then use this in place of 10.0.0.1.

11.1.4.3. Create the /etc/resolv.conf file

/etc/resolv.conf contains some extra information required when you are not running a nameserver. It points the resolver routines at real nameservers, and specifies some other information.

At the very least, /etc/resolv.conf should contain one line with a nameserver which can be queried. You should enter this as an IP address. My /etc/resolv.conf contains:

nameserver 158.152.1.193
nameserver 158.152.1.65
Which are Demon Internet's two nameservers. Add as many ``nameserver'' lines as your ISP provides nameservers.


FreeBSD Handbook : PPP and SLIP : Setting up user PPP : PPP Configuration
Previous: Check the tun device
Next: PPP and static IP addresses [an error occurred while processing this directive]