Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring Solaris port back up to date #525

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Linux distributions. The Linux kernel code supports using PPP over
things other than serial ports, such as PPP over Ethernet and PPP over
ATM.

Similarly, the kernel code for Solaris is no longer distributed with
this package. See the Illumos web site for pointers to the kernel
module source code and build environment.

https://www.illumos.org/


Installation.
*************
Expand Down Expand Up @@ -172,7 +178,7 @@ to [email protected], or report them to the maintainer for the
port for the operating system you are using:

Linux Paul Mackerras <[email protected]>
Solaris James Carlson <carlson@workingcode.com>
Solaris James Carlson <carlsonj@workingcode.com>


Copyrights:
Expand Down
248 changes: 48 additions & 200 deletions README.sol2
Original file line number Diff line number Diff line change
@@ -1,215 +1,69 @@
NOTE: These instructions are out of date.

This file describes the installation process for ppp-2.4 on systems
running Solaris. The Solaris and SVR4 ports share a lot of code but
are not identical. The STREAMS kernel modules and driver for Solaris
are in the solaris directory (and use some code from the modules
directory).

NOTE: Although the kernel driver and modules have been designed to
operate correctly on SMP systems, they have not been extensively
tested on SMP machines. Some users of SMP Solaris x86 systems have
reported system problems apparently linked to the use of previous
versions of this software. I believe these problems have been fixed.


Installation.
Introduction.
*************

1. Run the configure script and make the user-level programs and the
kernel modules.

./configure
make

The configure script will automatically find Sun's cc if it's in
the standard location (/opt/SUNWspro/bin/cc). If you do not have
Sun's WorkShop compiler, configure will attempt to use 'gcc'. If
this is found and you have a 64 bit kernel, it will check that gcc
accepts the "-m64" option, which is required to build kernel
modules.

You should not have to edit the Makefiles for most ordinary cases.

2. Install the programs and kernel modules: as root, do

make install

This installs pppd, chat and pppstats in /usr/local/bin and the
kernel modules in /kernel/drv and /kernel/strmod, and creates the
/etc/ppp directory and populates it with default configuration
files. You can change the installation directories by editing
solaris/Makedefs. If you have a 64 bit kernel, the 64-bit drivers
are installed in /kernel/drv/sparcv9 and /kernel/strmod/sparcv9.

If your system normally has only one network interface at boot
time, the default Solaris system startup scripts will disable IP
forwarding in the IP kernel module. This will prevent the remote
machine from using the local machine as a gateway to access other
hosts. The solution is to create an /etc/ppp/ip-up script
containing something like this:

#!/bin/sh
/usr/sbin/ndd -set /dev/ip ip_forwarding 1

See the man page for ip(7p) for details.

Integrated pppd
***************
This file describes the installation process for ppp-2.5 on systems
running an OpenSolaris-derived OS, such as Illumos or OpenIndiana.
For these systems, the STREAMS kernel modules are supplied with the
OS itself and are used as-is by this distribution. For more
information on these distributions (including kernel source) see:

Solaris 8 07/01 (Update 5) and later have an integrated version of
pppd, known as "Solaris PPP 4.0," and is based on ppp-2.4.0. This
version comes with the standard Solaris software distribution and is
supported by Sun. It is fully tested in 64-bit and SMP modes, and
with bundled and unbundled synchronous drivers. Solaris 8 10/01
(Update 6) and later includes integrated PPPoE client and server
support, with kernel-resident data handling. See pppd(1M).
https://www.illumos.org/
https://illumos.org/docs/about/distro/

The feature is part of the regular full installation, and is
provided by these packages:
For Oracle Solaris systems, either use the vendor-supplied PPP
implementation ("Solaris PPP 4.0" based on pppd-2.4.0), or download
an older version of the pppd sources here:

SUNWpppd - 32-bit mode kernel drivers
SUNWpppdr - root-resident /etc/ppp config samples
SUNWpppdu - /usr/bin/pppd itself, plus chat
SUNWpppdx - 64-bit mode kernel drivers
SUNWpppdt - PPPoE support
SUNWpppg - GPL'd optional 'pppdump' and plugins
SUNWpppgS - Source for GPL'd optional features
https://download.samba.org/pub/ppp/

Use the open source version of pppd if you wish to recompile to add
new features or to experiment with the code. Production systems,
however, should run the Sun-supplied version, if at all possible.
The last version known to compile and run correctly on Oracle
Solaris 10 is pppd-2.4.8. It may be possible to compile and use
newer versions on either Solaris 11 or by installing third-party
compilers; this has not been tested.

You can run both versions on a single system if you wish. The
Solaris PPP 4.0 interfaces are named "spppN," while this open source
version names its interfaces as "pppN". The STREAMS modules are
similarly separated. The Sun-supplied pppd lives in /usr/bin/pppd,
while the open source version installs (by default) in
/usr/local/bin/pppd.

Dynamic STREAMS Re-Plumbing Support.
************************************

Solaris 8 (and later) includes dynamic re-plumbing support. With
this feature, modules below ip can be inserted, or removed, without
having the ip stream be unplumbed, and re-plumbed again. All state
in ip for the interface will be preserved as modules are added or
removed. Users can install (or upgrade) modules such as firewall,
bandwidth manager, cache manager, tunneling, etc., without shutting
the interface down.

To support this, ppp driver now uses /dev/udp instead of /dev/ip for
the ip stream. The interface stream (where ip module pushed on top
of ppp) is then I_PLINK'ed below the ip stream. /dev/udp is used
because STREAMS will not let a driver be PLINK'ed under itself, and
/dev/ip is typically the driver at the bottom of the tunneling
interfaces stream. The mux ids of the ip streams are then added
using SIOCSxIFMUXID ioctl.

Users will be able to see the modules on the interface stream by,
for example:

pikapon# ifconfig ppp modlist
0 ip
1 ppp

Or arbitrarily if bandwidth manager and firewall modules are installed:

pikapon# ifconfig hme0 modlist
0 arp
1 ip
2 ipqos
3 firewall
4 hme

Snoop Support.
**************

This version includes support for /usr/sbin/snoop. Tests have been
done on Solaris 7 through 9. Only IPv4 and IPv6 packets will be sent
up to stream(s) marked as promiscuous (i.e., those used by snoop).

Users will be able to see the packets on the ppp interface by, for
example:

snoop -d ppp0

See the man page for snoop(1M) for details.

IPv6 Support.
Installation.
*************

This is for Solaris 8 and later.

This version has been tested under Solaris 8 and 9 running IPv6.
Interoperability testing has only been done between Solaris machines
in terms of the IPV6 NCP. An additional command line option for the
pppd daemon has been added: ipv6cp-use-persistent.
1. Make sure you have a suitable compiler installed. This package was
tested with "pkg install gcc-14" but other modern compilers should
work.

By default, compilation for IPv6 support is not enabled. Uncomment
the necessary lines in pppd/Makefile.sol2 to enable it. Once done,
the quickest way to get IPv6 running is to add the following
somewhere in the command line option:
2. Run the configure script and build the package.

+ipv6 ipv6cp-use-persistent
./configure --with-runtime-dir=/var/run --with-logfile-dir=/var/log/ppp
make

The persistent id for the link-local address was added to conform to
RFC 2472; such that if there's an EUI-48 available, use that to make
up the EUI-64. As of now, the Solaris implementation extracts the
EUI-48 id from the Ethernet's MAC address (the ethernet interface
needs to be up). Future work might support other ways of obtaining
a unique yet persistent id, such as EEPROM serial numbers, etc.
The configure script will automatically find the compiler if it's in
the standard location (/usr/bin/gcc). By default, everything will be
installed in /usr/local. Use "--prefix" to choose a different
installation directory if desired. Use "./configure -h" to see other
options.

There need not be any up/down scripts for ipv6,
e.g. /etc/ppp/ipv6-up or /etc/ppp/ipv6-down, to trigger IPv6
neighbor discovery for auto configuration and routing. The in.ndpd
daemon will perform all of the necessary jobs in the
background. /etc/inet/ndpd.conf can be further customized to enable
the machine as an IPv6 router. See the man page for in.ndpd(1M) and
ndpd.conf(4) for details.
3. Install the programs.

