Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In a normal IPv4 network, I can go into any browser such as Firefox and browse a server on a IPv4 address not hosted on port 80:

http://192.168.42.6:8080/

This accesses the server on port 8080 on 192.168.42.6. However, if I try this with a IPv6 IP, I get no luck. This tries to access port 8080 on fe80::520:ff0f:ece0:1 :

http://[fe80::520:ff0f:ece0:1]:8080/

Firefox will automatically "fix" this URL to:

http://[www.fe80::520:ff0f:ece0:1.com]:8080/

which does not help me access it at all. So either I am doing something really wrong OR there's something really wrong with IPv6. Couldn't find anything that even remotely helped on the Internet. (And yes, there is a server running on the IPv6 in question.)

share|improve this question
    
Do other browsers do similar things? –  Matthew H. Feb 5 '11 at 21:08
    
Seems like only Firefox does this - IE8 on Windows 7 doesn't, but switching to IE for the entire organization is not an option. –  logain Feb 5 '11 at 21:11
1  
Then maybe it's just a Firefox bug. What version of Firefox are you using? The current 4.0 beta doesn't seem to do this, at least on my system. –  Matthew H. Feb 5 '11 at 21:29
    
Is IPv6 disabled in the about:config page? –  BillThor Feb 6 '11 at 4:51

1 Answer 1

up vote 2 down vote accepted

First of all: I am no IPv6 expert.

If you cannot add a DNS name (or want to ensure IPv6 is used1), then why not use the actual address, rather than the fe80 link-local one? On a Mac with OS X, and on Windows XP Home edition, this (with an actual IPv6 address2) works fine for me, in all browsers:

http://[2001:db8::216:cbff:xx:xx]:8080/

(Note that some browsers do not automatically prefix the http:// part for IPv6 addresses. Adding a dummy name in your hosts file for only the IPv6 address makes life even easier.)

For fe80 addresses, it's probably not just the port number that is giving you problems; when using the default port 80, you probably cannot connect either, unless you also specify the zone index. (Thus: the outgoing interface that should make the connection, like wired ethernet or wireless, which might be different on each computer you use.)

On Windows XP Home edition, with both wired ethernet and wireless (the latter being inactive), the following works fine for me in Firefox 3.5 and 3.6. Here, 4 is my network interface index3:

http://[fe80::216:cbff:xx:xx%4]/
http://[fe80::216:cbff:xx:xx%4]:8080/

In Internet Explorer 8, the percent character must be percent-encoded into %25:

http://[fe80::216:cbff:xx:xx%254]:8080/

(For me, this does not work without the %4 or %254; if it does on other installations then maybe Windows or IE prefers external connections, and that installation only has a single network interface?)

On a Mac, the following works fine in Firefox:

http://[fe80::216:cbff:xx:xx%en0]:8080/

Specifying a zone index using the percent notation is troublesome, given the conflict with URL notations4. I could not get the above to work in Chrome 8 and 9 on Windows XP, nor in Safari or Chrome on a Mac.

On a Mac, instead of the % syntax, you can (ab)use the scope index (the 2nd word, or 3rd and 4th bytes) to specify the network interface index. Like fe80:0004 works fine in all my browsers:

http://[fe80:4::216:cbff:xx:xx]/
http://[fe80:4::216:cbff:xx:xx]:8080/

Note, however, that I doubt this is officially supported, as this does not work on my Windows XP, and some documentation claims that alternatives should always be used instead. Like:

ping6 -I en0 fe80::216:cbff:xx:xx  (en0 = wired ethernet on my Mac)
ping6 fe80::216:cbff:xx:xx%en1     (en1 = wireless)

...rather than:

ping6 fe80:4::216:cbff:xx:xx
ping6 fe80:6::216:cbff:xx:xx

Final note: one might be fooled into using :: or ::ffff: followed by an IPv4 address, as specified in RFC 4291. But, this does not actually use IPv6, though it gives a response on my Mac:

http://[::ffff:192.168.178.25]:8080/

This can also use a hexadecimal notation, and some browsers will rewrite it automatically:

http://[::ffff:c0a8:b219]:8080/

But no matter what: this uses an IPv4 connection on my Macs. On my Macs, [::192.168.178.25] does not work. I could not get any form to work on Windows XP.


1 Some browsers prefer IPv4 over IPv6. See test-ipv6.com. This also is platform dependent.
2 In IPv6, web servers might see the MAC address of your computer, being 216:cbff:xx:xx in these examples. I'd rather not publish this super cookie on the net. See also How to avoid exposing my MAC address when using IPv6?
3 On a Mac: look for the value for scopeid in the output of ifconfig. On Windows: see the value for Idx in the output of netsh interface ipv6 show interface. I have seen this number change after reboots!
4 It seems this once led to an RFC which never made it out of draft. This draft proposes to use the plus-character instead, but this does not work on my Macs or Windows XP either.

share|improve this answer
    
Re footnote #2 - see "privacy addressing". –  grawity Feb 9 '11 at 12:12
    
Yup, @grawity, I noticed that extension being mentioned in RFCs, but failed to find any related settings in my consumer grade modem/router to allow for that. :-( –  Arjan Feb 9 '11 at 12:18
1  
If your network is using IPv6 Autoconfiguration, then the address suffix is chosen by your own PC and this is where you should look for Privacy Addressing too. On Linux, sysctl net.ipv6.conf.eth0.use_tempaddr=1; on Windows it's netsh inter ipv6 set privacy (on by default). –  grawity Feb 9 '11 at 14:34
    
On a Mac: sudo sysctl -w net.inet6.ip6.use_tempaddr=1 (default value: 0). After that: ifconfig shows two IPv6 addresses; test-ipv6.com and ipv6-test.com show the temporary address. –  Arjan Feb 9 '11 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.