5

One can use either UNC or IPv4 address to connect to a shared folder on a remote machine using net use, e.g.:

net use \\remotePC\SharedFolder     // valid
net use \\111.122.1.1\SharedFolder  // valid

Is it possible for user to connect using IPv6 as well? Is it something that needs to be configured separately but is technically possible? If I try to specify IPv6 address, I get error 53:

The network path was not found.

The reason I'm asking is because one of my programs accepts a remote shared folder location as an input parameter - I need to evaluate whether the location is valid. I know it's valid if it's a UNC path or an IPv4 address, but am not sure if IPv6 should be allowed or simply result in an error.

2

3 Answers 3

5

As documented by Microsoft:

For example, for the following IPv6 address:

2001:4898:9:3:c069:aa97:fe76:2449

an example for a share might be the following:

\\2001-4898-9-3-c069-aa97-fe76-2449.ipv6-literal.net\share

For more, see: How do I create a UNC to an IPv6 address?


Also note that, strangely enough, Microsoft doesn't actually own that domain name, and the actual owner is unknown. While Windows shouldn't send these queries out to the network, there is still the possibility of leakage if this sort of literal gets reused in other contexts. You would be well advised to set up DNS for your network.

2
  • does not work for me somehow, even thought the IPv6 works on Linux...
    – xeruf
    Jan 19, 2023 at 23:31
  • As per the comment on the other answer, part of the claims in this answer seem to be wrong. Feb 11, 2023 at 22:04
2

You need to convert the IPv6 address to an IPv6 literal address. This website will do the conversion http://ipv6-literal.com/ and the website below is my source if you need more details. http://social.technet.microsoft.com/Forums/windowsserver/en-US/d61f8efe-c9a7-4fd7-a7e9-f936c2154c54/net-command-with-ipv6-address?forum=winserverManagement

The command would be something like: net use x: \fe80-0-0-0-a0b6-99c9-2f6c-5759. ipv6-literal.net\admin$ /u:administrator adminpassword

3
  • 3
    Be careful. Neither ipv6-literal.com nor ipv6-literal.net are actually owned by Microsoft. Jan 10, 2014 at 15:04
  • 1
    Wrong. Take a WHOIS lookup: Registrant Name: Doug Stamper Registrant Organization: Registrant Street: 1 Microsoft Way Registrant Street: Studio E/3160 Registrant City: Redmond Registrant State/Province: Washington Registrant Postal Code: 98052 Registrant Country: US Registrant Phone: +1.4257079004 Registrant Phone Ext: Registrant Fax: Registrant Fax Ext: Registrant Email: [email protected]
    – ulcha
    Mar 9, 2020 at 13:40
  • Either you @ulcha are wrong or it has changed since 3 years. ipv6-literal.com is owned by what seems to be a person in Latvia, but it only has a web page which creates links with .ipv6-literal.net. ipv6-literal.net has a "private" registration at Domains By Proxy, LLC in Arizona through Godaddy. I'm still not sure if it is safe to use.
    – w-sky
    Sep 20, 2023 at 14:14
0

You can also configure a IPv6 to Host entry (windows\system32\drivers\etc\hosts) and connect to the SMB share using the hostname

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .