Resources | Subject Notes | Computer Science
An IP address (Internet Protocol address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It allows devices to locate each other on the network and exchange data.
There are two main versions of IP addresses currently in use: IPv4 and IPv6.
IPv4 addresses are 32-bit numerical addresses, typically written in dotted decimal notation (e.g., 192.168.1.1). Each octet (group of 8 bits) can have a value from 0 to 255.
IPv4 addresses are further divided into classes, although the classful addressing scheme is largely obsolete. Common classes include:
A private IPv4 address range is also defined for use within local networks:
IPv6 addresses are 128-bit numerical addresses, written in hexadecimal notation (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
IPv6 was developed to address the limitations of IPv4, particularly the exhaustion of available addresses. It offers a vastly larger address space.
IPv6 addresses are categorized into different types:
IP Address Type | Address Length | Notation | Typical Use |
---|---|---|---|
IPv4 | 32 bits | Dotted decimal (e.g., 192.168.1.1) | Internet communication, local networks |
IPv6 | 128 bits | Hexadecimal (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334) | Future internet communication, large networks |
Unicast (IPv6) | Single interface | (e.g., 2001:db8:85a3:0:0:8a2e:370:7334) | Communication with a specific device |
Multicast (IPv6) | Group of interfaces | (e.g., 2001:db8:85a3::1) | Sending data to multiple devices simultaneously |
Anycast (IPv6) | Group of interfaces, nearest is used | (e.g., 2001:db8:85a3::1) | Routing traffic to the closest server in a group |
Public IP addresses are globally unique addresses assigned to devices connected to the internet. They are used for communication with devices on other networks.
Private IP addresses are used within local networks (e.g., home or office networks). They are not globally unique and are typically used for communication between devices within the same network.
The private IP address ranges mentioned earlier (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are reserved for private networks.