Bull GNU/Linux NFSv4 project

How to build IPv6 support for the client and the server

September 19th, 2008
Aime Le Rouzic

Here is a short description to explain how to have an IPv6 ready client and server for NFSv4 based on kernel 2.6.27-rc3 and nfs-utils-1.1.2 for the commands.

Install TI-RPC library

The ti-rpc library is designed to replace sunrpc library. It is necessary to do Remote Procedures Calls regardless the transport used.
If you don't already have it installed, download the tirpc tarball: libtirpc
Build and install it.

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   -   -

Rpcbind

If not already installed you can a rpcbind package available    here

Apply kernel patches

You need to apply a couple of fixes for the 2.6.27-rc3 kernel code that makes IPV6 server support over RPC services with the local rpcbind daemon:

. The first is a patch (patch1_rpcbindv4) which gathers the Chuck Lever's patches serie to Register kernel RPC services via rpcbind v4 .

Chuck Lever's patch series that adds rpcbind v4 support to svc_register()
I have tested on 2.6.27-rc3.
---

Chuck Lever (7):
SUNRPC: Support IPv6 when registering kernel RPC services
SUNRPC: Split portmap unregister API into separate function
SUNRPC: Simplify rpcb_register() API
SUNRPC: Use proper INADDR_ANY when setting up RPC services on IPv6
SUNRPC: Set V6ONLY socket option for RPC listener sockets
SUNRPC: Add address family field to svc_serv data structure
NFS: nfs_parsed_mount_options can use unsigned int

 . The second is a patch (patch2_ipv6overrpcbindv4) of mine which completes the ipv6 server implementation over rpcbind

      NFSV4 IPV6: Enable daemons server to listen on AF_INET6 sockets when IPv6 support available
NFSV4 IPV6: Adds AF_INET6 domain processing when AF_INET processing only available

Download those  patches :

patch1rpcbindv4

patch2ipv6overrpcbindv4

User part implementation

Download nfs-utils -1.1.2 tarball:
nfs-utils-1.1.2.tar.gz

Download and apply the nfs-utils-1.1.2 patchset:
. First, get the Chuck Lever's nfsv4 IPV6 mount patch:
 nfs-utils-1.1.2-ipv6mount-all.diff

. Second, get the nfsv4 server daemons patch of mine: 
nfs-utils-1.1.2-ipv6server-all.diff

Now To build nfs-utils, follow these instructions:

  1. sh ./autogen.sh
  2. ./configure --disable-nfsv4 --disable-gss --enable-ipv6
  3. make
  4. make install

Note that these patches are provided for review and experimental use only.
Please report problems toAime Le Rouzic.


Page maintained by: Aime Le Rouzic
Accessed times since its creation.
 
Last update: 2008, September 18