Unable to ping for Thread Border router using Linux + KW as Host Controlled Device with Serial TAP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to ping for Thread Border router using Linux + KW as Host Controlled Device with Serial TAP

Jump to solution
2,465 Views
kunalkotecha1
Senior Contributor II

Hello Juan Carlos Pacheco 

Thank you for guiding through the steps mentioned in Thread Border Router using Linux + KW as Host Controlled Device with Serial TAP for DHCPv6-PD. We are following the steps provided by you, however, we are still facing the issue.

Setup:

a) Linux PC (Ubuntu 14.04)

b) FRDM KW41Z flashed with a Host controlled device application

c) FRDM KW41Z flashed with a router eligible end device (REED)

d) OpenWrt Router configured with ULA prefix.

FRDM version:
a) CONNECTIVITY FRAMEWORK: v5.3.6
b) IEEE 802.15.4 MAC: v5.3.6
c) NXP Thread: v1.1.1.20

d) Thread SDK: SDK_2.2.0_FRDM-KW41Z_LINUX

We have done bridging of eth1 and threadtap0 interface. I am not able to ping Router's IPv6 address 2001:2002:2003::1 from Linux PC, but still able to ping from REED. However, after some time ( approx. 50-60 ping response are received), ping response does not come from REED as well.

I have attached a log.zip file for reference, which contains:

a) steps.txt: steps used for configuring Linux machine as a border router.

b ifconfig.txt: output of "ifconfig" command.

c) IPv6Netstat.txt: output of "netstat -rn -A inet6" command.

d) routerEligileEndDevice.txt: console of router eligible end device.

e) linuxBRMachine.txt: log of ping command in Linux machine configured as a border router.

Regards,

Kunal

Labels (3)
Tags (1)
0 Kudos
1 Solution
1,850 Views
jc_pacheco
NXP Employee
NXP Employee

Hi Kunal,

I'm still unable to replicate your issue. Looking at the sniffer logs, I see that there's still activity between the host controlled device interface 0, hence the board is at least partially responsive but there are no more echo requests or replies from Global interfaces.

Let's break down this a little bit with some tests to identify if the issue is on Linux configuration (sysctrl/firewall/other), hsdk_application (Thread_KW_Tun) or Host Controlled Device.

From your logs:

Thread NetworkExternal Network
InterfaceREEDHost Controlled Device (If1)Host Controlled Device (If0)OpenWRT Router
Global2001:2002:2003:4:ccf3:37d0:a06d:a5132001:2002:2003:4:fcc4:b3b4:a2f2:f57d2001:2002:2003:0:260:37ff:fe00:fa5c2001:2002:2003::1
LL64fe80::1c53:116c:3be6:51bcfe80::dc5a:76ed:3005:7716fe80::260:37ff:fe00:fa5cfe80::4494:fcff:fe8c:c608

When communication is lost, are you able to ping from REED to HCD (If0 and If1) and from Linux to the OpenWRT Router? Or from the OpenWRT to the HCD or REED? Can you trace it with wireshark?

When you mention you Power on Reset the FRDM-KW41Z, do you also restart the Thread_KW_Tun application?

If you just restart the Thread_KW_Tun application (no POR of FRDM-KW41Z), is the communication restablished?

Do you have any other interface in the Linux system (dev/ttyACMx)?

Is it possible to try with different hardware (KW and Linux)?

View solution in original post

0 Kudos
8 Replies
1,850 Views
jc_pacheco
NXP Employee
NXP Employee

Great news! Glad to help!

Please don't forget to mark this query as solved if it's the case.

0 Kudos
1,851 Views
jc_pacheco
NXP Employee
NXP Employee

Hi Kunal,

I'm still unable to replicate your issue. Looking at the sniffer logs, I see that there's still activity between the host controlled device interface 0, hence the board is at least partially responsive but there are no more echo requests or replies from Global interfaces.

Let's break down this a little bit with some tests to identify if the issue is on Linux configuration (sysctrl/firewall/other), hsdk_application (Thread_KW_Tun) or Host Controlled Device.

From your logs:

Thread NetworkExternal Network
InterfaceREEDHost Controlled Device (If1)Host Controlled Device (If0)OpenWRT Router
Global2001:2002:2003:4:ccf3:37d0:a06d:a5132001:2002:2003:4:fcc4:b3b4:a2f2:f57d2001:2002:2003:0:260:37ff:fe00:fa5c2001:2002:2003::1
LL64fe80::1c53:116c:3be6:51bcfe80::dc5a:76ed:3005:7716fe80::260:37ff:fe00:fa5cfe80::4494:fcff:fe8c:c608

When communication is lost, are you able to ping from REED to HCD (If0 and If1) and from Linux to the OpenWRT Router? Or from the OpenWRT to the HCD or REED? Can you trace it with wireshark?

When you mention you Power on Reset the FRDM-KW41Z, do you also restart the Thread_KW_Tun application?

If you just restart the Thread_KW_Tun application (no POR of FRDM-KW41Z), is the communication restablished?

Do you have any other interface in the Linux system (dev/ttyACMx)?

Is it possible to try with different hardware (KW and Linux)?

0 Kudos
1,850 Views
kunalkotecha1
Senior Contributor II

Hi JC,

