Episode #317: Ping and Tracert for Network Troubleshooting

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello again I'm Eli the computer guy and this is episode 317 ping and traceroute for network troubleshooting so if you're using a Windows computer and you are trying to do Network troubleshooting ping and traceroute are in valuable tools these are just really really great simple tools to use and they will make your life a lot easier so both ping and traceroute our basic dos commands their basic dos programs and basically what they allow you to do is be able to go out on the network and communicate and see if other computers or network devices are there essentially the idea with ping is saying hey computer number 5 are you there and computer number 5 will say yeah man I'm here so imagine if you were like in a cube farm so so you're sitting in your little cube and you want to see if your friend is over in his cube like five cubes down you might say hey Bob are you there and if he says yeah I'm here then you know he's there if you don't get a response then you know he's not there and that is all it is that's about all the communication that happens is all you do is see if the computer or the device is present and is functioning or not so basically to show you how the ping command works before we go into the troubleshooting methodology I do just want to go to a command prompt screen so this is a basic command prompt screen whether you're using Windows 7 Windows Vista or Windows 95 you will you will go to this command prompt spurts that command promise screen and then you just ping um whatever device you want to see if it exists so I'll do a ping 192.168.1.1 this is my router and I will see if it is there so it pings when I to dot one sixty eight dot one dot one and we can see that it says reply from 192.168.1.1 bytes equals thirty-two time equals two time to Lydia equals four TTL so we know that that IP address is active and it is responding we don't know what it is I know it's the router because I in fact know it's the router we don't know what it is but we do know it is up and running so if we go here and then let's say we ping something that I know is not active so do ping 192.168.1.1 o 222 then we will see that it tries to ping and it's trying but then we see reply from 192.168.1.3 that the host is unreachable so that we will see that the host is unreachable or we will see that there is no reply at all so 192.168.1.1 we saw that what that that computer that device was accessible then when we go and do the other one we see it is not accessible that is basically all the ping command is though it pings the network device or computer and then the network or device computer responds back to you to tell you if it is active or not now there are two reasons that a computer or network device may not respond back to you the first one obviously is that it is off or it is broken so that's a problem the second one is that if it has been configured not to reply to ping traffic this is the ICMP traffic if it has been told not to do that maybe it has a North End firewall installed or McAfee firewall and stuff installed so that is one thing that is important to understand is that it's been configured not to respond to a ping that it won't would respond to a ping but most devices and normal networks will be able to respond to spam so how do you use the ping in the normal world well basically how you use the ping in the normal world is you use it to figure out what devices are active so that you can figure out what you need to fix so if you are sitting at your computer and you seem to be networking issues you can use the pink man to try to figure out what is going on the first thing that you will try to ping is you'll do ping and you'll do one 2700 dot one if you ping 127 dot zero dot zero dot one that is called the loop back address the loop back address is the network card itself so essentially you are pinging yourself from yourself so if you don't need a cable attached you don't need anything you as long as you have a network card installed and the drivers are installed properly you can ping 127 9 0 dot 0 dot 1 and you should receive a response that is a-ok if you don't receive a response if this doesn't work that may mean your network card drivers are not installed properly that may mean your the the network card itself is dying or has problems essentially if you try to ping 127 dot 0 2 0 1 and there are any problems then that means there is a problem with your computer look no farther it is your computer the next thing that you can do is you can then go and you can ping a device or a computer on the network to see if it is accessible so I ping 192.168.1.1 that is the default gateway that is the router that is sitting on my network so the question is is ok I know my network card is working so now I'm going to ping out and see if this device responds now if this device does not respond you know that there is a either a problem with this device or there's a problem with the connections in between maybe the cable has been cut maybe the switch that is connecting everything is powered off so on and so forth so basically what you do is you try to ping something that you know should be active if that doesn't work you then try to ping another device so let's say you have a printer on the network 192.168.1.5 this would be an IP address that you already know now if you try to ping this device and it doesn't work and then you try to ping this device and this does work then you know that there is an issue with the first device if you try to ping this device and it doesn't work and you try paying this device and it doesn't work then you know it's probably the cabling the swish is some part of the networking between the devices so that's how you troubleshoot that the next thing you would do is you would ping a device or the computer by its host name so this is the friendly name you have for computers so Eli's laptop server file server whatever you have called the computer is any host name why that's important is because what will happen is your computer will make a call to DNS and will try to receive back the IP address of the computer you're trying to access so 192.168.1.5 is called test we can do ping test that will call out to the DNS server what you'll see I'll show you in the examples you should get a reply that says pinging the IP address so it should resolve the IP address and then ping the computer well if it resolves the IP address but then can't talk to the computer you know that there is an issue here if it doesn't resolve the domain name at all it can't turn the domain name into an IP address then you know that there is an issue with your DNS settings most of the time you see this when somebody has gone in and messed with the the network card and change the DNS settings so if you try to ping the IP address it works fine when you try to ping the domain name it doesn't work well then if you're trying to go farther so now you figured out your entire local area network works so now you're trying to figure out about a problem trying to get to let's say cnn.com or in the example I'll show you in a minute DSL reports.com just because it's easier so if we're trying to figure out what the problem is here then what we can do is we can ping our default gateway 192 dot 168 - 101 that tells us if we can get to the default gateway that should get us out to the internet then we ping ping DSL reports.com that should resolve to an IP address and then we should be able to ping it and get a response if that doesn't resolve then we know that we have a problem with DNS again it may be a DNS setting in our computer at this point it may be a DNS setting within the router itself or if this is your own server whatever you're trying to ping is something that you set up maybe it is a problem within the internet DNS settings that you've created if you can't ping by the domain name you try to ping by the IP address for the server if you still don't get a response then you know there's probably something mucked up with your server and if you do get a response then you know it goes back to DNS so this is the overall process of how you use the ping command for troubleshooting and use this all the time it's very very useful and it's very very simple the final tool that I will show you at the end is something called trace route or trace Artie what trace route does is when you're sitting on your computer and you're trying to access another server as your packets go through the different hops to get to the server that you're trying to connect to so when we talk about hops we are talking about routers it will send a reply back to your computer for every one of these routers it goes through the packets go through so that if there is a problem you know exactly where the traffic stop so if you're trying to go from your computer to the server you get the first reply you get second reply you get the third reply and then let's say on the fourth one you don't get a reply well you know all the way up to here the routers work and then there's an issue somewhere on this side it shows you where the traffic stops this becomes important especially in the modern world where more people are using colocation facilities so colocation facilities are where you take your own servers but you put them into a data center so you rent space in a data center well if you're having problems accessing that server you don't know if it's you you don't know if it's your ISP you don't know if it's a Co location facilities networking equipment or maybe it's your networking equipment that's sitting in the colocation facility using the traceroute command will allow you to try to figure that out I use this quite a bit back when I had my my server up in the colocation facility sometimes it was my fault sometimes it was a colocation facilities fault by using a traceroute command you can go oh I know that this is the last place that the communication was seen so I know whoever controls this this router is the one that needs to make the repair so with that let's go back in the computer and I'll show you how the ping command works so let me make sure my Windows 8 computer is up so that I can actually in fact ping it ok so we're back and this is just a normal Windows 7 computer so ping works on Windows 7 hopefully it'll work on Windows 8 Windows Vista Windows XP Windows 95 windows NT so on and so forth so let me just screen there and we will go to the screen so here we are just sitting at the command prompt so this is just a normal command prompt that you go to as I showed you before if I want to ping my router I do 192.168.1.1 and that pings my router and tells me that my router is working now the question that you may have you say ok well Eli you know what your routers IP addresses how do I know what my routers IP address is well that is where you can use the IP config command so IP see Oh pubs IP conf I G I P config that's all it is and this will give you your IP configuration settings for your computer so I hit enter and then if we can see I mean let me get my little drawing drawing thing so if we can see up here this tells us the information about the network card that we're dealing with so you can see that the ipv4 address is 192.168.1.3 so that is the IP address of my computer of this computer the subnet mask is 255.255.255.0 and the default gateway is 192.168.1.1 so it's important that you understand a little bit about these tcp/ip settings remember these are generally all received from the dhcp server so they may be different from you you may be one ninety two dot one sixty eight dot 2.1 or you might be 10.1 10.1 depending on whatever your DHCP is configured for that is the information you will see there so just because I say my router is 192.168.1.1 that doesn't mean your router is that so do IP config so that you can see what the router is so I can see my router is 192.168.1.1 so now that I have that I can go and I can just see some of the basic things going on with my network so if I say hey can I talk to another computer on my network ease DNS resolving properly I can do King then test so test is my Windows 8 computer by ping test you will notice that it resolves the domain name so if you look up here it says ping test and then it gives an IP address see it says pinging test and then it says 192.168.1.5 so it's showing me that is going out to the DNS server it's recovering the IP or receiving the IP address from the DNS server port the computer named test and then it's pinging that IP address very important that you understand that concept and then it just works fine then obviously if the DNS did not work properly I would have to go over to the other computer find out what its IP address is and I can just ping it by its IP address 192.168.1.1 to see if it works so sometimes if you try to ping by the domain name that won't work but when you try to ping by the IP address it will so therefore you know that there is a DNS issue there's a problem with the DNS now what I'm talking about the DNS issue basically what we're talking about as we go here we go to your your network in it Internet network connections you right-click you go to properties you then select on tcp/ip version 4 and you go to properties and what you'll notice is this gives you how your your IP settings for your computer setup now down at the bottom this obtain DNS server address automatically a lot of times people will have this filled out with garbage for whatever reason they will go in here and they will put in garbage they think that they're being funny they think they're being cute and in reality they are just messing everything up this is the server that your computer will go to to resolve an IP address if the server information in here is incorrect then it's not going to resolve properly and then you will not be able to resolve domain names so if your dns isn't working properly you can ping by the IP address but not the domain name test cnn.com any of those human friendly readable domain names you won't be able to see so with that let me close out of that and so now we have pings so we've pinged the router and I shown you how to get the IP address for your router we've pinged the local computer and we've ping the IP address of the local computer now what I can do is I can go out and I can try to ping a website such as DSL reports comm so by pinging DSL reports this is now out on the Internet this is out this is all happening out on the internet so you're pinging out to DSL reports who knows where that is somewhere on the cloud so if this gives you back the proper information then you know that DNS your internet DNS is working properly and that the server is up and running if you can't ping DSL reports comm from the domain name then you would try to ping it from its external IP address pinku Oh 9.1 23.1 Oh 9.1 75 and you hit enter and that will give you reply now why this is important for you is again we all want to be thinking about we're troubleshooting somebody else's equipment but the reality is you might be troubleshooting your own equipment your own problem a lot of you guys want to be setting up your own servers for inside your house or inside your offices you're not taking my advice you say Eli I want to build my own box and I want to host my own box so that means you have to go into your own DNS settings from your registrar so from GoDaddy or one in one calm or network associates and change the IP address for the domain name there if you do it improperly then it won't work right so that's where the resolution and the IP address work work for this so that is basically how you use the ping command for troubleshooting again it's not too hard not too complicated but it is something very important to understand now the final thing that I'll show you is I'll show you the traceroute command so I dude clear screen and so what I'll do is I'll do trace here are a seee route or RT so it's just tracer it so me me me as a tracer let's trace route the s L reports.com and then what this will do is this will show you every router that this commune this packet goes through so you will see that it goes through one ninety two dot one sixty eight dot one dot one then on step two it goes through Verizon then step three it goes to another Verizon step for another Verizon and alternate and Washington DC then Washington DC they want you to do you see it at Newark the Newark these are all the different routers that the packets go through in order to get to the final destination so I could see if if this failed somewhere along the way I could go oh look the last communication was at Verizon so maybe it is a Verizon's problem again this isn't the best example really here but I did use it when I have my server in the data center because I could see as the traffic went out of my network went up to my ISP when all over the world went into their their um their colocation facility and once it went into their colocation facility they had a number of routers there before I hit my server right so sometimes you would see that it would get like two routers in and then fail well then I call them up and I tell them it's their problem other times I can see that I got three routers in which is I think how many routers my server was in and then it failed at that point which I knew meant that it went through all their routers it failed at my server so that's how you can use this traceroute command the final thing that is really really useful in the real world is being able to tell ping the number of times you want to ping a device so I'm going to ping the computer test so that is the computer test and I can do - in and then say how many times I want to ping so during a normal ping process in Windows it only pings four times in Linux it goes on forever but in Windows it only pings four times well if I'm waiting for a server to come online or if I'm waiting for a server to go offline using the king command is a really easy way to know when that has happened I can simply just keep pinging the device until I see it come online or go offline so with this example what I can do is I can do ping test - and two hundred so it's going to ping the computer test two hundred times and then all I have to do is I just have to hit enter and now as you can see it's pinging away so test is the IP address 192.168.1.1 going over to the computer and I'm just being mean to it shutting it off right now and as we can see right as I shut it off it no longer applied request timed out now request times got to keep timing out to keep timing out keep timing out so that is a very easy way to see if the computer has booted up yet or has gone down so a lot of times again when I'm dealing with a lot of servers I will run this ping command because I have to reboot a server and when you start dealing with things like small business servers they take a long time to reboot small business servers take like 10 to 15 minutes to reboot sometimes and so you don't want to do sit there looking at the server so what I'll do is I will run this ping command with like an in a number count of let's say a thousand and you just sit there and have that running in the screen doing my other work until I see that it replies and then once it starts replying I know and I can work on the server or if I'm trying to shut a server down and you have to do it correctly you don't just pull the plug like I did on that one you have to wait for it to go through all the steps to shut down it can take a long time again you can be pinging it until you see it shut down so those are the tips and tricks of the ping command I know a lot of you old-timers probably like oh my golly Ilana just spent 23 minutes on Payne but for you new guys understanding how ping works why ping works and why you will use it is an invaluable tool ping is one of those tools I use every time I go to a client it's just it is so good it is so useful that if you don't know how to use it properly you're just you're just really hamstrung yourself for it for no reason so yeah so this was episode 317 ping and traceroute for network troubleshooting I enjoyed taping this episode and I look forward to seeing it the next one
Info
Channel: Eli the Computer Guy
Views: 110,871
Rating: undefined out of 5
Keywords: Eli, the, Computer, Guy, ping, tracert
Id: -SoWUni1uxM
Channel Id: undefined
Length: 23min 42sec (1422 seconds)
Published: Fri Oct 26 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.