有一台具有以下地址的ubuntu机器
root@soup:/# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 08:00:27:09:90:1c
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe09:901c/64 Scope:Link我有一个要导出的文件夹,然后挂载/home/wat/ipv6/,所以我配置了相应的/etc/exports
/home/wat/ipv6 [fe80::a00:27ff:fe09:901c](rw,sync,fsid=0,subtree_check,no_root_squash)
/home/wat/ipv6 192.168.56.101(rw,sync,fsid=0,subtree_check,no_root_squash)一个通过ipv4,另一个通过ipv6。
此外,我还配置了一个/etc/fstab来安装这些导出。
[fe80::a00:27ff:fe09:901c%eth1]:/ /mnt/ip6 nfs defaults 0 0
192.168.56.101:/ /mnt/ip4/ nfs defaults 0 0所以当我跑
root@soup:/# exportfs -rv
exporting 192.168.56.101:/home/wat/ipv6
exporting [fe80::a00:27ff:fe09:901c]:/home/wat/ipv6然后当我试图安装它们时,我会遇到
root@soup:/# mount -av
mount: 192.168.56.101:/ already mounted on /mnt/ip4/
mount.nfs: timeout set for Mon Nov 9 14:44:30 2015
mount.nfs: trying text-based options 'vers=4,addr=fe80::a00:27ff:fe09:901c%eth1,clientaddr=fe80::a00:27ff:fe09:901c'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting [fe80::a00:27ff:fe09:901c%eth1]:/并且只有ipv4导出是挂载的,您知道为什么会发生这种情况吗?
发布于 2022-04-03 09:44:02
检查所有IPv6地址,在NFS客户端上运行:
COLORFGBG=";0" ip -c a您可能会看到一堆带有“范围全局临时动态”的IP地址。它们来自IPv6的隐私扩展。
接下来,检查NFS-server的日志,例如
sudo tail -F /var/log/messages /var/log/*.log我相信您会看到您的NFS客户端正在尝试使用您意想不到的IPv6地址之一。
然后使用以下建议如何在安装nfs时指定要使用的ipv6 6地址:
[fe80::a00:27ff:fe09:901c%eth1]:/ /mnt/ip6 nfs defaults,clientaddr=fe80::a00:27ff:fe09:901c 0 0在家里,我使用的地址不是fe80::/10,而是fc00::/7 (fc00 00…)。( fdff):他们不需要指定"%eth0“的以太网接口链接名。如果使用OpenWRT路由器,则可以使用"IPv6 ULA-前缀“设置设置此前缀。
https://serverfault.com/questions/734969
复制相似问题