Total Pageviews

Saturday, 11 May 2024

Networking essentials


I recently bought a Linksys WRT-54GL router and a DSL router/modem so I could have a good network setup for my home computers/server. I must admit that configuring all that is rather hard if you don't know much about networking, so I decided to write this "Networking essentials" guide so people could have an idea what all these terms mean.

IP Address

First off, a bit about IP addresses. In order for computers to talk to each other, they must have a way to address each other, so each one needs to have a unique name (or number). Since, however, numbers are more practical for computers, that's what we use. A computer's number is its IP address, and it's unique to it within a network (so yes, noone on the entire internet in the whole world has the same IP address as you.

An IP address consists of four numbers (they're actually four digits, but don't pay much attention to this) in the range 0-254, separated by periods. So, 119.12.23.64 is a valid IP address (and someone is probably using it right now).

DNS server

As I already said, the internet works with IP addresses, and that's how your computer knows where to get what you want. IP addresses, however, are rather tedious for people to remember (it's much easier to remember poromenos.org than 63.247.68.107), so we need a system to translate human-readable words into IP addresses. This is what the DNS does. When you type a hostname (such as www.poromenos.org) in a program, your computer sends a DNS request to its DNS server to ask it what IP address that hostname corresponds to. The DNS server checks its list for the address. If it doesn't know it, it forwards the request to another DNS server. This can take a few hops if noone knows the hostname, until the request reaches the root servers, which hold all the hostnames in the world. If the address isn't found there either, the lookup fails.

DHCP Server

The DHCP server's job is to send the network configuration to any client that requests it. So, instead of setting each computer's IP address, DNS server, gateway, etc manually, your computer sends a DHCP request and all this info is returned to it by the server. For IP addresses, the DHCP server has a list of addresses it has leased to computers (they are leased because they expire after a few days, usually, and need to be renewed), to make sure it doesn't assign the same address to two computers.

Gateway

The gateway is a computer (or device) that connects a network to another network, for example your LAN to the internet. Computers send their requests to the gateway and the gateway forwards them to the internet and relays the responses back.

Ports

Each computer has various ports (65536, to be exact) on which it can receive data. This is purely for convenience, since this way computers can offer various services on specific ports. For example, if you connect to some computer's port 80, you'll find its web server (if it has one). Similarly, port 110 is POP3 (for getting your e-mails), 25 is SMTP (for sending your e-mails), etc.

from http://web.archive.org/web/20070712174227/http://www.poromenos.org/tutorials/networking

No comments:

Post a Comment