Switching and routing of telecommunication systems. Routers and switching devices

This question increasingly arises when building infocommunication structures in organizations and enterprises of various sizes. The ITU-T Recommendations and the Open Systems Interconnection (OSI) Network Architecture Reference Model provide an unequivocal answer to this question. Meanwhile, developers of telecommunications equipment are trying to make the equipment universal and omnipotent, which makes users think about the profitability of acquiring new multifunctional devices. To what extent this is justified, we will find out later.

Router Features

The main function of the router is to read and analyze the service information of packets for each port in order to decide on the further direction of data over the network. The device is also assigned the following functions:
- creation and maintenance of routing tables;
— definition of routes;
- packet filtering;
- queuing;
— conversion of network addresses to local ones;
— data distribution by ports.

In accordance with the network model of OSI interaction, the place of the router is at the network level and it is designed to organize the connection of subnets within a single network to each other. With regard to small and medium-sized businesses, the use of routing devices is in demand when organizing networks with the requirement to allocate several subnets and share access to them. For example, when organizing a network in a hotel, the router allows you to differentiate between the access of the administration and guests. In enterprises, routers can combine several local networks and provide access to the provider's network, in particular, through different channels. In this case, the subnets will be logically separated from each other.

Switch Features

As for the switch, then, firstly, it is designed to work on a channel, i.e. the second level according to the OSI model and, secondly, its main task is to analyze the MAC address of the sending port and send data to another port, while the switching table is formed by it. Structurally, a switch is a hub operating as a multiport bridge. It allows you to segment the network, provide each workstation on the subnet with a channel, and allocate bandwidth for data transmission. The switch provides not only access to the network for user devices, but can also serve as a traffic aggregation device when transferred to the network, thereby taking up space inside the local network or on its border.

The organization of a local network without such a device is impossible, because it is he who is designed to connect user devices to the global network. Switches are widely used in home networks and small offices for jointly connecting several computers to one provider line, and are also in demand in medium and large companies for building cascaded network architectures aimed at aggregating (aggregating) flows before transferring them to the network.

What is the difference between a router and a switch?

The similarities and differences of network devices are determined by the implemented functionality in accordance with the levels of the OSI models. So layer 3 switches are as similar as possible in functionality to routers, while access layer switches work more like flow concentrators. Meanwhile, there are a number of functions that are inherent in only one. Comparison of devices is presented in the table below.

Table - Functionality of network equipment

Functional router Switch
Interfaces supports all types of Fast and Gigabit Ethernet physical interfaces, including 10Base-T, 10 Base-2, as well as UTP and V.35 for Toking Ring, ISDN and Frame Relay networks supports all types of physical interfaces of Fast and Gigabit Ethernet networks, in particular 10/100Base-T, 100Base-TX, 100Base-FX.
Hardware address available, including MAC address for LAN operation available for every device on the network
IP address for each physical interface one per device
Traffic filtering implemented in all models possible only by devices that support network and transport layer protocols
Differentiated Service supports, implemented in software only supported by hardware port allocation
Performance hundreds of thousands of packets per second several million packets per second
Configuring and Setting Modes implemented in all models of managed devices
Bandwidth setting available on managed devices that support the QoS function
Number of ports limited only by device size increase is possible due to the logical addition of a new device
Scalability by supporting slots for additional interfaces by supporting stream aggregation
Additional functionality VoIP adapter, VPN, firewall VLAN

Hybrid network devices

  • A routing switch is a kind of compromise between a router and a switch, when only the main functions are left from the first, and packets are processed in one module. At the same time, the switching and routing processes are logically distributed over the levels, i.e. network and channel. The device is characterized by high performance at a low cost of ownership. Optimal for use in corporate and ISP networks.
  • Switching router - operates at the network layer and is used to reduce the load on the route calculation modules. Due to information about the recipient known from earlier operations, packets are sent without looking at the routing tables. Switching devices have the function of switching the device to a switcher or router only mode. This makes them versatile devices for enterprise networks, ISP backbones, and WANs.
  • Flow switch - when continuous flows are detected at the network layer, the routing functions are disabled, and switching is performed at the link layer. Due to this, it is possible to reduce data processing time and increase platform performance. Devices on ISP backbones and WANs are effective.

Ownership cost

Hardware implementation of switching devices is much cheaper than routers. Accordingly, and always lower. Comparing the cost of routers and network-layer switches with the same functionality, the latter will also turn out to be somewhat cheaper. The D-Link DES-1008 switch for 8 ports 100 Mb / s can be purchased for only 800 rubles, while the router for 4 ports DVG-5402SP from the same manufacturer will cost 2,800-3,000 rubles. For hybrid models, router-based devices are more expensive than switch platforms. For example, the cost of owning a DES 3200 series routing switch for 24 ports is 10,000-13,000 rubles, while a Huawei AR 1200 series router with only 8 LAN ports will cost about 40,000 rubles. The cheapest way to organize networks is to use switches inside and at the edge of the network, with a router installed at the junction with the backbone. For example, you can use a Cisco RV082 router with two trunk ports and 8 LAN ports to connect up to 50 users using Cisco SB SF100D-05 access switches. The cost of owning such a network does not exceed 50,000 rubles.

Conclusion

Can a router act as a switch? Yes, you can, but it will be expensive! Can a switch act as a router? No, it cannot, even if it will work at the network level. A compromise for those who want a versatile device, but do not care about the price - switching routers.

You can choose the optimal functionality and switches in the online store.ls computers. Always available inexpensive, stackable D-Link and switches, distinguished by reliability and functionality. As an official partner of such companies as Cisco, D-Link, Zyxel, NetGear, HP and many others, we offer only certified equipment with subsequent warranty service. Call our managers by phone 8 800 333 23 70 or leave a request on the website. They will answer all your questions on the selection and purchase of network equipment!


All rights to the materials published on the site are intellectual property and are protected in accordance with the legislation of the Russian Federation. When citing materials from this site, a direct hyperlink is required.

The main purpose of switching nodes is to receive, analyze, and in networks with routing also select a route, and send data in a selected direction. In the general case, switching nodes also include gateway devices. Switching nodes of computer networks contain switching devices (switches). If they switch based on hierarchical network addresses, they are called routers.

Switching devices occupy an important place in information transmission systems in computer networks. With the help of switching devices, the length of communication channels in networks with several interacting subscribers is significantly reduced: instead of laying several communication channels from a given subscriber to all the others, it is possible to lay only one channel from each subscriber to a common switching node. In this regard, if extremely stringent requirements are not imposed on the efficiency and reliability of data transmission in computer networks, switched communication channels are used.

Switching nodes perform one of three possible types of switching when transmitting data:

Channel switching;

message switching;

Packet switching.

Messages and packets are often referred to as datagrams. datagram(datagram) is an independent data packet (message) containing enough information in its header so that it can be transmitted from source to recipient, regardless of all previous and subsequent messages.

Circuit switching

A direct physical connection is established between the points of origin and destination by forming a composite channel from serially connected separate sections of communication channels. Such an end-to-end physical composite channel is established at the beginning of a communication session, maintained throughout the session, and terminated after the end of the transmission. Formation of the end-to-end channel is ensured by successively turning on a number of switching devices in the desired position constantly for the entire duration of the communication session. The creation time of such a channel is relatively long, and this is one of the disadvantages of this switching method. The formed channel is not available to outside subscribers. The monopolization by interacting subscribers of the subchannels that form the physical channel causes a decrease in the overall throughput of the data transmission network. And this despite the fact that the formed physical channel is often underloaded.



The main advantages of the method:

Ability to work both in interactive mode and in real time;

Ensuring full transparency of the channel.

This switching method is most often used for duplex transmission of audio information (ordinary telephone communication is a typical example of channel switching).

Message switching

