Network world is becoming more mainstream, but without being simplified. Thus, more and more people own or use a router at home without any understanding of its functions. The massive deployment of broadband Internet access via ADSL and permanent or cable has caused a proliferation of local network at home (or business). There are many facilities within some amount in which you need to just unpack and plug the router and miraculously, everything works the first time, at least for Internet access. However once the needs are different like for online games, telephone, access to remote machines, etc things get complicated and I receive many questions from users a little lost. Most of these facilities include a router that must understand the operating principle to configure properly.
Internet is not a network but a network of networks where the name INTER Networking. These networks are interconnected by specialized programs in this work, often integrated into an autonomous body called the router. A router has two network interfaces then to link two LANs. The Internet allows two machines to exchange information between them. Each machine has a unique IP address which allows it to be identified on the network. This address (IPv4) is a 32 bit number that is usually represented as a sequence of 4 numbers from 0 to 255 as for example, 126.96.36.199. Since this is not very practical you can use a symbolic address easier to remember such as www.google.com. Servers called DNS (Domain Name System) perform the conversion between the symbolic address and the actual physical address. To see this conversion, the simplest and typing on a command line (DOS window in W98 or XP command prompt) ping www.google.com. To find the IP address of your machine, type ipconfig on the command line.
To connect two machines on the network, TCP / IP cutout information packets that include all the IP address of the original equipment and the IP address of the destination device. If machines are on the same LAN, they communicate directly. Otherwise, packets are sent to the router. The router checks if packets are destined for the LAN interface of the other if it goes to another router until you find the router that has an interface on the local network of the destination address. Typing on the command line tracert www.google.com, you can follow the sequence of routers used to reach the destination machine, usually between 10 and 20.
To see if the IP address belongs to the local network or another network, TCP / IP needs additional information. This is provided as a mask. The usual value 255.255.255.0 defines a local network of 256 IP addresses.
Configuration settings of the TCP / IP, DHCP
You must already know the IP address and subnet mask as explained above. If the destination machine does not belong to the same LAN, you must know the local address of the router that will handle the routing of packets that parameter gateway (or gateway in English). The last parameter is the address of a DNS to convert symbolic address IP address if necessary. In summary:
- IP address and mask of the machine required.
- Gateway IP addresses necessary to access machines outside the LAN.
- IP address of a DNS needed to resolve symbolic names.
You can configure these settings using the DHCP service if the user has configured the TCP / IP request to obtain an IP address automatically. The advantage of this service is to provide settings to automatically configure the machine. The disadvantage is that the address may vary at each startup unless we assign a static IP address in the DHCP service. This service requires a DHCP server on the LAN. The most routers, if DHCP is ON, providing that service as well as the Internet Connection Sharing built into Windows XP.
Who assigns IP addresses?
For the Internet system works, we must say that the public IP addresses are all different among the 4 billion combinations allowed by the 32 address bits. The rapid growth of the Internet beyond all expectations and use of IP for systems not connected to the Internet has made it impossible or unnecessary to assign different public IP addresses to all machines on the Internet. The IANA (The Internet Assigned Numbers Authority-body that assigns Internet addresses) has created three blocks of addresses, called private:
- 10.0.0.0 - 10.255.255.255 (10 / 8 prefix)
- 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
- 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
These blocks of private addresses are not routed over the Internet and the use of these addresses is free within a local Internet. You can assign them as you want for your private LAN.
To best use the existing stock of public addresses, providers of Internet addresses have become used to give one public IP address accessible on the Internet in most public offerings. If you have a machine, there is no problem but when you have multiple machines, you must assign private addresses, taken in the blocks above. This solution has one major drawback: the machines with private addresses cannot communicate directly with the public Internet. We must find a trick. Many systems are possible. As always, for simplicity, I will not describe the simplest and most modern that can be used with all consumer routers: NAT also known as the masquerading under Linux