Tcpdump in Torizon OS

Hi,

I’m trying to trouble shoot some networking issues and was wondering if there is a program like tcpdump or wireshark i could use in the Torizon os?

Thanks.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

For troubleshooting networking issues on Torizon OS, you can indeed use tools like tcpdump. While tcpdump is a command-line packet analyzer tool that is very useful for network diagnostics and monitoring, Wireshark provides a graphical interface and is more feature-rich but might not be directly available or suitable for running on Torizon due to its graphical dependencies and resource requirements.

To use tcpdump on Torizon, you can install it within a container by adding it to your Dockerfile. Here’s a simple example of how to do this in a Dockerfile for an application that runs on Torizon:

FROM torizon/debian:2-bullseye

RUN apt-get update && apt-get install -y tcpdump

# Your application setup steps here

This Dockerfile starts with a base image from Torizon, updates the package lists, and installs tcpdump. You can then build this container and deploy it to your Torizon device. Once deployed, you can execute tcpdump within your container to monitor network traffic.

Remember, running tcpdump may require elevated privileges depending on your container’s configuration and the specifics of what you’re trying to capture.

For graphical tools like Wireshark, it’s generally recommended to capture the packets on the device using tcpdump and then transfer the capture file to a workstation where Wireshark is installed to analyze the packets.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

OpenVPN and Weston's VNC/RDP on Torizon OS | Toradex Developer Center.

1 Like

Thanks, I would like to run tcpdump outside of the container for now. Is that possible? How do I get tcpdump installed in torizon. I want to confirm my data is correct before going into the container.

Hey @jojo,

The way to get tcpdump or wireshark into Torizon OS would require building them into the OS with Yocto. The option without using yocto would be to build the tools you want into a container and use them on Torizon OS (as the AI suggested).

Is there a specific networking issue you are trying to solve?

And have you seen our Networking Connectivity Documents for Torizon?

edit:
Also, via the container method, if you pass --net=host when running your container, you use the same networking stack as outside the container. So it should be simple to use tcpdump via the container method.

-Eric

1 Like

Thanks @eric.tx,

I currently run my application in a container and pass in --net=host. This will be fine if it is the same as running outside the container. I didn’t know if it would be the same or not so i was trying to eliminate potential problems. I will run tcpdump inside the container.

There is a specific networking issue I’m having though I do not believe it’s on torizon’s end.

I run a Qt application which uses DDS(data distribution service) for tx/rx data on a local network. My application requires ipv6 which is giving me issues. If I run ipv4 everything works great. So I’m trying to see what’s going on when i switch from ipv4 to ipv6.

There is nothing I need to enable or do inside the container for ipv6 correct?

Thanks for you help.

Hey @jojo,

Looking at the docker docs. IPv6 needs configuration support.

-Eric

Thanks @eric.tx.

Is the Torizon OS kernel built with ipv6 multicast support?

Thanks

Hey @jojo,

It will depend on specifically what you want to do with IPV6 multicast. If you find you need a specific kernel module enabled, we can submit a change and if its accepted (most likely) it would come out on a nightly build soon there after.

These are the kernel configs relating to IPV6 as of Torizon OS 6.6.1.

CONFIG_IPV6=y
CONFIG_IPV6_ROUTER_PREF=y
# CONFIG_IPV6_ROUTE_INFO is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
# CONFIG_IPV6_VTI is not set
CONFIG_IPV6_SIT=y
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_GRE is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_IPV6_SUBTREES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IPV6_IOAM6_LWTUNNEL is not set

and for IP related multicast.

torizon@verdin-imx8mp-07011921:~$ zcat /proc/config.gz | grep CONFIG_IP_M
CONFIG_IP_MULTICAST=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_MROUTE_COMMON=y
CONFIG_IP_MROUTE=y
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set

-Eric

Great, maybe that is my issue.
Let me check which modules are required for the application I’m trying to run.

Hey @jojo,

A small correction on what I have given you.

The configs I listed were not for your module. I see you have the IMX6ULL. Although the configs might be the same, the 6.1 IMX6ULL (emmc) config can be found via our artifactory here:

or as a download link:
kernel-config–6.1.84+git0+17baa943ac_347385861c-r0-colibri-imx6ull-emmc-20240425031622.FIX_21090 (209.5 KB)

-Eric

I have the verdin-imx8mp.

I select the correct module when creating topics and it always changes it to imx6 or adds it for some reason.

I have put in a request in with my DDS vendor to see which modules they need for ipv6. I will let you know when i hear something back.

Do I just post back here to request a change for a nightly build or is there a process I need to follow?

Thank you,

Hey @jojo,

Thanks for the info

Posting here will work.

-Eric

Hey Eric,

I have not got any information back on which ipv6 modules need to be configured.

I would like to try to troubleshoot myself. Is it possible for me to configure the options myself when building Torizon with Yocto?

I’m not to familiar with Yocto but I can build Torizon and get it deployed to my module. I just do not know where to configure the modules above. Do you know where I can configure the modules?

Thank you,
jojo

Hey @jojo,

Can you share more specific functionality you are trying to implement?

You would need the proper setup via: build Torizon with yocto, then you can use
bitbake -c menuconfig virtual/kernel to get an interactive terminal that you can changes configs.

-Eric

Hi Eric,

I have followed that link yesterday and was able to build Torizon and deploy it to my verdin. I will look at the menuconfig command.

My problem is the dds software transmits rtps packets which writes multicast and unicast packets. On ipv4 everything works great. When using ipv6 unicast packets can be received and transmitted but multicast packets are not being received.

I can not figure out if this is some find of network configuration issue, or a firewall, or some other kind of filtering. I’m a little bit confused because the software works fine on native linux machines.

Hey Eric,

The DDS vendor was able to get this resolved in their settings.

This issue has been solved.

Thanks for you help.

Jordan