we have discussed about IP addresses , network basics in our previous post .if you have not read them read them first to get a better understanding.
What is ping ?
- It is a command in command prompt(windows).
- ping is used to test weather the destination is reachable by the source.
- Example:
- If I want to reach www.youtube.com then by using ping command we can find out weather we can reach the node or node.
- source send request messages to the destination computer,that request messages are called as ICMP (Internet Control Message Protocol).
- After sending request message the source waits for the response message from the destination.
- If the source receives the response message then it means that the destination is available otherwise its means that destination is not available.
- go to start -> type cmd -> click command prompt
now command prompt opens (make sure you have connected to internet before executing the command,if no internet connection it will say " host not available")
- type " ping(space)hostname ", host name can be www.google.com or www.facebook.com etc...
- note: enter the full address (not as facebook or facebook.com).
case 1: when the host you request is available
- In the above picture we can see that we have made a request to youtube.com as " ping www.youtube.com " .we can also ping for any other host such as google.com,facebook.com etc...
- we can see 32 bytes of data is sent as request data.
- you can see 172.217.31.206 is the IP address of youtube and we get four reply messages (packets) from the host (here host is youtube.com)
- it also says the time taken to send reply in milli seconds and TTL stands for time to live .
- there is no loss since we got response for all the four packets we sent.
case 2 : when the host is not available or not internet connected
- In the above image you can see that we have requested for a host called www.gooooogleeee.com which is not a available host.so it says ping request could not find the host.
What is traceroute?
- traceroute is also a command used in command prompt.
- As we know that when a request is made from source (packet are sent) they travel through number of intermediate node(routers) to reach the destination .
- By using traceroute we can we the path and nodes through which the packets reaches the destination.
- go to start
- type cmd and click on command prompt
- command prompt opens(make sure you connected to internet)
- type " tracert www.facebook.com" and hit enter.
- Note: we use the command " traceroute " in mac and " tracert " in windows
Example:
- In the above example we have a tracert request to www.facebook.com
- 157.240.192.35 is the IP address of facebook as seen in the picture.
- It took 11 hops to reach the facebook.com (hops is the number of intermediate routers the packet is traversed through).
Note: there is not a single IP address for www.facebook.com or www.youtube.com the IP address may change based on the traffic.
If a particular facebook server has more traffic and i am requesting a facebook page at that time then the request goes to another facebook server with less traffic.
If you have any doubts ask in the comment section below.....Thank you....
0 comments: