Wednesday, January 20, 2016

Week 17: Day 048 - Network Naming


Welcome to my new format of doing blog entries on Network+. You should expect to see up to nine posts until the end of the month on this. I think this will all be done by the end of January, which is great for me. I skipped a week of blog posts since I was really busy learning command line for Linux. This chapter is about Network Naming. You have a name for your network as a convenience, and to be able to communicate over the internet, there is a translation that takes place so the network can switch a regular IP to a domain and vice versa. This is called DNS, which is the first topic of coverage; let's get right into it.

Domain Name System (DNS) is a name resolution system which translates IPs into domain names, so I don't have to go on http://93.325.525 to open a webpage. In the early days of TCP/IP a system called HOSTS was used. A HOSTS file had a list of IPs of networks on the internet. There weren't that many computers back then. Here's an example of what it looks like:

192.168.2.1     fred
201.32.16.4     school2
123.21.44.16   server

The HOSTS file on every system was update at 2 AM every morning. If you wanted to contact fred, HOSTS would just look for his name, and contact him. When the internet grew, it became impractical. Important thing to note the # on HOSTS file meant the line would be a comment, kind of like Python does. Long story short, to see how it works, ping a random website in your CMD (command prompt) and take the IP of what you're pinging, put it into a text editor, put a name beside it like, "bob", then save it as a HOSTS file. Afterwards type "ping bob" into cmd, and it will show ping that address.

The way Domain Name System (DNS) was created, was through the need to replace HOSTS. What ended up being the normal DNS was a method in which the top dog DNS systems delegated jobs to other ones which delegated jobs to ones below them. As you can see, it's very bureaucratical. These systems run a special program and are called, "DNS servers". The top dog ones are super computers around the world, which work as a team known collectively as "DNS Root Servers". DNS root has the complete name resolution table, while the resolution work is delegated to other DNS servers. Under the DNS root, the next part of the hierarchy is "Top-Level Domain" (TLD) names. They are the famous .com, .org, .net, etc. names at the end of a URL. Then under that is Second-level DNS which support individual computers. In essence what happens is that the domain is masking the IP address of the individual, and it is at second-level in which this happens. Now in terms of the DNS hierarchical name space, it's basically a tree structure which contains all possible names within a single system. HOSTS used "flat name space", which is just a big unorganized list. I already understand the hierarchical system, so no need to go over that (but if I did, pg. 321-323). Now in terms of how the name space works, it works a lot like the file system on a computer. I've been playing around with Terminal in my other course, and it's taught me a lot about hierarchical file systems on Linux. This is essentially the same on Windows. But in the world of DNS, you start out with the "root", then the "domain", and then the "host names". If you wanted to use DNS in your TCP/IP network you could, it's not exclusive to the internet. That would be called an "intranet". Regardless, the DNS naming convention is the opposite to that of a computer. The complete DNS name + host and domain is called "Fully Qualified Domain Name" (FQDN) which is written with the root on the far right, followed by domains left of the root, and host names on far left. So basically on Windows if you went for example C:\Program Files\Steam\SteamApps it would be the complete opposite in the world of DNS instead it would be reversed to SteamApps/Steam/Program Files/C: which may seem weird, but deal with it!

Then there's the "name servers". Here are the three key ones:
- DNS Server: A DNS server is a computer running DNS server software
- Zone: A zone is a container for a single domain that gets filled with records.
- Record: A record is a line in the zone data that maps an FQDN to an IP address.

Systems with DNS server software contain DNS information. A network usually has one DNS server for the entire network. On Pg. 327 there is an example of authoritative DNS server which lists all host names on the domain and their corresponding IP addresses.You can have a single DNS server as authoritative. Every DNS server knows the name and address of the "Start of Authority" (SOA). If Mikes-PC.Support.Houston needs the IP address of Server1.Dallas then the network has to choose an authoritative DNS server. Say that DNS1.Dallas is the authoritative for all Dallas domains and DNS.1 is in charge of all Houston domains. As root, Houston server has a listing for SOA in the Dallas domain, but does not know the IP address for every system on it. The requesting sytem will ask the Dallas DNS server for the IP address of the system it needs. There are advantages to the hierarchy, as almost all web servers are called www. only the DNS naming appends domain names to the server names. No to machines have the same FQDN because it must fit within the worldwide hierarchy.

To access the internet you don't have to use DNS. It makes things easier to do, however. Browsers accept urls like www.google.com, but it converts it into an IP to access the webpage. Moving on, to broadcast for name resolution, the host sends a message to all machines on the network, requesting a respsonse from another system on another network. The broadcast stops at the router, since routers don't forward broadcasts. Now the final way of resolving a name to an IP address is, of course, to use DNS. To request the IP address of www.micrsofot.com, for example, your PC needs the IP address of its DNS server. You have to enter its DNS info int your system, by using the "TCP/IPv4 Properties" dialog box. I've used it before. Enter what Mike has down on pg. 332 and see what happens! Every OS has a tool like the one on Microsoft. On Ubuntu it's "Network Configuration Utility". You can verify your settings on Command Prompt through "ipconfig /all" and on Linux with "cat /etc/resolv.conf".

The DNS server receives this request for the IP of www.microsoft.com from your client. Your DNS server will check the cache of a previous FQDN to see if www.microsoft.com is there. Let's say it isn't. Your DNS server needs to find it. It may not know the address of for www.microsoft.com but it knows 12 root name server operators. Those know all the addresses for top level domains. The root servers will send your DNS server an IP address for a .com server. But that .com DNS server doesn't know the address for www.microsoft.com either! But it knows the IP of just microsoft.com. Finally, we know that microsoft.com will know the IP address to www.microsoft.com (finally.)

I'm skipping a section of the chapter which doesn't cover much for the test. Let's go straight to Troubleshooting DNS. Most DNS problems result from an issue with the client. How do we know? DNS servers rarely go down. Everything you do on an IP network depends on DNS to find the right system to communicate to for whatever job an application needs to do. FTP clients use DNS for their servers, and web browsers use DNS to find web servers. The first clue to expect the rare occasion in which a DNS server is at fault, is when you see a "server not found" error. To test, flush out DNS caches by typing into cmd "ipconfig /flushdns". If you can't use your web browser for testing, just use the "ping" command. Run ping from cmd, followed by a famous website. An example would be, "www.google,com". If you get a "request timed out" message, that's okay, you just want to see if the DNS is resolving FQDNs into IP addresses. If you get a "server not found" error, you'll need to pign again with just an IP address. The IP for Google is 74.125.95.99 try memorizing that! If ping works with the IP address, but not the website, then it's a DNS problem! Simple.

In addition, NetBIOS is a system created by Microsoft for Windows (older ones), and was invented in the 80s. Basically Microsoft kept adapting their NetBIOS to work with TCP/IP, and made it DNS-compatible. To reduce overhead, they created a special text file called LMHOSTS, which is like Hosts except it uses "Windows Internet Name Service" (WINS) for name resolution. Two reasons to use a WINS server would be to reduce overhead broadcasts, and to enable NetBIOS name resolution across routers. Why routers? Well routers kill broadcasts, so they have that in common. To keep Windows systems connected to your WINS server from broadcasting, you'd use a WINS "proxy agent", to forward WINS broadcasts to the WINS server. To configure the WINS client, you only need to configure the IP address of a WINS server in its WINS settings under Network Properties. Then Windows will just look for the WINS server to register its NetBIOS name. I'll skip the troubleshooting bit for this, since it's unimportant to the test.

Finally, here's how to diagnose TCP/IP networks:

1. Diagnose the NIC by pinging the loopback, typing into cmd: "ping 127.0.0.1" or "ping localhost"

2. Diagnose locally.

3. Check IP address and Subnet Mask

4. Run netstat by typing into cmd: "netstat"

5. Run netstat -s (same as before except with -s modifier)

6. Diagnose to the gateway.

7. Diagnose to the Internet.

Completion Status: 52.5%
Pages Left:
- Book: 322 pages


Questions:
1. NetBIOS uses what type of name space?

2. The DNS root director is represented by what symbol?
/ (forward slash)

3. What command do you use to see the DNS cache on a Windows system?
ipconfig /displaydns

4. The users on your network haven't been able to connect to the server for 30 minutes. You check and reboot the server, but you're unable to ping either its own loopback address or any of your client systems. What should you do?
Replace the NIC, cause it sucks and it failed.

5.  A user calls to say she can't see the other systems on the network when she looks in My Network Places. You are not using NetBIOS. What are your first two troubleshooting steps? (Select Two)
Ping the loopback address.
Ping several neighboring systems using both DNS names and IP addresses.

6. What is checked first when trying to resolve an FQDN to an IP address?
HOSTS file

7. Which type of DNS record is used by mail servers to determine where to send e-mail?
MX record

8. Which command enables you to eliminate DNS cache?
ipconfig /flushdns

9. Which tool enables you to query the functions of a DNS server?
nslookup

10. Where does a DNS server store the IP addresses and FQDNs for the computers within a domain?
Forward lookup zone.


No comments:

Post a Comment