GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
IP Addresses |
20190608 An IP address (internet protocol) allows messages to be sent to and from specific computers anywhere on the Internet. An IP address is a sequence of four numbers each in the range from 0 to 255, like 192.168.278.12. In fact it is stored as a single string of 32 bits (binary digits i.e., 0's and 1') grouped as 4 bytes (a byte being 8 bits). With 8 bits we can represent the numbers from 0 (00000000) to 255 (11111111).
Two things happen to get your network going: loading a driver for your network hardware and specifying your network address and configuration.
The network is usually setup at boot time by the system initialisation script /etc/init.d/networking. For pcmcia network cards, for example, the /etc/pcmcia/ tree provides its own scrips, including /etc/pcmcia/network, that is called whenever a network card is found in the PCMCIA socket.
Your IP address bitwise ANDed with the so called netmask yields your network address. The network address bitwise ORed with the negated netmask yields your so called broadcast address. The IP address of the router through which you connect to the Internet is referred to as the gateway.
A simple example is:
IP: 192.168.0.34 (0xc0a80022) Mask: 255.255.255.240 (0xfffffff0) Network: 192.168.0.32 (0xc0a80020 = 0xc0a80022 & 0xfffffff0) Broadcast: 192.168.0.47 (0xc0a8002f = 0xc0a80020 | ~0x0f)
The following IP address ranges are reserved for private use within your own network and these are used by home routers for example to assign IP addresses that only apply within the home network. You will often see adresses in these ranges at home.
10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255 |
For further information: