What functions of the network architecture require the implementation of the protocol. Architecture of protocols in computer networks. emvos architecture (open system interconnection, osi). class addressing system

The TCP/IP protocol stack is the most widely used protocol stack today. The flexibility and capabilities of traffic routing allow it to be used in networks of various sizes. The TCP / IP protocol stack is a set of network protocols that regulate all aspects of the process of interaction between network devices.

Requirements-characteristics:

Fault tolerance. A network built using the protocol must retain its functionality even if part of the network loses its functionality.

Expandability. The protocol must allow for easy network expansion. Adding new segments to the network should not disrupt existing services.

Reliability. The protocol must include mechanisms that ensure reliable transmission of information within the network, regardless of the reliability of existing communications.

Inner simplicity. The protocol should have a simple structure in order to provide sufficient performance

Architecture: The TCP/IP stack conforms to the OSI (Open Systems Interconnection) reference model in terms of system architecture and allows applications and services running on virtually any platform, including Unix, Windows, Macintosh, and others, to communicate over a network.

Overview of the main stack protocols:

TCP: The Transmission Control Protocol (TCP) assumes all responsibility for delivering packets received from upper layer protocols in an unaltered state and in the appropriate sequence. Therefore, it is the responsibility of the transport layer protocol to break these packets into smaller TCP packets, which are then passed to the network layer protocol.

UDP: Within the structure of the TCP/IP protocol stack, there is another protocol that operates at the transport layer that is not connection-oriented. This is the User Datagram Protocol (UDP). The UDP protocol is quite fast because it does not include mechanisms that control the delivery of packets.

IP: Its main task is to route data packets. When receiving a packet from the upper layer protocols of the OSI model, the IP protocol decides on the delivery of these packets. The decision is made on the basis of special tables called routing tables. Based on this table, two decisions can be made, depending on which subnet the receiving computer is on.

ARP: At the link layer, addressing is based on so-called MAC addresses. The MAC address is a unique 48-bit identification code assigned to each network adapter. This code is written (or, as they say, "sewn") into a special ROM on the network adapter card and thereby permanently associated with this network adapter. Since data link layer addressing is performed by means of MAC addresses, a mechanism is needed to translate IP addresses to the corresponding MAC addresses. The Address Resolution Protocol (ARP) provides such a mechanism. Its main task is to establish a correspondence between an IP address and a MAC address.

ICMP: Internet Control Message Protocol (ICMP) is a mechanism by which hosts can exchange service information. The ICMP protocol supports two types of service messages: error messages and control messages.

IGMP: The transmission of multicast traffic is governed by the Internet Group Management Protocol (IGMP).

IPsec: The IPsec protocol provides protection for any packets transmitted by higher layer protocols.

Application layer: Through the Application layer of the TCP/IP model, applications and services access the network. Access to TCP / IP protocols is carried out through two program interfaces (API - Application Programming Interface):

  • - Windows sockets;
  • - NetBIOS.

The Windows Sockets Interface, or WinSock as it is called, is a network programming interface designed to facilitate interoperability between different TCP/IP applications and protocol families.

The NetBIOS interface is used for communication between processes (IPC - Interposes Communications) of Windows services and applications. NetBIOS performs three main functions: determining NetBIOS names; NetBIOS Datagram Service; NetBIOS session service.

Transport layer: The TCP/IP transport layer is responsible for establishing and maintaining a connection between two nodes. Main functions of the level:

  • - confirmation of receipt of information;
  • - data flow control;
  • - sequencing and relaying packets.

Depending on the type of service, two protocols can be used:

  • - TCP (Transmission Control Protocol - transmission control protocol);
  • - UDP (User Datagram Protocol - user datagram protocol).

TCP is typically used when an application needs to transfer a large amount of information and make sure that the data is received by the destination in a timely manner. Applications and services that send small amounts of data and do not require acknowledgment use UDP, which is a connectionless protocol.

Internet layer: The Internet layer is responsible for routing data within a network and between different networks. Routers operate at this level, which depend on the protocol used and are used to send packets from one network (or its segment) to another (or another network segment). The TCP/IP stack uses the IP protocol at this level.

Network Interface Layer: This layer of the TCP/IP model is responsible for distributing IP datagrams. It works with ARP to determine the information that should be placed in the header of each frame. A frame is then created at this level appropriate for the type of network being used, such as Ethernet, Token Ring, or ATM, then an IP datagram is placed in the frame's data region, and it is sent out onto the network.

Diagnostic utilities:

ipconfig /flushdns /registerdns /displaydns /showclassid /setclassid class_id]

/all -- as a result of executing the utility, complete information about the protocol configuration for all interfaces of the local computer is displayed. Including for network interfaces working with the Routing and Remote Access Service (RAS);

/release -- executing the utility with this key releases the allocated IP address. The key is applicable for use only on DHCP clients;

/renew -- using this switch instructs the system to refresh the configuration of the TCP/IP protocol stack. If you specify a network adapter name, only the protocol configuration for the selected adapter is updated. Otherwise, the protocol stack configuration for all network adapters is updated;

/displaydns -- as a result of executing the utility, information about the contents of the local cache of the DNS client used to resolve domain names will be displayed;

ping [-t] [-a] [-n count] [-1 size] [-f] [-i ttl] [-v tos] [-r count] [-S count] [[-] host-list ] | (-k host-list]] [-w timeout] [-R] [-S srcaddr] [-4] [-6] destination-host

  • -t -- use of this switch instructs the system to continuously send special ICMP packets to the remote computer until the user stops the execution of the utility;
  • -a -- using this key allows you to determine the domain name of a remote computer by its IP address. The usefulness of this key is often underestimated by users. Nevertheless, when working on a local network, situations often arise when it is necessary to find out the domain name of a computer by its IP address;
  • -n count -- unlike the previous switch, allows you to specify the number of ICMP packets that will be sent during the connection check. By default, the utility sends four packets;
  • -w timeout -- By default, the ping utility waits for one second for an acknowledgment from the remote host. At the end of this time, the utility concludes that the connection cannot be established with the host. This situation occurs especially often when remote computer connected via slow communication lines. Using this key allows you to increase the confirmation timeout to a certain value, set in milliseconds as the timeout parameter;

tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name

  • -d -- by default, the utility, providing information about routers passed by packets, indicates not only IP addresses, but also their domain names. Using this key instructs the utility not to convert IP addresses to domain names. This allows you to reduce the execution time of the utility;
  • -h maximum_hops -- using the utility with this key allows you to limit the allowed number of hops from one subnet to another during route tracking. The maximum_hops parameter specifies the maximum number of hops allowed;
  • -w timeout -- switch allows you to explicitly define the maximum timeout for a response from a remote router. In this case, the time is set by the timeout parameter in milliseconds;

target_name -- specifies the name of the remote host to be routed to.

netstat utility. Allows you to get statistical information on some of the protocols of the stack (TCP, UDP, IP and ICMP), and also provides information about current network connections.

nbtstat utility. The utility is used to obtain information related to the question of the functioning of NetBIOS over TCP/IP. Using this utility, you can get information about both local and remote computers.

IP address: According to the concept of TCP/IP, each host must have a specific IP address in order to operate on a network.

The IP address is a 32-bit binary number, which is divided into octets for ease of remembering - eight-bit groups

Rules for assigning an IP address:

  • 1. A computer cannot be assigned the first address on a given network (an address ending in the number 0). Such addresses are reserved to refer to the entire network.
  • 2. The computer cannot be assigned the last address on this network (address ending in 255). Such addresses are used for broadcasting (broadcasting) - addressing all computers on the network.
  • 3. Each octet is a number between 0 and 255.
  • 4. The IP address of each computer must be unique within the network. If you assign a new computer an address that already exists on the network, an address conflict will occur. Operating system will report the conflict by showing a warning window, and both computers will not be allowed to use the network until the situation is corrected.

Subnet address and host address: There are two components to any IP address: the subnet address and the host address on that subnet. At the development stage, the creators of the protocol divided all IP addresses into three categories, combining them into three classes of subnets - A, B and C.

Class A subnets are the most expensive, so only large corporations can afford them. All Class A address pools have already been allocated. Corporations such as IBM, Xerox, Apple and Hewlett-Packard act as their holders.

Address class B is less expensive, but it can only be afforded by wealthy corporations that are willing to shell out significant sums for a sufficient number of IP addresses. One of the most famous corporations that holds the class B address pool is Microsoft.

Subnetting: The subnet mask is one of the key terms in TCP/IP and is a 32-bit number that is used to extract a subnet address from an IP address.


Therefore, the subnet mask bits set to 1 denote the bits that are used in the IP address to determine the subnet address. The selection is carried out by the method of logical multiplication (AND operation) of the IP address and subnet mask.

ROOT address: 11000000 10101000 00000001 00000001

Subnet address: 11000000 10101000 00000001

STORE address: 11000000 10101000 00000001 00010101

Subnet mask: 11111111 11111111 11111111 00000000

STORE subnet address: 11000000 10101000 00000001

ROOT subnet address: 11000000 10101000 00000001

Internal IP addresses: For local networks, depending on their size, the IANA (Internet Assigned Numbers Authority), which is responsible for assigning IP addresses on the Internet, has allocated the following address ranges:

  • 10.0.0.0 -- 10.255.255.255
  • 172.16.0.0 -- 172.31.255.255
  • 192.168.0.0 -- 192.168.255.255

DHCP, DNS, WINS services

To organize and manage access to network resources of users and applications, an approach based on symbolic designations of nodes and resources is used. To determine the location of these nodes in the network, services are needed that provide translation of symbolic names into identifiers used at lower levels of internetworking protocols.

The Domain Name System (DNS) is a method of registering computer names and their IP addresses.

The Windows Internet Name Service (WINS) is used as a NetBIOS name-to-IP address resolution service in segmented networks.

Domain name servers are the tools of this system that ensure its functioning.

The Domain Name System (DNS) is a hierarchical distributed database containing mappings of DNS domain names to various types data such as IP addresses. DNS allows you to find computers and services by friendly names, as well as view other information from the database.

DNS Client - A client computer that queries DNS servers to resolve DNS domain names. DNS clients have a temporary cache of resolved DNS domain names.

DNS server - a server that contains information about a part of the DNS database, responds to DNS queries and resolves them.

DNS suffix is ​​a string of characters representing the domain name in DNS. The DNS suffix indicates the location of a node relative to the DNS root, indicating the node's position in the DNS hierarchy. Typically, the DNS suffix describes the last part of the DNS name, preceded by one or more of the first labels of the DNS name.

Domain name space:

In the case of grouping by organizational level, first-level domain names are formed by three characters:

Edu (educational institutions),

Com (commercial organizations),

Org (non-profit organizations),

Gov (government organizations),

Mil (military establishments), etc.

The expansion of the Internet beyond the United States has led to the need to take into account the nationality of organizations and institutions. In this regard, the system for constructing the DNS namespace has been modified. It was proposed to group domains according to their belonging to a certain state. For this, names consisting of two characters are used. For example:

Ru (Russia),

Ie (Ireland),

Au (Australia)

In addition, there is another first-level domain, which is used to group reverse domains (reverse domains). Reverse domains are used to look up the domain name of a host by its IP address. This special domain was named .arpa, and was the only first-level domain with a four-character name. The domain contains only a few second-level domains: .in-addr.arpa., ip6.arpa

A special organization, the Internet Corporation for Assigned Names and Numbers (ICANN), deals with the creation of first- and second-level domains.

DNS Service Architecture

This article will cover the basics of the TCP/IP model. For a better understanding, the main protocols and services are described. The main thing is not to rush and try to understand each thing in stages. All of them are interconnected and without understanding one, it will be difficult to understand the other. Very superficial information is arranged here, so this article can be safely called "TCP / IP protocol stack for dummies." However, many things here are not as difficult to understand as it might seem at first glance.

TCP/IP

The TCP / IP stack is a network model for transmitting data on a network; it determines the order in which devices interact. Data enters the data link layer and is processed in turn by each layer above. The stack is presented as an abstraction that explains the principles of processing and receiving data.

The TCP/IP network protocol stack has 4 layers:

  1. Channel (Link).
  2. Network (Internet).
  3. Transport (Transport).
  4. Applied (Application).

Application layer

The application layer allows interaction between the application and other layers of the protocol stack, parses and converts incoming information into a format suitable for software. It is closest to the user and interacts with him directly.

  • HTTP;
  • SMTP

Each protocol defines its own order and principles for working with data.

HTTP (HyperText Transfer Protocol) is designed for data transfer. It sends, for example, HTML documents that serve as the basis of a web page. Simplified, the scheme of work is presented as "client - server". The client sends a request, the server accepts it, properly processes it, and returns the final result.

Serves as a network file transfer standard. The client sends a request for a certain file, the server searches for this file in its database and, if it is successfully found, sends it as a response.

Used to send email. The SMTP operation includes three sequential steps:

  1. Determining the sender's address. This is necessary to return letters.
  2. Recipient definition. This step can be repeated a number of times when specifying multiple recipients.
  3. Determine the content of the message and send. Data about the message type is transmitted as service information. If the server confirms its readiness to accept the packet, then the transaction itself is committed.

Header

The header contains service data. It is important to understand that they are intended only for a specific level. This means that as soon as the packet is sent to the recipient, it will be processed there according to the same model, but in reverse order. The nested header will carry special information that can only be processed in certain ways.

For example, a header nested at the transport layer can only be processed by the transport layer on the other side. Others will simply ignore it.

transport layer

At the transport layer, the received information is processed as a single unit, regardless of the content. The received messages are divided into segments, a header is added to them, and all this is sent below.

Data transfer protocols:

The most widely used protocol. It is responsible for guaranteed data transfer. When sending packets, their checksum, the transaction process, is controlled. This means that the information will reach "safe and sound" regardless of the conditions.

UDP (User Datagram Protocol) is the second most popular protocol. It is also responsible for data transfer. Its distinguishing feature lies in its simplicity. The packets are simply sent without any special association.

TCP or UDP?

Each of these protocols has its own scope. It is logically determined by the features of the work.

The main advantage of UDP is its transmission speed. TCP is a complex protocol with many checks, while UDP seems to be more simplified and therefore faster.

The downside is simplicity. Due to the lack of checks, data integrity is not guaranteed. Thus, the information is simply sent, and all checks and similar manipulations remain with the application.

UDP is used, for example, to watch videos. For a video file, the loss of a small number of segments is not critical, while download speed is the most important factor.

However, if you need to send passwords or details bank card, then the need to use TCP is obvious. The loss of even the smallest piece of data can have catastrophic consequences. Speed ​​in this case is not as important as security.

network layer

The network layer forms packets from the received information and adds a header. The most important piece of data is the IP and MAC addresses of senders and recipients.

IP-address (Internet Protocol address) - logical address of the device. Contains information about the device's location on the network. Recording example: .

MAC-address (Media Access Control address) - the physical address of the device. Used for identification. Assigned to network equipment at the manufacturing stage. Represented as a six-byte number. For example: .

The network layer is responsible for:

  • Determination of delivery routes.
  • Transferring packets between networks.
  • Assignment of unique addresses.

Routers are network layer devices. They pave the way between the computer and the server based on the data received.

The most popular protocol of this layer is IP.

IP (Internet Protocol) is an Internet protocol designed for network addressing. It is used to build routes along which packets are exchanged. It does not have any means of checking and confirming the integrity. To provide delivery guarantees, TCP is used, which uses IP as the transport protocol. Understanding the principles of this transaction explains much of the basis of how the TCP/IP protocol stack works.

Types of IP addresses

Networks use two types of IP addresses:

  1. Public.
  2. Private.

Public (Public) are used on the Internet. The main rule is absolute uniqueness. An example of their use is routers, each of which has its own IP address for interacting with the Internet. Such an address is called a public address.

Private (Private) are not used on the Internet. In the global network, such addresses are not unique. An example is a local network. Each device is assigned a unique IP address within the network.

Interaction with the Internet is carried out through a router, which, as mentioned above, has its own public IP address. Thus, all computers connected to the router appear on the Internet on behalf of one public IP address.

IPv4

The most widely used version of the Internet Protocol. Predates IPv6. The record format is four eight-bit numbers separated by dots. The subnet mask is indicated through the fraction sign. The address length is 32 bits. In the vast majority of cases, when we talk about an IP address, we mean exactly IPv4.

Recording format: .

IPv6

This version is intended to solve problems with the previous version. The address length is 128 bits.

The main problem that IPv6 solves is the exhaustion of IPv4 addresses. The prerequisites began to appear already in the early 80s. Despite the fact that this problem entered an acute stage already in 2007-2009, the introduction of IPv6 is very slowly “gaining momentum”.

The main benefit of IPv6 is a faster internet connection. This is because this version of the protocol does not require address translation. Simple routing is in progress. This is less costly and, therefore, access to Internet resources is provided faster than in IPv4.

Recording example: .

There are three types of IPv6 addresses:

  1. Unicast.
  2. anycast.
  3. multicast.

Unicast is a type of unicast IPv6. When sent, the packet only reaches the interface located at the corresponding address.

Anycast refers to multicast IPv6 addresses. The sent packet will get to the nearest network interface. Used only by routers.

Multicast are multicast. This means that the sent packet will reach all the interfaces in the multicast group. Unlike broadcast, which is "broadcast to everyone", multicast broadcasts only to a specific group.

Subnet mask

The subnet mask reveals the subnet and host number from an IP address.

For example, an IP address has a mask. In this case, the record format will look like this. The number "24" is the number of bits in the mask. Eight bits equals one octet, which can also be called a byte.

In more detail, the subnet mask can be represented in binary notation as follows: . It has four octets, and the entry consists of "1" and "0". If we add the number of units, we get a total of "24". Fortunately, counting by one is not necessary, because in one octet there are 8 values. We see that three of them are filled with units, add up and get "24".

If we talk specifically about the subnet mask, then in binary representation it has either ones or zeros in one octet. In this case, the sequence is such that bytes with ones go first, and only then with zeros.

Let's consider a small example. There is an IP address and a subnet mask. We count and write: . Now we compare the mask with the IP address. Those mask octets in which all values ​​are equal to one (255) leave their corresponding octets in the IP address unchanged. If the value is zero (0), then the octets in the IP address also become zero. Thus, in the subnet address value we get .

Subnet and host

The subnet is responsible for the logical separation. In fact, these are devices that use the same local network. Defined by a range of IP addresses.

Host is the address of the network interface (network card). Determined from the IP address using a mask. For example: . Since the first three octets are the subnet, . This is the host number.

The range of host addresses is from 0 to 255. Host number "0" is, in fact, the address of the subnet itself. And host number "255" is a broadcast host.

Addressing

Three types of addresses are used for addressing in the TCP/IP protocol stack:

  1. Local.
  2. Network.
  3. Domain names.

MAC addresses are called local. They are used for addressing in LAN technologies such as Ethernet. In the context of TCP/IP, "local" means that they only operate within a subnet.

The network address in the TCP/IP protocol stack is the IP address. When a file is sent, the recipient's address is read from its header. With it, the router learns the host number and subnet and, based on this information, lays a route to the end node.

Domain names are the human-readable addresses of websites on the Internet. Web servers on the Internet are accessible through a public IP address. It is successfully processed by computers, but it seems too inconvenient for people. In order to avoid such complications, domain names are used, which consist of areas called "domains". They are arranged in a strict hierarchy, from top to bottom.

The first level domain represents specific information. General (.org, .net) is not limited to any strict boundaries. The reverse situation is with local (.us, .ru). They are usually geographically tied.

The lower level domains are everything else. It can be of any size and contain any number of values.

For example, "www.test.quiz.sg" is a valid domain name, where "sg" is a local first (top) level domain, "quiz.sg" is a second level domain, "test.quiz.sg" is a third level domain . Domain names may also be referred to as DNS names.

Sets a correspondence between domain names and a public IP address. When typing a domain name in a browser string, DNS will detect the corresponding IP address and report to the device. The device will process this and return it as a web page.

Link layer

At the link layer, the relationship between the device and the physical transmission medium is determined, a header is added. Responsible for encoding data and preparing frames for transmission over the physical medium. Network switches work at this level.

The most common protocols:

  1. ethernet.
  2. WLAN.

Ethernet is the most common wired LAN technology.

WLAN - local area network based on wireless technologies. Devices interact without physical cable connections. An example of the most common method is Wi-Fi.

Configuring TCP/IP to use a static IPv4 address

A static IPv4 address is assigned directly in the device settings or automatically when connected to a network and is permanent.

To configure the TCP / IP protocol stack to use a permanent IPv4 address, enter the ipconfig / all command in the console and find the following data.

Configuring TCP/IP to use a dynamic IPv4 address

A dynamic IPv4 address is used for a period of time, leased out, and then changed. Assigned to the device automatically when connected to the network.

To configure the TCP / IP protocol stack to use a non-permanent IP address, you need to go to the properties of the desired connection, open the IPv4 properties and check the boxes as indicated.

Data transfer methods

Data is transmitted through the physical medium in three ways:

  • simplex.
  • half duplex.
  • full duplex.

Simplex is a one-way communication. The transmission is carried out by only one device, while the other only receives the signal. We can say that information is transmitted only in one direction.

Examples of simplex communication:

  • TV broadcasting.
  • Signal from GPS satellites.

Half-duplex is a two-way communication. However, only one node can transmit a signal at a given time. With such communication, two devices cannot use the same channel at the same time. A full-fledged one may be physically impossible or lead to collisions. It is said that they conflict over the transmission medium. This mode is used when using a coaxial cable.

An example of half-duplex communication is communication by walkie-talkie on the same frequency.

Full Duplex - full two-way communication. Devices can transmit and receive at the same time. They do not conflict over the transmission medium. This mode is used when using technology fast ethernet and twisted pair connection.

An example of full duplex communication is telephone communication over a mobile network.

TCP/IP vs OSI

OSI Model defines the principles of data transmission. The layers of the TCP/IP protocol stack correspond directly to this model. Unlike the four-layer TCP / IP, it has 7 layers:

  1. Physical (Physical).
  2. Channel (Data Link).
  3. Network (Network).
  4. Transport (Transport).
  5. Session (Session).
  6. Executive (Presentation).
  7. Applied (Application).

At the moment, it is not worth going deep into this model, but at least a superficial understanding is necessary.

The application layer in the TCP/IP model corresponds to the top three OSI layers. All of them work with applications, so you can clearly trace the logic of such a combination. This generalized structure of the TCP/IP protocol stack makes the abstraction easier to understand.

The transport layer remains unchanged. Performs the same functions.

