• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: no route to host with ipv6?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no route to host with ipv6?


  • Subject: Re: no route to host with ipv6?
  • From: email@hidden (Sebastian Mecklenburg)
  • Date: Thu, 19 Jun 2003 07:06:21 +0200

hello,

thaks a lot for the reply. but i don't understand why i need DNS here at all, since i have the numeric ip address already.
but the scope_id sounds interesting. with ping6 i have to use the -I switch to ping an other computer on a local network, like

ping6 -I en0 fe80::230:65ff:fe17:8f20

so i think i have to use the interface information somewhere in my networking code. i looked at the kame implementation, but it is very complex. you mentioned, that they 'embed the scope_id in the third and fourth bytes of the IPv6 address'. do you have more information on how they make use of this embedded information?
meanwhile i will try to dig my way through the sources other ipv6 ready applications. they get it done, so it must be possible ;-)

thanks and regards,
sebastian mecklenburg


On Tuesday, June 17, 2003, at 07:50 PM, Joshua Graessley wrote:

The address you're getting is an IPv6 Link-Local address. IPv6 addresses should not be placed in DNS for two reasons.

1) They are specific to the local link
2) They require a scope_id which can not be communicated through a DNS query.

IPv6 handles multihoming a little better than IPv4. IPv6 addresses use something called a "scope id". The scope id for link-local addresses identifies which interface the link-local address is on. This is necessary because IPv6 Link Local addresses may be found on more than one interface even though those interfaces are on separate links. A common example is a laptop with built-in and wireless. Both are connected to two different networks that are not bridged. If the laptop needs to communicate with fe80::1:2:3, the laptop has no way to know if it should look for fe80::1:2:3 on en0 (ethernet) or en1 (airport). In addition, there may be an fe80::1:2:3 on both ethernet and airport, so the address alone is ambiguous. The result is a no route to host error.

The scope_id is specific to the local machine. Each interface has an index number. The scope_id specifies an interface by index. The IPv6LL address in addition to the scope_id provides a unique identifier without the ambiguity of an IPv6LL address alone.

In a future release, the mDNSResponder will return IPv6 addresses in addition to IPv4. The resolver library will remember which interface the mDNS packet was received on and use that as the scope id, enabling clients to resolve names to IPv6 link-local addresses.

Kame uses a trick where it embeds the scope_id in the third and fourth bytes of the IPv6 address. You may see this in a few places.

scope ids are tricky and confusing, but they make a lot of things possible.

-josh

On Tuesday, June 17, 2003, at 5:20, Sebastian Mecklenburg wrote:

hello,

i wrote a simple client-server software in c++ and the usual unix socket functions to transfer some data via tcp. it works fine with ipv4 but with ipv6 the connect() function always generates a "no rout to host" error, if server and client are on different computers. if both are on the same machine (i.e. both use ::1 as address) it works fine. here is the code i use, it's the constructor of mysocket class:


//create a client
Socket::Socket(const char* in_hostname, const char* in_portnumber) :
m_socketDescriptor(-1),
m_isServer(false) {
int err = 0;
struct addrinfo hints, *res;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = 0; //AI_PASSIVE (not for clients)
hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_STREAM;

err = ::getaddrinfo(in_hostname, in_portnumber, &hints, &res);
//no error here

m_socketDescriptor = ::socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if(m_socketDescriptor < 0) {
//no error here
}

// Connect to the server
err = ::connect(m_socketDescriptor, res->ai_addr, res->ai_addrlen);
//duh! err is -1 and errno is 65, which stands for "no route to host'"
}

for in_hostname parameter i use the ipv6 ip address of the server, which is automatically generated from the MAC address of the network devices and is shown by ifconfig, for example fe80::230:65ff:fe17:8f20. someone got an idea?

regards,
sebastian mecklenburg
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.



regards,
sebastian mecklenburg
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: no route to host with ipv6?
      • From: Joshua Graessley <email@hidden>
References: 
 >Re: no route to host with ipv6? (From: Joshua Graessley <email@hidden>)

  • Prev by Date: Safari and Helper Applications
  • Next by Date: Re: Safari and Helper Applications
  • Previous by thread: Re: no route to host with ipv6?
  • Next by thread: Re: no route to host with ipv6?
  • Index(es):
    • Date
    • Thread