IP adress

ImprimirCitar

The IP address is a numeric label that identifies, in a logical and hierarchical way, a network interface (communication/connection element) of a device (computer, laptop, smartphone). that uses the Internet Protocol (Internet Protocol) or that corresponds to the network layer of the TCP/IP model.

An IP address has two main functions: identifying the network interface and addressing to your location.

The IP address should not be confused with the MAC address, which is a 48-bit identifier expressed in hexadecimal code, to uniquely identify the network card and does not depend on the connection protocol used in the network.

The IP address can change often due to changes in the network, or because the device in charge of assigning IP addresses within the network decides to assign another IP (for example, with the DHCP protocol). This form of IP address assignment is also called a dynamic IP address (usually abbreviated as Dynamic IP).Internet sites that by their nature need to be permanently connected, generally have a need for a fixed IP address (commonly fixed IP or static IP). This does not change over time. Mail servers, DNS, public FTP and web page servers must necessarily have a fixed or static IP address, since in this way their location on the network is allowed.

Devices connect to each other using their respective IP addresses. However, it is easier for people to remember a domain name than the numbers of the IP address. DNS domain name servers "translate" the domain name into an IP address. If the dynamic IP address changes, it is enough to update the information on the DNS server. Other people will continue to access the device by the domain name.

IP addresses

IPV4 addresses are expressed as a 32-bit binary number allowing an address space of up to 4,294,967,296 (232) possible addresses.

IP addresses can be expressed as numbers in decimal notation: the 32 bits of the address are divided into four octets. The decimal value of each octet is in the range 0 to 255 [the highest 8-bit binary number is 11111111 and those bits, from right to left, have decimal values of 1, 2, 4, 8, 16, 32, 64 and 128, which adds up to 255].

In the expression of IPv4 addresses in decimal, each octet is separated by a single character ".". Each of these octets can be between 0 and 255.

  • Example of IPv4 address representation: 10.128.1.253, 192.168.255.254/18

In the early stages of the development of the Internet Protocol, Internet administrators interpreted IP addresses in two parts, the first 8 bits to designate the network address and the rest to individualize the computer within the network. This method soon proved inadequate as new networks began to be added to those already assigned. In 1981 Internet addressing was revised and class architecture was introduced. (classful network architecture). In this architecture there are three classes of IP addresses that an organization can receive from the Internet Corporation for Assigned Names and Numbers (ICANN): class A, class B, and class C.

  • In a class A network, the first octeto is assigned to identify the network, reserving the last three octetos (24 bits) to be assigned to the hosts, so the maximum amount hosts It's 224 - 2 (excluding the reserved address for broadcast (last octetos to 1) and network (last octetos to 0)), i.e. 16 777 214 hosts.
  • In a Class B network, the first two octets are assigned to identify the network, reserve the two final octets (16 bits) to be assigned to the hosts, so the maximum amount hosts for each network is 216 - 2, or 65 534 hosts.
  • In a C-class network, the first three octets are assigned to identify the network, reserving the final octeto (8 bits) to be assigned to the hosts, so the maximum number of hosts per network is 28 - 2, or 254. hosts.
ClassInitialIntervalo (*)No. of networksNo. of addresses by networkNo. of hosts per network()Network maskDirectorate of broadcast
A00.0.0.0 (**) - 127.255.255.255)12816 777 21616 777 214255.0.0.0x.255.255.255
B10128.0.0.0 - 191.255.255.25516 38265 53665 534255.255.0.0x.x.255.255
C110192.0.0.0 - 223.255.255.2552 097 150256254255.255.255.0x.x.x.255
D (Multicast)1110224.0.0.0 - 239.255.255.255
E (experimental)1111240.0.0.0 - 255.255.255.254
  • (*) The address that has the host bits equal to 0 serves to define the network in which it is located. It is called network address. The address that has the corresponding bits host equal to 1, it serves to send packages to all hosts of the network in which it is located. It is called address broadcast.
  • (**) The address 0.0.0.0 is reserved by the IANA for local identification.
  • () The addresses 127.x.x.x are reserved to designate the machine itself. It is called address of local loop or loopback.
  • () The first address is reserved to identify the network (e.g. 18.0.0.0), while the last address is used as a broadcasting address or broadcast (e.g. 18.255.255.255). That is why the maximum number hosts in a network is always equal to the number of addresses available in a specific range minus two.

The design of class networks (classful) served during the expansion of the Internet, however this design was not scalable and faced with a great expansion of networks in the nineties, the The class address space system was superseded by a classless Classless Inter-Domain Routing (CIDR) network architecture in 1993. CIDR is based on variable-length subnet masking VLSM networks., allowing networks of arbitrary prefix length to be assigned. Thus allowing a finer and more granular distribution of addresses, calculating the necessary addresses and "wasting" the minimum possible.

