IPv6 packet not sent or received

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

IPv6 packet not sent or received

Ivan Delamer-2
Hi Mohsin,

That's really not so much information so it's hard to help much.

If you're using Ethernet make sure you set:

     netif->output = etharp_output;
#if LWIP_IPV6
     netif->output_ip6 = ethip6_output;
#endif /* LWIP_IPV6 */

and make sure netif->linkoutput is set too.

For incoming packets try to capture an interrupt from your Ethernet
controller and debug the path the packet takes.

Cheers
Ivan


> Date: Fri, 7 Nov 2014 14:53:07 -0700 (MST)
> From: mfkexpress <[hidden email]>
> To: [hidden email]
> Subject: [lwip-users] IPv6 packet not sent or received
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Hi Ivan,
> I'm new to IPv6 and trying to implement it in my device and have
> called
> netif_create_ip6_linklocal to form IP6 address of my device.
> But when I connected it to my PC,  I couldn't find any packet in
> Wireshark
> originating from my device. I also confirmed through some debug
> messages
> that my device is writing some packet to write FIFO but no packet is
> received at PC.
> Also I discovered that nd6_input is not being called any time in my
> case.
> Please suggest some solution.
>
> Regards.
> Mohsin


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Mohsin
Hi Ivan,

First of all thanks for your reply. I'm using ethernet and thus I've already set output_ip6 and linkoutput as you have mentioned. I tested IPv4 and it is working properly but when I tested IPv6 by disabling IPv4 in my PC, it didn't work. I even captured interrupt and printed it using p->payload, but it does not match exactly with what my PC is sending.

And what about nd6_input that is not being called anytime?

Thanks &  Regards,
Mohsin
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Ivan Delamer-2
In reply to this post by Ivan Delamer-2
The only thing I can think of at the moment, look in your
ethernetif_input() and make sure IPv6 is not filtered out, my version
does this:

switch( htons( ethhdr->type ) )
{
     /* IP packet? */
     case ETHTYPE_IP:
     case ETHTYPE_ARP:
     case ETHTYPE_IPV6:
         /* pass to network layer */
         if (pxNetIf->input( p, pxNetIf ) != ERR_OK)
         {
             pbuf_free( p );
         }
         break;

     default:
         pbuf_free( p );
         break;
}

So make sure ETHTYPE_IPV6 is included. otherwise your packet is freed.

Cheers
Ivan


> Date: Sun, 9 Nov 2014 07:03:01 -0700 (MST)
> From: mfkexpress <[hidden email]>
> To: [hidden email]
> Subject: Re: [lwip-users] IPv6 packet not sent or received
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Hi Ivan,
>
> First of all thanks for your reply. I'm using ethernet and thus I've
> already
> set output_ip6 and linkoutput as you have mentioned. I tested IPv4 and
> it is
> working properly but when I tested IPv6 by disabling IPv4 in my PC, it
> didn't work. I even captured interrupt and printed it using
> p->payload, but
> it does not match exactly with what my PC is sending.
>
> And what about nd6_input that is not being called anytime?
>
> Thanks &  Regards,
> Mohsin
>
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Mohsin
This post was updated on .
Oh!! I'm sorry that I told I'm using ethernet, but actually I'm using LAN card.

So, I haven't included ethernetif.c in my project. Instead I implemented it using lan9221if.c because I'm using LAN9221 card in my device.

In lan9221if_input(), I've already added case ETHTYPE_IPV6 as u suggested.

So, is it ok with just lan9221if.c or I need to include ethernetif.c also?

Thanks & Regards,
Mohsin
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Mohsin
In reply to this post by Ivan Delamer-2
Thank You so much Ivan!!!

Earlier I added "case ETHTYPE_IPV6" in lan9221_if_input_interrupt() but forgot to add it in lan9221_if_input().

Now my receiption part is ok. Only one problem is that in all received packets, I get some additional 4 bytes at the end.

And still transmission part is not working

Thaks & Regards,
Mohsin
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Ivan Delamer-2
In reply to this post by Ivan Delamer-2
> Date: Sun, 9 Nov 2014 22:46:07 -0700 (MST)
> From: mfkexpress <[hidden email]>
> To: [hidden email]
> Subject: Re: [lwip-users] IPv6 packet not sent or received
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Thank You so much Ivan!!!
>
> Earlier I added "case ETHTYPE_IPV6" in lan9221_if_input_interrupt()
> but
> forgot to add it in lan9221_if_input().
>
> Now my receiption part is ok. Only one problem is that in all received
> packets, I get some additional 4 bytes at the end.

This is not LwIP-related this is due to your lan9221 code, so I can't
really help you there.

> And still transmission part is not working

Packets may be queued in ND6 code waiting for address resolution. Do
you see any neighbor discovery messages going out?

I don't have any more advice other than to trace the outgoing packets
through the debugger...

Ivan


>
> Thaks & Regards,
> Mohsin
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: IPv6 packet not sent or received

Mohsin
Yes,  I confirmed by printing q->payload that my device is trying to multicast some Neighbour Solicitation as well as Router Solicitation messages but they do not appear on Wireshark.