LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2014, 05:58 AM   #1
-Jiten-
LQ Newbie
 
Registered: Oct 2014
Location: India
Distribution: Ubuntu
Posts: 5

Rep: Reputation: Disabled
Question Query regarding ping command [Ubuntu]


I am typing below mentioned command :
ping -i 10 -s 128 192.168.0.103

Here we are defining (-i)interval, (-s)size of packet.
So this means it should sent & receive 128 bytes of data packet right ?

But instead of that am getting this:

PING 192.168.0.103 (192.168.0.103) 128(156) bytes of data.
136 bytes from 192.168.0.103: icmp_seq=1 ttl=128 time=0.643 ms
136 bytes from 192.168.0.103: icmp_seq=2 ttl=128 time=0.311 ms
136 bytes from 192.168.0.103: icmp_seq=3 ttl=128 time=0.324 ms


its is sending 136 bytes of data. Can you explain why ?
 
Old 10-29-2014, 06:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,913

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
see man page of ping:
Code:
 -s packetsize
              Specifies the number of data bytes to be sent.  The default is 56, which translates into 64 ICMP data bytes when combined with the 8  bytes  of
              ICMP header data.
 
1 members found this post helpful.
Old 10-29-2014, 06:12 AM   #3
-Jiten-
LQ Newbie
 
Registered: Oct 2014
Location: India
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by pan64 View Post
see man page of ping:
Code:
 -s packetsize
              Specifies the number of data bytes to be sent.  The default is 56, which translates into 64 ICMP data bytes when combined with the 8  bytes  of
              ICMP header data.
So when we are sending 128 bytes of data. 8 bytes of header is added in it . So total amount of data will always be defined data + 8 bytes .. ryt ?
 
Old 10-29-2014, 06:19 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Yes, 136 bytes if -s is 128
 
1 members found this post helpful.
  


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
Ping command hangs indefinitely i.e.system(ping -w 10 [ip address]) Anshu Tomar Linux - Newbie 4 07-05-2012 07:16 AM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM
Sharing an XP net connection with a Ubuntu box - Ubuntu config query. uncle-c Linux - Newbie 2 11-06-2007 10:09 AM
Simple question about command syntax ping/log ping results ohalnet Linux - Networking 1 07-25-2006 04:46 AM
apt-get query command? bruno buys Debian 1 07-14-2004 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:58 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