How to simulate traceroute using ping?












-1














I am learning computer networks and looking for a way to simulate traceroute using the ping command. I think it has something to do with ttl, but I don't know how to develop that further.










share|improve this question




















  • 1




    Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
    – slhck
    May 16 '15 at 18:13
















-1














I am learning computer networks and looking for a way to simulate traceroute using the ping command. I think it has something to do with ttl, but I don't know how to develop that further.










share|improve this question




















  • 1




    Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
    – slhck
    May 16 '15 at 18:13














-1












-1








-1


1





I am learning computer networks and looking for a way to simulate traceroute using the ping command. I think it has something to do with ttl, but I don't know how to develop that further.










share|improve this question















I am learning computer networks and looking for a way to simulate traceroute using the ping command. I think it has something to do with ttl, but I don't know how to develop that further.







ping traceroute






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 14 at 23:40









Mark

1136




1136










asked May 16 '15 at 18:04









Kabachok

33




33








  • 1




    Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
    – slhck
    May 16 '15 at 18:13














  • 1




    Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
    – slhck
    May 16 '15 at 18:13








1




1




Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
– slhck
May 16 '15 at 18:13




Can you elaborate on what exactly you mean by "simulating" a traceroute with ping? Do you have a specific assignment given?
– slhck
May 16 '15 at 18:13










1 Answer
1






active

oldest

votes


















1














There is a way to do this.



In Linux or Cygwin:



for i in {1..30}; do ping -t $i -c 1 google.com; done | grep "Time to live exceeded"


In Windows:



for /l %i in (1,1,30) do @ping -i %i -n 1 google.com | find "TTL expired"


Sample output from an Amazon EC2 VPS:



From 100.64.16.93 icmp_seq=1 Time to live exceeded
From 205.251.232.220 icmp_seq=1 Time to live exceeded
From 205.251.232.202 icmp_seq=1 Time to live exceeded
From 205.251.232.75 icmp_seq=1 Time to live exceeded
From 205.251.225.181 icmp_seq=1 Time to live exceeded
From 72.14.219.251 icmp_seq=1 Time to live exceeded
From 209.85.249.32 icmp_seq=1 Time to live exceeded
From 216.239.51.159 icmp_seq=1 Time to live exceeded


Ping isn't allowed for that instance, that's why it times out.






share|improve this answer























  • No probs, enjoy
    – td512
    May 16 '15 at 18:20










  • nothing, but I hardly use windows anymore, so I defaulted to the linux command line
    – td512
    May 18 '15 at 3:22












  • @Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
    – td512
    May 18 '15 at 5:15










  • Done. :) (filler)
    – Karan
    May 18 '15 at 5:30






  • 1




    Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
    – Karan
    May 18 '15 at 5:33











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f915657%2fhow-to-simulate-traceroute-using-ping%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














There is a way to do this.



In Linux or Cygwin:



for i in {1..30}; do ping -t $i -c 1 google.com; done | grep "Time to live exceeded"


In Windows:



for /l %i in (1,1,30) do @ping -i %i -n 1 google.com | find "TTL expired"


Sample output from an Amazon EC2 VPS:



From 100.64.16.93 icmp_seq=1 Time to live exceeded
From 205.251.232.220 icmp_seq=1 Time to live exceeded
From 205.251.232.202 icmp_seq=1 Time to live exceeded
From 205.251.232.75 icmp_seq=1 Time to live exceeded
From 205.251.225.181 icmp_seq=1 Time to live exceeded
From 72.14.219.251 icmp_seq=1 Time to live exceeded
From 209.85.249.32 icmp_seq=1 Time to live exceeded
From 216.239.51.159 icmp_seq=1 Time to live exceeded


Ping isn't allowed for that instance, that's why it times out.






share|improve this answer























  • No probs, enjoy
    – td512
    May 16 '15 at 18:20










  • nothing, but I hardly use windows anymore, so I defaulted to the linux command line
    – td512
    May 18 '15 at 3:22












  • @Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
    – td512
    May 18 '15 at 5:15










  • Done. :) (filler)
    – Karan
    May 18 '15 at 5:30






  • 1




    Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
    – Karan
    May 18 '15 at 5:33
















1














There is a way to do this.



In Linux or Cygwin:



for i in {1..30}; do ping -t $i -c 1 google.com; done | grep "Time to live exceeded"


In Windows:



for /l %i in (1,1,30) do @ping -i %i -n 1 google.com | find "TTL expired"


Sample output from an Amazon EC2 VPS:



From 100.64.16.93 icmp_seq=1 Time to live exceeded
From 205.251.232.220 icmp_seq=1 Time to live exceeded
From 205.251.232.202 icmp_seq=1 Time to live exceeded
From 205.251.232.75 icmp_seq=1 Time to live exceeded
From 205.251.225.181 icmp_seq=1 Time to live exceeded
From 72.14.219.251 icmp_seq=1 Time to live exceeded
From 209.85.249.32 icmp_seq=1 Time to live exceeded
From 216.239.51.159 icmp_seq=1 Time to live exceeded


