cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3087
Views
4
Helpful
11
Replies

does vlan affect the TTL of ping ???

Dr.X
Level 2
Level 2

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

2 Accepted Solutions

Accepted Solutions

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

View solution in original post

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

View solution in original post

11 Replies 11

Peter Paluch
Cisco Employee
Cisco Employee

Hi Ahmed,

What device is sending the pings? Is it the router, or the switch, or a PC?

Best regards,

Peter

Vishnu Asok
Cisco Employee
Cisco Employee

Hi Ahmed

Can yoiu also provide the output of ping and traceroute that you are doing.

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

HTH

Rick

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

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

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

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

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

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

Sorry I don't know the commands or ways to find the ttl value.

Maybe try google it.

thanks , i will

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: