Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cmd:ping [2013/10/21 14:43]
mcb30 created
cmd:ping [2017/05/24 16:10]
mcb30
Line 3: Line 3:
 ===== Synopsis ===== ===== Synopsis =====
  
-    ping [--size <​size>​] [--timeout <​timeout>​] <​host>​+    ping [--size <​size>​] [--timeout <timeout>] [--count <count>] <​host>​
  
 ===== Examples ===== ===== Examples =====
Line 16: Line 16:
 === Check connectivity to default gateway === === Check connectivity to default gateway ===
  
-    ping ${netX/​gateway}+    ping --count 1 ${netX/​gateway} ​&& goto gateway_good || goto gateway_bad
  
 ===== Description ===== ===== Description =====
  
-Check network connectivity to the specified host using ICMP ECHO ("​ping"​) packets of the specified payload size, sent every specified timeout interval (in milliseconds). ​ If no payload size is explicitly specified, then the default size of 64 bytes will be used.  If no timeout interval is explicitly specified, then the default timeout interval of one second will be used.+Check network connectivity to the specified host using the specified number of ICMP ECHO ("​ping"​) packets of the specified payload size, sent every specified timeout interval (in milliseconds). 
 + 
 +If no payload size is explicitly specified, then the default size of 64 bytes will be used.  If no timeout interval is explicitly specified, then the default timeout interval of one second will be used.  If no count is explicitly specified, then an unlimited number of ICMP ECHO packets will be sent.
  
 ===== Command status ===== ===== Command status =====
  
-^ Success ​  ​| ​Not possible; this command does not terminate unless cancelled ​               ​|+^ Success ​  ​| ​The host has responded with at least one ICMP ECHO reply packet ​              |
 ^ Failure ​  | Command was cancelled, or a network problem occurred ​                         | ^ Failure ​  | Command was cancelled, or a network problem occurred ​                         |
  
 ===== See also ===== ===== See also =====
  
 +  * ''​[[:​cmd:​ifstat]]''​
 +  * ''​[[:​cmd:​ipstat]]''​
 +  * ''​[[:​cmd:​nstat]]''​
   * ''​[[:​cmd:​route]]''​   * ''​[[:​cmd:​route]]''​
   * [[:cfg|List of all iPXE settings]]   * [[:cfg|List of all iPXE settings]]
Line 36: Line 41:
  
 This command is available only when the build option ''​[[:​buildcfg:​PING_CMD]]''​ is enabled. This command is available only when the build option ''​[[:​buildcfg:​PING_CMD]]''​ is enabled.
 +
 +Note that if no ''​%%--count%%''​ option is specified then the ''​ping''​ command will terminate only when it is cancelled by the user (e.g. by pressing Ctrl-C).
  
cmd/ping.txt · Last modified: 2017/05/24 16:10 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.