IP address

from Wikipedia, the free encyclopedia

An IP address is an address in computer networks that - like the Internet  - is based on the Internet Protocol (IP). It is assigned to devices that are connected to the network, making the devices addressable and thus accessible. The IP address can designate a single recipient or a group of recipients ( multicast , broadcast ). Conversely, several IP addresses can be assigned to a computer.

The IP address is mainly used to transport data from its sender to the intended recipient. Similar to the postal address on an envelope, data packets are given an IP address that uniquely identifies the recipient. On the basis of this address, the “post offices”, the routers , can decide in which direction the parcel should be forwarded. In contrast to postal addresses, IP addresses are not tied to a specific location.

The best-known notation of today's IPv4 addresses consists of four numbers that can have values ​​from 0 to 255 and are separated by a point, for example Technically, the address is a 32-digit ( IPv4 ) or 128-digit ( IPv6 ) binary number .


In order to establish communication between two technical devices, each of the devices must be able to send data to the other device. In order for this data to arrive at the correct remote station, it must be clearly named (addressed). This is done in IP networks with an IP address. For example, a web server is addressed directly by a web browser via its IP address. To do this, the browser asks a name server for the IP address that is assigned to a domain (for example “www.example.com”). It then uses this IP address to send data to the web server.

IP address in IP data packets

Each IP data packet begins with an information area for transport through the IP layer , the IP header. This header also contains two fields in which the IP addresses of both the sender and the recipient are entered before the data packet is sent. The switching is done on the layer 3 in the OSI model , the network layer .


Earlier versions

The Internet was initially designed as a network to connect several existing data networks with one another. An organization like IANA that assigns IP areas to institutions as required did not yet exist. In the headers of the earlier variants of the Internet protocol, there were separate fields in which a network address and a host address were defined independently of one another. The network address was a network code number in the form of an 8-bit value, which identifies the source and destination network of the respective data packet. The code numbers used for Arpanet , Cyclades and other networks were fixed. In the first version of the Internet Protocol from 1974, the host address had a length of 16 bits, but was expanded to 24 bits in the first revision of the Internet Protocol. It was theoretically possible since 1975 to address the same number of hosts on the Internet as is still possible today on the basis of IPv4. The separation of network and host address was omitted when the IPv4 protocol was introduced in 1981 and the IANA then assigned IP address ranges in different sizes through the introduction of network classes . Due to more complex routing methods and the fact that there were IP networks in different sizes, the separation of network and host addresses became obsolete, so that the addresses were simply referred to as IP addresses, which only an individual network depending on the respective network size - and have host part.


The IPv4 addresses used predominantly since the introduction of version 4 of the Internet protocol consist of 32 bits , i.e. 4 octets (bytes) . This means that 2 32 , i.e. 4,294,967,296 addresses can be displayed. In the dotted decimal notation , the 4 octets are written as four whole numbers separated by dots in decimal notation in the range from 0 to 255.



Due to the rapidly increasing demand for IP addresses, it is foreseeable that the usable address space of IPv4 will sooner or later be exhausted. This is the main reason why IPv6 was developed. It uses 128 bits to store addresses, so 2 128 = 256 16 (= 340.282.366.920.938.463.463.374.607.431.768.211.456 ≈ 3.4 · 10 38 ) addresses can be represented. This number is sufficient to provide at least 665,570,793,348,866,944 (= 6.65 · 10 17 ) IP addresses for every square millimeter of the earth's surface . If there were 100  billion planetary systems in each of the approx. 2  billion galaxies of the known universe, each with an inhabited planet, then one could assign 1.7 · 10 15 IP addresses to each planet . If the planets are the size of the earth, that would be about 3 addresses per m 2 of the planet's surface.

Since the decimal ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd.ddd representation would be confusing and difficult to handle, IPv6 addresses are represented in hexadecimal form. To further simplify this representation, two octets of the address are combined and represented in groups separated by a colon. XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX.

Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7344

To shorten it further, zeros at the beginning of a block can be left out. One or more consecutive blocks that only consist of zeros can be ::replaced by - but no more than once in the address, so that eight blocks can be clearly filled.

Example: 2001:db8:85a3::8a2e:370:7344

Network part and device part

Each IPv4 address is separated by a network mask , each IPv6 address by specifying the prefix length , into a network part and a device part ("host part"). The network mask, i.e. the prefix length, indicates the bit at which the address must be divided. The bits masked by the network mask or specified by the prefix length (network part) are identical for all hosts (computers) in a subnetwork. The information as to whether a device is in the same subnet (i.e. the same network part in the IP address) is required by a host in order to be able to make routing decisions (see following section).

Example: (classless) IPv4 address203.0.113.195/27

              Dezimal          Binär                                Berechnung
IP-Adresse  11001011 00000000 01110001 11000011      ip-adresse
Netzmaske  11111111 11111111 11111111 11100000  AND netzmaske
Netzwerkadr.  11001011 00000000 01110001 11000000    = netzwerkteil
IP-Adresse  11001011 00000000 01110001 11000011      ip-adresse
Netzmaske  11111111 11111111 11111111 11100000
                               00000000 00000000 00000000 00011111  AND (NOT netzmaske)
Geräteteil                  3  00000000 00000000 00000000 00000011    = geräteteil

With a network mask with 27 set bits, the result is a network address of There remain 5 bits and thus 2 5  = 32 addresses for the device part. Of these, one address each is required for the network itself and for the broadcast , so that 30 addresses are available for devices.


If a device wants to send an IP packet, the network parts of the source IP address and destination IP address are compared. If they match, the destination host is on the same network and the packet is sent directly to the recipient. In the case of Ethernet networks, the ARP (Address Resolution Protocol) is used to find the hardware address. The ARP works on the second layer of the OSI model and establishes the connection to the first layer.

If the network parts do not match, however, a routing table is used to search for the IP address of a router (next hop) and the packet is sent to this router. This has contact to other networks via one or more interfaces and routes the packet on using the same procedure - for this purpose, it consults its own routing table and sends the packet to the next router or to the destination if necessary. The packet can pass through many networks and routers to the end device. Going through a router is also called a hop , the routing method Next Hop Routing .

Routing an HTTP packet over three networks

A router has its own IP address and network mask for each of its interfaces, which belong to the respective network. Each IP packet is routed individually. The source and destination address in the IP header are set by the sender and, if no address conversion takes place, remain unchanged throughout the route.

Special IP addresses

Special IPv4 addresses according to RFC 6890 :

CIDR address block Address range description RFC to current network (only valid as source address) RFC 3232 (replaces RFC 1700 ) to Network for private use RFC 1918 to Multiple used address range for provider NAT (see carrier-grade NAT ) RFC 6598 (1) to Localnet RFC 3330 to Zeroconf RFC 3927 through Network for private use RFC 1918 to reserved, but earmarked for allocation to Dual-Stack Lite (DS-Lite) , IPv4 and IPv6 transition mechanism with global IPv6 address and provider NAT for IPv4 RFC 6333 to Documentation and sample code ( TEST-NET-1 ) RFC 5737 (replaces RFC 3330 ) through 6to4 - anycast forwarding prefix RFC 3068 to Network for private use RFC 1918 through Network benchmark tests RFC 2544 to Documentation and example code ( TEST-NET-2 ) RFC 5737 to Documentation and example code ( TEST-NET-3 ) RFC 5737 to Multicasts (former class D network ) RFC 3171 to reserved (former class E network) RFC 3232 (replaces RFC 1700 ) 2) Broadcast

According to this list, 622,199,809 of around 4.3 billion IPv4 addresses or 14.5% of all possible IPv4 addresses fulfill a special purpose.

  1. The network refers to the local computer ( loopback address ). From this network area, the address can often be addressed with the host name localhost . Addresses from this range are used for communication between a client and a server process on the same computer. The servers on a local computer can be addressed with command line commands such as ssh localhostor ftp, for example to test their functionality.
  2. The special address can also be used as a broadcast address in addition to the highest device address in the network. This means that broadcasts can be sent without knowing other network parameters. This is important for protocols like BOOTP and DHCP .

