March 4th, 2005
Introduction:
A pre-requisite for the support of IPv6 is to solve the problem of the current SunRPC and portmap which have been designed only for TCP and UDP over IPv4 transports. So, the first step to add the support of IPv6 in NFS is to extend these components or provide new ones. For reasons described below, the latter solution has been chosen. The SunRPC of the glibc has been replaced by a TI-RPC (Transport Independent RPC) library and the portmap has been replaced by the rpcbind.
User RPC (migration fron SunRPC to TI-RPC)
Description
Currently, NFS commands use the SunRPC routines provided by the glibc. These routines do not support IPv6 addresses. Ulrich Drepper, who is the maintainer of the glibc, refuses any change in the glibc concerning the RPC. He wants the RPC to become a separate library. Other OS (NetBSD, FreeBSD, Solarix, HP-UX, AIX) have migrated their SunRPC library to a TI-RPC (Transport Independent RPC) implementation. This implementation allows the support of other transports than UDP and TCP over IPv4.
FreeBSD provides a TI-RPC library ported from NetBSD with improvments. This library already supports IPv6. So, the FreeBSD release 5.2.1 TI-RPC has been ported to replace the SunRPC of the glibc.
Delivery
The TI-RPC library is implemented as a standalone package. After compilation, the library is installed under /usr/lib/ and the includes under /usr/include/tirpc/. So the use of the '-I/usr/include/tirpc -ltirpc' flags allows an application to be compiled and linked with this new library. A /etc/netconfig configuration file allows the administrator to specify what are the protocols supported by the RPCs. In this way, the support of the TCP and UDP protocols over IPv6 can be added or removed by uncommenting / commenting the following lines in the configuration file.
udp6 tpi_clts v inet6 udp - -
tcp6 tpi_cots_ord v inet6 tcp - -
This library supports the RPCSEC via GSS API.
Tests
Basic tests have been done with client/server programs using this library to communicate. Then, more intensive tests have been done using the NFS tests.
Additionnal Information and Links
- the 0.1.7 release has been included in Fedora Core 6 since October. A RPM is now available here. Thanks to Steve Dickson from Red Hat
- a version management tool and a bugtracker are now available on new TI-RPC sourceforge. It will make easier for users to report bug and for developers to maintain versions of the library.
Report bugs
You can report bugs on the TI-RPC bugtracker
User portmapper (migration from portmap to rpcbind)
Description
Whereas portmap supports only UDP and TCP transports over INET (IPv4), rpcbind can be configured to work on various transports supported by the TI-RPC. This includes TCP and UDP over IPv6. Moreover, rpcbind provides additional functions in regards to portmap:
Portmap provides the following functions, referred as portmapper version 2:
- SET (1) : to register a program / version
- UNSET (2) : to un-register a program / version
- GETPORT (3) : to get the INET port on which the program is listening
- DUMP (4) : to dump all the registered programs with their versions and ports
- CALLIT (5) : to call a remote RPC program
The version 3 of the rpcbind implements the functions of the pormap version 2; i.e. :
- SET (1) : to register a program / version
- UNSET (2) : to un-register a program / version
- GETADDR (3) : to get the address on which the program is listening
- DUMP (4) : to dump all the registered programs with their versions and ports
- CALLIT (5) : to call a remote RPC program
plus the following functions :
- GETTIME (6) : to get the local time
- UADDR2TADDR (7) : to convert universal addresses to transport (netbuf) addresses
- TADDR2UADDR (8) : to convert transport (netbuf) addresses to universal addresses
The version 4 of the rpcbind adds the following functions :
- GETVERSADDR (9) : same as GETADDR but checking both the program and version numbers
- INDIRECT (10) : same as CALLIT but returns an indication of errors
- GETADDRLIST (11) : returns a list of addresses
- GETSTAT (12) : returns statistics about the activity of the rpcbind server
Like for the TI-RPC, the FreeBSD release 5.2.1 rpcbind has been ported to replace the portmap.
The portmap implementation in the kernel RPC has also to be extended to support IPv6. This is described in NFS support over IPV6.
Delivery
The rpcbind daemon is delivered in a rpcbind package including also a rpcinfo command which reports RPC information from a specified server.
The rpcbind package is available here
Tests
Tests have been done using NFS tests and in interoperability tests with other OS (Solaris 5.10, AIX 4.3.0).
Conclusion
The first use of these new library and rpcbind will be the support of NFS over IPv6.
Documentation
A pdf documentation about ti-rpc library is available:
tirpc-doc.pdf