Data is transmitted in the form of discrete portions of different lengths (messages), and no end-to-end physical channel is established between the source and destination, and the resources of the communication system are not preliminarily distributed. The sender only specifies the address of the recipient. The switching nodes analyze the address and the current occupancy of the channels and transmit the message over a currently free channel to the nearest network node towards the recipient. The switching nodes have switches controlled by a communication processor, which also provides temporary data storage in buffer memory, information reliability control and error correction, data format conversion, and formation of message receipt confirmation signals. Due to the presence of buffer memory, it is possible to set a consistent message rate between two nodes. Transparency of data transmission in this mode is only coded (bit); temporal transparency is not provided. In view of this, it is difficult to work in an interactive mode and in real time. Some opportunities for implementing these modes remain only due to the high transmission rate and the ability to perform priority service of applications. This type of switching is used in e-mail, teleconferencing, electronic news, etc.

Packet switching

In modern systems, to improve the efficiency, reliability of transmission and reduce the storage capacity of switching nodes, long messages are divided into several shorter standard lengths, called packages(sometimes very short messages, on the contrary, are combined together in a package). The standard size of the packets determines the corresponding standard capacity of the equipment of communication nodes and the maximum efficiency of its use. Packets can even follow different paths to the recipient, and immediately before issuing to the subscriber, they are combined (separated) to form complete messages. This type of switching provides the highest network bandwidth and the lowest delay in data transmission. The disadvantage of packet switching is the difficulty, and sometimes the impossibility of its use for systems operating in interactive mode and in real time. Although significant progress has been made in this direction in recent years, Internet telephony technologies are actively developing. One of the directions of this technology is the creation virtual channel to transmit packets by multiplexing in time using each switching node. The host port time resource is shared among multiple users such that each user is given a constant set of minimum time slots, giving the impression of continuous access.

Message and packet switching are logical types of switching, since when using them, only a logical channel is formed between subscribers. With logical switching, the interaction of subscribers is performed through a storage device, where messages are received from all subscribers served by this node. Each message (packet) has an address part that defines the sender and recipient; in accordance with the address, a further route is selected and a message is transmitted from the storage device of the switching node.

The transmission method using logical packet switching often requires special messengers mini- or microcomputers that receive, store, analyze, split, synthesize, select a route and send messages to the addressee.

Switches are used in switching nodes and as a gateway and intranet interface, performing the functions of a bridge - a connector of several network segments together.

Switching nodes can also use hubs and remote multiplexers. Their main purpose is to combine and compact the input data streams coming from subscribers via low-speed communication channels into one or more higher-speed communication channels, and vice versa.

Routing in networks

As already mentioned, in networks with information routing, the problem of data routing arises. In circuit-switched systems and when a virtual circuit is created, routing is performed once when the initial connection is established. In normal packet and message switching modes, routing occurs continuously as data travels from one switching node to another.

There are two main routing methods: with pre-connection, in which before data exchange between network nodes, a connection with certain parameters must be established; and dynamic, using datagram-type protocols, through which a message is transmitted to the network without first establishing a connection.

Routing consists in the correct choice of the output channel in the switching node based on the address contained in the header of the packet (message).

Options for addressing computers on the network

Three addressing options are most widely used.

Hardware addresses are designed for small networks, so they have a simple non-hierarchical structure. Addresses can be encoded in binary or hexadecimal notation. The bit length of the address can be any - this is an internal matter of a particular network or subnet. The assignment of hardware addresses occurs automatically, or is built into the hardware (modems, adapters, etc.), or is generated every time the hardware is started up.

Symbolic addresses or names are intended for users and therefore should be meaningful. In large networks, such addresses have a hierarchical system and consist of separate domains identified by alphabetic abbreviated names of objects, often understandable to the user (similar to domain addresses on the Internet). They can be very long.

Numeric compound addresses in a fixed compact format. An example would be to refer to IP addresses on the Internet.

In modern networks, all three address options are often used simultaneously for addressing. The user specifies a symbolic address, which is immediately replaced on the network with a numeric one (according to the address tables stored in the network name server). When the transmitted data arrives at the destination network, the numeric address is replaced by the hardware one. A possible technology for addressing messages is as follows. The sending computer sends a broadcast message to all computers on the network asking them to recognize their numeric name. The computer that recognizes the address is sent the hardware address, and then the message itself. Optimal routing provides:

Maximum network bandwidth;

The minimum time it takes for a packet to travel from the sender to the recipient;

Reliability of delivery and security of transmitted information;

Routing can be centralized and decentralized. Centralized routing is possible only in networks with centralized management: route selection is carried out in the network control center, and the switches in the nodes only implement the incoming decision. With decentralized routing, control functions are distributed between switching nodes, in which, as a rule, there is a communication processor.

Routing Methods

Simple Routing when choosing a further path for a message (packet), it takes into account only the static a priori state of the network, its current state - loading and topology changes due to failures - is not taken into account. One of the directions of simple routing is the flooding of a message through all free channels at once. There is no need to talk about the merits of such routing.

Fixed Routing takes into account only changes in network topology. For each destination node, the transmission channel is selected electronically. route table(route table), which determines the shortest paths and time of delivery of information to the destination. This routing is used in networks with an established topology.

Adaptive Routing takes into account both load changes and network topology changes. When choosing a route, information from the route table is supplemented with data on the health and busyness of communication channels, operational information about the existing packet queue on each channel. In the local variant of this routing, only data on channels originating from the current node is taken into account, and in distributed adaptive routing, data received from neighboring switching nodes is also taken into account.

routers are sometimes called mirrors: they receive messages from one section of the network, determine the recipient of the message, and forward the message to another section of the network. They are also widely used as a gateway, providing a connection between networks at a higher level than bridges, because information is available about the structure of the network and the connections of its elements to each other.

routers are usually based on one or more processors and have a specialized operating system.

Hubs also used for circuit switching in computer networks. The functions of concentrators described when considering STOD are one rather simple special case. In networks, the main functions of the hub are to repeat signals (repeater) and concentrate in itself (hub) as in a central device, the functions of combining computers into a single network. They are often referred to as hubs or multiport repeaters. The concentrator forms a common data transmission medium from the individual physical network segments connected to its ports - a kind of logical segment that has all the functions of a physical one.

hubs can be of three types:

Passive, simply connecting network segments of the same type, without adding anything new;

Active, which, in addition to connecting segments, also amplify (regenerate) signals (they, like repeaters, allow you to increase the distance between the connected devices);

Intelligent, in addition to the functions of active hubs, they route signals across segments (send data only to those segments for which they are intended) and provide some service technologies, such as protecting information from unauthorized access, self-diagnosis and automatic shutdown of poorly performing ports, etc.

The course is available as part of the international program of the Cisco Networking Academy. Cisco is a world leader in information technology. The program provides opportunities for gaining practical experience and developing the professional skills required to work in basic positions in the field of information and communication technologies (network technician, network administrator).

The purpose of the course is to learn the principles of building a network architecture, special network equipment and its functions in a network, configuring Cisco routers and switches to perform basic functionality. An additional goal is to help accelerate the career of an IT specialist and master the practical skills of a network technician or computer network administrator.

Training is led by authorized instructors from the Cisco Academy. The electronic materials of the course include a lot of laboratory work that allows you to take a diversified look at the principles and technologies being studied. Course materials can be accessed using a personal smartphone, tablet PC, laptop or desktop computer.

The program, compiled from the materials of the second part of the Cisco Certified Network Professional (CCNA Routing and Switching) course, is excellent for:

  • students and graduates of universities, colleges, vocational and technical schools;
  • professionals who wish to improve their skills in the field of network technologies and prepare for professional certification and obtaining an international Cisco CCNA qualification;
  • anyone who wants to accelerate their career as a network specialist.

To successfully master the course materials, students are recommended to have a basic knowledge of network technologies and protocols. Training will be most effective if the student has previously studied the course ""

At the end of the course you will know:

  • how dynamic routing protocols work;
  • how switching technologies such as VLANs, VLANs, and the IEEE 802.1q standard work;
  • How are Layer 3 switches configured?
  • Upon completion of the course you will be able to:
  • configure and resolve configuration issues when performing basic operations on a small switched network;
  • configure and verify that static routing and the default gateway are working correctly;
  • perform basic router configuration, configuration validation, and routing troubleshooting in small networks;
  • find errors in configuring VLANs and routing between VLANs - inter-VLAN routing;
  • configure, monitor, and troubleshoot networks when using ACLs for IPv4 and IPv6 protocols;
  • configure and fix typical problems on routers and switches in networks when using dynamic routing protocols RIPv1, RIPv2, OSPF protocol when working with one OSPF zone and with several - multi-area;
  • configure virtual local networks - virtual LANs and routing between groups of hosts belonging to different VLANs - inter - VLANs both for networks using the IPv4 protocol and for networks using IPv6.
  • The course is useful in preparing for the CCENT (Cisco Certified Entry Network Technician) and CCNA (Cisco Certified Network Associate) industry certification exam.

Teaching technology includes:

  • access to the Cisco NetSpace distance learning system to Cisco branded educational materials (lectures, practical assignments, self-test materials, control tests, teacher communications service);
  • comfortable training on an individual schedule without interruption from the main work/study;
  • online consultations of a personal teacher-instructor Cisco - during the entire period of training.

Course program ():

Chapter 1 Introduction to Switched Networks

Chapter 2 Basic Concepts and Switching Setup

Chapter 3: Virtual Local Area Networks (VLANs)

Chapter 4 Routing Concept

Chapter 5 Inter-VLAN Routing

Chapter 6 Static Routing

Chapter 7 Dynamic Routing

Chapter 8 Single Area OSPF

Chapter 9 Access Control Lists (ACLs)

Chapter 10 DHCP

Chapter 11 IPv4 Network Address Translation

Course duration

Study program: 72 hours

Duration of training: 1-2 months.
graduation documents

Cisco international certificate of completion of the course.

Many users do not know what is the difference between routers and switches, mistakenly thinking that the devices have the same principle of operation and serve the same purposes. To understand the difference, it is necessary to study what gadgets are used for, where they are most often installed, what their functioning is based on. The main conclusion that can be drawn is that the router and switch are devices used for various tasks and purposes. However, they have different prices. It is worth noting that both gadgets are used for. Sometimes they are compared with the third type of gadgets - the hub, which today is outdated and does not meet modern technological requirements. The information given in the article will be of interest to people who are interested in the principle of building a network. In some cases it is necessary to use one type of device, while in others it is advisable to install a second type.

Switch and router perform different functions within the network

The principle of operation of the switch

To understand the difference between a switch and a router, you need to learn the basics of how these devices work. It is worth noting that a switch that is installed for computer networks is called a network switch. Such a device is used to connect a variety of computers to a network within several or one segment. It should be noted that the channel is used, that is, the second level of the OSI model. The first level uses legacy hubs. In this case, the device transmits information directly to the recipient, which increases the security and performance of the device compared to a hub. The switch stores special switching tables. This is information about the correspondence of the MAC addresses of the nodes to the ports of the gadget. During operation, the device sets the MAC address of the sending host and enters the information in the table.

In other words, any Ethernet fragment, that is, a packet data fragment, has a MAC address. The gadget captures data about it and performs the work of a kind of traffic controller, that is, it determines the computer to which information can be sent. Accordingly, data cannot be transferred to other computers. Thus, a network device of this type guarantees a direct connection between the transmitting and receiving laptop, computer.

Such a device is not always convenient to use when working with large networks, since the memory of the tables with which it works is limited. At the same time, such devices have a low price and have excellent speed of operation. Very often they are used in large companies to build networks, since this option is inexpensive.

The principle of operation of the router

A router is a router familiar to many. Such devices have a large amount of memory and actually represent a mini computer. This allows the router to work with traffic up to 1 gigabyte. The advantage is that the router is compatible with all kinds of interface modules. It is worth noting that the device allows you to connect an unlimited number of routes.

Users are not always satisfied with the speed of work, since the router checks completely all the data, and not just the MAC and IP addresses. Such gadgets have an extended set of functions, for example, they can determine various programs that come as input. It is worth noting that the device operates at the third, more advanced OSI level. The router allows you to link incompatible protocol and network architectures. Such modern and convenient devices, of course, are more expensive. At the same time, devices perfectly cope with the creation of large networks.

Very often, routers are used for home use. Typically, the gadget receives an IP address from an Internet service provider, and itself conducts IP addressing over a local network. Many advanced instruments allow the user to take advantage of additional features. Among them are built-in protection against dangerous malware, a convenient web interface that can be accessed using any computer or laptop, and even the ability to connect a printer.

The difference between the two devices may not be very clear to the average layman at first glance. It is worth noting that they can be used for the same functions. At the same time, gadgets differ in their principles of operation, cost, speed of operation and other parameters. The router, as it were, “thinks out” data transmission routes while the switch relays them.

In the public sense of the word, routing means the movement of information from a source to a destination through an interconnected network. In this case, as a rule, at least one node is encountered along the way. Routing is often opposed to connecting networks using a bridge, which, in the popular sense this method performs exactly the same functions. The main difference between the two is that bridging takes place at Layer 2 of the ISO reference model, while routing occurs at Layer 3. This difference explains that routing and bridging use different information as it moves from source to destination.The result of this is that routing and bridging accomplish their tasks in different ways; in fact, there are several different types of routing and bridging.

Switching Switching algorithms are relatively simple and are basically the same for most routing protocols. In most cases, the host determines whether the packet needs to be sent to another host. Having obtained the address of the router in some way, the source host sends a packet addressed specifically to the physical address of the router (MAC layer), but with the protocol address (network layer) of the destination host.

After checking the protocol address of the packet's destination, the router determines whether or not it knows how to forward this packet to the next router. In the second case (when the router does not know how to forward the packet), the packet is usually ignored. In the first case, the router forwards the packet to the next router by replacing the physical address of the destination with the physical address of the next router and then forwarding the packet.

The next hop may or may not be the host computer of the final destination. If not, the next hop is typically another router that performs the same switch decision process. As a packet moves through the Internet, its physical address changes, but the protocol address remains the same.

Below is a description of all four modifications of the Ethernet frame headers (and the frame header means the entire set of fields that relate to the link layer):

    802.3/LLC frame (or Novell 802.2 frame)

    Raw 802.3 frame (or Novell 802.3 frame)

    Ethernet DIX frame (or Ethernet II frame)

    Ethernet SNAP frame

The 802.3/LLC frame header is the result of combining the frame header fields defined in the 802.3 and 802.2 standards.