Private addresses

There are certain addresses in each IP address class that are unassigned and are called private addresses. Private addresses can be used by hosts that use Network Address Translation (NAT) to connect to a public network or by hosts that do not connect to the Internet. Three non-overlapping ranges of IPv4 addresses are reserved for private networks. Two identical addresses cannot exist in the same network, but they can be repeated in two private networks that do not have a direct connection to each other or that are connected through a third party to do NAT. The private addresses are:

Of the approximately four billion addresses defined in IPv4, about 18 million addresses in three ranges are reserved for use in private networks. Package addresses in these ranges are not rotten on the public Internet; they are ignored by all public routers. Therefore, private hosts cannot communicate directly with public networks and require the translation of network addresses into a routing link door for this purpose.

IPv4 network ranges reserved for private networks
Name Block CIDR Address range Number of addresses Class
24-bit block 10.0.0.0/8 10.0.0.0 - 10.255.255.255 16 777 216Class A.
20-bit block 172.16.0.0/12 172.16.0.0 - 172.31.255.255 1 048 576Rango contiguo de 16 blocks class B.
16-bit block 192.168.0.0/16 192.168.0.0 - 192.168.255.255 65 536Contiguous range of 256 class C blocks.
Since two private networks, for example, two branches, cannot interoperate directly through the public Internet, the two networks must be connected via the Internet through a virtual private network or an IP tunnel, which encapsulates the packages, including their headers that contain the private addresses, in a protocol layer during transmission through the public network. In addition, encapsulate packages can be encrypted so that transmission through public networks secures data.

Netmask

The network mask allows distinguishing within the IP address, the bits that identify the network and the bits that identify the host. In an IP version 4 address, of the 32 bits that are in total, they are defined by default for a class A address, that the first eight (8) bits are for the network and the remaining 24 for host, in a class B address, the first 16 bits are the network part and the host part is the next 16, and for a class C address, the first 24 bits are the network part and the remaining eight (8) are the host part. For example, from the class A address 10.2.1.2 we know that it belongs to the 10.0.0.0 network and the host to which it refers is 2.1.2 within it.

The mask is formed by setting the bits that identify the network to 1 and the bits that identify the host to 0. In this way, a class A address will have a default mask of 255.0. 0.0, one of class B 255.255.0.0 and one of class C 255.255.255.0: Network devices perform an AND between the IP address and the netmask to obtain the network address to which the host identified by the given IP address belongs. For example:

IP address: 196.5.4.44

Netmask (default): 255.255.255.0

AND (in binary):

11000100.00000101.00000100.00101100 (196.5.4.44) IP address

11111111.11111111.11111111.00000000 (255.255.255.0) Netmask

11000100.00000101.00000100.00000000 (196.5.4.0) AND result

This information is required by a router since it needs to know which network the IP address of the destination datagram belongs to in order to consult the routing table and be able to send the datagram through the interface output. The mask can also be represented as follows 10.2.1.2/8 where the /8 indicates that the 8 most significant bits of the mask are intended for networks or number of bits in 1, that is, /8 = 255.0.0.0. Similarly (/16 = 255.255.0.0) and (/24 = 255.255.255.0).

Default netmasks refer to those that do not contain subnets, but when subnets are created, the default masks change, depending on how many bits it takes to create the subnets.

Creating Subnets

The address space of a network can be further subdivided by creating separate autonomous subnets. An example of use is when we need to group all the employees belonging to a department of a company. In this case we would create a subnet that encompasses their IP addresses. To achieve this, one must reserve bits of the host field to identify the subnet by setting the network-subnet bits in the mask to one. For example, the address 173.17.1.1 with a mask of 255.255.255.0 tells us that the first two octets identify the network (because it is a class B address), the third octet identifies the subnet (with 1 bits in the mask) and the fourth identifies the host (to 0 the corresponding bits within the mask). There are two addresses for each subnet that are reserved: the one that identifies the subnet (host field set to 0) and the address to perform broadcast in the subnet (all bits of the host field > in 1).

Networks can be broken down into smaller networks to better utilize the IP addresses available to hosts, as these are sometimes wasted when subnetting with a single subnet mask.

Subnetting allows the network administrator to contain broadcasts that are generated within a LAN, resulting in better bandwidth performance.

To begin subnetting, you begin by “borrowing” bits from the host part of a given address, depending on the number of subnets you want to create, as well as the number of hosts needed in each subnet.

Dynamic IP

A dynamic IP address is an IP assigned to the user by a DHCP (Dynamic Host Configuration Protocol) server. The IP obtained has a certain maximum duration. The DHCP server provides specific configuration parameters for each client that wishes to participate in the IP network. Among these parameters is the client's IP address.

DHCP appeared as a standard protocol in October 1993. The RFC 2131 standard specifies the latest definition of DHCP (March 1997). DHCP replaces the older BOOTP protocol. Due to DHCP backwards compatibility, very few networks continue to use pure BOOTP.

Dynamic IPs are currently offered by most operators. The DHCP service server can be configured to renew the assigned addresses every certain time.

Advantages

  • Reduces operating costs to Internet service providers (ISP).
  • Reduces the amount of IP assigned (fixed) inactive.
  • The user can restart modem or router to be assigned another IP and thus avoid the restrictions that many websites put on their free download or multimedia viewing services online.

Disadvantages

  • Force to depend on services that redirect a host to an IP.

IP address assignment

Depending on the particular implementation, the DHCP server has three methods of assigning IP addresses:

  • manuallywhen the server has at your disposal a table that pairs MAC addresses with IP addresses, manually created by the network administrator. Only customers with a valid MAC address will receive an IP address from the server.
  • automatically, where the DHCP server assigns for a preset time already by the administrator a free IP address, taken from a preset interval also by the administrator, to any client requesting one.
  • dynamically, the only method that allows reuse of IP addresses. The network administrator assigns an IP address interval for the DHCP and each LAN client computer has its TCP/IP communication software configured to request an IP address from the DHCP server when your network interface card starts. The process is transparent for the user and has a limited period of validity.

Static IP

A fixed IP address or static IP is an IP address assigned by the user manually, or by a network server, based on the MAC address of the client. Many people associate fixed IP with public IP and dynamic IP with private IP.

An IP can be either dynamic or fixed private as it can be dynamic or fixed public IP.

A public IP is generally used to set up servers on the internet and you necessarily want the IP to stay the same. That is why the public IP is usually configured in a fixed and non-dynamic way.

In the case of the private IP, it is generally dynamic and assigned by a DHCP server, but in some cases a fixed private IP is configured to be able to control access to the Internet or to the local network, granting certain privileges depending on the number of IP we have. If this were to change (if it was assigned dynamically) it would be more difficult to control these privileges (but not impossible).

IPv6 addresses

The function of the IPv6 address is exactly the same as its predecessor IPv4, but within the IPv6 protocol. It is made up of 128 bits and is expressed in a 32-digit hexadecimal notation. IPv6 currently allows each person on Earth to be assigned several million IPs, as it can be implemented with 2128 (3.4×1038 addressable hosts). The advantage over the IPv4 address is obvious in terms of its addressability.

Its representation is usually hexadecimal and the symbol ":" is used to separate each pair of octets. A block spans from 0000 to FFFF. Some notation rules about the representation of IPv6 addresses are:

  • The initial zeros can be ignored.

Example: 2001:0123:0004:00ab:0cde:3403:0001:0063 -> 2001:123:4:ab:cde:3403:1:63

  • Contiguous zero blocks can be compressed using "::". This operation can only be done One time.

Example: 2001:0:0:0:0:0:0:4 -> 2001::4. 2001:0:0:0::2:1

Invalid example: 2001::2001::2:0:0:1 or 2001::0:0:2::1.

Google and Wikipedia

When you perform a search on Google, the IP address of the device you are searching with (PC, laptop, tablet, smartphone, etc.) is recorded, so Google knows where to send the response.

When a change is made to Wikipedia, the IP address is recorded in the article history.

Obtaining the IP address

Depending on the operating system you are on, you can easily tell what your IP address is:

Microsoft Windows

In Windows, you can find out the IP of the computer on each network interface with the following command:

C:Windowssystem32ipconfig

Which will report the IP address, the netmask used, and the gateway address of each connected network interface.

If you only want to get a specific look, type the following command

C:Windowssystem32ipconfig | find "(Skin name, no parentheses)"

GNU/Linux and UNIX-like subsystems

In GNU/Linux and other UNIX and UNIX-like subsystems, there are two commands:


IFCONFIG

Note: "ifconfig" may not be available in newer versions of some UNIX subsystems, it is being replaced by "ip"

user@host:~$ ifconfig [interface]

IP

user@host:~$ ip address show dev [interface]

Or also its abbreviated version:

user@host:~$ ip a show dev [interface]

Contenido relacionado

Lynx (browser)

Lynx is a text-mode web browser and gopher...

ReiserFS

ReiserFS is a general-purpose file system, designed and implemented by a team at Namesys, led by Hans...

Microphone

A microphone is an input device used to transform sound waves into electrical energy and vice versa into sound recording and reproduction processes; It...
Más resultados...
Tamaño del texto:
Copiar