Ping isn't allowed for that instance, that's why it times out.






share|improve this answer























  • No probs, enjoy
    – td512
    May 16 '15 at 18:20










  • nothing, but I hardly use windows anymore, so I defaulted to the linux command line
    – td512
    May 18 '15 at 3:22












  • @Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
    – td512
    May 18 '15 at 5:15










  • Done. :) (filler)
    – Karan
    May 18 '15 at 5:30






  • 1




    Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
    – Karan
    May 18 '15 at 5:33














1












1








1






There is a way to do this.



In Linux or Cygwin:



for i in {1..30}; do ping -t $i -c 1 google.com; done | grep "Time to live exceeded"


In Windows:



for /l %i in (1,1,30) do @ping -i %i -n 1 google.com | find "TTL expired"


Sample output from an Amazon EC2 VPS:



From 100.64.16.93 icmp_seq=1 Time to live exceeded
From 205.251.232.220 icmp_seq=1 Time to live exceeded
From 205.251.232.202 icmp_seq=1 Time to live exceeded
From 205.251.232.75 icmp_seq=1 Time to live exceeded
From 205.251.225.181 icmp_seq=1 Time to live exceeded
From 72.14.219.251 icmp_seq=1 Time to live exceeded
From 209.85.249.32 icmp_seq=1 Time to live exceeded
From 216.239.51.159 icmp_seq=1 Time to live exceeded


Ping isn't allowed for that instance, that's why it times out.






share|improve this answer














There is a way to do this.



In Linux or Cygwin:



for i in {1..30}; do ping -t $i -c 1 google.com; done | grep "Time to live exceeded"


In Windows:



for /l %i in (1,1,30) do @ping -i %i -n 1 google.com | find "TTL expired"


Sample output from an Amazon EC2 VPS:



From 100.64.16.93 icmp_seq=1 Time to live exceeded
From 205.251.232.220 icmp_seq=1 Time to live exceeded
From 205.251.232.202 icmp_seq=1 Time to live exceeded
From 205.251.232.75 icmp_seq=1 Time to live exceeded
From 205.251.225.181 icmp_seq=1 Time to live exceeded
From 72.14.219.251 icmp_seq=1 Time to live exceeded
From 209.85.249.32 icmp_seq=1 Time to live exceeded
From 216.239.51.159 icmp_seq=1 Time to live exceeded


Ping isn't allowed for that instance, that's why it times out.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 18 '15 at 5:30









Karan

48.9k1486157




48.9k1486157










answered May 16 '15 at 18:14









td512

4,58821237




4,58821237












  • No probs, enjoy
    – td512
    May 16 '15 at 18:20










  • nothing, but I hardly use windows anymore, so I defaulted to the linux command line
    – td512
    May 18 '15 at 3:22












  • @Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
    – td512
    May 18 '15 at 5:15










  • Done. :) (filler)
    – Karan
    May 18 '15 at 5:30






  • 1




    Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
    – Karan
    May 18 '15 at 5:33


















  • No probs, enjoy
    – td512
    May 16 '15 at 18:20










  • nothing, but I hardly use windows anymore, so I defaulted to the linux command line
    – td512
    May 18 '15 at 3:22












  • @Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
    – td512
    May 18 '15 at 5:15










  • Done. :) (filler)
    – Karan
    May 18 '15 at 5:30






  • 1




    Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
    – Karan
    May 18 '15 at 5:33
















No probs, enjoy
– td512
May 16 '15 at 18:20




No probs, enjoy
– td512
May 16 '15 at 18:20












nothing, but I hardly use windows anymore, so I defaulted to the linux command line
– td512
May 18 '15 at 3:22






nothing, but I hardly use windows anymore, so I defaulted to the linux command line
– td512
May 18 '15 at 3:22














@Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
– td512
May 18 '15 at 5:15




@Karan, oh, I didn't know that I needed the @ :D you taught me something new. No, I defaulted because I couldn't think of the windows version. feel free to update the answer if you think it's appropriate. :P
– td512
May 18 '15 at 5:15












Done. :) (filler)
– Karan
May 18 '15 at 5:30




Done. :) (filler)
– Karan
May 18 '15 at 5:30




1




1




Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
– Karan
May 18 '15 at 5:33




Both have pros and cons and I use whatever suits the job at hand best. It's not a religious debate for me like it is for some. :)
– Karan
May 18 '15 at 5:33


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f915657%2fhow-to-simulate-traceroute-using-ping%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Aardman Animations

Are they similar matrix

“minimization” problem in Euclidean space related to orthonormal basis