The 802.3 standard defines eight header fields:

    The preamble field consists of seven bytes of sync data. Each byte contains the same sequence of bits - 10101010. With Manchester encoding, this combination is represented in the physical medium by a periodic wave signal. The preamble is used to allow time and opportunity for the transceiver circuits to come into steady sync with the received clock signals.

    The initial frame delimiter consists of a single byte with bit set 10101011. The occurrence of this pattern is an indication that a frame is about to be received.

    Destination address - can be 2 or 6 bytes long (destination's MAC address). The first bit of the recipient address is a sign of whether the address is individual or group: if 0, then the address points to a specific station, if 1, then this is the group address of several (possibly all) network stations. In broadcast addressing, all bits of the address field are set to 1. It is common to use 6-byte addresses.

    Source Address - 2 or 6 byte field containing the address of the sender's station. The first bit is always 0.

    The two-byte length field specifies the length of the data field in the frame.

    The data field can contain from 0 to 1500 bytes. But if the length of the field is less than 46 bytes, then the next field is used - the padding field, to pad the frame to the minimum allowed length.

    The padding field consists of a number of bytes of padding that provides a certain minimum data field length (46 bytes). This ensures that the collision detection mechanism works correctly. If the length of the data field is sufficient, then the padding field does not appear in the frame.

    Checksum field - 4 bytes containing a value that is calculated according to a specific algorithm (CRC-32 polynomial). Upon receiving a frame, the workstation performs its own checksum calculation for that frame, compares the received value with the value of the checksum field, and thus determines whether the received frame is corrupted.

An 802.3 frame is a MAC sublayer frame, in accordance with the 802.2 standard, an LLC sublayer frame is embedded in its data field with the frame start and end flags removed. The LLC frame format has been described above.

The resulting 802.3/LLC frame is shown on the left side of Figure 4. Since the LLC frame has a 3-byte header, the maximum data field size is reduced to 1497 bytes.

Rice. 4. Ethernet frame formats

An Ethernet DIX frame, also called an Ethernet II frame, is similar to the Raw 802.3 frame in that it also does not use the LLC sublayer headers, but differs in that it defines a protocol type field (Type field) in place of the length field. This field serves the same purpose as the DSAP and SSAP fields of an LLC frame - to indicate the type of upper layer protocol that has enclosed its packet in the data field of this frame. Protocol type encoding uses values ​​greater than the maximum data field length value of 1500, so Ethernet II and 802.3 frames are easily distinguishable.

Another popular frame format is the SubNetwork Access Protocol (SNAP) Ethernet frame. The Ethernet SNAP frame is defined in the 802.2H standard and is an extension of the 802.3 frame by introducing an additional Organization ID field that can be used to restrict access to a network of computers from other organizations.

Table 2 summarizes which Ethernet frame types are commonly supported by implementations of popular network layer protocols.

table 2

39. Addressing in network systems with packet switching. Problem and general routing algorithms.

The TCP/IP stack uses three types of addresses: local (also called hardware), IP addresses, and symbolic domain names. All these types of addresses are assigned to the nodes of the composite network independently of each other.

An IP address is 4 bytes long and consists of a network number and a host number. To determine the boundary separating the network number from the node number, two approaches are implemented. The first is based on the concept of an address class, the second is based on the use of masks.

The address class is determined by the values ​​of the first few bits of the address. Class A addresses have one byte for the network number, and the remaining three bytes for the host number, so they are used in the largest networks. For small networks, class C addresses are more suitable, in which the network number occupies three bytes, and only one byte can be used for node numbering. An intermediate position is occupied by class B addresses.

Another way to determine which part of an address is a network number and which part is a host number is based on the use of a mask. The mask is a number that is used in conjunction with the IP address; the binary notation of the mask contains ones in those bits that in the IP address should be interpreted as a network number.

Network numbers are assigned either centrally if the network is part of the Internet, or randomly if the network is autonomous.

The process of distributing IP addresses to network nodes can be automated using the DHCP protocol.

The mapping between an IP address and a hardware address (most often a MAC address) is handled by the ARP address resolution protocol, which looks up the ARP tables for this purpose. If the desired address is missing, then a broadcast ARP request is made.

The TCP/IP stack uses a domain symbolic name system, which has a hierarchical tree structure that allows the use of an arbitrary number of constituent parts in a name. A set of names, in which several of the leading components are the same, form a domain of names. Domain names are assigned centrally if the network is part of the Internet, otherwise locally.

Correspondence between domain names and IP addresses can be established both by means of a local host using the hosts file, and by using a centralized DNS service based on a distributed database of mappings "domain name - IP address".

A router is a complex multifunctional device whose tasks include: building a routing table, determining a route based on it, buffering, fragmenting and filtering incoming packets, and supporting network interfaces. The functions of routers can be performed by both specialized devices and universal computers with appropriate software.

Routing algorithms are characterized by single-hop and multi-hop approaches. One-hop algorithms are divided into fixed, simple, and adaptive routing algorithms. Adaptive routing protocols are the most common and in turn can be based on distance vector algorithms and link state algorithms.

Routing algorithms must be flexible. In other words, routing algorithms must quickly and accurately adapt to a variety of network circumstances. For example, suppose a network segment is rejected. Many routing algorithms, once aware of this problem, quickly select the next best path for all routes that would normally use that segment. Routing algorithms can be programmed to adapt to changes in network bandwidth, router queue sizes, network latency, and other variables.

Static or dynamic algorithms

Static routing algorithms are hardly algorithms at all. The distribution of static routing tables is set by the network administrator prior to routing. It does not change unless the network administrator changes it. Algorithms using static routes are easy to develop and work well in environments where network traffic is relatively predictable and the network layout is relatively simple.

Because Since static routing systems cannot respond to changes in the network, they are generally considered unsuitable for today's large, ever-changing networks. Most of the dominant routing algorithms of the 1990s - dynamic.

Dynamic routing algorithms adjust to changing network conditions in real time. They do this by parsing incoming routing update messages. If the message indicates that a network change has taken place, the routing programs recalculate routes and send out new routing update messages. Such messages permeate the network, encouraging routers to re-run their algorithms and modify their routing tables accordingly. Dynamic routing algorithms can supplement static routes where appropriate. For example, one could develop a "last hit router" (i.e., a router to which all unsent packets on a particular route are sent). Such a router acts as a repository for unsent packets, ensuring that all messages will be processed at least in some way.

Single-path or multi-path algorithms

Some complex routing protocols provide multiple routes to the same destination. Such multipath algorithms make it possible to multiplex traffic over multiple links; single-path algorithms cannot do this. The advantages of multipath algorithms are obvious - they can provide much more throughput and reliability.

Single-level or hierarchical algorithms

Some routing algorithms operate in a flat space, while others use routing hierarchies. In a single-level routing system, all routers are equal with respect to each other. In a hierarchical routing system, some routers form what constitutes the backbone of routing. Packets from non-core routers travel to core routers and pass through them until they reach the common destination area. From that point on, they travel from the last core router through one or more non-core routers to their final destination.

Routing systems often establish logical groups of nodes called domains or autonomous systems (ASs) or areas. In hierarchical systems, some routers in a domain can communicate with routers in other domains, while other routers in that domain can only communicate with routers within their own domain. In very large networks, additional hierarchical levels may exist. The routers at the highest hierarchical level form the routing base.

The main advantage of hierarchical routing is that it mimics the organization of most companies and therefore supports their traffic patterns very well. Most network communication takes place within groups of small companies (domains). Intra-domain routers only need to know about other routers within their domain, so their routing algorithms can be simplified. Accordingly, the routing update traffic can also be reduced, depending on the routing algorithm used.

Algorithms with intelligence in the main computer or in the router

Some routing algorithms assume that the source end node determines the entire route. This is commonly referred to as source routing. In source routing systems, routers simply act as storage and forwarding devices for a packet, sending it off to the next hop without any thought.

Other algorithms assume that the main computers do not know anything about the routes. Using these algorithms, routers determine the route through the internetwork based on their own calculations. In the first system discussed above, the routing intelligence resides in the main computer. In the system considered in the second case, routers are endowed with routing intelligence.

The trade-off between intelligent routing in the host and intelligent routing in the router is achieved by weighing route optimality against traffic overhead. Systems with intelligence in the main computer more often choose the best routes, because they usually find all possible routes to the destination before the packet is actually sent out. They then select the best route based on their determination of the optimality of that particular system. However, the act of determining all routes often requires significant search traffic and a large amount of time.

Intra-domain or cross-domain algorithms

Some routing algorithms operate only within domains; others - both within domains and between them. The nature of these two types of algorithms is different. Therefore, it is clear that the optimal intra-domain routing algorithm will not necessarily be the optimal inter-domain routing algorithm.

Link State or Distance Vector Algorithms

Link state algorithms (also known as "shortest path first" algorithms) send routing information to all nodes in the internetwork. However, each router sends only that part of the routing table that describes the state of its own links. Distance vector algorithms (also known as Balman-Ford algorithms) require each router to send all or part of its routing table, but only to its neighbors.Link state algorithms actually send small updates across the board, while distance vector algorithms send larger updates only to neighboring routers.

With faster convergence, link state algorithms are somewhat less prone to routing loops than distance vector algorithms. On the other hand, channel state algorithms are more complex than distance vector algorithms, requiring more processing power and memory than distance vector algorithms. As a consequence, the implementation and maintenance of channel state algorithms can be more expensive. Despite their differences, both types of algorithms perform well under a variety of circumstances.