Hi all,
I have integrated FreeRTOS-Plus-TCP-labs-ipv6_multi.And I am receiving the following IPv6 address FF02::1:FF20:9834 this is a multicast IP so is it correct or I am looking in the wrong IP address and when i am pinging it its ping is not stable at all.
Thank you.
Like the IPv4 ping, ICMPv6 ping can go from any address to any other address.
FF02:: I have no experience with pinging to a broadcast address.
when i am pinging it its ping is not stable at all.
What do you mean with not stable? Does it sometimes reply, and sometimes it doesn’t?
If so, that is usually related to resources being scarce, like available network buffers and heap.
I just tried to ping a FreeRTOS+TCP device using IPv6, both from Windows and from Linux.
First, I assigned a static “local link” address: “fe80::7007”. That is easy to remember to do later experiments.
The init code is as follows:
static NetworkInterface_t xInterfaces[ 1 ];
static NetworkEndPoint_t xEndPoints[ 2 ];
static const uint8_t ucMACAddress1[ 6 ] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x60 };
IPv6_Address_t xIPAddress;
IPv6_Address_t xPrefix;
pxSTM32Fxx_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
FreeRTOS_inet_pton6( "fe80::", xPrefix.ucBytes );
FreeRTOS_inet_pton6( "fe80::7007", xIPAddress.ucBytes );
FreeRTOS_FillEndPoint_IPv6( &( xInterfaces[ 0 ] ),
&( xEndPoints[ 0 ] ),
&( xIPAddress ),
&( xPrefix ),
64U, /* Prefix length. */
NULL, /* No gateway */
NULL, /* DNS address. */
ucMACAddress1 );
FreeRTOS_IPStart();
Beside that it has an automatic IPv4 address.
I can ping the device from windows using:
ping fe80::7007
Linux ( Ubuntu ) also wants to know which interface to use, which I don’t know, so I just try:
ping fe80::7007%1
connect: Network is unreachable
ping fe80::7007%2
PING fe80::7007%2
(fe80::7007%ens33) 56 data bytes
64 bytes from fe80::7007%ens33: icmp_seq=1 ttl=64 time=0.564 ms
64 bytes from fe80::7007%ens33: icmp_seq=2 ttl=64 time=0.522 ms
The ping from my Ubuntu is slow, because it runs in a virtual box.
This is flood ping:
su ping -f fe80::7007%1
It exchanges 1,671 packets per second, without any loss on my LAN.
Yes i was getting that multicast address even though i am not enabling the IPv6 multicast in my configuration. for clear view I was looking at the following function (FreeRTOS_FindEndPointOnIP_IPv6) and from this i was getting that broadcast address.
Thanks for the init code.
Following is my Init code
IPv6_Address_t xIPAddress;
IPv6_Address_t xPrefix;
IPv6_Address_t xGateWay;
IPv6_Address_t xDNSServer;
pxFillInterfaceDescriptor(0, &(xInterfaces[0]));
FreeRTOS_inet_pton6( “fe80::”, xPrefix.ucBytes );//2001:470:ec54
FreeRTOS_inet_pton6( “fe80::7007”, xIPAddress.ucBytes );
FreeRTOS_FillEndPoint_IPv6( &( xInterfaces[0] ),&( xEndPoints[0] ),
&( xIPAddress ),
&( xPrefix ),
64uL, /* Prefix length. */
NULL,
NULL,
ucMACAddress );
I have given the same IP address statically for now and below is the image of the reply i am receiving. And resources have also been checked then also the reply looks like this.
Did you tell what type of hardware you are using? And what network interface do you use to drive it?
I hope that you have mainCREATE_TCP_ECHO_TASKS_SINGLE
not defined?
mainCREATE_TCP_ECHO_TASKS_SINGLE
only provides downward compatibility with the IPv4 branch.
You call pxFillInterfaceDescriptor()
, where is that defined?