Category Archives: TCP-IP

TCP-IP is a description of network protocols developed by Vinton Cerf and Robert E. Kahn, commissioned by DARPA, in the 1970s

TCP-IP

TCP-IP

TCP-IP is a description of network protocols developed by Vinton Cerf and Robert E. Kahn, in the 1970s

It was implemented in the ARPANET network, the first wide area network (WAN), developed on behalf of DARPA, an agency of the United States Department of Defense, and predecessor of the Internet

Sometimes referred to as model DoD or model DARPA

IP addressing

All the computers connected to a network must be identified by a unique address

Ethernet compatible computers have a unique MAC address that is 48 bits (6 bytes) long

Each manufacturer of Ethernet equipment is assigned a segment of addresses, and it is their responsibility to assign a different address to each equipment

MAC addresses are represented in hexadecimal in the following format: XX : XX : XX : XX : XX : XX, which is made up of values ​​in the range 0-FF

Valid MAC example: 00:14:83:B2:19:45

In IP networks, the unique identification is done through the IP address

Currently it is done using the protocol IPv4 that sets the address using 32 bits (4 bytes)

The protocol will be implemented in the near future IPv6 which sets the address using 128 bits (16 bytes)

Subnet Mask

A subnet is a network in a multi-network environment that uses IP addresses derived from a single network identifier. Subnets divide a large network into multiple physical networks connected to routers. A subnet mask removes part of an IP address so that TCP/IP can distinguish the network ID from the host ID. When TCP/IP is attempted to communicate, the subnet mask determines whether the target host belongs to a local network or a remote network. Computers must have the same subnet mask to communicate within a local network

Class IP
A 255.0.0.0
B 255.255.0.0
C 255.255.255.0
D 255.255.255.255

Default Gateway

It is the intermediate device of a local network that stores network identifiers for other enterprise or Internet networks. An IP address is configured for the default gateway so that it can communicate with a host on another network. TCP/IP sends packets for remote networks to the default gateway (if no other route is configured), which forwards packets to other gateways until the packet is delivered to a gateway connected to the specified destination

DNS (Domain Name System)

The idea is simple, associate names with IP addresses and provide a translation system that will be carried out by DNS servers. Obviously DNS servers are always referenced by their IP address

Domain names have a name part and a domain identifier part. The identifiers established are:

Id Description
.arpa Identification ARPANET to Internet
.com Trading company
.edu Educational institution
.gov Government agency
.mil Military
.net Related to the Internet or its providers
.org Another organism that is not included in the previous

This definition was created exclusively for the US, when with the expansion of the Internet, new identifiers with two letters were created to indicate a country. For example .es for Spain, .fr for France, .uk for United Kingdom, etc

An extension is foreseen with identifiers such as .info for information, .nom for nominal people

The use of a name is requested from the NIC (Network Information Center), if the name is approved it is added to the Internet database

URL (Uniform Resource Locator)

One of the objectives of the WWW was to have a system to locate and easily access any element (documents, program files, etc.), through the browser and in a simple and independent way of the protocol used

With this objective, the Uniform Resource locator was developed. A URL is a complete description of an element indicating the access protocol, the machine where it is located, the path to follow and the element's identifier

The general format of a URL is:

service://machine.domain:port/path/file?parameters

The service is one of those offered by the Internet: http, https (HyperText Transfer Protocol Secure) for secure http connections, ftp, ghoper, wais, news, telnet, mailto for sending mail and file to obtain a local file from the local disk , follows from ://

The machine.domino indicates the server that offers us the resource, for example for the University of La Rioja, the web server is www.unirioja.es and the mail server via the Web is Correo.unirioja.es

The port is optional and normally it is not necessary to indicate it if we use the one normally assigned to the service. For the Web mail server of the University of La Rioja, port 8000 is used and it must be indicated

The path is the directory path to follow to find the desired file. To separate subdirectories we will use the UNIX / slash, it is used by convention because it is the system of most servers. It is important to remember that on UNIX type machines there is a difference between upper and lower case both in the name of the directories and in the name of the files

The extension of the files is important because it tells the browser how to treat them. txt plain text file; htm or html HTML document; gif, jpg or jpeg image format, etc

In http if we do not indicate a file, in some servers they assume by default index.htm or the file that will be assigned by default

The parameters are used to pass to certain files (htm, php, ...) variable values

The format is:

variable=valor&variable=valor&variable=…

DHCP (Dynamic Host Configuration Protocol)

Protocol for Dynamic Computer Configuration. Allows you to automate the configuration of the IP address, the gateway, optional values, the address of the DNS servers, the address of the WINS servers

Users do not need to acquire IP addressing information from an administrator to configure TCP/IP. DHCP service provides all necessary configuration information on the network to DHCP clients

Valid IP addressing information ensures proper configuration, eliminating many difficult to-trace problems

Having servers running the DHCP service on each subnet eliminates the overhead associated with having to manually reconfigure IP addresses, subnet masks, and default gateways when moving computers from one subnet to another. Note that a single DHCP server can support IP address assignment for multiple networks

WINS (Windows Internet Name Service)

The WINS name resolution process allows WINS clients to register their name and IP address on WINS servers. WINS clients can query WINS servers to locate and communicate with other resources on the network

A WINS client automatically updates the WINS database whenever its IP addressing information changes, for example, when dynamic addressing through the DHCP service results in a new IP address for a computer that was moved from a subnet to other

The following steps outline the WINS name resolution process:

  1. Each time a WINS client starts, it registers its NetBIOS name/IP address correspondence with a designated WINS server. Then query the WINS server for computer name resolution
  2. When a WINS client initiates a NetBIOS command to communicate with another resource on the network, it sends a name query request directly to the WINS service instead of broadcasting the request on the local network
  3. The WINS server finds in its database for a matching NetBIOS name/IP address for the destination resource, and returns the IP address to the WINS client

IPv4

IPv4

IPv4 (Internet Protocol version 4) is the fourth version of IP (Internet Protocol), a protocol for interconnection of Internet based networks, and which was the first version implemented in 1983 for the production of ARPANET

Defined in the RFC 791, IPv4 uses 32 bit addresses, limited to 2^{32}= 4294967296 unique addresses, many of them LAN

Where the decimal value of each of the bytes follows the following format: XXX . XXX. XXX. XXX, which is composed of values in the range 0-254

Valid address example: 192.168.0.1

Every IPv4 address has two parts:

  • Network id
    Identifies all hosts on a same physical network
  • Host id
    Identifies a host within a network

In the example, the network ID is 192.168.0 and the host ID is 1

Due to the enormous growth in electronic security and automation, combined with the fact that addresses are being wasted, it was observed several years ago that IPv4 addresses were in short supply

This limitation helped stimulate the study of the implementation of the new protocol IPv6, which in 2016 was already in the first phase of testing, and which will end up replacing the IPv4 protocol

The addresses available in the IANA global reserve belonging to the IPv4 protocol were officially exhausted on Monday, January 31 of 2011

The Regional Internet Registries, from that moment, had to allocate their own reservations, which were estimated to last until the year 2020 and not for much longer

To this day, they continue to be used and the migration to the IPv6

Reserved addresses

  • 0.0.0.0 is used exclusively for the Internet, because it represents any network
  • 127.0.0.0

    is reserved for testing, loopback

    The Routers or local machines can use this address to send packets back to themselves

    Therefore, it cannot be assigned to any network

  • Addresses between 169.254.0.0 and 169.254.255.255

    are addresses assigned by the Internet Assigned Numbers Authority (IANA) for automatic private IP addressing

    This ensures no conflicts with addresses routable

Classes

IPv4 classes
Type
A \frac{\color{Green}\text{0XXXXXXX}}{\color{Green}net} \frac{\color{Blue}\text{XXXXXXXX XXXXXXXX XXXXXXXX}}{\color{Blue}host}
B \frac{\color{Green}\text{10XXXXXX XXXXXXXX}}{\color{Green}net} \frac{\color{Blue}\text{XXXXXXXX XXXXXXXX}}{\color{Blue}host}
C \frac{\color{Green}\text{110XXXXX XXXXXXXX XXXXXXXX}}{\color{Green}net} \frac{\color{Blue}\text{XXXXXXXX}}{\color{Blue}host}
D \frac{\color{Green}\text{1110XXXX XXXXXXXX XXXXXXXX XXXXXXXX}}{\color{Green}net} \frac{}{\color{Blue}host}
E \frac{\color{Green}\text{11110XXX XXXXXXXX XXXXXXXX XXXXXXXX}}{\color{Green}net} \frac{}{\color{Blue}host}

A Class

They are used in networks of extremely large size

Its range goes from 1-126 in its first value

The rest are made up of values ​​in the range 0-254

The first bit is a 0, then 7 bits are used to identify the network and 24 to identify the host

The smallest number that can be represented is 00000000, which is the decimal 0

The highest value that can be represented is 01111111, which is the decimal 127

The numbers 0 and 127 are reserved and cannot be used as network addresses

In principle there are 2^7 = 128 class A networks and 2^{24} = 16777216 hosts for those networks

Example of a valid A class address: 80.78.32.254

B Class

They are used in networks of moderate to large size

Its range goes from 128-191 in its first value

The rest are made up of values ​​in the range 0-254

The first two bits are 10, then 14 bits are used to identify the network and 16 to identify the host

The smallest number that can be represented is 10000000, which is the decimal 128

The highest number that can be represented is 10111111, which is the decimal 191

In principle there are 2^{14} = 16384 class B networks and 2^{16} = 65536 hosts for those networks

Example of a valid B class address: 130.254.10.99

C Class

They are used in networks of small size and that have a maximum of 254 hosts, generally local area networks

Its range goes from 192-223 in its first value

The rest are made up of values ​​in the range 0-254

The first three bits are 110, then 21 bits are used to identify the network and 8 to identify the host

The smallest number that can be represented is 11000000, which is the decimal 192

The highest number that can be represented is 11011111, which is the decimal 223

In principle there are 2^{21} = 2097152 of C class networks and 2^8 = 256 hosts for those networks

Example of a valid C class address: 192.168.240.5

D Class

They are used for multicast traffic, where the destination address directs the packets to predefined groups of IP addresses, it is usually used to transmit video, cable television or streaming

Its range goes from 224-239 in its first value

The rest are made up of values ​​in the range 0-254

The first four bits are 1110, then 28 bits are used to identify the network and 0 to identify the host

The smallest number that can be represented is 11100000, which is the decimal 224

The highest number that can be represented is 11101111, which is the decimal 239

In principle there are 2^{28} = 268435456 D class networks and 2^0 = 1 hosts for those networks

Example of a valid D class address: 230.20.230.106

E Class

Are used for broadcast traffic

The Internet Engineering Task Force (IETF) has reserved these addresses for its own investigation

Its range goes from 240-255 in its first value

The rest are made up of values ​​in the range 0-255

The first five bits are 11110, then 32 bits are used to identify the network and -8 to identify the host

The smallest number that can be represented is 11110000, which is the decimal 240

The highest number that can be represented is 11111111, which is the decimal 255

In principle there are 2^{32} = 4294967296 of networks of class E and 2^{-8} = 0,00390625 hosts for those networks

Example of a valid E class address: 254.10.0.15

IPv6

IPv6

IPv6 (Internet Protocol version 6) is the sixth version of IP (Internet Protocol), an Internet based network interconnection protocol, and was developed as an update to the protocol IPv4, designed to solve the problem of address exhaustion

Before IPv6, there was IPv5, which was called IPng (IP Next Generation), but it was not the successor of IPv4, as it was used as an experimental streaming oriented protocol that attempted to support voice, video, and audio

Defined in the RFC 2460, IPv6 uses 128 bit (16 byte) addresses, limited to 2^{128}\approx 3.4 \cdot 10^{38} unique addresses

It can also be represented as 16^{32}, with 32 hexadecimal digits, each of which can take 16 values

IPv6 addresses are defined in the RFC 2373 and RFC 2374, but was redefined in April 2003 in the RFC 3513

According to the publication RFC 5952, IPv6 addresses, 128 bits long

Where the hexadecimal value of each of the four digits follows the following format:
XXXX . XXXX . XXXX . XXXX . XXXX . XXXX . XXXX . XXXX, which is composed of values in the range 0000-FFFF

Valid address example: 2001:0db8:85a3:08d3:1319:8a2e:0370:7334

A group of four digits can be compressed if it is null (that is, it takes the value “0000”)

Valid address example: 2001:0db8:85a3:0000:1319:8a2e:0370:7344
Valid compressed address example: 2001:0db8:85a3::1319:8a2e:0370:7344

The addresses in the example are equivalent and for that reason, for efficiency reasons, it is recommended to use the compressed one

Following this rule, if more than two consecutive groups are null, they can also be compressed as “::”

