Ipv6 ip is not assigned on linux

Dear supporter,

My developement environment is as follws,
Raspberry pi cm3(Raspbian GNU/Linux 9) + wp7610(usb)
I installed modem qmi driver .
raspberrypi get the ipv4 Ipaddress get alright.
Also i need to get ipv6 ipaddress. Modem get the ipv6 address like below.
root@unet:/#
root@unet:/# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1400
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fefe:6991 prefixlen 64 scopeid 0x20
ether b8:27:eb:fe:69:91 txqueuelen 1000 (Ethernet)
RX packets 1568995 bytes 223262382 (212.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2662858 bytes 3410732014 (3.1 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1400
inet 63.46.184.86 netmask 255.255.255.252 broadcast 63.46.184.87
inet6 fe80::10b8:2cff:fef2:a308 prefixlen 64 scopeid 0x20
ether 12:b8:2c:f2:a3:08 txqueuelen 1000 (Ethernet)
RX packets 237402 bytes 23388028 (22.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 326315 bytes 298829338 (284.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 1092514 bytes 67010402 (63.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1092514 bytes 67010402 (63.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@unet:/#

This is the ip the modem knows about.
at+cgpaddr

+CGPADDR: 1,63.46.184.86
+CGPADDR: 2,38.0.16.3.16.41.235.145.0.0.0.0.43.167.134.47<- this one is ipv6 address
+CGPADDR: 3,0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

OK

Two of them are differnt.
I was wondering how to synchronize modem’s ipv6 ip in linux.
Please check if there is a way.
Thank you.

are you using AT!SCACT=1,1 to establish data connection in the host?
what is eth0? Is it not related?

I just use eth0 is another wire ethernet network for internal network.
eth1 is wireless network through wp7610 modem usb network.

yes I am using AT!SCACT=1,1 and udhcpc linux command .

but your profile 1 is having ipv4 address…
Have you tried to use AT!SCACT on profile 2 which is having IPv6 address?

I am sorry.
I din’t know that modem ipv6 ip address is wrong.
Modem didn’t get the ipv6 address.
But i try to your instruction below.
Thank you .
at+cgpaddr

+CGPADDR: 1,63.46.184.86
+CGPADDR: 2,38.0.16.3.16.41.235.145.0.0.0.0.43.167.134.47<- this one is not data usable ipv6 ip.
+CGPADDR: 3,0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

OK
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1400
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba27:ebff:fefe:6991 prefixlen 64 scopeid 0x20
ether b8:27:eb:fe:69:91 txqueuelen 1000 (Ethernet)
RX packets 481 bytes 92682 (90.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 382 bytes 192295 (187.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4227<UP,BROADCAST,NOARP,MULTICAST> mtu 1500
ether de:ea:c8:70:ab:08 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 257 bytes 20314 (19.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 257 bytes 20314 (19.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

at+cgpaddr

+CGPADDR: 1,63.46.184.86
+CGPADDR: 2,38.0.16.3.16.41.235.145.0.0.0.0.43.167.134.47
+CGPADDR: 3,0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

OK
AT!SCACT=1,2

OK
at+cgpaddr

+CGPADDR: 1,63.46.184.86
+CGPADDR: 2,38.0.16.3.16.41.235.145.0.0.0.0.43.167.134.47
+CGPADDR: 3,0.0.0.0,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

OK
at!scact=1,1

OK
AT+CGCONTRDP

+CGCONTRDP: 1,5,we01.vzwstatic,63.46.184.86,198.224.173.135,198.224.174.135
+CGCONTRDP: 2,6,ims,38.0.16.3.16.41.235.145.0.0.0.0.43.167.134.47, 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1, 32.1.72.136.0.22.255.0.1.225.0.13.0.0.0.0, 32.1.72.136.0.23.255.0.1.228.0.13.0.0.0.0,32.1.72.136.0.4.254.0.0.176.1.4.0.0.2.77,32.1.72.136.0.4.254.0.0.176.1.4.0.0.2.17

OK

what is return of “AT+CGDCONT?”

I can see the IP address returned by profile 1 is still IPv4…

The result of “at+cgdcont?” is as follows.

+CGDCONT: 1,“IPV4V6”,“we01.vzwstatic”,“0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”,0,0,0,0
+CGDCONT: 2,“IPV4V6”,“ims”,“0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”,0,0,0,0
+CGDCONT: 3,“IPV4V6”,“sos”,“0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0”,0,0,0,1

OK

it seems you should use profile 1 for data communication.
And from +CGPADDR, the profile 1 is returning IPv4 address