Local and Global IP address for IPv6

Hi All,

We need to set Local and Global IPv6 address in Apalis I.MX8. We are using Toradex Reference Multimedia image in Yocto Project for this board.
We can see below IPv6 addresses:

root@apalis-imx8-06980499:~/test_eth# ip -6 addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet6 fd00:db8:21:444:214:2dff:fe6a:8393/64 scope global dynamic mngtmpaddr 
       valid_lft 2591885sec preferred_lft 604685sec
    inet6 fe80::214:2dff:fe6a:8393/64 scope link 
       valid_lft forever preferred_lft forever

Could you please let me know which of these are Global and Local IPv6 addresses and how to set them using connmanctl . If we can not set it from connmanctl then using which command we can set local and global IPv6 addresses?

Regards,
Prathamesh Kulkarni

Hi,
Can anyone please help us on this issue?

Regards,
Prathamesh Kulkarni

Hi @prathamesh.kulkarni

Sorry for the delay response.
in the above ip address,fd00:db8:21:444:214:2dff:fe6a:8393/64 is globel and fe80::214:2dff:fe6a:8393/64 local link ipv6 addresses.
Have you tried setting up ipv6 with ip command?
https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ch06s02.html

Hi @ashok.tx ,
Thanks for sharing your input. I am able to set local link address using ip command.
Below is the commands output.


root@apalis-imx8-06980499:~# 
root@apalis-imx8-06980499:~# ip -6 addr add fe80::406e:8dff:fec1:6fe6/64 dev eth0                                                             
root@apalis-imx8-06980499:~# ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet6 fd00:db8:21:444:406e:8dff:fec1:6fe5/64 scope global dynamic mngtmpaddr 
       valid_lft 2591961sec preferred_lft 604761sec
    inet6 fe80::406e:8dff:fec1:6fe6/64 scope link tentative 
       valid_lft forever preferred_lft forever
    inet6 fe80::406e:8dff:fec1:6fe5/64 scope link 
       valid_lft forever preferred_lft forever
  1. The old link address is still present along with the new address. Is there any way to get only the newly set local link address?
  2. The newly set local link address disappears after rebooting the device.
root@apalis-imx8-06980499:~# ip -6 addr show dev eth0                                                                                         
2: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet6 fd00:db8:21:444:406e:8dff:fec1:6fe5/64 scope global dynamic mngtmpaddr 
       valid_lft 2591943sec preferred_lft 604743sec
    inet6 fe80::406e:8dff:fec1:6fe5/64 scope link 
       valid_lft forever preferred_lft forever
root@apalis-imx8-06980499:~#

Is there any way to persist the new local address after reboot?

Regards,
Prathamesh Kulkarni

Hi All,

Could anyone please answer my above query?
And also is there any way to set the IPv6 local and global addresses using Slaac?

Regards,
Prathamesh Kulkarni

Hi All,
could you please share your input on this Local and Global IP address for IPv6 - #5 by prathamesh.kulkarni

Regards,
Prathamesh Kulkarni

Hi @prathamesh.kulkarni

Sorry for the delayed response.
Unfortunately i could not find any info regarding above query.

Thanks @ashok.tx ! Could you please share your inputs on Local and Global IP address for IPv6 - #4 by prathamesh.kulkarni .

Regards,
Prathamesh Kulkarni

Hi @prathamesh.kulkarni

Is there any way to persist the new local address after reboot?

Create a simple service to auto-start at boot time.

Hello @ashok.tx ,
I am able to set the new IP address at boot time by creating a service and running it at boot time. But I am facing a new issue.
When I set a new IPv6 address, the old IPv6 address also persists. I am deleting the old IPv6 address using ip command.

ip -force -6 addr del fd00:db8:21:444:406e:8dff:fec1:6fe5/64 dev eth0

But the old IPv6 address reappears after reboot. I created a script in /etc/profile.d/ to delete the old IPv6 address, and tried to delete the IP at boot time using service but it reappears even after deleting it on bootup.
Is there any way we can delete this old IPv6 address permenently?

Thanks,
Prathamesh Kulkarni

Hi All,

Could you please share your thoughts on this Local and Global IP address for IPv6 - #10 by prathamesh.kulkarni?

Regards,
Prathamesh Kulkarni

Hi @ashok.tx ,
any thoughts on this?

Regards,
Prathamesh

Hello,
Please update on this issue as soon as possible. We are stuck in this point.

Hi @prathamesh.kulkarni

Sorry for the delay response.
Unfortunately,I never tried/used ipv6 settings.Here are some usefull links
https://superuser.com/questions/1011505/how-to-remove-only-one-ipv6-address-from-an-interface