Basics of ipconfig, ping, tracert, nslookup, and netstat

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you're going to want to know your basic network testing tools introductory to be able to test your network for connect for connections to see if you have connectivity to your server to see if you have connectivity to your gateway your router and you're going to need to know how to use these few commands here IP config ping tray cert or trace RT or trace route nslookup and netstat so let's run through an example of all these commands ok I'll close these windows and I'll open up a command prompt and we'll start off I can make this a little bit bigger make the font a little bit bigger for you so it's easier to see okay so now that I have the font a little bit bigger I'll run an IP config and what can you learn from by running an IP config well you're going to be able to get your IP address your subnet mask and your gateway so and this can be useful because if you've set your computer to DHCP client to automatically obtain this you can't see it by going to the NIC and right clicking and looking at your properties you won't be able to see what IP address you received so you need to be able to do this to find out what is my IP address ok IP address subnet mask and Gateway but we don't see our DNS server information and we also there's some couple other things we can see if we put in IP config space slash all if we put in that command we can see our host name we can see our physical address right here which is our the MAC address of our NIC of our network interface card so our Ethernet card has this MAC address burned into it you can see the DHCP is off and that we have our subnet mask we see our gateway and our DNS server information ok and this is once again using just an XP client it's probably going to be a lot more information if you do this in there will be more information if you do it in Windows 7 or Windows Vista because you'll see IP version 6 information you'll probably see more interfaces but this is a very simple client for this example okay so that is IP config and IP config all very useful you'll need to know those tools next ping you're going to need to know how to use a ping command to be able to test to see if you're connected on the network and mainly if you can let's say get a response from your router so in this case I'll say ping and then I'll type the IP address of the router so I'll say the Gateway 192.168 and I'll put in the IP address of my Gateway and you can see here that I'm getting a reply from the Gateway and that means that I have communications established with the gateway router and that's a very useful tool be able to ping a another computer on your network and see if you can contact them ping uses ICMP protocol and sends out an echo request and then the packets that come back are echo replies and sometimes you can have a situation where you're pinging a computer and you actually have a situation where your firewall could be blocking those pings your pings your echo requests could be getting to the destination but not coming back because they could be being blocked another thing about ping is you can ping domain names too now when you ping a domain name there's going to need to be a domain name server to be able to resolve the name so like if I ping yahoo.com this is going to test not if I can just get to my router and back but it's going to test to see if I can get all the way to Yahoo's web server and back so it's going to go across the internet of over multiple routers and to get there and then return so you can see there I can get a reply that shows that I can resolve DNS I can go out across the Internet and come back in and so that's pretty useful a lot of sides from ping we can also do a trace route now a trace route will show us almost like a ping but much more detailed as the as the requests for replies travel across the Internet each router along the way will send a reply or send a message back and so we'll be able to see every router along the way send a return message so I can say ping I mean not paying trace arty or trace eart and I'll do the same thing do it to yahoo.com as an example and as this trace command gets sent out over the Internet you can see all of the routers or hops along the way communicating back and you can trace that here and if there's a problem in communication or breakdown you can see where at which router where did the communication break down this can be useful if you have multiple routers on your network and you want to know where which um which router is blocking your communication okay so that's tracer all right let's see here what else it is we wanted to cover nslookup we're now going to cover to look up resolve a domain name to an IP address and then netstat to look for open ports so let's do that right now okay for nslookup we're trying to resolve a name to an IP address so you see that when we last pinged Yahoo or we did a trace arty or tracer to Yahoo that we got messages back but basically behind the scenes dns was resolving those names to IP addresses well we can put in a command to find those IP addresses straight up so I can say NS lookup right name server lookup and put in a space and type Yahoo comm and my DNS server that I have configured will try to resolve that name and so it said that basically at 4.1 there was no dns server but at 50.1 we have one so there's a miss configuration there writer passed it on to 50.1 and we got this reply that yahoo.com resolves to these IP addresses all right and we can actually change our nslookup we could just type in s lookup and run the program and then set a separate server for to use the testing with so I could say you know server change it to 50.1 alright and it says there and then I can say resolved yahoo.com right and then there's non-authoritative answer why is it a non authoritative answer because 50.1 is not the authority for this domain name it is not the primary DNS server for this domain name okay alright let's do the next one alright I'll clear that screen and last but not least net stat net stat is useful for seeing whether we have listening TCP ports or connections on our system network connections established or listening or waiting on our system so if you type net stat let's say - a for all you'll see all of the ports that this computer might have listening you see and so you can see here local address this is the protocol TCP protocol UDP this is the local address here the foreign address here and then the state whether it's listening or established so let's see if we can run some services and then watch as these these as we make connections or have extra listening connections happening over here right you can see that we're listening on certain ports already but we want to do something cooler for the test so I'm going to run a sample ok FTP server and let's will run a will run a HTTP server so we have a web server here right so I've got a web server waiting and I've got an FTP server now active I'll close this window and so now if we run a net stat - all we should be able to see those servers those ports listening on our computer and you can see right off the bat TCP FTP is listening and you can see here that HTTP is port 21 listening and this is port 80 HTTP is also listening and pretty cool let's see if we can do that to pee all right this is without names so I did a slash aan and now you can see the port numbers so you can see here that 21 is listening listening on zero zero zero meaning every listening on zero zero zero listening for every incoming address on port 21 because it's running an FTP server port 8000 zero listening for any incoming address on port 80 for the web server so very useful tool to see which connections are established and which are simply listening and which are waiting and network basically channels that your computer is communicating on
Info
Channel: danscourses
Views: 533,272
Rating: 4.8972754 out of 5
Keywords: network, tools, ipconfig, ping, tracert, nslookup, netstat, testing
Id: M4yzxOAtn7k
Channel Id: undefined
Length: 9min 55sec (595 seconds)
Published: Sun Sep 11 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.