01-26-2012 06:02 AM - edited 03-07-2019 04:33 AM
i have a topology that contain one router and switch and the switch has two vlans ,
when i ping vlan 1 , i note that ttl = 254 , but i ping vlan 2 i note that the ttl of my ping is 62 ????
i want to know if it affect the ttl .
thanks alot
Solved! Go to Solution.
01-26-2012 11:39 PM
That TTL value is not standard across all platforms ( it has to be between 0 and 255, i guess), and your PC has a route map if you do a "route print" on your PC you will see the metric for default gateway will be like say 20.
Then the OS decide and puts a TTL value calculated in the packet.
It is up to OS what value it uses.
Hope it helps
Eugen
01-26-2012 11:46 PM
Hi,
whenever you send a Ping or traceroute packet, the host which is replying is NOT copying the TTL from the packet received.
Instead, its using its own maximum TTL for the ICMP packet used to reply.
So if the host replying to your Ping/traceroute has a maximum TTL (by OS settings) equal to 65 and is 3 hops away, you can see TTL 62 in the packets received.
HTH,
Milan
01-26-2012 06:06 AM
Hi Ahmed,
What device is sending the pings? Is it the router, or the switch, or a PC?
Best regards,
Peter
01-26-2012 06:09 AM
Hi Ahmed
Can yoiu also provide the output of ping and traceroute that you are doing.
01-26-2012 06:43 AM
Ahmed
I believe the question from Peter suggests that the change is not due to the VLAN but is due to the hosts involved in the ping. Peter's question about the host sending the ping reflects a theory that the sender is changing the TTL. I would ask a different question and suggest a slightly different theory.
My question - where (and perhaps how) are you observing the TTL of the ping? My assumption is that the response observed on the sending host includes an indication of TTL. But perhaps you are observing the TTL differently and that might change my suggestion.
My suggestion - the TTL that you see reflects what the responder sends and that the different TTL that you see is related to the responder more than to the sender. So while Peter asks who is sending the ping I would ask what device (and what OS) is responding to the ping?
HTH
Rick
01-26-2012 09:58 PM
thanks all for ur reply , well , im pinging from my personal pc , and the thing that surprised me is that the traceroute output was 3 hops while the TTL was 62 ??
when i studied ccna i learned that the TTL is decreased by 1 after every router hop , that mean the TTL was supposed to be 253 or 252 but not 62 !!!!
am i missanderstanding something ?
what is the realtion between Traceroute and TTL , can i say a rule that the TTL = 256-(number of hops) ???
what can be the cause of this issue ??:
----------------------------------------------------------------------
what
01-26-2012 11:39 PM
That TTL value is not standard across all platforms ( it has to be between 0 and 255, i guess), and your PC has a route map if you do a "route print" on your PC you will see the metric for default gateway will be like say 20.
Then the OS decide and puts a TTL value calculated in the packet.
It is up to OS what value it uses.
Hope it helps
Eugen
01-26-2012 11:46 PM
Hi,
whenever you send a Ping or traceroute packet, the host which is replying is NOT copying the TTL from the packet received.
Instead, its using its own maximum TTL for the ICMP packet used to reply.
So if the host replying to your Ping/traceroute has a maximum TTL (by OS settings) equal to 65 and is 3 hops away, you can see TTL 62 in the packets received.
HTH,
Milan
01-27-2012 04:18 AM
thnak you all, u really helped me , but i have another question , how can i know the maximum number of ttl of a device ???i mean here the router , the switch and the pc ???
my router is 7206 and my switch is catalyst2960 ,
and there is another question , is the max TTL is an interface propritery or a device propritary ???
============================================================================
here is my topology
me =========Gi0/1(Router)Gi0/2====(Switch vlan1)
Gi0/3
||
||
switch vlan2
========================================================
i would like to mention that i pinnged the router interfaceGi0/1 that is before my vlan and gave me 254 but when i ping the other sider of my router ( the vlan network) i have TTl =62
================================================
note that i dont user router on stick toplogy , "" each vlan has its own physical interface """
==========================
thanks alot
01-27-2012 05:02 AM
For the answers you seek you should ask the software programmers what algorithm they use to calculate the TTL value, that their designed software insert into IP packet.
If the question is answered please mark it accordingly
Eugen
01-27-2012 05:50 AM
you may missunderstood me , i mean if there is a spesefic command which can help me how to show the default or maximum TTL vlaue in routers or Pc
01-27-2012 06:02 AM
Sorry I don't know the commands or ways to find the ttl value.
Maybe try google it.
01-27-2012 06:09 AM
thanks , i will
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide