Windows Command Prompt Networking Utilities (archived)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
first as ipconfig and the following procedure will utilize the ipconfig utility and show the various parameters that are part of the command to demonstrate this I'm going to go to the command line and first run a basic IP config you've seen this before it's showing us the wireless network connection the IP address subnet mask and default gateway if you want to learn more about IP config you can type ipconfig slash question that'll give you the usage or syntax for IP config and it'll give you the options otherwise known as switches or parameters that can be used with the IP config utility let's show a couple of those now first is ipconfig /all I use this a lot in the field when troubleshooting network connectivity issues it shows you a lot more information than just a standard IP config like the hostname the wireless network you're connected to the MAC address and the DNS servers that you're connecting to and using also it shows the DHCP is enabled and that means I'm getting this IP address from a DHCP device that brings us to a couple more switches that can be used with IP config slash release and slash renew if I wanted to remove the IP address that I'm getting from the DHCP device I could type in ipconfig slash release and of course all these pop-ups are going to come up because we've lost our IP address we've removed it and now the IP address is known as 0.0.0.0 sometimes you have to do this when troubleshooting a connection on an IP network perhaps the DHCP device has been reconfigured or there's a new DHCP server on the network I don't know maybe when you're troubleshooting a LAN connection you have to release and renew the IP address so that the ISP can give you a new IP this happens sometimes if I want to get the address back I type ipconfig renew and that takes a few moments and most like we're gonna get the same address back and we do 170 2.30 253 is the same address that we had before the main reason is because my original lease hasn't ended the original lease wasn't supposed to end until a couple days from now so what's going on here is the operating system remembers the IP address it keeps that information in the registry and so really it just gets the same address back a couple more commands that deal with DNS the first is IP config slash display DNS will show all the connections that you've made to various host names and websites if you want to flush this information out you could do that with an IP config flush DNS that will flush out the DNS resolver cache and anything that you might have connected to sometimes this is necessary to make a new connection to a newly configured DNS server now after I've done this flush DNS if I go back and do a display DNS it only gives us basic information it really just tells us about the local host if I wanted to connect to a new DNS server and be initiated with that DNS server I would type in ipconfig slash register DNS and that'll start the registration with the DNS server paying there's so much to talk about when it comes to paying in this procedure we'll demonstrate the usage of paying and the parameters and once again to demonstrate this we're gonna go to the command line you've seen the ping command before and first what I want to show is how to get to the help file now you can do it with a slash question mark but you may want to get in the habit of using the dash question mark some tcp/ip utilities don't work with the slash you need to use the dash so that gives the information here the usage for paying or the syntax and also the options or parameters that we can use the ones that I'm interested in for this particular lab are - t - a - n and - L we're gonna use those for different options and those are the most common ones you're probably use in the field and you might get questions on them on the net plus exam now the ping command is great for troubleshooting and when I'm troubleshooting a computer I like to start internally I like to start with the computer itself and the best way to do this is a ping space localhost this pings the local loopback address which is 127.0.0.1 every computer has this and you don't need to have a connection to the network - to do this test as long as tcp/ip is installed properly you should get replies even if you're not connected to the network and another example of this would be ping space loopback and finally ping space 127.0.0.1 let's look at these three different pings that I did the difference between the first two and the last one is name resolution when you do a ping localhost or a ping loopback it resolves the name to the local loopback address the name of the computer that is to the local loopback address when you do a ping 127.0.0.1 you're kind of cutting out the middleman you're cutting out a name resolution and going right to the source and that's a good idea in a lot of cases when you're pinging a computer ping by IP so there's no name resolution getting in the way so I like to start internally with the computer and ping itself now you can also paying the logical IP address in this case I'm 170 2.32 50.3 and I get replies I could also paying my own computer name same IP address but it resolves from name to IP now I'm positive that IP is working properly on my computer now I want to branch out to other systems on the network so for example I could do a ping space 172 dot 32 50.4 that's another laptop on the network or I could connect to the router dot 1 and then I can try connecting to computers on other networks for example I could connect to my web server David L cross comm and it resolves the name to the IP address that's being used by the web server out in the internet so I like to branch out step by step with that ping commands now let's talk about some of the switches for ping first one is the - T parameter - T allows you to run a continuous ping to a specific IP address now you can put the - T before the IP address or after the IP address I like to kind of keep the IP address after the commands so I type - command pinging then the IP address and then the parameter but it doesn't make a difference you can put it wherever you want when I do so I get a continuous ping it's gonna keep pinging that other laptop on the network until I tell it to stop and I can stop it by closing the command prompt or by pressing ctrl c ctrl c will break out of that pain this is a great command option when you're testing cabling you can try connecting a patch cable to different ports until you find the ly for it that you want to be connected to and once you get that live port you'll get replies on the screen so a couple possibilities for troubleshooting with Dashti the next one is going to be ping dash l with dash l you can increase the buffer size of the packets that are being sent by default those packet sizes are 32 bytes of information and we can increase that as far as we want up to 65,000 500 bytes so for example I'll do a ping space 170 2.30 and I will connect to the laptop again dot 4 dash L and then I have to specify the size of the packet I'll choose 1000 bytes when I press enter you notice here that the packet size has changed 32 to a thousand and the time has actually increased a little bit up to 7 milliseconds like I said you can go as far as 65 thousand five hundred Microsoft operating systems and those are going to be giganto packets notice the time it takes for those packets to get to their destination and reply back that's like dial-up speeds right there and you can really take down a network with the packets this size now this is the beginnings of a ping of death or a denial of service most routers will block this they won't allow any packet size is bigger than 1500 bytes so you wouldn't have to worry about it too much and you won't be able to go beyond us and Microsoft unless you hack the registry but again most devices worth their salt won't allow anything larger than 1500 bytes so there's your dash L parameter the next one is the dash end parameter which is the count it's the amount of packets that you're sending in one particular ping so I could specify that I want to send 10 packets all together and we should get 10 replies so dash n is the count and what I like to do is I like to run tests on servers as part of my performance analysis of a server I'll run a test gets the server wits ping and what I'll do is save run a ping to the device and I'll run it with say maybe a hundred count of packets I'll just do ten for now so it goes faster and I'll do that with a specific size packet we'll say fourteen hundred bytes and what I'd like to do is I like to save this information and do it every day or every couple days and compare that information and see if there's any variants see if anything's different between the the performance data you'll see down here we get an average if I see that this test tomorrow runs up at say fifteen or twenty milliseconds well I may want to check why I may want to kind of delve in a little bit farther and see what the problem is why is there more congestion on the network at one time then at another now again I might do this with more packets maybe a thousand packets and maybe even a larger size to simulate more data traffic or more congestion congestion on the network and also I could do this with a batch file and store the results in a text file for comparison to other tests later and that's basically creating your baseline the last one I want to show is - a - a will resolve IP addresses - the hostname and I'm sorry I forgot about this one - a is one of those parameters that has to be directly after the ping command so you run a ping - a and then the IP address that you want to connect to so for example pinging laptop - author dot don't go here that's just a wireless access point name because I'm not part of a domain so ping - eh we'll take that IP address and resolve it - the name and there you have it with ping the parameters you really want to know are gonna be - T - L - N and - a tray certs next we'll demonstrate the usage of the tracer utility and one of its options as well as a tracer utility on the web so again we're gonna go to the command line the tracer command is short for trace routes and what it does is it traces the route that packets would take from your computer to a final destination that final destination could be on the LAN or most likely it'll be on another network somewhere every time this trace goes through a router it's considered a hop the amount of routers in between you and the final destination is the amount of hops now the first thing I'm going to do is I'm going to trace her to a computer on this network and very quickly we get one hop it takes one hop for me to that computer and it does it in a triple ping which shows us three milliseconds three milliseconds of 59 milliseconds to that final destination and tells us the trace is complete to take this to the next level we'll run a tracer to a website for example David L Prowse comm again it's going to do three pings to each hop along the way here's the first hop and you can find out some information here about the network that I'm part of my ISP even my location if you look carefully so three pings - each hop along the way each router along the way to the final destination which is Ozma lunar pages calm that's the web server that my website is being hosted on and finally that IP address now this takes a little time because it's resolving this information to IP it's doing a triple ping and it's storing all that information in a table here for us to view and now the trace is complete to make that trace a little bit faster you can do the tracer but with the dash D parameter which is numeric so no name resolution going on here it shows IP addresses only but it should show the same IP addresses that we showed in the first tracer this command works well when testing to find out when a network router is down if a specific router was down you'd get stars you'd get three stars or asterisks here and it wouldn't tell you what router it is but if you look at your network documentation you could find out from that info which router is the one that's failing and you know either the router may need to be restarted or it may need to be reconfigured or perhaps just turned on another way to do a tracer it is on the web I'm at speed guide net and you can use their tracer program at their website what this does is it traces in Reverse it traces from their website out to your computer and your final destination but it gives the trace route results pretty much the same host name of the router IP address and the three pings okay moving right along and next we'll demonstrate the usage of the netstat utility and some of its options so back to the command line and if we just type net stat we're gonna get the basic active connections I have a connection here to the local host right now which is closed so net stat by itself may not give you all the information you want if you type netstat - eh you'll get more of the active connections that are running on this system and we've shown this before we've shown connections to the router wireless access point and to other websites and to network storage this information may take time to come up on your screen though and to make it a little quicker we can change all the host names to numeric - IP addresses we would do that with the net stat - a n which by the way is not in the help file that changes everything to numeric IP addresses and ports are shown numerically netstat dash e gives you the ethernet statistics and the packets that have been received and sent by your network adapter and to build on that net stat - as a statistics for card including IP version 4 statistics ICMP version 4 statistics TCP statistics and UDP statistics you can get a little bit more information there and finally net stat - R gives us the routing table and this routing table is something that is shown on any computer but we're not really using it right now we're not really routing anything and we're gonna show more about this routing in an upcoming lab now again like I said if you were to do a net mark it'll show the help file and the various parameters you can use but there's no a n on the list here however I'm sure you're going to want to use that in the future next we'll demonstrate the usage of the nbtstat utility and its parameters back to the command line we go here's the nbtstat command just by typing the nbtstat command you can get the help file when you press ENTER and it'll show you all the parameters now nbtstat stands for NetBIOS over tcp/ip statistics and we're net stat was used to test the local computer and analyze the local computer nbtstat can be used at a local or remote computers the nbtstat command will show NetBIOS information and it also work even if you're part of a dns network for the most part because most dns networks are backward compliant with NetBIOS so let's show a couple of parameters for this first nbtstat - a will allow you to see the name table for a given machine and when you use a - lowercase a you can use the host name or the NetBIOS name I should say of the computer so in this case we'll do the local computer first laptop - author and it shows the NetBIOS machine name table and what it's showing here are that specific services are running for example 0 0 is the workstation service very important service to have on a computer when you want to connect to other computers on the network 2 0 is the server service if my computer wanted to serve information I would need to have the server service running those are the two big services of networking and we see they're both running here we can also do this to remote computers for example laptop - music and that guy's also got the 0 0 and the 2 0 services running so I can find out information about services running on a remote computer we can also do this by IP address with the capital a parameter so for example if I want to connect to that laptop music I would do that with the IP address and the capital a and it shows me the same information so if you can't connect to a system by name and maybe there's an issue with the NetBIOS name on that particular computer you can always try connecting by IP address the way I like to remember it here is when you type characters by default they're in lowercase so a host name or a NetBIOS name when you type it would be in lowercase by default and here's the lowercase - a when you type numbers they're always upper case there is no lower case numbers so uppercase a for IP address a couple other parameters here we have the - our parameter lowercase which gives you the NetBIOS names resolution and registration statistics and how many NetBIOS names were resolved by broadcast or registered by broadcast we also have - capital R which will purge and reload the remote cache name table and then we have double R which registers the computer in a winds network so a little bit about nbtstat next we'll demonstrate the usage of the nslookup utility or a name server lookup and if we type nslookup in the command line it'll bring us into a shell where we can do additional work if we type the question mark we can actually work with our DNS server and make changes to the DNS server with these commands whatever that name server may be whether it's on the land or if it's on the ISP this particular DNS servers on the ISP so I'm not going to be able to make any changes to them but what most people use nslookup for initially is to resolve hostnames or web names to IP address so for example i could type in the name david l Prowse dot-com and get a answer here the address - 1690 seven to thirty six to forty five now if you're obtaining an IP address from a DHCP device like one of those four ports Soho routers this may be blocked because it may add in a little DNS address of itself initially in your DNS information so and that's the case with my Belkin router so what I've done is I've set up this machine to connect statically to the internet with a static IP address I could type in other domain names like Microsoft comm and it'll give the address or addresses that that name resolves to some have more than one some have four or eight addresses when you're done working with the command and you're done being in the shell you can type exit to get back to the original C colon backslash in this last procedure we'll demonstrate the usage of the FTP utility and to demonstrate this we'll go to the command line for the last time in this lab and we'll type FTP the FTP command allows us to connect to FTP servers by name or by IP address I want to connect to the FTP server on my land so I'm going to type its IP address now and it's gonna ask for a username and password and if you typed everything correctly it should say that that user is now logged in for me it's a David P and you'll know we're in the FTP utility because the prompt has changed and it now says FTP let's start with a pretty universal command the dir commands when I press ENTER it gives me a listing of the files on the FTP server and what I want to do is I want to grab some files from the FTP server and what a novel idea I want to do file transfer so let's do that here's test.txt I so want that file to get it I use the get command and we'll type get space test dot txt when I press ENTER it's going to grab that file and download it to my computer and it doesn't really fast it opened an ASCII mode data connection for test XD and completed the transfer it was only three bites I mean how long could that possibly take one nanosecond who knows but what we did here was we opened in ASCII mode data connection and by default that's the mode that's going to be used and that's what you want for text files and for most types of documents now you may ask where did that go by default it'll go to the last known good the last known good directory that you were in prior to the FTP connection and for me that was the root of C so test dot txt should now be located in my root directory I go to Windows Explorer and go to the C Drive will see test dot txt here so it did indeed download it that C colon backslash is known as my local current directory okay so now what I want to do is I want to give you a little information on the help system if you type question mark and press Enter look if you a list of commands that you can use if you want to learn more about one of those commands you type question mark and the command you want to learn more about for example and get and it tells us m get gets multiple files in one shot from the FTP server well it doesn't say all that but I'm inferring that so we want to get multiple files sure I want to get all these files that are on the FTP server I want it all so I'll use the M gate command and type star wildcard meaning all the files when I press ENTER it's going to ask about each file individually do I want a c3 filter I'll say Y for yes and enter it'll download it then it'll ask about test.txt oh I don't really need that I've already downloaded it so I'll say n for now and then it asks about USB 100m I'll say yes and enter and it downloads that so we've done the get and the M get now what I'd like to do is I'd like to put files onto the FTP server now first of all you want to say okay well where are the files going to come from and that's going to be your local directory right now the local directory is C colon backslash but that's not where I have the file that I want to upload the file that I want to upload is in a folder called FTP underscore uploads so I'm going to change my local directory by typing LCD C colon backslash FTP underscore uploads press Enter and it tells us that the local directory is now C colon backslash FTP uploads the follow wanna upload is called setup dot exe and to upload files to the FTP server we use the put commands so put space set up that Exe press Enter it opens an ASCII mode data connection and it uploaded the file to test that I'll type dir and view the FTP contents and here's setup.exe finally we were talking about the mode how you're going to send information well you have two options you have the ASCII option and the binary option to find out what option you're using type the type command and that'll tell you right now it's using ASCII mode to transfer files that's the default by the way when you first connect to an FTP server but you can change that if you wanted to and I do I want to change it to binary mode you see I want to upload a graphics file and when you move graphic files ASCII mode will change the code we don't want that we want it to be sent in binary to change it to binary mode we just type in binary and the type will be set to binary if we type the command type again it tells us using binary mode now the file I want to upload is in my FTP uploads folder it's called lab 15 underscore routing JPEG so I'm gonna upload that guy now by using the put command lab 15 underscore routing dot JPEG it opens a binary mode data connection and it uploaded the file that's exactly what we wanted so we use the dir command that get and em get commands the put commands and we change the mode of transfer and we also change the local directory with LCD now you may not want to use the command line when moving data but it can be fast once you get used to it there are other FTP programs like smart FTP or FileZilla so if you want to use one of those you can they work in a GUI mode and it's easy to drag-and-drop files that's about it for FTP
Info
Channel: Prowse Tech
Views: 320,864
Rating: undefined out of 5
Keywords: n10-005, network+, ping, ipconfig, tracert, netstat, FTP, Network Utility
Id: EC6teF7Aafc
Channel Id: undefined
Length: 30min 12sec (1812 seconds)
Published: Wed Oct 29 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.