There are three types of IP addresses:

  • Unicast : Sending to a specific recipient on the Internet (normal addressing).
  • Broadcast : Send to all devices in the same network ( subnet ). This is replaced by multicast in IPv6.
  • Multicast : Send to several devices in the same network (or devices in the multicast backbone network ).

IP addresses no longer reserved

With RFC 5735 approx. 50 million IP addresses were released. The reservation of the following address ranges has been canceled and released for distribution.

CIDR address block Address range number description RFC to 16,777,216 Public data network RFC 3232 (replaces RFC 1700 ) to 16,777,216 Cable Television Networks to 16,777,216 awarded to the APNIC in January 2011 RFC 1797 to 65,536 Awarded to the RIPE NCC in November 2010 to 65,536 reserved, but earmarked for allocation to 256 reserved, but earmarked for allocation RFC 3330

DNS - translation of computer names into IP addresses

Names can be resolved into IP addresses (and vice versa) using the Domain Name System (DNS) , which is available worldwide . For example, the name www.example.com is translated into the IPv4 address the IPv6 address 2606:2800:220:1:248:1893:25c8:1946.

Allocation of IP addresses and network areas

IANA - Internet Assigned Numbers Authority

The allocation of IP networks in the Internet is regulated by the IANA . In the early years of the Internet, IPv4 addresses and networks were assigned in large blocks directly by the IANA to organizations, companies or universities. For example, the area thus 16,777,216 addresses were assigned to the Xerox Corporation, and Merck & Co. ( and IBM ( were also assigned such a large area. The only German company that has been assigned a / 8 area is debis AG ( Today the IANA allocates blocks to regional registration offices.

RIR - Regional Internet Registry

Areas of responsibility of the five RIRs

Since February 2005 there are five regional registration offices called Regional Internet Registries (RIR):

The RIPE NCC is responsible for Germany , Liechtenstein , Austria and Switzerland , among others .

The Regional Internet Registries assign the networks assigned to them by the IANA to local registration offices .

LIR - Local Internet Registry

The local registration offices, known as Local Internet Registries (LIR), pass on the addresses assigned to them by the RIRs to their customers. Internet service providers usually perform the task of the LIR . LIR customers can either be end customers or other (sub) providers.

The addresses can either be permanently assigned to the customer ( static IP address, fixed IP address ) or dynamically assigned when the Internet connection is established ( dynamic IP address, dynamic IP address ). Permanently assigned addresses are mainly used for leased lines or when servers are to be operated on the IP address.

Which end customer or which Local Internet Registry has been assigned an IP address or a network can be determined using the RIR's Whois databases.

Private networks

In private, local networks ( LAN ) even IP addresses can be assigned. For this purpose, IPv4 addresses from the private networks named in RFC 1918 should be used (for example ). These addresses are not assigned by the IANA and are not routed on the Internet. In order to still enable an Internet connection, the LAN-internal addresses are translated into public IPv4 addresses valid in the Internet using Network Address Translation in a router . In the case of packets that are sent to the public address, the public address is translated back into the private addresses. In addition, NAT enables all computers in the local network to appear externally under the same (ie only one) IPv4 address that is valid in the Internet, which "saves addresses". A communication between a local computer with a private address and the server in the Internet is then assigned via the port number .,, …

Network classes

Originally, IPv4 addresses were divided into network classes from A to C with different network masks. Classes D and E were intended for special tasks. Due to the increasingly large routing tables, the classless routing CIDR ( Classless Interdomain Routing ) was introduced in 1993. It no longer matters which network class an IPv4 address belongs to.

Device configuration

Manual configuration

There are configuration programs for administrators. On Linux this is ip, on Windows netsh, and other Unix-like operating systems ifconfig. To display can be selbige; the term Windows also ipconfigor winipcfgare (depending on the version) are available.

Example: Display of the current configuration

  • Linux: ip addr; ip route show table all
  • Windows: netsh dump

Example: The network interface eth0 / LAN connection 1 is assigned the IPv6 address 2a01: db8 :: 123 in a / 64 subnet.

  • Linux: ip addr add 2001:db8::123/64 dev eth0
  • Windows: netsh interface ipv6 add address interface="LAN-Verbindung 1" address=2001:db8::123

Example: Assignment of the IPv4 address

  • Linux: ip addr add brd + dev eth0
  • Unix (FreeBSD, Mac OS X): ifconfig eth0
  • older ifconfig: ifconfig eth0 netmask broadcast

The specification of the parts “broadcast” or “brd +” are optional. ("Brd +" stands for the automatic calculation of the broadcast address; a specific address can also be specified. Ifconfig calculates the broadcast address automatically in newer versions).

Automatic configuration

Using protocols such as BOOTP or DHCP , IP addresses can be assigned by an appropriate server when the computer is started up. For this purpose, the administrator defines a range of IP addresses on the server, from which other computers can obtain an address when they start up. This address is leased to the computer . Computers that require fixed addresses can be identified in the Ethernet network by their MAC address and given a permanent address.

The advantage here is the central administration of the addresses. If automatic configuration is planned after the installation of the operating system , no further settings need to be made for network access. Mobile devices such as laptops can share addresses if not all devices are connected to the network at the same time. In addition, they can be integrated into various networks (e.g. company, customer network, home network) without changing the configuration.

For IPv6 there is also the option of auto configuration , which works without a server.

Dynamic addressing

If a host is assigned a new IP address each time it is connected to a network, this is called dynamic or alternating addressing . In the LAN range dynamic addressing via is DHCP spread, the Internet access area is dynamic addressing mainly by Internet service providers (ISPs) used the Internet access via dial-up offer. You use dynamic addressing via PPP or PPPoE .

The advantage of dynamic addressing is that, on average, significantly less than one IP address is required per customer, since all customers are never online at the same time. A ratio between 1:10 and 1:20 is common. The RIPE NCC requires its LIRs to provide proof of the use of the IP addresses assigned to them. Fixed assignment of addresses is only accepted in justified cases, for example for the operation of servers or for billing purposes.

If the customer has a DSL connection, the providers usually also use dynamically assigned IPs.

Static addressing

Static addressing is generally used wherever dynamic addressing is technically not possible or makes no sense. In LANs, for example, gateways , servers or network printers usually have fixed IP addresses. In the Internet access area, static addressing is mainly used for routers on leased lines . Static addressing is also increasingly being used for machine-to-machine communication, particularly in the mobile radio sector ( GPRS ). Static addresses are usually configured manually, but can also be assigned via automatic addressing (see above).

Multiple addresses on one network card

Usually, exactly one IPv4 address is assigned to each network interface (for example network card ) of a host . In some cases (see below), however, it is necessary to assign several IPv4 addresses to an interface. This is also known as IP aliasing . Several IPv4 addresses on a network card are used, among other things, to operate several identical services there in parallel, to make a host accessible from different subnets or to logically separate a service from the host so that it - with its IPv4 address and transparently for the clients - can be moved to another hardware.

Example (FreeBSD)

The network interface fxp0 receives the IPv4 address with a / 26 subnet as an alias
ifconfig fxp0 alias netmask

Example (Linux)

On Linux just use the same command as under manual configuration to add more addresses.
ip addr add dev eth0

With IPv6, the binding of several addresses to a network interface is the rule, for example, to operate a link-local address next to a global address and dynamically assigned prefixes next to fixed ones, or to have IPv6 addresses of several Internet providers available on the same host. In addition, the above reasons apply as for IPv4.

Different networks on one physical network

Different networks (with different network address parts) can be set up and used simultaneously on a physical network (for example, Ethernet network). This is used, among other things, if the network is to be split up later or if separate networks are to be combined earlier.

Storage of IP addresses

The German Federal Constitutional Court ruled on March 2, 2010 that the storage of IPs in Germany was unconstitutional in its previous implementation, since the law on the indiscriminate storage of extensive data of all users of electronic communication services does not provide for any concrete measures for data security. The court also rated the barriers to retrieving this data as too low. The ruling obliged German telecommunications providers to delete collected data immediately. The retention of data is only permissible under stricter security and transparency precautions as well as limited retrieval options for security authorities.

A request for information from the public prosecutor's office must be complied with in investigations into serious criminal offenses. The storage of IP addresses for other purposes (for example when visiting a website, for example in a log file ) is not legally clarified.

In March 2007, the district court Mitte (Berlin) declared IP addresses to be personal data within the meaning of Section 3 BDSG . Thus, their storage is inadmissible. The Munich District Court ruled at the end of September 2008 that IP addresses should not be considered personal data. Thus, their storage is generally permissible. However, the court tied this to requirements: The permissibility of storage depends on the possibilities of the person who stores the data. If he can identify a person using the IP address (for example with a personalized user account ), then automatic storage is not permitted or only permitted if the user has given his express permission beforehand.

Both judgments were made for IPv4 addresses. Due to the larger address range, IPv6 addresses may have to be legally classified differently.

In addition, there is the question of the evidential value of an IP address due to possible operating errors or route hijacking. When in 2010 IP addresses from 37,000 networks (not users) were routed to China due to setting errors in the Border Gateway Protocol (BGP) , the question arose as to what evidential value IP addresses could have for the prosecution of criminal offenses. Secret services also added BGP kidnappings to their tool arsenal. In principle, all providers would have to store the routing tables of their customers with their regional Internet registrar (in Europe RIPE) and reject any wrong route. Wrong routes would then be limited to subnets that are already insecure. According to a decision of the European Court of Justice , affiliate liability is not based solely on IP addresses. Further information is required from the Internet access provider. German courts judge the evidential value of this information differently, since only the subscriber can be determined, but not which person was active at the time in question. In order to prevent route hijacking, there are suggestions for storing the routing tables and for introducing BGPsec, the Border Gateway Protocol Security Extension, developed in 2017. Certification via Resource Public Key Infrastructure (RPKI) was also introduced for the BGP. Not all Internet providers use this, as tests with IsBGPsafeyet.com show. In Germany, neither Telekom nor Vodafone support this security measure.

Recovery of additional information

With the help of an IP address, further information about its user can be assumed with a certain probability:

  • Geotargeting tries to infer the whereabouts (at least the state, region) ( location ).
  • Content from a non-dynamic IP address of a company or an authority can be assumed to come from there with a high degree of probability; Page views from there may come. by an employee.
  • Anyone who accesses the websites of a server with an IP address of a cellular network provider is very likely to be someone who surfs with a cell phone / smartphone.

See also


  • Marc Störing: Dangerous address memory - legal uncertainty when storing and forwarding IP data . In: c't , No. 25/2008, pp. 190-191 (online) .
  • Bernhard J. Hauser, Fachwissen Netzwerktechnik , 2nd edition, Europa-Lehrmittel -Verlag, Haan 2015, ISBN 978-3-8085-5402-9

Web links

Wiktionary: IP address  - explanations of meanings, word origins, synonyms, translations

Individual evidence

  1. postel.org
  2. to: Joseph Davies: Understanding IPv6 . Microsoft Press 2002, ISBN 0-7356-1245-5 , 2 ^ 128 addresses per 510 million square kilometers
  3. ARIN WhoIs
  4. ↑ Urgent application in the matter of "data retention" partially successful
    "serious criminal offenses": in the sense of § 100a Abs. 2 StPO.
  5. ^ AG Berlin-Mitte, judgment of March 27, 2007, Az. 5 C 314/06.
  6. ^ AG Munich, judgment of September 30, 2008, Az. 133 C 5677/08.
  7. Institute for IT Law Data Protection on the Internet: Current discussion on the question of whether IP addresses are personal data within the meaning of the BDSG.
  8. 10 years ago: The evidential value of an IP address iX 6/2020 p. 33