Network Management Tutorial
Part 2

MAC address
IP address
Domain name
Server types and NAT routers
IP address, gateway, and DNS server assignment
Dynamic IP address assignment
Static IP address assignment
 
Part 1
Part 3

MAC address

Every electronic networked device in the world has a unique hardware address, also known as a MAC address. They look like this: 00.0F.B5.6C.62.2A. Sometimes there are colons or spaces instead of the periods, but there are always six two-digit groups containing 0 through 9 and/or A through F.

The MAC address is like a fingerprint; it's unique to the individual piece of equipment. In the case of a PC with more than one Ethernet port, each port has its own MAC address.

The MAC address uniquely identifies that piece of hardware, but it says nothing about its location. For example, at any given moment I could be in Hong Kong or Cape town or Baton Rouge, but my fingerprints would still be the same.

IP address

To find a given piece of hardware, it is given an IP address. This looks like this: 192.168.0.1 or 23.45.129.88. There are always four numbers between 0 and 254, separated by periods.

The IP address is analogous to a phone number. Once you have my phone number, you can reach me. The phone system has logic built into it to find me by my country code, area code, exchange, and the last bit of the number.

Similarly, the Internet can find a computer by its IP address. When a computer (or other device such as a router) attaches to the Internet, it's assigned an IP address, either automatically by a program called a DHCP server, or manually by a system administrator.

Once you have a computer's IP address, you can reach it. The local network and/or the Internet conspire, as the phone network does, to route your packets to it and any responses back to you. (More on this below).

Usually you can ping it, which just sends some packets to it and lets you know if it responded. If it's got an FTP or Web server, you can connect to it and get or send files or retrieve Web pages. If it's got a mail server that has your email on it, you can get your mail from it or send email to it to be forwarded to your friends. All this is done by using the IP address, just like you use a phone number to reach a friend or a business.

Domain name

A third piece of identification is called a domain name. This is what is usually used in URL's because they are easier to remember than IP addresses. For example, yahoo.com, fema.gov, and redcross.org are all domain names.

Each domain name corresponds to an IP address. This is like having your name in a phone book along with your phone number. On the Internet and in LANs, there is a computer or other device that can look up a domain name and get an IP address. This is called a Domain Name Server, or DNS server for short.

So now we have three kinds of addresses: MAC address, unique to each piece of hardware (like your fingerprint); IP address, which tells where to find you (like a phone number); and domain name, which is like your name.

Server types and NAT routers

In addition to the three types of addresses, we have two kinds of server:

  1. The DHCP server. This assigns an IP address to your hardware device (NIC, router, Vonage box, whatever)
  2. A DNS server. This lets your computer look up a domain name and get an IP address.

There is one more type of server on each LAN that connects to the Internet. This is called a gateway. Usually in home LANs like ours, the router acts as the gateway.

All Internet traffic originated on any of the PC's on the LAN goes to this gateway/router, and it in turn forwards the traffic to the Internet, where it gets forwarded on until it gets to its destination. Any return traffic comes into the router/gateway and gets forwarded to the correct computer on the LAN.

(The router does this using something called NAT, for Network Address Translation; we won't go into this here. Suffice it to say that the router does some nifty footwork to keep track of outgoing packets and their returning responses, and forwards the incoming responses to the correct computer on the LAN via its IP address.)

IP address, gateway, and DNS server assignment

So, now we get to assigning an IP address. Your computer needs to have a unique IP address on your LAN so the router can send it stuff that comes from the Internet.

Your computer also needs to know the IP address of the router, which is going to act as its gateway to the internet. This is the IP address that your computer will send all outgoing traffic to.

Your computer also needs to know something called the netmask, which is a group of numbers which identifies how much of your IP address is specific to your LAN. This is generally 255.255.255.0 in home LANs; in large networks with different subnets, it could be something like 255.255.128.0, but never mind that. Just take the default, 255.255.255.0.

Finally, your computer needs to know the IP address of the machine it will use for DNS lookups, so when you type in http://autosport.com into your browser, it can go find out the IP address for Autosport's web site. Typically your ISP supplies a DNS server and a backup in case something goes wrong with the main one.

Dynamic IP address assignment

When your router connects to your ISP, it asks the ISP's DHCP server for an IP address, and the IP address of a DNS server and a backup DNS server.

Then, when your computer connects to your router, it asks the router's DHCP server for an IP address and all the other stuff it will need to talk to the Internet.

The router looks in its own table of IP addresses for your LAN, and picks out one for you that isn't currently being used. It hands this back to you, along with its own LAN IP address (by default, 192.168.0.1 for D-Link routers) for you to use as your gateway, and the IP addresses of the DNS servers that it got from your ISP.

Static IP address assignment

So, when you want to statically assign an IP address you also have to be ready to put in a netmask, a gateway, and one or two DNS server IP addresses.

You pick an IP address, preferably from outside the range that the router's DHCP server will automatically assign, to make sure that some other computer on your network will never get that same IP address assigned to it. As you can imagine, two computers having the same IP address is bad; it's like you and your best friend having the same phone number! Both of you would probably go crazy.

For the gateway, you simply use the router's LAN IP address, and for the DNS servers you use the IP addresses the router got from your ISP.

Now your computer can talk to any computer on the Internet as though it were connected directly to the Internet. It's almost as though the Internet is one huge LAN. Slick, eh?