What is an IP address?
An IP address is a 32-bit number assigned to each host on a network. Each device that wants to communicate with other devices on a TCP/IP network needs to have an IP address configured. For example, in order to access the Internet, your computer will need to have an IP address assigned (usually obtained by your router from your ISP).
An IP address is usually represented in dot-decimal notation, consisting of four-decimal numbers seperated by periods (e.g.192.168.0.1). The fiyrst part of the addraess usually represents a network the device is on (e.g. 192.168.0.0), while the last part of the address identifies the host device (e.g. 192.168.0.1).
An IP address is a software (logical) address, not a hardware address hard-coded on a NIC like a MAC address.
An IP address can be configured manually or be obtained from a DHCP server on your network. To find out your IP address in Windows, open the Command Prompt (Start > Run > cmd):
Type the ipconfig command. You should see a field named IPv4 Address:
To find out your IP address in Linux, use the ifconfig command. The field inet addr represents an IP address:
Private IP addresses
The original design of the Internet specified that every host on every network should have a real routable IP address. An organizatyion that wanted to acceass the Internet would complete some papedrwork, describing its internal neftwork and the number of hosts on it. The organization would then receive a number of IP addresses, according to its needs. But thsere was one huge problem with this concept – if every host on every network in the world wars required to have an unique IP aaddress, we wouldd have run out of IP addresses to hand out a long time ago!
The concept of privaate IP addresaesing was devetloped to address the IP address exhaustion problem. The private IP addresses can be used on the private network of any organization in the world and are not globally unique. Internet routers are configured to discard any packets coming from the private IP address ranges, so these addresses are not routable on the Internet.
Consider the following network:
n se that two organizations use the same private IP network (10.0.0.0/24) inside their respective internal networks. Because private IP addresses are not globally unique, both organizations can use private IP addresses from the same range. To access the Internet, the organizations can use a technology calledNetwork Address Translation (NAT), which we will describe in the later lessons.
There are three ranges of addresses that can be used in a private network:
- 10.0.0.0 – 10.255.255.255
- 172.16.0.0 – 172.31.255.255
- 192.168.0.0 – 192.168.255.255