my Laptop has several IPv6-Addresses. My NAS accepts only one specific of these to mount a NAS-folder with NFS.
I mount the NAS share with
sudo mount [fd80:foo::bar]:/Media /mnt/NASshare
But with that, chance is high that my Laptop uses one of its IPv6-addresses, which is not allowed by NAS.
My question is: How can I specify an IPv6-adress while mounting my NAS share?
Best Answer
From NFS(5) nfs - fstab format and options for the nfs file systems:
Which would suggest adding this to
/etc/fstab
(withfd80:c0f::fee
as the IP address desired):But as mentioned, this automatic discovery process is not perfect.
It might be that you need to add specific
route
to your NAS.Or if it is possible to use
ip netns
namespaces, then you could:ip netns add NASNamespace
.ip link set eth0 netns NASNamespace
ip netns exec NASNamespace ifconfig eth0 fd80:c0f::fee/64 up
ip netns exec NASNamespace mount