Ubuntu – How to enable nfsd to support IPv6 on Ubuntu Linux

ipv6nfsUbuntu

I need to enable IPv6 NFS support on a Ubuntu linux server. This server has support IPv4 NFS.

Linux info –

root@nimbus-nfsserver:~# uname -a
Linux nimbus-nfsserver 2.6.35-22-server #35-Ubuntu SMP Sat Oct 16 22:02:33 UTC 2010 x86_64 GNU/Linux

Both IPv4 and IPv6 IP addresses are up:

root@nimbus-nfsserver:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:b1:30:88
          inet addr:10.114.165.41  Bcast:10.114.191.255  Mask:255.255.224.0
          inet6 addr: fc00:10:114:191:250:56ff:feb1:3088/64 Scope:Global
          inet6 addr: fe80::250:56ff:feb1:3088/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25486 errors:0 dropped:0 overruns:0 frame:0
          TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1542572 (1.5 MB)  TX bytes:28300 (28.3 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:89 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8316 (8.3 KB)  TX bytes:8316 (8.3 KB)

Current /etc/exports file:

root@nimbus-nfsserver:~# cat /etc/exports
/store *(rw,async,no_root_squash,no_subtree_check)

This is a purely internal NFS server, it allows NFS mount from any IP address.

What I want to do is to also enable any IPv6 client NFS mount. How to modify /etc/exports file, and what additional procedure to follow?

More info –

root@nimbus-nfsserver:/etc/rc3.d# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:60077           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:54482           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:41335           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:57184           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 :::48318                :::*                    LISTEN
root@nimbus-nfsserver:/etc/rc3.d# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  52246  status
    100024    1   tcp  54482  status
    100021    1   udp  42170  nlockmgr
    100021    3   udp  42170  nlockmgr
    100021    4   udp  42170  nlockmgr
    100021    1   tcp  60077  nlockmgr
    100021    3   tcp  60077  nlockmgr
    100021    4   tcp  60077  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049
    100227    3   tcp   2049
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049
    100227    3   udp   2049
    100005    1   udp  55594  mountd
    100005    1   tcp  57184  mountd
    100005    2   udp  55594  mountd
    100005    2   tcp  57184  mountd
    100005    3   udp  55594  mountd
    100005    3   tcp  57184  mountd

Best Answer

NFS over IPv6 support first appeared in Ubuntu 10.10, Maverick Meerkat. Most of the work on NFS over IPv6 in Linux was actually done by early 2010, too late for inclusion in 10.04. Since you have 10.04, you cannot use NFS over IPv6. Your only option is to upgrade to a newer supported release (12.04 or 14.04 LTS).

Related Topic