IPv6 on IPv4 network

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

IPv6 on IPv4 network

Post by SeeCwriter »

I think an application that is compiled with IPV6 defined will work on an IPv4 network. If that is correct, can broadcasting still be used? I notice there is a method to set an IP to NULL, but not to -1.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: IPv6 on IPv4 network

Post by rnixon »

Are you talking about an IPv4 broadcast? That should be 255.255.255.255. I would not label it as null or -1.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: IPv6 on IPv4 network

Post by dciliske »

Yes, an application that is compiled to support IPv6 can operate on an IPv4 network. If you're trying to send a global broadcast there is an IPADDR4 function (which you really are asking about) called GlobalBroadcast(). It returns an IPADDR4 for the global broadcast address...

You can still pass a 0xFFFFFFFF for broadcast in a function that takes an IPADDR4, but you'll have issues porting your code over to actually handle IPv6 in the future. Unfortunately broadcasts don't really translate to IPv6, where everything is multicast based. This is actually a topic I haven't really thought about much before...
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: IPv6 on IPv4 network

Post by dciliske »

Turns out that while IPv6 is Multicast based, there exists a logical equivalent to the global broadcast address in the form of the ALL_NODES address. Sending a multicast packet to the ALL_NODES address will send to all IPv6 devices on the local link.

We will likely end up with an example of this in the next month or so, but I'm busy working on cryptography...
Dan Ciliske
Project Engineer
Netburner, Inc
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Re: IPv6 on IPv4 network

Post by SeeCwriter »

The include file multicast.h appears to only support IPv4. I am unable to find an IPv6 version of function RegisterMulticastFifo().
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: IPv6 on IPv4 network

Post by rnixon »

IPv6 needs multicast by default. I believe its anything with a FF00: prefix.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: IPv6 on IPv4 network

Post by dciliske »

Hmm... interesting. I get what you expect that to do. I'll have a look at this later, currently trying to improve performance for Diffie-Hellman key exchange.
Dan Ciliske
Project Engineer
Netburner, Inc
SeeCwriter
Posts: 635
Joined: Mon May 12, 2008 10:55 am

Re: IPv6 on IPv4 network

Post by SeeCwriter »

Dan,

Have you had a chance to look into the IPv6 equivalent of RegisterMulticastFifo()?
User avatar
pbreed
Posts: 1091
Joined: Thu Apr 24, 2008 3:58 pm

Re: IPv6 on IPv4 network

Post by pbreed »

You have to join by interface...

#include <ipv6/ipv6_interface.h>


IPv6Interface * pIf=IPv6Interface::GetFirst_IP6_Interface();
if(pIf)
{
pIf->SendMLDRegistration( const IPADDR & regAddr );
}


If you have more than one interface then you can iterate with the IPv6Interface static members:
static IPv6Interface *GetInterfaceForDestination(const IPADDR6 & ip);
static IPv6Interface *GetInterfaceForSource(const IPADDR6 & ip);
static IPv6Interface *GetInterfaceN(int n);
static IPv6Interface *GetFirst_IP6_Interface();

Or the non static member function:
IPv6Interface *GetNext_IP6_Interface();
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: IPv6 on IPv4 network

Post by dciliske »

IPv6 support has now been added to RegisterMulticastFifo. It's a little rudimentary (we don't currently support *full* MLDv2 querying for instance), but appears to be functional.

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Post Reply