Below is a sample output of "ifconfig -a" with persistent link-local
address. Note the UNNUMBERED flag is set because hme0 and ppp0 both
have identical link-local IPv6 addresses:
sudo make install

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 129.146.86.248 netmask ffffff00 broadcast 129.146.86.255
ether 8:0:20:8d:38:c1
lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
inet6 ::1/128
hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
ether 8:0:20:8d:38:c1
inet6 fe80::a00:20ff:fe8d:38c1/10
hme0:1: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 fec0::56:a00:20ff:fe8d:38c1/64
hme0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2000::56:a00:20ff:fe8d:38c1/64
hme0:3: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2::56:a00:20ff:fe8d:38c1/64
ppp0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> mtu 1500 index 12
inet 172.16.1.1 --> 172.16.1.2 netmask ffffff00
ppp0: flags=2202851<UP,POINTOPOINT,RUNNING,MULTICAST,UNNUMBERED,NONUD,IPv6> mtu 1500 index 12
inet6 fe80::a00:20ff:fe8d:38c1/10 --> fe80::a00:20ff:fe7a:24fb
This installs the following:

Note also that a plumbed ipv6 interface stream will exist throughout
the entire PPP session in the case where the peer rejects IPV6CP,
which further causes the interface state to stay down. Unplumbing
will happen when the daemon exits. This is done by design and is not
a bug.
/usr/local/sbin pppd, chat, pppstats, pppdump
/usr/local/share/man/man8 man pages
/usr/local/include/pppd plug-in header files
/usr/local/lib/pppd/$VER plug-in modules
/usr/local/etc/ppp example configuration files

If your system normally has only one network interface at boot
time, the default Solaris system startup scripts will disable IP
forwarding in the IP kernel module. This will prevent the remote
machine from using the local machine as a gateway to access other
hosts. The solution is to create an /etc/ppp/ip-up script
containing something like this:

64-bit Support.
***************
#!/bin/sh
/usr/sbin/ndd -set /dev/ip ip_forwarding 1

This version has been tested under Solaris 7 through 9 in both 32-
and 64-bit environments (Ultra class machines). Installing the
package by executing "make install" will result in additional files
residing in /kernel/drv/sparcv9 and /kernel/strmod/sparcv9
subdirectories.
See the man page for ip(7p) for details.

64-bit modules and driver have been compiled and tested using Sun's
cc and gcc.

Synchronous Serial Support.
***************************
Expand All @@ -220,14 +74,8 @@ Synchronous Serial Support.
was tested with a Cisco router.

The ppp daemon does not directly support controlling the serial
interface. It relies on the /usr/sbin/syncinit command to
initialize HDLC mode and clocking.

There is a confirmed bug with NRZ/NRZI mode in the /dev/se_hdlc
driver, and Solaris patch 104596-11 is needed to correct it.
(However this patch seems to introduce other serial problems. If
you don't apply the patch, the workaround is to change the nrzi mode
to yes or no, whichever works.)
interface. It relies on the OS-supplied /usr/sbin/syncinit command
to initialize HDLC mode and clocking.

How to start pppd with synchronous support:

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ AM_CONDITIONAL(PPP_WITH_CHAPMS, test "x${enable_microsoft_extensions}" != "xno")
AM_COND_IF([PPP_WITH_CHAPMS],
AC_DEFINE([PPP_WITH_CHAPMS], 1, [Have Microsoft CHAP support]))

AM_CONDITIONAL(PPP_WITH_MPPE, test "x${enable_microsoft_extensions}" != "xno")
AM_CONDITIONAL(PPP_WITH_MPPE, test "x${build_sunos}" != "xyes" && test "x${enable_microsoft_extensions}" != "xno")
AM_COND_IF([PPP_WITH_MPPE],
AC_DEFINE([PPP_WITH_MPPE], 1, [Have Microsoft MPPE support]))

Expand Down
6 changes: 1 addition & 5 deletions include/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
EXTRA_HEADERS = \
linux/ppp-comp.h \
linux/ppp_defs.h \
net/ppp-comp.h \
net/ppp_defs.h \
net/pppio.h \
net/vjcompress.h
linux/ppp_defs.h

EXTRA_DIST = \
$(EXTRA_HEADERS)
Loading