I can not use ping 'target' source 'interface'

ping source lo0

% Invalid input detected at '^' marker.

It's possible if I use "ping"

Protocol [ip]: ip
Target IP address:
Repeat count [5]: 
Datagram size [100]: 
Timeout in seconds [2]: 
Extended commands [n]: y
Source address or interface: loopback0
Type of service [0]: 
Set DF bit in IP header? [no]: 
Validate reply data? [no]: 
Data pattern [0xABCD]: 
Loose, Strict, Record, Timestamp, Verbose[none]: 
Sweep range of sizes [n]: 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Packet sent with a source address of
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/25/59 ms

That's time consuming! I'd like to use the "shortcut command" but I can't! Any suggestion?

My Topology, for curious enter image description here

I'm trying ping (R2) source (Loopback0)

  • got no problem with that command and source interface as loopback. maybe IOS limitation. I suggest to state the IOS version. Is there loopback option as the source interface for the command in your router? If no, then it is IOS limitation.
    – Ron Vince
    Aug 18, 2015 at 1:54
  • Version 12.4(15)T1 I can use source interface using extended ping.. Furthermore I see some video tutorials that They use it Aug 18, 2015 at 2:12
  • According to the command reference, this should be available on the command line of the 12.4(15)T train as long as you are in privileged mode. Could you also provide your platform? Maybe there is some platform specific differences?
    – YLearn
    Aug 18, 2015 at 3:37
  • What happens when you specify the IP address of the source interface rather than the interface name? This is how I've always used the "one line" extended ping and it's worked fine for me. Aug 18, 2015 at 4:56
  • @YLearn Platform? OS? @ John Jensen using directly IP Addr I didn't test! Aug 18, 2015 at 13:56

6 Answers 6


Packet Tracer does not provide access to IOS. It provides access to an IOS-like environment that has a limited subset of IOS features/commands, mainly tailored to learn CCNA level concepts.

As such, it doesn't surprise me that you do not have this option on the command line.

  • Wow, this explains everything. Aug 19, 2015 at 4:32

I had the same problem. It is strange but in my case adding ip addressing on interface unlocked additional options in ping command

R2#ping ip ?

R2#conf t          
Enter configuration commands, one per line.  End with CNTL/Z.

R2(config)#int fa0/0
R2(config-if)#ip address

R2#ping ?
  data      specify data pattern
  df-bit    enable do not fragment bit in IP header
  repeat    specify repeat count
  size      specify datagram size
  source    specify source address or name
  timeout   specify timeout interval
  validate  validate reply data

Source address or interface is a partial output of the extended ping command. The interface cannot be written as lo0.

Look at this page Using the Extended ping and Extended traceroute Commands

  • Even trying ping source loopback 0 or loopback0 it doesn't works! Aug 18, 2015 at 1:46

Instead of supplying the exit interface, use the source IP address instead.

ping source repeat 100

This should do what you want.

  • John, using R2#ping source repeat 100 ^ % Invalid input detected at '^' marker.] Aug 18, 2015 at 14:14
  • I get the same error as Thiago. What version of IOS are you using that allows you to state "source"? Aug 18, 2015 at 16:13
  • @stephenmuth, from Cisco documentation: The following keywords were added in Cisco IOS Release 12.0: data, df-bit, repeat, size, source, timeout, validate.
    – YLearn
    Aug 19, 2015 at 3:59
  • I've used this on NX-OS for sure, and various of versions IOS. I'll have to test a few boxes tomorrow, but I don't think I've ever had problems running the command... Aug 19, 2015 at 4:20

R3# ping

Protocol [ip]:

Target IP address:

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

  • Please consider adding some additional information to your question to make clear what exactly you're trying to explain.
    – Teun Vink
    Jun 10, 2020 at 6:08

Ping has an option to allow you to use specific option source ip address to destination.

Syntax: ping -I source ip destination ip

Ex: ping -I

  • That's the ping binary on linux, not the ping command on cisco.
    – Teun Vink
    Jan 20, 2018 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.