Thank you for your response. I have changed both Host and REED FRDM KW41Z board and surprisingly it is working. I am able to ping the router from REED. But I am not able to ping Border Router IP address from REED.

Steps:

sudo ./make_tap.sh
sudo brctl addbr br0
sudo brctl addif br0 threadtap0
sudo brctl addif br0 eth1
sudo ifconfig br0 up
sudo dhclient br0
sudo dhclient -6 br0
sudo /sbin/ip -6 route add 2001:2002:2003::/64 dev br0
sudo /sbin/ip -6 route del 2001:2002:2003::/64 dev eth1

Screenshot for Border Router:

pastedImage_3.png

Screenshot for Host:

pastedImage_4.png

Screenshot for REED:

pastedImage_5.png

Screenshot for Other Test Linux System connected over Ethernet to router:

pastedImage_7.png

Screenshot for Ping status for all interfaces:

An IP address in below screenshot is taken from above screenshots (Please verify once if possible)pastedImage_8.png

I am not able to ping REED from x86 Linux system and Border Router. It would be great if you could help us on the same.

Regards,

Kunal

0 Kudos
1,850 Views
kunalkotecha1
Senior Contributor II

Hi JC,

I am now able to ping REED node from Linux System. I just need to add the route and did it by rdisc6 command mentioned in https://community.nxp.com/docs/DOC-334294 .

Thanks a lot for your help and support.

Regards,

Kunal

0 Kudos
1,850 Views
jc_pacheco
NXP Employee
NXP Employee

I'll check the wireshark logs and get back to you... Meanwhile, I noticed you have both ULA and Global addresses.. normally when you enable dhcp topology you should not get the ULA unless you modified the code to force it, did you?

I updated the https://community.nxp.com/docs/DOC-334294 guide with steps I performed and it worked ok, I left my Thread router pinging the IPv6 router during the night and it keeps working fine (>20hrs).

0 Kudos
1,850 Views
kunalkotecha1
Senior Contributor II

Hi JC,

Thank you for your response. I have gone through updated Thread Border Router using Linux + KW as Host Controlled Device with Serial TAP for DHCPv6-PD and followed the steps. However, REED is able to ping for few minutes only. Below are the screenshots:

pastedImage_2.png

pastedImage_4.png

pastedImage_5.png

pastedImage_6.png

Regards,

Kunal

0 Kudos
1,850 Views
jc_pacheco
NXP Employee
NXP Employee

Hi Kunal,

Your setup looks good and I can see your router does provide the DHCPv6 Prefix Delegation.

As you probably noticed, most of the steps provided in the post you mention are no longer required, you just need to enable the THR_SERIAL_TUN_ROUTER flag in ../source/config.h file. Please let me know if you did any additional modification on the host_controlled_device project.

The demo project is intended to be used only as a bridge between the Thread network and the external network, which seems to be achieved in your results (ping from REED to IPv6 router). What hardware and firmware are you using on your router? I was able to run the same setup (ping from REED to IPv6 router 2001:2002:2003::1 ip) with no issues for a couple of hours (a few packets were timed out but not many). What demo application did you run on the Linux side to start the TAP interface, Thread_KW_Tun or Thread_Shell? It appears that either the application in Linux or the KW41Z became unresponsive...

Regarding the ping from your Linux PC to your IPv6 router, have you tried specifying the interface?

ie. # ping6 2001:2002:2003::1 -I br0

If that doesn't work, you may try to add the static route to indicate the br0 interface.

Hope this helps.

Regards,

JC

0 Kudos
1,850 Views
kunalkotecha1
Senior Contributor II

Hello JC,

Thank you for your helpful response. 

Router Specs

Model: NETGEAR WNDR3800

Software Version: OpenWrt Barrier Breaker r39783 / LuCI Trunk (svn-r9974)

Kernel Version: 3.10.32

We are using  'Thread_KW_Tun" application. We added the static route for the br0 interface. Now I am able to ping the router address 2001:2002:2003::1, but for only about 5 minutes. As you said, it seems that the host controlled application is having some issue. If we power cycle the Host Control device and run the "Thread_KW_Tun" application again then, REED is able to ping router for 5 minutes. So after every power cycle of the Host control device, REED is able to ping router for a very short time.

Steps:

a) sudo ./make_tap.sh
b) sudo brctl addbr br0 (Optional; as we have changed the route interface to br0.see: interfaces-Info.txt)
c) sudo brctl addif br0 threadtap0
d) sudo brctl addif br0 eth1 (Optional; as we have added the eth1 interface to br0 at boot time. see: interfaces-Info.txt)
e) sudo ifconfig br0 up
f) sudo ./bin/Thread_KW_Tun /dev/ttyACM2 threadtap0

I have attached the Reference.zip file which contains below log files:

a) br0.pcapng: Wireshark file captured for br0 interface.

b) eth1.pcapng: Wireshark file captured for eth1 interface.

c) sniffer.pcapng: Wireshark file captured for sniffer802154_0 interface.

d) threadtap0.pcapng: Wireshark file captured for threadtap0 interface.

e) REED-Info.txt: Console logs of REED.

f) HostControlledDevice-Info.txt: Console logs of Host Control Device.

g) interfaces-Info.txt: /etc/network/interfaces file after adding static route to br0.

Regards,

Kunal

0 Kudos