title: Adding multiple ipv6 addresses to a single interface using ioctl
body: <p>I am trying to port my application to ipv6 and my current code brings up alias IP addresses dynamically as shown:</p>
  
  <pre><code>eth0      Link encap:Ethernet  HWaddr 00:16:35:68:21:5B
            inet addr:192.168.1.245  Bcast:192.168.1.255  Mask:255.255.255.0
            inet6 addr: fe80::216:35ff:fe68:215b/64 Scope:Link
            UP BROADCAST RUNNING  MTU:1500  Metric:1
            RX packets:278885750 errors:0 dropped:0 overruns:0 frame:0
            TX packets:68117973 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:68976932662 (64.2 GiB)  TX bytes:39384521280 (36.6 GiB)
            Interrupt:169
  
  eth0:1    Link encap:Ethernet  HWaddr 00:16:35:68:21:5B
            inet addr:192.168.1.246  Bcast:192.168.1.255  Mask:255.255.255.0
            UP BROADCAST RUNNING  MTU:1500  Metric:1
            Interrupt:169
  
  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:6060179 errors:0 dropped:0 overruns:0 frame:0
            TX packets:6060179 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0
            RX bytes:2366257047 (2.2 GiB)  TX bytes:2366257047 (2.2 GiB)
  </code></pre>
  
  <p>eth0:1 will be added dynamically by the application. It uses ioctl to do this. I want to do the same for IPV6 address. I tried this <a href="https://stackoverflow.com/questions/8240724/assign-ipv6-address-using-ioctl">Assign ipv6 address using ioctl</a>. But the example code is adding IPV6 address to the existing interface eth0 instead of eth0:1 or eth0:2 even if I specify the interface name as eth0:1. Can anyone please help since I am new to IPV6.</p>