trying to include new fields in IPv6 Router Advertisements

0

A newbie here and I am working on a hobby project and trying to change the packet format of an IPv6 router advertisement packet using RADVD. But I do not know how to work on it.

My plan is to set up a wireless network with a router sending out periodic modified RA and enabling a host to identify that modified RA.

My Ubuntu PC acts as a router and it is connected to a wireless modem. A host laptop is also connected to the same network using Wifi. I installed radvd on the router pc and edited the radvd.conf file to advertise a particular network id.

sysctl.conf:

net.ipv6.conf.all.forwarding = 1

radvd.conf:

interface eth1
{
  prefix 2001:db1:0:1::/64
  {
    AdvOnLink on;
    AdvAutonomous on;
  };
};

rc.local:

ip a a 2001:db1:0:1::1 dev eth1
ip r a 2001:db1:0:1::/64 dev eth1

When I start radvd, I am able to get both the router and the host on the common network and the host auto configures itself with the advertised net id.

I now want to change the packet format of the RA and introduce a few more fields that can change the way the address auto configuration works. I think that I will have to introduce few more fields in the radvd.conf file with all the parameters that I need. But I am not sure.

PS: my router is not connected to the internet. So I do not need an IPv64 tunnel. Also my current system is a single router and a single host

Additional Information: I would like to include a set of five new one bit flags that does not exist in the present RA. The present RAs support only the following information: http://manpages.ubuntu.com/manpages/utopic/man5/radvd.conf.5.html
I'm trying to create a better and a more efficient protocol for the existing ICMPv6. I have the protocol on paper but I want to implement this and test the working of my design. I also will need to change the neighbor solicitations and the neighbor advertisements of the exiting ICMPv6. Can someone help me with this?

Hariharasudhan Vigneswaran

Posted 2015-04-07T14:17:17.927

Reputation: 3

2Yes, you'll likely need to change some of the configuration options in radvd.conf, however unless you tell us what you're trying to achieve, we won't be able to help you know what to change. Please edit your question with the additional details. – heavyd – 2015-04-07T14:21:48.533

@heavyd I am trying to make the ICMPv6 protocol more efficient. I want to introduce a few single bit flags in the RAs and also change the Neighbor advertisements and solicitations. I will be introducing a few more fields like packet id(16 bits) and a few single bit flags in the neighbor solicitation packet. – Hariharasudhan Vigneswaran – 2015-04-08T11:49:33.823

Answers

0

From what I guess you have specifically in mind, you simply cannot use radvd for what you want to do. That is, you cannot make up new options or fields and "plug them in" through radvd configuration syntax. Say, if you invented a new option, then

interface yada
{
    prefix yada:yada:yada::/64
    {
        myNewFancyOption on;
        ...
    }
}

won't work. radvd follows the relevant RFCs (i.e. RFC 4861 and its updates) and hence doesn't "know" about your modifications.

If you want to send arbitrary packets, you have to modify the radvd sources or you have to use a packet generator like scapy.

countermode

Posted 2015-04-07T14:17:17.927

Reputation: 851