0

How can I assign link, site and global IPv6 addresses at a same time using /etc/network/interfaces file? I am able to assign any one of them address at a time.

  • Could you provide an example of what you've got so far, please. – roaima Jun 10 '15 at 9:02
  • Actually what do you want? I have just assigned 3 different types of IPv6 address to my device using /etc/network/interfaces file and ping them from different devices and PCs. Here you should make sure that if you want to ping any global unique address, you should have global unique address otherwise it will not work. – Neel Tailor Jun 10 '15 at 10:50
3

The link-local address will be assigned automatically. You do not need to configure anything in /etc/network/interfaces to make that happen.

"Special" site-local IPv6 addresses are sort of an obsolete concept: an idea that was part of the original IPv6 spec that turned out to have problems and was removed. Today there is a replacement called Unique Local Addresses but they're not treated specially by the protocol. A ULA address is just another unicast address you can assign to an interface as far as the networking stack is concerned. Is ULA what you mean when you say "site"?

As for assigning multiple IP addresses to an interface, the normal address, netmask etc... directives only handle a single address. To configure multiple addresses,

  • pick one address and configure it normally (using address and netmask)
  • Add all other addresses using custom commands executed when the interface comes up:

    up ip addr add abcd:defg::whatever/64 dev <interface name>
    
  • Yes I mean ULA by "site". OK i got it that link local address will be generated automatically. But, if I want to assign ULA and Global unique address or say 2 global unique addresses using /etc/network/interfaces file only. Is there any way? I can not use command suggested by you. – Neel Tailor Jun 10 '15 at 5:24
  • I am not aware of any way other than what I suggested. Why can you not use that? – Celada Jun 10 '15 at 5:29
  • Ok. Thank you ma'm. I am configuring IPv6 in my device so when it gets static IPv6 from user, it will be stored in /etc/network/interfaces file. User can not go to terminal to write this code. – Neel Tailor Jun 10 '15 at 6:09
  • I understand. I read the manpage again just to confirm; it looks like there is no other way. Perhaps whatever is automatically updating /etc/network/interfaces with user-supplied data can be modified to handle adding up directives for additional addresses? After all, they go right in the same location in the same file. – Celada Jun 10 '15 at 6:43
  • It's done using following lines in /etc/network/interfaces file: auto eth0:0 iface eth0:0 inet6 static address fec0::1eba:8cff:fee5:c117 netmask 64 – Neel Tailor Jun 10 '15 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.