|
|
Let's put into practiceA very simple LANWhen you connect 2 or more computers in your home, you are building a Local Area Network (LAN). If systems in your LAN are configured with NetBEUI or IPX/SPX protocols, you have not to define IP addresses manually, as those protocols use hardware addresses (MACs) to identify each other. Each computer connected to your network must have a network card (also called Network Adapter, Ethernet Card, Network Interface Card, NIC, etc.). The network card is a piece of computer hardware where you connect the network wire. Any network card has a unique 48 bits serial number called MAC address. NetBEUI and IPX/SPX protocol use the MAC address. As said before your little network is called LAN, whereas very big networks are called WANs (Wide Area Network). Generally, you won't use NetBEUI or IPX/SPX. You will probably use TCP/IP instead. So you must provide IP addresses manually. Do you remember the 3 network classes? If you are building a little home net, you won't use more than 253 computers right? ;o) If so, you need a C class network. Even if you could use A class or B class IP addresses, you should use C class IP addresses. So you must use an IP address like this: 192.168.x.x. Let's see a simple LAN:
Ok, you have just connected 3 hosts in your LAN. What if you want to access the Internet? By means of the configuration shown above, simply you can't access the Internet! Let's see the reason of that. Usually you are connected to the Internet by means of an ISP. Your ISP uses its own network that is connected to the Internet. You are connected to the ISP's network which is connected to the Internet in turn. Take a look at this typical configuration:
/
/
|
------------------------------| THE INTERNET
| |
| \
| \
-------
| ISP | (10.0.0.0 network)
-------
|
|
============== ETHERNET WIRE =========================== = =
| | | |
| | | |
--------- --------- --------- ------- - - |\
| | | | | | | -------| \
| YOU | | | | | | -------| / AND ALL OTHER ISP's CUSTOMERS FOLLOW...
--------- --------- --------- ------- - - |/
10.10.10.1 10.10.10.2 10.10.10.3 10.10.10...
(picture 2)
In the above example your computer is 10.10.10.1 which is connected to the ISP's network 10.x.x.x (A class network).
You have not any LAN, you are just one of many ISP's customers. You have one computer connected to your ISP only.
So all things work fine. Anyway, you are a hacker who likes to tinker with LANs ;o). So you would like to set
up something like this:
/
/
|
------------------------------| THE INTERNET
| |
| \
| \
-------
| ISP | (10.0.0.0 network)
-------
|
|
= = =========== ISP NETWORK =========================== = =
| | | |
| | | |
--------- --------- --------- ------ - - |\
| | | | | | | -------| \
======| YOU | | | | | | -------| / AND ALL OTHER ISP's CUSTOMERS FOLLOW...
| --------- --------- --------- ------ - - |/
| 10.10.10.1 10.10.10.2 10.10.10.3 10.10.10...
|
|
|
|
|
================ YOUR HOME LAN ========()
| |
| |
--------- ---------
| | | |
| PC 2 | | PC 3 |
--------- ---------
192.168.10.1 192.168.10.2
(picture 3)
Ok, the configuration shown above won't work because you *CANNOT* connect 2 different networks each other simply wiring them! Rule number 1: to connect 2 or more computers to form a network, all computers must share the same range of IP addresses. Rule number 2: to connect 2 different networks you need a ROUTER. Hmmm...wait...you can connect 2 computers each other easily: plug the end of your cable to one computer (to its network card exactly) then plug the other end to the other computer. Ok, but what if you have 3 computers? Think about that! How can you connect them? Well, you need a particular box called HUB. So let's see a simple LAN again:
__________
| H U B |
|__________|
| | |
-------------| | |-------------
| | |
| | |
--------- --------- ---------
| | | | | |
|Host 1 | |Host 2 | |Host 3 |
--------- -------- --------
192.168.10.1 192.168.10.2 192.168.10.3
(picture 4)
As you can see Host 1, Host 2 and Host 3 are connected each other by means of a HUB. Any hub send information from one host to each other host (but not the original one). A typical hub has
4 sockets called PORTS. HUBs are stupid boxes because they send information to all computers connected. So when host 1 wants to talk to host 3, the hub connecting them will send messages to both
host 3 and host 2. Really a stupid box right? If you want to use a smarter device, you must use a network SWITCH. A network switch is an intelligent hub. In fact it can examine
messages in order to deliver them to the intended recipient only. So when host number 1 want to talk to host number 3, the switch connecting them will send messages
to host number 3 only. Take a look at the picture number 3: as you can see your home LAN and the ISP network are using 2 different IP classes, right? Now remember the 2 rules...Rule number 1: to connect 2 or more computers to form a network, all computers MUST SHARE THE SAME RANGE OF IP addresses. Rule number 2: to connect 2 different networks you need a ROUTER. What is wrong with picture 3? Of course, neither rule number 1 nor rule number 2 are satisfied! In fact you are trying to connect 2 different networks (10.0.0.0 and 192.168.10.0). In other words you need a ROUTER. A router is a box that connects 2 different networks:
/
/
|
------------------------------| THE INTERNET
| |
| \
| \
-------
| ISP | (10.x.x.x network)
-------
|
|
= = =========== ISP NETWORK =========================== = =
| | | |
| | | |
--------- --------- --------- ------ - - |\
| | | | | | | -------| \
=====| | | | | | | -------| / AND ALL OTHER ISP's CUSTOMERS FOLLOW...
| --------- --------- --------- ------ - - |/
| 10.10.10.1 10.10.10.2 10.10.10.3 10.10.10...
|
|
|
________|________________________________
| | |
| ____|__________ |
| | R O U T E R | (192.168.10.1) |
| |_____________| |
| | | |
| | | |
| | ------------- |
| | | |
| --------- --------- |
| | | | | |
| | PC 2 | | PC 3 | |
| --------- --------- |
| 192.168.10.2 192.168.10.3 |
| |
|_______________________________________|
|
|
|
--------------------> YOUR HOME LAN (192.168.10.0 network)
(picture 5)
Ok, you have a full networking knowledge to understand next subjects ;o)<--- Index --->
DISCLAIMER: |
|