Wednesday, April 10, 2013

How to verify UDP packet communication between two linux system?

Purpose: verify UDP packet communication between two linux system
OS Environment : Linux
Required Application : nc
Real Example :

We had to check UDP packet communication between linux and a windows system. Main purpose was to make all linux clients send/forward udp packets to central windows server which has arcsight. remote log forwarding was enabled on client.

Troubleshooting Steps :

1. send UDP packets from client :

$nc  -uv   IP_of_system_where_UDP_is_sending   port_number_to_which_UDP_is_receiving
Hello
This is test UDP packet
Are you capturing it
Please let me know

Example :

$ nc   192.1.2.10   514
Hello
This is test UDP packet
Are you capturing it
Please let me know

        If you capture the packets using wireshark / tshark or tcpdump, you'll see above packets on windows system/linux system. If your system wants to listen or receive UDP packets on any linux box, you can execute this :

Open UDP port on system A :

SystemA$ nc -luv port

Send UDP packaets from system B :

SystemB$ nc -uv    514

>>type anyting, you'll see it on SystemA 




No comments:

Post a Comment