how to mount ipv6 address to linux

11,270

Solution 1

Command is wrong NFS mount command should be

mount -t nfs [2001:db8::60fe:5bff:febc:912]:/home/abhitesh /home/mount/

IPv6 address should be in [].

and for CIFS mount command should be

mount -t cifs -o username=xxxx,password=yyyyy //2001:db8::60fe:5bff:febc:914/public /home/mount

Solution 2

For those who might ever need it, posting below the entries that worked for me. Using Arch linux and link-local IPv6 addresses.

/etc/exports entry on the server

/dir1    fe80::blah:blah:blah:blah(rw,sync,nohide)

/etc/fstab entry on client

[fe80::boom:boom:boom:boom%wlan0]:/dir1    /home/a/b/c    nfs    noatime,noauto,users    0 0

Command when mounting manually

sudo mount [fe80::boom:boom:boom:boom%wlan0]:/dir1 /home/a/b/c
Share:
11,270
Abhitesh khatri
Author by

Abhitesh khatri

I am interested in knowing Linux kernel.. Can you help me........

Updated on June 04, 2022

Comments

  • Abhitesh khatri
    Abhitesh khatri almost 2 years

    I am trying to mount a folder from ubuntu system having ip ipv6 as well as ipv4 address

    root@:/home# ifconfig
    br0       Link encap:Ethernet  HWaddr 16:37:81:2e:ce:e9  
              inet addr:10.0.3.24  Bcast:10.0.7.255  Mask:255.255.248.0
              inet6 addr: 2001:db8::60fe:5bff:febc:912/64 Scope:Global
              inet6 addr: 2001:db8::e8a6:7d68:16b8:3d86/64 Scope:Global
    

    I can able to ping ipv6 address from different linux system :

    [root@Abhitesh home]# ping6 2001:db8::60fe:5bff:febc:912
    PING 2001:db8::60fe:5bff:febc:912(2001:db8::60fe:5bff:febc:912) 56 data bytes
    64 bytes from 2001:db8::60fe:5bff:febc:912: icmp_seq=1 ttl=64 time=0.968 ms
    64 bytes from 2001:db8::60fe:5bff:febc:912: icmp_seq=2 ttl=64 time=1.07 ms
    

    I am getting error, when i am trying to mount with ipv6

    [root@Abhitesh home]# mount -t nfs 2001:db8::60fe:5bff:febc:912:/home/abhitesh /home/mount/
    mount.nfs: mount system call failed
    [root@Abhitesh home]#
    

    with ipv4 mount command is working.

    Is that my command is wrong or i need to configure something, to mount with ipv6.

    In my system ipv6 is enabled.

    cat /proc/sys/net/ipv6/conf/all/disable_ipv6
    0