The network layer is also unchanged. Performs exactly the same tasks.

The link layer in TCP/IP corresponds to the last two OSI layers. The link layer establishes protocols for transferring data across the physical medium.

Physical represents the actual physical connection - electrical signals, connectors, etc. In the TCP / IP protocol stack, it was decided to combine these two layers into one, since they both work with the physical medium.

Do-it-yourself Linux server Kolisnichenko Denis Nikolaevich

1.7.5. Layered architecture of the TCP/IP stack

This section of the book is optional: if you think you already have enough knowledge about the TCP/IP protocol, you can skip to the next sections and come back to this later. Here the layered architecture of the TCP/IP protocol will be described - for a better understanding of what is happening.

First, let's look at the history of the creation of the TCP / IP protocol. The TCP / IP protocol was created in the late 60s and early 70s by the DARPA agency of the US Department of Defense (U.S. Department of Defense Advanced Research Projects Agency). The main stages in the development of this protocol are noted in Table. 1.4.

Milestones in TCP/IP Table 1.4

Year Event
1970 Introduced NCP (Network Control Protocol) protocol for Arpanet network nodes
1972 First Telnet specification released (see RFC 318)
1973 FTP protocol introduced (RFC 454)
1974 TCP (Transmission Control Program)
1981 IP protocol standard published (RFC 791)
1982 Combining the TCP and IP protocols into one - TCP / IP
1983 Arpanet network switched to TCP protocol (formerly NCP protocol was used)
1984 Introduced DNS domain name system

As you can see, all Internet protocol standards are published in RFC documents. RFCs(Request For Comments) is a request for comments. These documents describe the structure of the Internet.

RFCs are created by the Internet Society (ISOC). Any ISOC member can publish their standard in an RFC document. RFC documents are divided into five types:

All required RFCs can be found on the included CD.

Protocols of the TCP / IP family can be represented as a model consisting of four layers: application, core, internetwork and network (see Fig. 1.11).

Rice. 1.11. Layers of the TCP/IP protocol stack

Each of these layers performs a specific task for organizing reliable and productive network operation.

Network interface layer

This layer underlies the entire protocol model of the TCP/IP family. The network interface layer is responsible for sending to and receiving from the network frames that contain information. Frames are transmitted over the network as a single unit. Frame(frame) is a unit of data exchanged between computers in Ethernet networks. To designate blocks of data of certain levels, the terms frame (frame), packet (packet), datagram (datagram), segment (segment) are used. All these terms refer to separately transported data units and can be considered synonymous. The name of the transmitted data block changes depending on the level (see Fig. 1.12).

Rice. 1.12. Transferring a block of data in the TCP/IP protocol stack

Internet layer

Internet protocols encapsulate blocks of data into packets (datagrams) and provide the necessary routing. The main Internet protocols are:

IP (Internet Protocol) designed to send and route packets.
ARP (Address Resolution Protocol) used to obtain MAC addresses (hardware addresses) of network adapters.
ICMP (Internet Control Message Protocol) designed to send notifications and error messages when transmitting packets.
IGMP (Internet Group Management Protocol) used by hosts to inform routers that support multicasting that they are participating in groups.
RIP (Route Internet Protocol) and OSPF (Open Shortest Path First) routing protocols.

At this level, the transfer of packets without establishing a connection is implemented - in a datagram way. The internetwork layer ensures that packets move through the network using the most rational route (OSPF protocol). The main function of the internetwork layer is the transmission of packets across the composite network, which is why this layer is also called the Internet layer.

Transport (main) layer

This layer provides communication sessions between computers. There are two transport protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). The TCP protocol is connection-oriented, that is, before transmitting data, computers "negotiate" among themselves. Typically, this protocol transmits large amounts of data or data that requires acknowledgment. This protocol is used by most network applications, as it provides sufficient reliability for data transfer.

The UDP protocol is not connection oriented and does not guarantee the delivery of packets (datagrams). However, UDP is faster than TCP. Typically, small amounts of data are transmitted over this protocol. The network program is responsible for delivering the data.

Application layer

This layer is the pinnacle of the TCP/IP model. Almost all common utilities and services work at this level: DNS, Telnet, WWW, Gopher, WAIS, SNMP, FTP, TFTP, SMTP, POP, IMAP.

To complete this section, consider the correspondence between the levels of the TCP / IP protocol stack of the seven-layer OSI model (see Table 1.5).

Correspondence of TCP/IP stack levels of the OSI model Table 1.5

OSI model layer Protocol TCP/IP stack layer
7, 6 WWW (HTTP), FTP, TFTP, SMTP, POP, telnet, WAIS, SNMP 1
5, 4 TCP, UDP 2
3 IP, ICMP, RIP, OSPF, ARP 3
2, 1 Ethernet, PPP, SLIP 4

The next paragraph discusses such an important concept of the TCP / IP protocol as a port. In the same paragraph, IP and TCP packet structures will be considered, since it makes no sense to consider this material without introducing a port definition.

From the book Let's Build a Compiler! by Crenshaw Jack

From the book DIY Linux Server author Kolisnichenko Denis Nikolaevich

1.7.5. Layered Architecture of the TCP/IP Stack This section of the book is optional: if you think you already have enough knowledge of the TCP/IP protocol, you can skip to the next sections and come back to this later. Layered architecture will be described here

From the book Fundamentals of Object-Oriented Programming by Meyer Bertrand

E9.3 Sharing a Stack of Reachables (This exercise assumes familiarity with the results of Lecture 18) Rewrite the available component that defines the stack of reachables in a component-level approach. The only stack must be shared

From the book Windows Script Host for Windows 2000/XP author Popov Andrey Vladimirovich

Viewing the Call Stack In the debugger, you can display the Call Stack window with a list of all active script procedures and functions. To do this, execute the View|Call Stack command. For example, if you call this window while inside the MyFunc () function in the ForDebug.js script, then in the list we will see the name

From the book System Programming in the Windows Environment author Hart Johnson M

Global and Local Stack Unwinding Exceptions and abends cause a global stack unwind in search of a handler, as shown in Figure 2-3. 4.1. Suppose, for example, that in the tracked block of the example at the end

From the book TCP/IP Architecture, Protocols, Implementation (including IP version 6 and IP Security) the author Faith Sidney M

3.6 TCP Architecture TCP is implemented in hosts. The presence of TCP at each end of the connection provides the following options for delivering local application data: Accuracy? Sequence retention? completeness? Duplication AvoidanceBasic Mechanism for Implementation

From the book Programming in the Ruby Language [Language Ideology, Theory and Practice of Application] author Fulton Hal

3.7 UDP Architecture UDP is implemented on hosts. The protocol does not ensure the integrity of data delivery, since this function is assigned to the applications communicating. They are the ones who check the integrity of the delivered data. An application that wants to send data from

From the book Linux Network Tools author Smith Roderick W.

8.1.17. Using an Array as a Stack or Queue The basic stack operations are called push and pop, and they add and remove elements to the end of an array. The basic queue operations are shift (removes an element from the beginning of an array) and unshift (adds an element to the beginning of an array). For

From the XSLT book author Holzner Stephen

9.2.1. Stricter Stack Implementation We promised to show how the stack could be made tamper-proof. Keeping the promise! Here is an example of a simple class that stores an array inside and controls access to that array. (There are other ways, for example

From the book Fundamental Algorithms and Data Structures in Delphi author Bucknell Julian M.

From the book Firebird DATABASE DEVELOPER'S GUIDE author Borri Helen

The Role of the TCP/IP Protocol Stack in the Development of Networks TCP/IP is currently the most popular protocol stack. This stack includes the most commonly used protocols discussed in this book. Most applications do not support

From the C++ book for beginners author Lippman Stanley

Multilevel numbering Element also supports multi-level numbering - such as 3.1.2.5, etc. To work with it, you need to set the level attribute to "multiple". With the count attribute, you can specify which type of nodes you want to number by setting this attribute to

From the author's book

From the author's book

Layered Model Increasing scalability and greater interoperability requirements lead to a model with more layers, as shown in Figure 2. 5.2. The client interface is moved to the center of the model; it combines with one or

From the author's book

11.3.2. Stack unwinding The search for a catch handler for a thrown exception is as follows. When a throw expression is in a try block, all catch clauses associated with it are examined to see if they can handle the exception. If suitable

From the author's book

19.2.5. Stack Unwinding and Calling Destructors When an exception is thrown, the search for its catch handler—stack unwinding—begins with the function that threw the exception and continues up the chain of nested calls (see Section 11.3). During unwinding, one by one

Table."Stack of the main protocols of network architectures ISO and TCP / IP"

ISO standard levels

ISO protocol stack

TCP/IP protocol stack

7. Applied

Protocol set

Protocol set

6. Data representations

5. Session

4. Transport

3. Networked

2. Channel

Arbitrary

1. Physical

Arbitrary

Differences in the ideology of building network architectures generate significant differences in the data transfer mechanism at all levels of the ISO standard, with the exception of the physical and channel, where the LAP-B and X.21 protocols can be used, but others can. The main differences in the data transmission algorithm are, firstly, in the ideology of error protection, and secondly, in the implementation packet switching mode(KP).
Consider first error handling methods.

A lot of attention has been paid to the issues of protecting data from errors and failures. For this, the second (channel) level is allocated. Error detection is performed using a powerful error-correcting BCH code (Rec. V.42) with a minimum code distance of d=5, which makes it possible to detect any 4-fold error. Error correction is performed using feedback algorithms - ROS-OZh or (more often) ROS-NP. To combat insertions and dropouts of frames, timeout and cyclic numbering of frames are used. At the network layer, packet numbering and requery are provided. All this makes it possible to use a transmission medium of almost any quality, however, the price for this is a high degree of introduced redundancy, i.e. drop in real data transfer rate.

In the TCP / IP architecture, the first and second layers are not specified at all, i.e. transmission can proceed even without error protection. Increasing fidelity is assigned to the TCP transport protocol. If good channels are used, for example, fiber-optic communication lines (FOCL), then the UDP protocol is used at the transport layer, where error protection is not provided. In this case, error detection and correction are carried out at the application level by special user programs. This approach becomes understandable, because TCP / IP architecture was originally implemented in the ARPANET, which used dedicated high-speed channels.

Consider the differences in packet switching methods, i.e. in ISO Level 3 implementation.

In the ISO architecture, the third (network) layer (Rec. X.25) is responsible for routing (delivering packets to an address). It provides for the creation of virtual connections or channels from the source to the recipient, and then packets are transmitted over this connection. This mode is referred to as virtual CS mode and is similar in principle to traditional circuit switching (CS). The TCP/IP architecture implements a different approach called CP datagram mode. This mode drastically simplifies the task of routing, but creates the problem of assembling messages from packets, because packets of the same message can be delivered along different routes and arrive at the recipient at different times. The CM datagram mode is similar in principle to message switching (MS).

Comparisons of virtual and datagram CP methods according to the following characteristics:

    establishing a connection;

    addressing;

    the procedure for transmitting a packet over a network;

    management of the input message flow;

    efficient use of network resources.

Establishing a connection. With virtual CP, a logical connection is established between interacting objects of the transport layer (and possibly higher ISO levels) before the message is transmitted. This logical channel is stored in the routing tables of all packet switching centers (PSCs) that participate in the connection. Packets are transmitted only over the established logical channel, so their order is not violated.

With a CP datagram, a logical connection is not established, therefore, packets of one message are transmitted along those routes that are optimal at the moment, i.e. possibly different routes. The problem of assembling a message from packets is solved at the transport level.

Addressing. In the virtual CP mode, the full address of the recipient object is transmitted only when a logical connection is established, i.e. with the first package. Upon receiving this packet, the recipient object notifies the sender of its consent to the communication session (or disagreement). A logical connection is created, and the rest of the packets containing only the logical channel number are transmitted.

In the datagram mode of the CP, each transmitted packet must necessarily contain the full address of the recipient (and sender) and the packet number in the message.

The procedure for transmitting a packet over a network. The virtual CP mode provides for the allocation of a special basic data transmission network (TD) and the transmission of packets in this TD network over a ready-made logical channel created at the initiative of the transport layer.

In datagram mode, each packet is transmitted along different routes, which makes it possible to use network resources more efficiently, since in large networks, the load of channels changes very quickly, so it is desirable to adjust the delivery route more often. In this case, it is possible to build a global network without isolating a separate PD core network.

Managing the incoming message flow. In the virtual CP mode, the flow of incoming messages (but not packets) can only be controlled at the input of the virtual channel, i.e. at a specific packet switching center for a given message.

The CP's datagram mode is more flexible and allows control of the incoming message flow from virtually any MCU, which improves control flexibility.

Efficiency of use of network resources. In the virtual CP mode, the optimal route is selected only at the moment of establishing a logical connection, therefore, when the situation on the network changes rapidly, the path that is optimal for the first message packet may not be optimal for subsequent packets of the same message.

In the datagram mode, the route correction is performed more frequently, which allows more even loading of the channels of the entire network and, ultimately, reducing the message delivery time.

5.2.1.3 Scope of the TCP/IP architecture

The scope of the TCP / IP architecture is determined by their properties, which give rise to the main advantages and disadvantages of the network architectures used.

Advantages of the TCP / IP architecture:

    low costs for the implementation of interaction protocols due to a smaller set of required protocols;

    significant simplification of the routing procedure, which reduces the cost of the underlying data transmission network through the use of simpler ICTs;

    the possibility of building a large-scale temporary detention center using different types of equipment;

    the possibility of implementing the interaction of various networks using simple matching algorithms.

The disadvantages of the TCP / IP architecture include:

    the possibility of implementation only when using "good" communication channels (preferably dedicated);

    the need to solve the problem of assembling packages that can arrive at the transport layer in an arbitrary order;

    the possibility of losing a message due to untimely delivery of one of the packets of this message;

    complication of user application programs due to the introduction of procedures for monitoring and correcting errors in received messages.

When building global networks, when the decisive factor is the ease of coordinating the operation of various national networks, implemented, as a rule, on different types of equipment, the most effective is the use of the TCP / IP architecture, this conclusion is confirmed by practice, because the Internet uses exactly the TCP / IP architecture. And the ISO network architecture is effective when using "bad" communication channels, the need to work in real time and a homogeneous structure of equipment, and the quality of the communication channels is the main one.

In the Internet architecture, separate networks (LAN, regional and global) are connected to each other by special devices - routers of IP packets.

Definition. Network interconnection devices within the Internet are called IP gateways, or IP routers, or Routers.

5.2.1.3.1
5.2.1.3.2 Internet fragment

LAN - local area network;
MAN - regional TDF;
WAN - global WAN;
WS (Work Station) - LAN workstation;
FS (File Server) - file server;
Host - host machine (a computer that is connected to the network as a host);
Router - IP router.

5.2.1.3.3

The gateway is connected to two or more networks, each of which perceives this gateway as a host computer. Therefore, the gateway has a physical interface and a special IP address in each of the connected networks. Packet forwarding requires the gateway to determine the IP address of the next gateway or, in the last hop, the IP address of the host machine to which the IP packet is directed. The gateway function, commonly referred to as routing, is based on the analysis of special routing tables (route matrices) that are stored in a special database. The database in each of the gateways must be constantly updated to reflect the current topology of the Internet.

Route is the sequence of routers that a packet traverses from the sender to the destination.

The Internet is based on the TCP/IP protocols.

5.2.1.3.4
5.2.1.3.5 TCP/IP protocol chain example

Data is transmitted in packets. Packets have a header that contains service information. Data from higher levels is inserted into the packets of lower levels.

5.2.1.3.6
5.2.1.3.7 Internet messaging based on the encapsulation mechanism (encapsulation)
5.2.1.4 Physical and data link layer

The TCP/IP stack does not imply the use of any specific media access layer protocols and physical media. The media access layer is required to have an interface with the IP module to enable the transmission of IP packets. It is also required to ensure the conversion of the IP address of the network node to which the IP packet is transmitted to the MAC address. Often, entire protocol stacks can act as an access layer to the transmission medium, then they talk about IP over ATM, IP over IPX, IP over X.25, etc.

5.2.1.5 Internet layer and IP (Internet Protocol)

The basis of this layer is the IP protocol:

    The first IPv4 standard was defined in RFC-760 (1980).

    The latest version of IPv4 is RFC-791 (1981).

Purpose of the IP protocol

The Internet Protocol - IP - is an unreliable, connection-free mechanism for delivering messages in separate packets.
"Unreliable delivery":

    Delivery of packages to the recipient is not guaranteed;

    Along the way, the package may be lost, duplicated, delayed;

    Packets may be delivered out of order.

Packet delivery does not require a pre-established connection (i.e., the path of the packets), since each packet is considered independent of the others. Therefore, packets from the sender to the recipient can take different routes.

Internet datagram

A packet sent over the Internet is called an IP datagram or an IP packet.

Packet structure: header and data block.

Included in the IP packet header set of rules , which ensure the delivery of the data packet to the recipient. These rules specify how packets are handled by network hosts and routers, as well as the conditions under which error messages should be generated and packets should be removed from the network.

5.2.1.5.1
5.2.1.6 TCP/IP stack address types

The TCP/IP stack uses three types of addresses: local (also called hardware), IP addresses, and symbolic domain names.

In TCP/IP terminology, a local address is a type of address that is used by the underlying technology to deliver data within a subnet that is part of a composite network. If the subnet of the composite network is the LAN, then the local address is the MAC address. The MAC address is assigned to network adapters and network interfaces of routers. MAC addresses are assigned by hardware manufacturers and are unique. For all existing LAN technologies, the MAC address consists of 6 bytes, for example 11-A0-17-3D-BC-01. The MAC address is the address used at the link layer.

An IP address is a network layer address. IP addresses are the primary type of addresses that the network layer uses to transfer packets between networks. These addresses consist of 4 bytes, for example, 109.26.17.100. The IP address is assigned by the administrator during the configuration of computers and routers. An IP address consists of two parts: a network number and a host number. The node number is assigned regardless of the node's local address.

Symbolic domain names are special names for computers on the Internet.

5.2.1.7 Internetworking Protocol (IPv4)
5.2.1.7.1 Representation and structure of an IP address

binary format

Decimal Format

5.2.1.7.2class addressing system
5.2.1.7.3
5.2.1.7.4Special addresses

00000000

00000000

00000000

00000000

Only allowed to be used during network software initialization

11111111

11111111

11111111

11111111

Limited broadcast address on your local network

00000000

Node ID

00000000

00000000

Node ID

00000000

00000000

00000000

Node ID

Computer on your network

Network ID

11111111

11111111

11111111

Network ID

11111111

11111111

Network ID

11111111

Directed broadcast address on the specified network

01111111

Special Combinations

Feedback loop

Network class

Number of networks

Number of nodes in the network

Value range of the first byte of network identifiers

Class D has the following group IP address grid:
from 224.0.0.0 before 239.255.255.255.

5.2.1.7.5 Assignment of network identifiers

To connect a network to the Internet, you need to obtain a network ID from the Internet Information Center (InterNIC - Internet Network Information Center). The network ID must cover all hosts connected to the same physical network.

5.2.1.7.6
5.2.1.7.7 IP address allocation example
5.2.1.7.8
5.2.1.7.9 Interface addresses
5.2.1.7.10
5.2.1.7.11 Network addresses
5.2.1.7.12
5.2.1.7.13 Three routers connecting six hosts

Address space allocated for Intranet (autonomous IP networks):
in class A - one network with the address 10.x.y.z.
in class B - 16 networks with addresses 172.16.y.z. - 172.31.y.z.
in class C - 256 networks with addresses 192.168.y.z. - 192.168.255.z

5.2.1.7.14 Subnets

The traditional scheme of dividing an IP address into a network number and a host number is based on the notion of a class, which is defined by the values ​​of the first few bits of the address. Precisely because the first byte of the address 185.23.44.206 falls into the range 128-191, we can say that this address belongs to class B, which means that the network number is the first two bytes, supplemented by two zero bytes - 185.23.0.0, and the host number – 0.0.44.206. In this representation, the IP address consists of two hierarchical levels. The need to introduce a third level of hierarchy - the level of subnets - was dictated by the emergence of a shortage of network numbers and a sharp increase in the routing tables of routers on the Internet. After the introduction of the subnet level, the node number is divided into two parts - the subnet number and the number of the node in this subnet.

5.2.1.7.15
5.2.1.7.16 Forming a three-level hierarchy

Increasing the number of layers eliminates the problem of growing routing tables by making private network topology information unnecessary for Internet backbone routers. Routes from the Internet to any particular subnet located on the network with a given IP address are the same and do not depend on which subnet the recipient is located on. This is made possible by the fact that all subnets of a network with a given number use the same network number, although their numbers (subnet numbers) are different. Routers on a private network need to distinguish between individual subnets, but for Internet routers, all subnets refer to a single entry in the routing table. This allows a private network administrator to make any changes to the logical structure of their network without affecting the size of the routing tables of Internet routers.

Reader ondisciplineInformaticsCompiled: st. teacher Stolyarov A.S. springsemester2009 Content 1 The concept of information 3 ... How to pass the exam and centralized testing oninformatics for 100 points. - Rostov...

  • Main educational program

    ... onsemesters ... ondisciplines professional cycle attracted 17% teachers... as well as readers and methodical... in the field informatics; methods and... subjective composition, content And... spring... based st. 11 ... Independent States. - 2009 . – № ...

  • Document

    Leading teachers faculty on courses in mathematics disciplines Informatics"), as well as disciplines, most ... MPEI was conducted on 15 disciplines, 304 students studied. IN springsemester2009 /2010 educational...

  • Interuniversity Center for History Education in Technical Universities of the Russian Federation Interuniversity Center for Political Science Education

    Document

    Leading teachers faculty on courses in mathematics disciplines("Mathematics", "Mathematical Psychology", " Informatics"), as well as disciplines, most ... MPEI was conducted on 15 disciplines, 304 students studied. IN springsemester2009 /2010 educational...

  • Competence-based approach as a conceptual basis of modern education collection of scientific articles based on the materials of the international scientific-practical conference (February 2010)

    Document

    ... ondiscipline"Russian history". Teacher... May 2009 of the year... compose... during everything semester, but... st.9) ... Modern military psychology: Reader/ comp. ... happy spring ... content education should take an important place communication: Informatics ...

  • A set of multilayer protocols, or as the TCP / IP stack is called (Table 2.1), is designed to be used in various network environments. The TCP / IP stack in terms of system architecture corresponds to the OSI (Open Systems Interconnection) reference model and allows applications and services running on almost any platform, including Unix, Windows, Macintosh and others, to communicate over a network.

    Table 2.1. TCP/IP protocol family

    Protocol name

    Protocol description

    Network programming interface

    Communication with Windows applications

    The Transport Driver Interface allows you to create session-level components.

    Transmission Control Protocol

    User Datagram Protocol

    Address Resolution Protocol

    Reverse Address Resolution Protocol

    Internet Protocol

    Internet Control Message Protocol

    Internet Group Management Protocol,

    Interaction interface between transport protocol drivers

    File Transfer Protocol

    Trivial File Transfer Protocol

    Microsoft's implementation of TCP/IP follows a four-layer model instead of a seven-layer model, as shown in Figure 2. 2.2. The TCP/IP model includes more features per layer, resulting in fewer layers. The following levels are used in the model:

    The Application layer of the TCP/IP model corresponds to the Application, Presentation, and Session layers of the OSI model;

    The Transport layer of the TCP/IP model corresponds to that of the Transport layer of the OSI model;

    Rice. 2.2. Compliance with the seven-layer OSI model and the four-layer TCP/IP model

    The Internet layer of the TCP/IP model performs the same functions as the Network layer of the OSI model;

    The network interface layer of the TCP/IP model corresponds to the Link and Physical layers of the OSI model.

    Application Level

    Through the Application layer of the TCP/IP model, applications and services access the network. Access to TCP / IP protocols is carried out through two program interfaces (API - Application Programming Interface):

    Windows sockets;

    The Windows Sockets Interface, or WinSock as it's called, is a network programming interface designed to facilitate interoperability between different TCP/IP applications and protocol families.

    The NetBIOS interface is used for communication between processes (IPC - Interposes Communications) of services and applications of Windows OS. NetBIOS performs three main functions: determining NetBIOS names; NetBIOS Datagram Service; NetBIOS session service.

    Transport layer

    The TCP/IP transport layer is responsible for establishing and maintaining a connection between two nodes. Main functions of the level:

    Confirmation of receipt of information;

    Data flow control;

    Packet ordering and relaying.

    Depending on the type of service, two protocols can be used:

    TCP (Transmission Control Protocol - transmission control protocol);

    UDP stands for User Datagram Protocol.

    TCP is typically used when an application needs to transfer a large amount of information and make sure that the data is received by the destination in a timely manner. Applications and services that send small amounts of data and do not require acknowledgment use UDP, which is a connectionless protocol.

    Transmission Control Protocol (TCP)

    The data transmission control protocol - TCP (Transmission Control Protocol) - provides reliable message transmission between remote application processes through the formation of virtual connections. Appeared in the initial period of networking, when global networks were not very reliable.

    The reliability of the TCP protocol is as follows:

    - it diagnoses errors,

    – if necessary, sends the data again,

    - if he cannot correct the error on his own, he reports it to other levels.

    Before sending segments of information down the model, the sending TCP contacts the receiving TCP to establish a connection. As a result, a virtual channel is created. This type of communication is called connection-oriented.

    The connection is established in three steps:

    1. A client requesting a connection sends a packet to the server indicating the port number the client wishes to use, as well as an ISN (Initial Sequence number) code (a specific number).

    2. The server responds with a packet containing the server's ISN plus the client's ISN plus 1.

    3. The client must acknowledge the connection by returning the server's ISN plus 1.

    How TCP works:

    Takes large blocks of information from the application, breaks them into segments,

    Numbers and sequences each segment so that the TCP on the receiving end can correctly join all the segments into the original big block;

    Negotiates with the protocol of the receiving party the amount of information that must be sent before receiving an acknowledgment from the receiving TCP;

    After sending the segments, the TCP waits for an acknowledgment from the target TCP to receive each one;

    Resends segments that were not acknowledged.

    The three-step connection opening establishes the port number as well as the client and server ISNs. Each TCP packet sent contains the sender and receiver TCP port numbers, a fragment number for messages broken into smaller pieces, and a checksum to ensure that no errors occurred during transmission. The TCP protocol is responsible for the reliable transmission of data from one network node to another. It creates a session with a connection, in other words, a virtual channel between machines.

    User Datagram Protocol (UDP)

    The UDP protocol is designed to send small amounts of data (datagrams) without establishing a connection and is used by applications that do not need confirmation of their receipt by the addressee. UDP is considered to be a simpler protocol, since it does not clutter up the network with service information and does not perform all the functions of TCP. However, it successfully copes with the transfer of information that does not require guaranteed delivery, and at the same time uses much less network resources. UDP does not create virtual circuits and does not contact the target device before sending information. Therefore, it is considered a connectionless, or connectionless, protocol.

    How UDP works:

    Receives blocks of information from the upper levels, breaks them into segments;

    Numbers each of the segments so that all segments can be reassembled into the required block at the destination, but does not order the segments or care about the order in which they arrive at the destination,

    Sends segments and "forgets" about them;

    It does not wait for acknowledgments of receipt, and even does not allow such acknowledgments, and therefore is considered an unreliable protocol. But this does not mean that UDP is inefficient - it just does not belong to reliable protocols.

    UDP also uses port numbers to identify the specific process at the specified IP address. However, UDP ports are different from TCP ports and therefore can use the same port numbers as TCP without conflict between services.

    Internet layer

    The internetwork layer is responsible for routing data within a network and between different networks. Routers operate at this level, which depend on the protocol used and are used to send packets from one network (or its segment) to another (or another network segment). The TCP/IP stack uses the IP protocol at this level.

    Internet Protocol (IP)

    The IP protocol provides for the exchange of datagrams between network nodes and is a connectionless protocol that uses datagrams to send data from one network to another. This protocol does not expect to receive an acknowledgment (ASK, Acknowledgment) of sent packets from the destination node. Acknowledgments as well as retransmissions of packets are carried out by protocols and processes operating at the upper levels of the model.

    Its functions include datagram fragmentation and internetwork addressing. The IP protocol provides control information for reassembling fragmented datagrams. The main function of the protocol is internetwork and global addressing. Depending on the size of the network over which the datagram or packet will be routed, one of three addressing schemes is used.

    Addressing in IP networks

    Each computer in TCP / IP networks has three levels of addresses: physical (MAC address), network (IP address) and symbolic (DNS name).

    The physical or local address of a node, as determined by the technology behind the network that the node belongs to. For hosts included in local networks, this is the MAC address of the network adapter or router port, for example, 11-A0-17-3D-BC-01. These addresses are assigned by hardware manufacturers and are unique addresses because they are managed centrally. For all existing LAN technologies, the MAC address has the format of 6 bytes: the upper 3 bytes are the manufacturer's identifier, and the lower 3 bytes are assigned uniquely by the manufacturer.

    Network, or IP address, consisting of 4 bytes, for example, 109.26.17.100. This address is used at the network layer. It is assigned by the administrator during the configuration of computers and routers. An IP address consists of two parts: a network number and a host number. The network number can be chosen arbitrarily by the administrator, or assigned on the recommendation of a special division of the Internet (Network Information Center, NIC), if the network should work as an integral part of the Internet. Typically, ISPs obtain address ranges from NIC departments and then distribute them to their subscribers. The host number in IP is assigned regardless of the host's local address. The division of an IP address into a network number field and a host number field is flexible, and the boundary between these fields can be set arbitrarily. A node can belong to several IP networks. In this case, the node must have several IP addresses, according to the number of network links. An IP address does not characterize a single computer or router, but a single network connection.

    When developing the IP protocol, based on the size of networks, their classes were distinguished (Table 2.2):

    Class a - few networks with a very large number of nodes; the network number occupies one byte, the remaining 3 bytes are interpreted as the node number in the network.

    Class B - medium-sized networks; 16 bits (2 bytes) are allocated for the network address and for the host address.

    Class C - networks with a small number of nodes; 24 bits (3 bytes) are allocated for the network address, and 8 bits (1 byte) for the host address.

    Table 2.2. Network classes

    Address range

    Maximum number of networks

    Maximum number of nodes in one network

    0Network.node.node.node

    0.0.0.0 ‑ 0.255.255.255

    reserved

    1.0.0.0 ‑ 126.255.255.255

    127.0.0.0 – 127.255.255.255

    reserved

    10Network.network.node.node

    128.XXX.0.0 – 191.XXX.255.255

    110Network.network.network.node

    192.XXX.XXX.0 - 223.XXX.255.255

    1110Group.group. group.group

    224.0.0.0 – 239.255.255.255

    1111Reserve reserve reserve reserve

    240.0.0.0 – 255.255.255.255

    reserved

    · Class D addresses – special, group addresses – multicast; can be used to send messages to a specific group of nodes. If the packet contains a destination address that belongs to class D, then all nodes that are assigned this address should receive such a packet.

    · Class E addresses reserved for future use.

    In addition to the above addresses, there are reserved addresses that are used in a special way.

    If the network number field is 0

    0 0 0 0..............................0 Node number,

    then by default it is considered that this node belongs to the same network as the node that sent the packet: if the computer address is 128.187.0.0, then the address 0.0.25.31 specified in the message is implicitly converted to the address 128.187.25.31;

    The address 127.0.0.X is reserved for organizing feedback when testing the operation of the host software without actually sending a packet over the network. This address is called loopback or localhost. If the program sends a packet with such an address, then this packet, without leaving the computer, will go through all levels of the network subsystem and return to this program. Allows you to develop and test network software on a local computer, including one that does not have a network adapter at all.

    If all bits of the IP address are 1

    1 1 1 1...................................1 1,

    then the packet with that destination address must be sent to all nodes on the same network as the sender. Such a distribution is called a limited broadcast message (limited broadcast);

    If the destination host address field contains solid 1

    Network address 1111...................11,

    then a packet with such an address is sent to all network nodes with a given address. This distribution is called a broadcast message (broadcast);

    Class D addresses are a form of multicast IP address. The packet must be delivered to several nodes at once, which form a group with the number specified in the address field. The nodes themselves identify themselves, that is, they determine which of the groups they belong to. The same node can belong to several groups. Such messages, in contrast to broadcast messages, are called multicast messages. The multicast address is not divided into network and host number fields and is handled in a special way by the router.

    Symbolic address, or DNS name, such as SERV1.IBM.COM. This address is assigned by the administrator and consists of several parts, such as machine name, organization name, domain name. Such an address is used at the application level, for example, in the FTP or telnet protocols.

    Numeric addressing is useful for machine processing of routing tables. For human use, it presents certain difficulties. To facilitate interaction, tables of correspondence of numerical addresses to machine names were first used. For example, on UNIX, the /etc directory contains a file called hosts, which might look like this:

    IP address Machine name

    127.0.0.1 localhost

    144.206.160.32 Polyn

    144.206.160.40 Apollo

    As the network grew, the Domain Name System (DNS) was developed, which allows computers to be given easy-to-remember names, such as yahoo.com, and is responsible for translating those names back into IP addresses. The DNS is built on a hierarchical basis, but this hierarchy is not strict. In fact, there is no single root for all Internet domains.

    A computer name has at least two levels of domains, separated from each other by a dot (.). Domains following top-level domains usually define either regions (msk) or organizations (ulstu). The next levels of the hierarchy can be assigned to small organizations, or to subdivisions of large organizations or individuals (for example, alvinsoft.h11.ru).

    Everything on the left is a subdomain to the general domain. Thus, in the name somesite.uln.ru, somesite is a subdomain of uln, which in turn is a subdomain of ru.

    The most popular DNS support program is BIND, or Berkeley Internet Name Domain, a domain name server that is widely used on the Internet. It provides searches for domain names and IP addresses for any host on the network. BIND also distributes e-mail messages through Internet hosts.

    BIND is implemented according to the "client-server" scheme. There are four types of servers:

    · the primary master server maintains its database of names and services the local domain;

    · the secondary master-server serves its own domain, but receives information about the addresses of some of its machines over the network from another server;

    · The caching server does not have its own domain. It receives data either from one of the master servers or from a buffer;

    · remote server is a conventional master server installed on a remote machine, accessed by programs over the network.

    Primary or secondary master servers are usually installed on machines that are gateways to local networks.

    Gateway - a system that converts from one format to another.

    The name server can be installed on any computer on the local network. However, performance must be taken into account, as many server implementations keep name databases in random access memory. At the same time, information is often loaded from other servers. Therefore, this can cause delays in resolving a request for an address by host name.

    ARP Address Mapping ProtocolsAndRARP

    The Address Resolution Protocol (ARP) is used to determine the local address from an IP address. ARP works differently depending on which link layer protocol is running on a given network - a local area network protocol (Ethernet, Token Ring, FDDI) with the ability to broadcast access simultaneously to all network nodes, or a wide area network protocol (X.25, frame relay) that generally does not support broadcast access. There is also a protocol that solves the inverse problem - finding an IP address from a known local address. It is called reverse ARP - RARP (Reverse Address Resolution Protocol) and is used when starting diskless stations that do not initially know their IP address, but know the address of their network adapter.

    In local networks, ARP uses broadcast frames of the link layer protocol to search the network for a host with a given
    IP address.

    A host that needs to map an IP address to a local address generates an ARP request, attaches it to a link-layer protocol frame with a known IP address, and broadcasts the request. All nodes on the local network receive an ARP request and compare the IP address specified there with their own address. If they match, the node generates an ARP response, in which it indicates its IP address and its local address, and sends it already directed, since the sender specifies his local address in the ARP request. ARP requests and responses use the same packet format.

    ICMP protocol

    The Internet Control Message Protocol (ICMP) is used by IP and other high-level protocols to send and receive status reports on transmitted information. This protocol is used to control the rate at which information is transferred between two systems. If the router connecting the two systems is overloaded with traffic, it can send a special ICMP error message to slow down the message rate. It is part of the network layer of the TCP/IP protocol suite.

    The ICMP protocol uses messages for its purposes, two of which are called the ICMP Echo Request and the ICMP Echo Reply:

    · The echo request implies that the computer to which it was sent should respond to this packet.

    · Echo Reply is a type of ICMP message that is used to respond to such a request.

    These messages are sent and received using the command ping(Packet Internet Groper).

    Using special ICMP packets, you can get information:

    about the impossibility of delivering the package,

    about exceeding the packet lifetime,

    about exceeding the duration of the assembly of the package from fragments,

    about anomalous values ​​of parameters,

    about changing the forwarding route and type of service,

    about the state of the system, etc.

    IGMP protocol

    Local network hosts use the Internet Group Management Protocol (IGMP) to register themselves in a group. Group information is kept on LAN routers. Routers use this information to send multicast messages.

    A group message, like a broadcast message, is used to send data to several nodes at once.

    Network Device Interface Specification (NDIS) is a network device interface specification, a software interface that provides interaction between transport protocol drivers and the corresponding network interface drivers. Allows multiple protocols to be used even if only one network card is installed.

    Network interface layer

    This layer of the TCP/IP model is responsible for distributing IP datagrams. It works with ARP to determine the information that should be placed in the header of each frame. A frame is then created at this level appropriate for the type of network being used, such as Ethernet, Token Ring, or ATM, then an IP datagram is placed in the frame's data region, and it is sent out onto the network.

    Share with friends or save for yourself:

    Loading...