Si la dirección tiene más de una serie de grupos nulos consecutivos la compresión solamente se permite en uno de ellos, para evitar la ambigüedad

Example of compression of a valid address with many consecutive nulls: 2001:0DB8:0000:0000:0000:0000:1428:57ab
Examples of valid compressed addresses:
2001:0DB8:0000:0000:0000::1428:57ab
2001:0DB8:0:0:0:0:1428:57ab
2001:0DB8:0::0:1428:57ab
2001:0DB8::1428:57ab

Leading zeros in a group can also be omitted

Valid address example: 2001:0DB8:02de::0e13
Valid compressed address example: 2001:DB8:2de::e13

When what you want is to identify a range of addresses by means of the first bits, this number of bits goes after the slash character “/”

Examples of valid addresses in bit range:
2001:0DB8::1428:57AB/96 sería equivalente a 2001:0DB8::
2001:0DB8::874B:2B34/96 would be equivalent to 2001:0DB8:: and of course also to 2001:0DB8::1428:57AB/96

IPv4 addresses compatible with IPv6

The addresses IPv4 IPv6 compatible addresses constitute a special class of IPv6 address

The first 96 bits are zeros, while the last 32 bits represent an address IPv4

IPv6 conversion methods no longer use addresses IPv4 compatibles

This type of addresses is used when we have an addressing table IPv4 fixed and we need to store addresses those addresses as IPv6

It should be noted that the undefined IPv6 address :: and the loopback IPv6 address ::1 are not really addresses IPv4 compatible, despite being included in the IPv6 address space ::/96

You can use a compatible IPv4 address (uses the format ::1.2.3.4) or a mapped IPv4 address (uses the format ::ffff:1.2.3.4)

Example of IPv4 to convert:
192.168.89.9
Example of compatible IPv4:
::c0a8:5909
Example of mapped IPv4:
::ffff:c0a8:5909

Reserved addresses

  • ::/128

    address with all zeros is used to indicate the absence of an address, it is used exclusively for the Internet, because it represents any network

  • ::1/128

    is reserved for testing, loopback

    The Routers or local machines can use this address to send packets back to themselves

    Therefore, it cannot be assigned to any network

  • ::1.2.3.4/96

    compatible IPv4 address is used as a transition mechanism in dual IPv4/IPv6 networks

    It is used very little

  • ::ffff:0:0/96

    mapped IPv4 address is used as transition mechanism on dual terminals

  • fe80::/10

    link local prefix specifies that the address is only valid on the local physical link

  • fec0::

    site-local prefix specifies that the address is only valid within a local network

    The RFC 3879 declared it obsolete, stating that future systems should not implement any support for this special address type

    Instead they should be replaced by Local IPv6 Unicast addresses

  • fc00::/7

    unique local address prefix

    Declared in the RFC 4193

    Used in place of site-local addresses

  • ff00::/8

    multicast prefix

    It is used for multicast addresses

It should be noted that there are no broadcast addresses in IPv6, although the functionality they provide can be emulated using the multicast address FF01::1/128, called "all nodes".

Transition mechanisms to IPv6

Faced with exhaustion of addresses IPv4, and the problems that this is already causing, especially in emerging Asian countries such as India or China, the change to IPv6 has already begun

There are a series of mechanisms that will allow coexistence and progressive migration of both networks and user equipment

In general, transition mechanisms can be classified into three groups:

Double stack

Dual stack refers to a “dual-stack IP level solution” (RFC 4213), which implements the stacks of both protocols, IPv4 and IPv6, in each node of the network

Each dual stack node on the network will have two network addresses, one IPv4 and one IPv6

In favor: easy to deploy and widely supported

In against: the network topology requires two routing tables and two routing processes

Each node in the network needs to have both stacks up to date

Tunnels

Tunnels allow you to connect to IPv6 networks by "jumping" over IPv4 networks

These tunnels work by encapsulating IPv6 packets into IPv4 packets, having protocol number 41 as the next IP layer, hence the name proto-41

In this way, IPv6 packets can be sent over an IPv4 infrastructure

There are many tunnel technologies available

The main difference is in the method that the encapsulating nodes use to determine the address at the exit of the tunnel

Translation

The translation is necessary when a node that only supports IPv4 tries to communicate with a node that only supports IPv6

The translation mechanisms can be divided into two groups based on whether the state information is saved or not: