11

I’m testing IPv6 on a corporate network and having problems with OS X. With most IPv6 commands, such as telnet -6 or traceroute6, I get the error:

connect: No route to host

For example, I have a web server. This fails:

$ telnet -6 fe80::… 80    # this fails

I know the server is reachable because ping6 works (note that I have to use the -I argument):

$ ping6 -I en1 fe80::…    # this works

And I know the web server is running because I can telnet to it from Windows:

C:\> telnet fe80::… 80  # this works

I suspect there is some configuration flag or command-line argument that I am missing.

4
  • Ok, I'll bite. Why not just use IPv4? For that matter, why is telnet even enabled? Dec 30, 2010 at 4:55
  • 1
    @John Nate is trying to telnet to port 80. Your web server will get lonely and wither if you don't talk to it periodically. Dec 30, 2010 at 5:07
  • 2
    @John Gardeniers: I’m experimenting with IPv6 as I anticipate I will need to start implementing it in the next 12-18 months. Also, as Gerald says, a telnet client is a useful tool for testing basic connectivity to web or e-mail servers. I haven’t seen a telnet server in at least 10 years.
    – Nate
    Dec 30, 2010 at 18:15
  • @Gerald and @Nate, I saw "How can I telnet to an IPv6 host", which to me says the telnet protocol, at which point I always shudder and stop reading. Of course had the title been something like "How do I use the telnet program to connect..." I would have read the whole question. Sorry. Dec 30, 2010 at 21:50

3 Answers 3

11

The fe80::/16 prefix is for link-local addresses, and they're special. Try running

netstat -nr

on OS X and

netsh int ipv6 show routes

on Windows. On OS X you will most likely see a separate fe80:: route for each interface, e.g. for lo0 and en1. Windows (XP, at least) doesn't appear to do that. Since OS X has multiple routes to the same prefix you have to use a zone index to point the traffic in the right direction:

$ telnet -6 fe80::…%en1 80
1
  • Thank you, this worked. And thanks for explaining why it worked on Windows but not on OS X.
    – Nate
    Dec 30, 2010 at 17:43
4

An interface can and usually will have multiple IPv6 addresses. A link-local address is automatically created from the fe80::/16 range and is not routed (point to point connection). As Gerald Combs mentions, you'll need to specify a zone index if you can't specify which interface to use.

For regular use, and connections beyond the local link, you'll need to add routable addresses to the interface. This can be done by getting your own IPv6 range from your ISP (or from a tunnel provider such as SixXS or he.net), and distributing them to your devices via Router Advertisement, DHCPv6 or manually.

If you're just testing you could also use the special "Unique Unicast" IP range of fc00::/7 which should be used for this as per RFC4193:

This document defines an IPv6 unicast address format that is globally unique and is intended for local communications, usually inside of a site. These addresses are not expected to be routable on the global Internet

Check out this site, which gets you started by generating a range for you.

1
  • Unique Local Addresses will be my next step. Thanks for the excellent link!
    – Nate
    Dec 30, 2010 at 17:47
0

I believe you've found a bug in the link local fe80:: addresses. It works for me using my public address, even though they are link local.

$ telnet -6 2001::xxx:: 80
Trying 2001::xxx::...
Connected to 2001::xxx::
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Thu, 30 Dec 2010 01:18:00 GMT
Server: Apache
Last-Modified: Sun, 30 May 2010 20:11:06 GMT
Accept-Ranges: bytes
Content-Length: 44
Connection: close
Content-Type: text/html

Connection closed by foreign host.

Try getting real v6 addresses.

3
  • 1
    A link-local address isn't any less real, but it might be less useful depending on your use case. Dec 30, 2010 at 1:33
  • A 2001:: address is not link-local. It is a routable range and should not be confused with the link-local reservation fe80::/16. Please do not misuse the term, since this will confuse people. Dec 30, 2010 at 2:26
  • I meant link local as in physically the host resides on the same ethernet broadcast domain.
    – bahamat
    Dec 30, 2010 at 23:27

You must log in to answer this question.

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