LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2010, 10:09 AM   #1
piyara
LQ Newbie
 
Registered: May 2010
Posts: 7

Rep: Reputation: 0
Unhappy how to send udp packet to the DNS using netcat


Can anybody help me that how can i send udp packet to the DNS using netcat in opensuse.
 
Old 06-16-2010, 10:16 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
For what purpose?

The nc(1) manpages have documentation on using UDP.
 
Old 06-16-2010, 12:16 PM   #3
piyara
LQ Newbie
 
Registered: May 2010
Posts: 7

Original Poster
Rep: Reputation: 0
i have tried but it is not working.the command which i used is
netcat -uvv [host_name] [port_number]
e.g
netcat -uvv 8.8.8.8 53
annd then press enter. then i entered some text but it was stucked. when i pressed ctrl+c it was exit giving send 10 rcvd 0
 
Old 06-16-2010, 12:59 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Again, what is the purpose of this? You need to send a single UDP packet to the remote host? You need to ship data over UDP to the host? Or what..?
 
Old 06-16-2010, 01:39 PM   #5
zidane_tribal
Member
 
Registered: Apr 2005
Location: chained to my console.
Distribution: LFS 6.1
Posts: 143

Rep: Reputation: 18
Quote:
Originally Posted by piyara View Post
i have tried but it is not working.the command which i used is
netcat -uvv [host_name] [port_number]
e.g
netcat -uvv 8.8.8.8 53
annd then press enter. then i entered some text but it was stucked. when i pressed ctrl+c it was exit giving send 10 rcvd 0
curiouser and curiouser, why are you experimenting against googles dns servers? http://code.google.com/speed/public-dns/

whatever you are doing, i doubt you should be doing it with netcat and against a public dns server.
 
Old 06-16-2010, 02:43 PM   #6
piyara
LQ Newbie
 
Registered: May 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Thanx anomie for such immidiate responses. i have achieved the goal by this command
netcat -uvv [host_name] [port_number]

But now i want to calculate time difference between sending the packets and receiving the packets from the DNS. the problem is that after entering the above mentioned command, it waits for the input, and after the input response is shown by the dns. how can i take the difference of time????
 
Old 06-16-2010, 03:23 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
One option is to observe packets with tcpdump(8) and then check timestamps.
Code:
# tcpdump -i eth0 udp port 53
Replace "eth0" with appropriate interface.
 
Old 06-16-2010, 03:51 PM   #8
piyara
LQ Newbie
 
Registered: May 2010
Posts: 7

Original Poster
Rep: Reputation: 0
can i use "tcpdump" to monitor UDP packets in wireless network??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Relay UDP broadcast using Netcat/Socat ? hikmatrusiwa Linux - Networking 5 08-06-2010 04:14 AM
Perl: UDP server receive / send packet to host superm@n Programming 2 04-02-2010 07:22 AM
Send a UDP Syslog packet with Source Port set to 514 fjkum Programming 1 01-26-2010 03:53 PM
Generating UDP data gram using netcat mohtasham1983 Linux - Networking 3 02-19-2007 03:47 AM
Is it possible to set the udp packet size for a DNS query in BIND 9.2.1?? Paul_Randle Linux - Networking 0 10-17-2005 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration