(Very) Basic Networking Principals

| September 9, 2007 | Reply

Networking is arguably the most important aspect of our jobs. The one common thing between all interconnected computers, is the network. It is vital to all operations that Datacenter Operations have a firm grasp on basic networking principals. At the most basic level, we can compare a computer network to our own neighborhood. We have our house, our roads, our towns, states, and highways.
This excellent analogy is most likely the reason that the internet was nicknamed the information superhighway.

First. We have our desktop computer (our house)
Our house holds all kinds of personal items, our personal files, financial information, pictures. From there we communicate on an individual personal level. We have a mailbox, a telephone, and all sorts of tools and objects that bring us personal satisfaction.

Each house has a telephone. Each telephone is assigned a unique telephone number. This is the number that we give to people when we want to be reached. Each computer on the network is assigned a unique IP address, which can be thought of as a phone number.

Since on a daily basis we talk to so many people, it’s near impossible to memorize everybodies number. For this reason, the phone book was created. The phone book maps peoples names and addresses.. We open up the book, look for John Q. Public, and theres his number. Computers do the same thing… except they call the phone book DNS… or Domain Name Service. It’s DNS that makes it possible to reach the computer at 10.2.208.21 by it’s name… Sahara.

Every time you access sahara, the computer sends a request to it’s DNS server (or phonebook) which says… “I’m looking for the computer named sahara”. The DNS server then responds with “sahara is at 10.2.208.21″. Provided the DNS server is updated with everyones name and address, this is a seamless process, and you are routed directely to sahara’s address.

Each house has multiple entrances and exits. Doors, windows, bulkheads… We can open and close these at any time. We can allow or deny people in and out. In the computer world, we call these ports. If we were concerned about the security of our home, it would be obvious that we want the minimum number of ports open. We might leave our third floor window open when we are away, but with any prudence, we lock our front door. We don’t want people easily walking into our house to snoop around, steal, or vandalize anything… and we can’t lock the house up too tight, or we wouldn’t be able to get out when we wanted to.

Next, we have our roads. We need roads if we are to ever leave the house. Everyone understands that.
If lots of people are traveling on the same road at the same time… we get traffic. If the traffic is heavy, we’re still going to get where we’re going, but it’s going to take longer than it would otherwise. These roads, are our network cables. The roads my have intersections (switches) and at some point, lead us out of the neighborhood (at the router).

In some cases we may want to secure our entire neighborhood. Prisons secure their walls to keep inmates from getting out.
The Chinese built the great wall to keep invaders out..
When securing our networks, we call these barriers Firewalls.

We can put a firewall in front of our house. We can put a firewall in the middle of our street. We can put a firewall at the border of our country. These are designed to keep people who shouldn’t leave in, and to keep people who don’t belong out.

So this is an analogy of a network. Lets take a look at some of the tools we use to navigate around it.

PING (Also called ICMP)
For example, we want to ping sahara.
We issue the ping command, ping goes from our house out it’s designated window (or port), travels down the street, over to the dns server and says “Hey, I’m looking for sahara, what’s it’s address”.
The DNS server then returns “10.2.208.21″. So we continue down the street to the house at 10.2.208.21. We crawl through the window, and if we get in… we then return back home and return how long it took to take the trip.

If we don’t get in… there could be a few different reasons.
1.) ping couldn’t get out our home window.
2.) ping couldn’t get down the street.
3.) ping couldn’t find the DNS server (or the phone book), or the DNS server couldn’t find the entry for sahara. (or maybe sahara was at one address yesterday, but they moved and forgot to get their entry updated in the phonebook)
4.) ping got blocked by a firewall somewhere
5.) ping couldn’t get into saharas house.

TRACERT:
Tracert is like a gps tracking system for ping. It’s sending a ping request, and returning more information about it.
we issue the command tracert sahara
tracert sends a ping request down the road, and at every intersection it reports back how long it took to get there. This way, if there is a roadblock somewhere… we can see where it is. We can also see between which points there was traffic. This is especially helpful in environments like ours, which are basically made up of neighborhoods (or subnets) that are connected at intersections (or routers)

NMAP:
nmap (network map) is a tool that I use regularly. (it is not installed by default, so I generally nmap from the server raynham, although there are others that have it, and there is a windows version that is free)

Nmap will scan an address, and report back what ports (or windows) are opened.
This is a quick way to see what services are enabled on a given server.

[root@raynham ~]# nmap localhost

Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2007-09-08 20:05 EDT
Interesting ports on localhost (127.0.0.1):
(The 1662 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
111/tcp open rpcbind
631/tcp open ipp
791/tcp open unknown
825/tcp open unknown
2049/tcp open nfs
5900/tcp open vnc
8009/tcp open ajp13
8080/tcp open http-proxy
50000/tcp open iiimsf
50002/tcp open iiimsf

Nmap finished: 1 IP address (1 host up) scanned in 0.201 seconds
[root@raynham ~]#

From this output we can see that port (or window) 22 is open.. This is generally the port used for ssh.

Networking as a subject can get as deep as you want it to. Google searching on any of these commands will give more than enough information.

Tags:

Category: Uncategorized

About the Author ()