[an error occurred while processing this directive] FreeBSD Handbook : PPP and SLIP : Setting up user PPP : Final system configuration
Previous: PPP and Dynamic IP configuration
Next: Setting up kernel PPP

11.1.7. Final system configuration

You now have PPP configured, but there's a few more things to do before it's ready to work. They all involve editing the /etc/sysconfig file.

Working from the top down in this file, make sure the ``hostname='' line is set, e.g.,

hostname=foo.bar.com
Look for the network_interfaces variable, and make sure the tun0 device is added to the list. My line looks like
network_interfaces="lo0 tun0 ep0"
but I have an ethernet card (ep0) to configure as well.

Now add an ifconfig line for the tun0 device. It should look something like

ifconfig_tun0="inet foo.bar.com y.y.y.y netmask 0xffffffff"
as before, change ``foo.bar.com'' to be your hostname, y.y.y.y is the IP address of your providers gateway, and 0xffffffff is the netmask they provided you with (in hexadecimal). Two common values for the netmask are
255.255.255.255 = 0xffffffff
255.255.255.0   = 0xffffff00
Set the routed flags to ``-s'' with the line
routedflags=-s
It's probably worth your while ensuring that the ``sendmail_flags'' line does not include the ``-q'' option, otherwise sendmail will attempt to do a network lookup every now and then, possibly causing your machine to dial out. My sendmail line looks like
sendmail_flags="-bd"
The upshot of this is that I must force sendmail to re-examine the mailqueue whenever I have the PPP link up, by typing
# /usr/sbin/sendmail -q
That should be about all you need to do to get PPP working with a static IP address. All that's left is to reboot the machine. During startup the tun0 device should be detected, and two lines like the following should be printed,
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500
inet x.x.x.x --> y.y.y.y netmask 0xffffffff 
At this point, it should all be working. You can now either type
# ppp
and then ``dial provider'' to start the PPP session, or, if you want ppp to establish sessions automatically when there is outbound traffic, type
# ppp -auto provider
This line could be added to your /etc/rc.local file.


FreeBSD Handbook : PPP and SLIP : Setting up user PPP : Final system configuration
Previous: PPP and Dynamic IP configuration
Next: Setting up kernel PPP [an error occurred while processing this directive]