TCP/IP Addressing
TCP/IP uses 32 bits, or four groups of numbers between 0 and 255, to address computers.
IP address
Every computer must have an IP address to connect to the Internet.
Every IP packet must have an address in order to be sent to another computer.
In the next section of this tutorial you will learn more about IP addresses and IP names.
An IP address contains four groups of numbers:
TCP/IP uses four groups of numbers to address computers. Every computer must have a unique address made of four groups of numbers.
Each group must be between 0 and 255 and separated by dots, for example: 192.168.1.60.
32 bits = 4 bytes
TCP/IP uses 32 bits for addressing. One computer byte is 8 bits, so TCP/IP uses 4 bytes.
One computer byte can hold 256 different values:
00000000, 00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000 ....... up to 11111111.
Now you should know why a TCP/IP address is four groups of numbers between 0 and 255.
IP V6
IPv6 is short for "Internet Protocol Version 6", also known as the next-generation Internet protocol. It was designed by the IETF group (Internet Engineering Task Force) as a new IP protocol to replace the current IPv4 protocol.
We know that every host on the Internet has a unique IP address; an IP address uses a 32-bit binary number to represent a host number, but 32-bit address space is limited and can no longer meet user demand, so Internet research organizations published a new host identification method, namely IPv6.
RFC1884 (RFC is short for Request for Comments document; RFCs are in fact standards for Internet-related services) specifies a standard syntax recommending that the 128 bits (16 bytes) of an IPv6 address be written as eight 16-bit unsigned integers, each represented by four hexadecimal digits, separated by colons (:), for example:
686E:8C64:FFFF:FFFF:0:1180:96A:FFFF
Colon hexadecimal notation allows zero compression, that is, a run of consecutive zeros can be replaced by a pair of colons, for example:
FF05:0:0:0:0:0:0:B3可以定成:FF05::B3
To ensure zero compression has an unambiguous interpretation, the recommendation states that zero compression may be used only once in any address. This technique is especially useful for the proposed allocation strategy, since many addresses contain runs of consecutive zeros.
Colon hexadecimal notation can be combined with a dotted-decimal suffix. This combination is especially useful during the transition from IPv4 to IPv6. For example, the following string is a valid colon hexadecimal notation:
0:0:0:0:0:0:128.10.1.1
In this notation, although each value separated by colons is a 16-bit quantity, each dotted-decimal part indicates the value of one byte. Applying zero compression again gives:
::128.10.1.1
Domain names
Twelve Arabic digits are hard to remember. Using a name is easier.
Names used for TCP/IP addresses are called domain names. runoob.com is a domain name.
When you type a domain name such as http://www.runoob.com, the domain name is translated into numbers by a DNS program.
Around the world, a huge number of DNS servers are connected to the Internet. DNS servers translate domain names into TCP/IP addresses and update each other's systems with new domain name information.
When a new domain name is registered together with its TCP/IP address, DNS servers all over the world update this information.