From the course: Career Essentials in System Administration by Microsoft and LinkedIn

Routing tools

- [Instructor] There are many different routing tools and IP addressing tools that we can use in all versions of Windows. The first one I like to use would be the ping. And that's a simple one that just tells us whether or not a computer is responding. However, if that computing device has its firewall off, then you may not see a response. In that case, if you type the ARP command and then do a -a, and then we'll do a pipe command followed by more. What that does is it does Address Resolution Protocol, which is the reverse of a ping, and it will basically tell us if an IP address attached to a computer is actually responding. So, even if we get no ping reply, it will show up in this ARP table that you see here. Then we can see what the MAC address is, which is shown as the physical address in the middle, and we can see the internet address as well as the type, whether it's dynamic or static. If it shows up here, even if it doesn't ping, then that means it is up and running. Another thing I like to do with the ping command is to type a -t. This is similar to what Linux and Unix does when you type the ping command, it will just automatically continuously ping. But on a Windows computer, it will stop after four responses unless you do the -t, and then it will just ping until you stop it. And you can do that by hitting a Control + C. I also like to ping by size. So, you do a ping -l, and instead of doing a 32 byte ping, you can do a much larger one, such as 1,500 bytes. And then we'll put in the address. And if it's too large for the server on the other end that's trying to respond, then it will show up as a timeout. So we can go ahead and change that to something lower until we finally get a response, and then we'll know the maximum packet size that it can handle. And we can see 1,200 bytes will respond. Let's look at ipconfig, which is short for IP configuration on a Windows computer. If I hit Enter, then it's going to show me the IP address, the subnet mask, and the gateway. But if I do have /all, I'll see a lot more information. Here, I can see information such as the host name, I can see whether it's DHCP or statically set, and I can see other information, such as, if it was a DHCP address, it would tell me the DHCP server. And I get to see the DNS servers as well. I could do something similar in PowerShell. You can see it's got a PS for PowerShell next to the command prompt, so if I type in get-netipaddress, then it gives me a lot of information about the IP address. I've got my IPv6 information, as well IPv4, and whether it's unicast or multicast, and other information that you see here. I can switch back to a standard command prompt just by typing cmd, and now you see the PowerShell is gone. To get back into PowerShell, I just type in the word powershell. Now let's take a look at routing. If we type in route print, what it does is it gives us a routing table, and it shows us at the top that our default route is going out through 21.1, so if we want to go out to the internet, then that's how we get there. We can also see some other information, such as the loop back address 127.0.0.1, as well as multicast information at the bottom. And below that, we can see the IPv6 routing table as well, and that's because every computer by default in Windows is going to get both an IPv4 and an IPv6 address, even if there's no DHCP or static set on that network card. If I clear the screen, let's say I'd like to trace route, which is going to trace the route from my Windows computer out to a specific place. And I'll just type in the Google DNS server once again, and what it's going to do is it's going to try to resolve the names to IP addresses, and then it's going to show me how long it takes to get to each one of those different routers, which we refer to as a hop. Now sometimes it's going to give us just the IP address, and sometimes it's going to give us the name. So you can see, the name is showing up in some cases. They are also going to occasionally get this star that you see here, and that's just because that particular router, or the switch, or whatever it's connected to, has decided it's not going to give you that information. And that's okay, that does happen sometimes. But eventually it will get to where it needs to go, and then you'll be able to tell how many hops it is. Now how this is useful is it tells us if there's a router, or a switch, or something between you and your destination which is not routing properly, and that's where it will stop. So instead of going all the way to the destination, which is the 10th hop, it will actually stop, say at route 6, and then we'll know that the router at route 6 is the one causing the problem. We'll find out who owns the IP address by going to ARIN, arin.net, and type in the address, and it tells us who owns it. We can contact them, and they can fix their routing problem. pathping does something similar to trace route. I'll just replace that with pathping. And it goes through all the different addresses, as well as the names, if they resolve to anything. Another thing I like to do, let's switch over to PowerShell for a second, is to use PowerShell to test a network connection. So, if I type in test-netconnection, then I type in -port, which is going to be the TCP port, and I'll put in 443, that's going to be the SSL port connecting to google.com. And that'll tell me whether or not I'm getting through on this SSL port for a secure connection. And it's now waiting for the response, sometimes it takes a few seconds. And there's the results. So we see the remote IP address that resolved google.com to an IP, the remote port is port 443, shows my source address, and whether or not it was successful, which it was. And you could use that with any port. And similar to route print, which shows our route, we can type in get-netroute. And that shows us all the different routes, it just shows it in a slightly different way. IP tools built into Windows are very useful and free of charge. There are also useful third party tools such as Wireshark and Nmap. A good idea is to set up a virtual machine test so you can try these all out without causing any problems with your production computers.

Contents