Global computer network The Internet was originally built according to the following scheme: a backbone network, connected to it by networks called autonomous systems. The backbone network is also an autonomous system. This approach is convenient because detailed topological information remains within the autonomous system, and the autonomous system itself as a single whole for the rest of the Internet is represented by external gateways (routers through which autonomous systems join the backbone network). Internal gateways are used to form subnets within an autonomous system.

Accordingly, the routing protocols used on the Internet are divided into external and internal. External routing protocols (EGP, BGP) transfer routing information between autonomous systems. Internal routing protocols (RIP, OSPF, IS-IS) are used only within the autonomous system. Changing routing protocols and routes within an autonomous system does not affect the operation of other autonomous systems.

The OSPF (Open Shortest Path First) protocol was adopted in 1991. This is a modern protocol aimed at working in large heterogeneous networks with complex topologies including loops. It is based on a link state algorithm, which is highly resistant to changes in network topology.


40. Transport protocols of the TCP/IP stack.

Since connections are not established at the network layer, there is no guarantee that all packets will arrive at their destination unharmed or arrive in the same order in which they were sent. This task - ensuring reliable information communication between two end nodes - is solved by the main layer of the TCP/IP stack, also called transport.

The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) operate at this layer. The TCP protocol provides reliable transmission of messages between remote application processes through the formation of logical connections. This protocol allows peers on the sending and receiving computers to communicate in full duplex mode. TCP allows you to deliver a byte stream generated on one computer without errors to any other computer included in the composite network. TCP divides the byte stream into segments and passes them on to the underlying internetworking layer. Once these segments are delivered by the internetworking layer to their destination, TCP reassembles them into a continuous stream of bytes.

The UDP protocol provides application packets in a datagram manner, like the main Internet protocol of the IP layer, and serves only as a link (multiplexer) between the network protocol and numerous application-layer services or user processes.


41. TCP/IP diagnostic utilities.

TCP/IP includes diagnostic utilities for checking stack configuration and testing network connectivity.

Utility Application
arp Displays for viewing and editing the address translation table used by the Address Resolution Protocol (ARP - determines the local address from the IP address)
hostname Displays the local host name. Used without parameters.
ipconfig Displays values ​​for the current TCP/IP stack configuration: IP address, subnet mask, default gateway address, WINS addresses ( Windows Internet Naming Service) and DNS (Domain Name System)
nbtstat Displays statistics and current information on NetBIOS installed over TCP/IP. Used to check the status of current NetBIOS connections.
netstat Displays statistics and current information on the TCP/IP connection.
nslookup Checks records and domain aliases of hosts, domain services of hosts, as well as information operating system, by querying DNS servers.
ping Verifies the correctness of TCP/IP configuration and verifies communication with a remote host.
route Modifies IP routing tables. Displays table contents, adds and deletes IP routes.
tracert Checks the route to remote computer by sending ICMP (Internet Control Message Protocol) echo packets. Displays the route of packets to a remote computer.

To verify that TCP/IP is configured correctly, use the ipconfig utility. This command is useful on computers running DHCP (Dynamic Host Configuration Protocol) as it allows users to determine what TCP/IP network configuration and values ​​have been set using DHCP.
The ipconfig utility allows you to find out whether the configuration has been initialized and whether there are duplicate IP addresses:
- if the configuration is initialized, then the IP address, mask, gateway appears;
- if IP addresses are duplicated, then the network mask will be 0.0.0.0;
- if, when using DHCP, the computer was unable to obtain an IP address, then it will be equal to 0.0.0.0.
The ping (Packet Internet Grouper) utility is used to verify TCP/IP configuration and diagnose connection errors. It determines the availability and functioning of a particular host. Using ping is the best way to verify that a route exists between the local computer and a network host.
The ping command tests a connection to a remote host by sending ICMP echo packets to that host and listening for echo replies. Ping listens for each packet sent and prints the number of packets sent and received. Each received packet is checked against the transmitted message. If the connection between hosts is poor, the ping messages will tell you how many packets are lost.
By default, 4 echo packets of 32 bytes are transmitted (a periodic sequence of alphabetic characters in uppercase). Ping allows you to change the size and number of packets, specify whether to record the route it uses, what time-to-live (ttl) value to set, whether the packet can be fragmented, etc. When receiving a response, the time field indicates how long ( in milliseconds) the sent packet reaches the remote host and is returned back. Since the default value for waiting for a response is 1 second, then all values of this field will be less than 1000 milliseconds. If you receive a "Request time out" message, it is possible that if you increase the response timeout, the packet will reach the remote host.
Ping can be used to test both a host name (DNS or NetBIOS) and its IP address. If a ping with an IP address succeeds, but a ping with a name fails, this means that the problem is in recognizing the match between the address and the name, and not in the network connection.
The ping utility is used in the following ways:
1) To verify that TCP/IP is installed and correctly configured on the local computer, the loopback address is specified in the ping command feedback(loopback address): ping 127.0.0.1
2) To ensure that the computer is correctly added to the network and the IP address is not duplicated, the IP address is used local computer:
ping localhost_ip-address
3) To verify that the default gateway is functioning and that a connection can be established with any local host in local network, the default gateway IP address is set:
ping gateway_ip-address
4) To check the possibility of establishing a connection through the router, the IP address of the remote host is specified in the ping command:
ping [options] IP address of remote host
Tracert is a route tracing utility. It uses the TTL (time-to-live) field of the IP packet and ICMP error messages to determine the route from one host to another.
The tracert utility can be more comprehensive and convenient than ping, especially in cases where the remote host is unreachable. Using it, you can determine the area of ​​​​communication problems (at the Internet provider, in the core network, in the network of a remote host) by how far the route will be tracked. If problems arise, the utility displays asterisks (*) or messages like “Destination net unreachable”, “Destination host unreachable”, “Request time out”, “Time Exeeded”.
The tracert utility works as follows: it sends 3 probe echo packets to each host through which the route to the remote host passes. The waiting time for a response to each packet is displayed on the screen (It can be changed using a special parameter). Packets are sent with different lifetime values. Each router encountered along the way reduces the TTL value by one before forwarding the packet. Thus, the lifetime is a counter of intermediate delivery points (hops). When a packet's TTL reaches zero, the router is expected to send an ICMP "Time Exeeded" message to the source computer. The route is determined by sending the first echo packet with TTL=1. The TTL is then incremented by 1 in each subsequent packet until the packet reaches the remote host or the maximum possible TTL value is reached (default 30, set with the -h option). The route is determined by examining the ICMP messages that are sent back by intermediate routers.
Syntax: tracert [options] target_host_name
The ARP utility is designed to work with the ARP cache. The main task of the ARP protocol is to translate IP addresses into corresponding local addresses. To do this, the ARP protocol uses information from the ARP table (ARP cache). If the required entry in the table is not found, then the ARP protocol sends a broadcast request to all computers on the local subnet, trying to find the owner of this IP address. The cache can contain two types of entries: static and dynamic. Static entries are entered manually and are stored in the cache permanently. Dynamic entries are placed in the cache as a result of broadcast requests. For them there is a concept of life time. If within a certain time (by default 2 minutes) an entry has not been claimed, it is removed from the cache.
netstat utility allows you to obtain static information on some of the stack protocols (TCP, UDP, IP, ICMP), and also displays information about current network connections. It is especially useful on firewalls, and can be used to detect security breaches at the network perimeter.
Syntax:
netstat [-a] [-e] [-n] [-s] [-p protocol] [-r]
Options:
-a displays a list of all network connections and listening ports on the local computer;
-e displays statistics for Ethernet interfaces (for example, the number of bytes received and sent);
-n displays information for all current connections(for example, TCP) for all network interfaces on the local computer. For each connection, information about the IP addresses of the local and remote interfaces is displayed along with the numbers of the ports used;
-s displays statistical information for the UDP, TCP, ICMP, IP protocols. The "/more" key allows you to view information page by page;
-r displays the contents of the routing table.

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-2.jpg" alt=">IP Routing Protocol">!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-3.jpg" alt=">IP address l IPv 4 address is a unique 32-bit sequence of binary digits,"> IP-адрес l IPv 4 -адрес - это уникальная 32 разрядная последовательность двоичных цифр, с помощью которой компьютер однозначно идентифицируется в IP сети. (на канальном уровне в роли таких же уникальных адресов компьютеров выступают МАС адреса сетевых адаптеров, невозможность совпадения которых контролируется изготовителями на стадии производства.)!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-4.jpg" alt=">Versions l version 4 of the IP protocol, or IPv 4 l version 6 (IPv 6),"> Версии l версия 4 протокола IP, или IPv 4 l версия 6 (IPv 6), в которой IP адрес представляется в виде 128 битной последовательности двоичных цифр. ipv 6 install!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-5.jpg" alt=">Structure l For ease of working with IP addresses, a 32-bit sequence is usually"> Структура l Для удобства работы с IP адресами 32 разрядную последовательность обычно разделяют на 4 части по 8 битов (на октеты) l каждый октет переводят в десятичное число и при записи разделяют эти числа точками. l в таком виде (это представление называется «десятичные числа с точками» , или, «dotted decimal notation») IP адреса занимают гораздо меньше места и намного легче запоминаются 192. 168. 5. 200 11000000 10101000 0000101 11001000!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-6.jpg" alt=">Subnet mask l The subnet mask is a 32-bit number consisting of walking"> Маска подсети l Маска подсети - это 32 разрядное число, состоящее из идущих вначале единиц, а затем - нулей, например (в десятичном представлении) 255. 0 ИЛИ 255. 240. 0.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-7.jpg" alt=">Subnet mask l The subnet mask plays an extremely important role in IP addressing and"> Маска подсети l Маска подсети играет исключительно важную роль в IP адресации и маршрутизации l сеть ARPANet строилась как набор соединенных друг с другом гетерогенных сетей. Для правильного взаимодействия в такой сложной сети каждый участник должен уметь определять, какие IP адреса принадлежат его локальной сети, а какие - удаленным сетям. l здесь и используется маска подсети, с помощью которой производится разделение любого IP адреса на две части: идентификатор сети (Net ID) и идентификатор узла (Host ID). l такое разделение делается очень просто: там, где в маске подсети стоят единицы, находится идентификатор сети, а где стоят нули - идентификатор узла. Например, в IP адресе 192. 168. 5. 200 при использовании маски подсети 255. 0 идентификатором сети будет число 192. 168. 5. 0, а идентификатором узла - число 200. Стоит поменять маску подсети, на число 255. 0. 0, как и идентификатор узла, и идентификатор сети изменятся на 192. 168. 0. 0 и 5. 200, соответственно, и от этого, иначе будет вести себя компьютер при посылке IP пакетов.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-8.jpg" alt=">Rules for assigning IP addresses of networks and nodes 1. network identifier is not can only contain"> Правила назначения IP-адресов сетей и узлов 1. идентификатор сети не может содержать только двоичные нули или только единицы. Например, адрес 0. 0 не может являться идентификатором сети; 2. идентификатор узла также не может содержать только двоичные нули или только единицы - такие адреса зарезервированы для специальных целей l все нули в идентификаторе узла означают, что этот адрес является адресом сети. Например, 192. 168. 5. 0 является правильным адресом сети при использовании маски 255. 0 и его нельзя использовать для адресации компьютеров, l все единицы в идентификаторе узла означают, что этот адрес является адресом широковещания для данной сети. Например, 192. 168. 5. 255 является адресом широковещания в сети 192. 168. 5. 0 при использовании маски 255. 0 и его нельзя использовать для адресации компьютеров!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-9.jpg" alt=">Rules for assigning IP addresses of networks and nodes l node identifier within one and"> Правила назначения IP-адресов сетей и узлов l идентификатор узла в пределах одной и той же подсети должен быть уникальным; l диапазон адресов от 127. 0. 0. 1 до 127. 255. 254 нельзя использовать в качестве IP адресов компьютеров. Вся сеть 127. 0. 0. 0 по маске 255. 0. 0. 0 зарезервирована под так называемый «адрес заглушки» (loopback), используемый в IP для обращения компьютера к самому себе. PING 127. 12. 34. 56!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-10.jpg" alt=">l The distribution of IP addresses in the world is carried out by a private non-profit corporation called ICANN"> l Распределением IP адресов в мире занимается частная некоммерческая корпорация под названием ICANN (Internet Corporation for Assigned Names and Numbers), а точнее, работающая под ее патронажем организация IANA (Internet Assigned Numbers Authority).!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-11.jpg" alt=">Classful and classless IP addressing">!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-12.jpg" alt=">Development l Initially, the entire space of possible IP addresses was divided into five classes"> Развитие l Первоначальная все пространство возможных IP адресов было разбито на пять классов l принадлежность IP адреса к определенному классу определялась по нескольким битам первого октета l для адресации сетей и узлов использовались только классы А, В и С. l для этих сетей были определены фиксированные маски подсети по умолчанию, равные, соответственно, 255. 0. 0. 0, 255. 0. 0 и 255. 0, которые не только жестко определяли диапазон возможных IP адресов узлов в таких сетях, но и механизм маршрутизации.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-13.jpg" alt=">Address classes in the original IP addressing scheme Class First Possible number of bits V"> Классы адресов в первоначальной схеме IP-адресации Класс Первые Возможное число биты в значения сетей узлов в сети октете первого октета А 0 1 -126 16777214 В 10 128 -191 16384 65534 С 110 192 -223 2097152 254 D 1110 224 -239 Используется для многоадресной рассылки (multicast) Е 1111 240 -254 Зарезервирован как экспериментальный!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-14.jpg" alt=">Problems l To obtain the required range of IP addresses, organizations were asked to fill out a registration form ,"> Проблемы l Для получения нужного диапазона IP адресов организациям предлагалось заполнить регистрационную форму, в которой следовало указать текущее число компьютеров и планируемый рост компью терного парка в течение двух лет. l с развитием Интернета такой подход к распределению IP адресов стал вызывать проблемы, особенно острые для сетей класса В. l организациям, в которых число компьютеров не превышало нескольких сотен (скажем, 500), приходилось регистрировать для себя целую сеть класса В. l Поэтому количество доступных сетей класса В стало на глазах «таять» , но при этом громадные диапазоны IP адресов (в нашем примере - более 65000) пропадали зря.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-15.jpg" alt=">Solution to the problem l To solve the problem, a classless IP addressing scheme was developed">!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-16.jpg" alt=">Classless Inter. Domain Routing,) , CIDR l missing IP address binding"> Бесклассовая схема IP-адресации (Classless Inter. Domain Routing,), CIDR l отсутствует привязка IP адреса к классу сети и маске подсети по умолчанию l допускается применение так называемых масок подсети с переменной длиной (Variable Length Subnet Mask, VLSM). l Например, если при выделении сети для вышеуказанной организации с 500 компьютерами вместо фиксированной маски 255. 0. 0 использовать маску 255. 254. 0 то получившегося диапазона из 512 возможных IP адресов будет вполне достаточно. Оставшиеся 65 тысяч адресов можно зарезервировать на будущее или раздать другим желающим подключиться к Интернету. Этот подход позволил гораздо более эффективно выделять организациям нужные им диапазоны IP адресов, и проблема с нехваткой IP сетей и адресов стала менее острой.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-17.jpg" alt=">l Calculation of the maximum possible number of nodes in any IP network how many bits"> l Рассчет максимально возможного количества узлов в любой IP сети сколько битов содержится в идентификаторе узла, или, иначе, сколько нулей имеется в маске подсети. l Это число используется в качестве показателя степени двойки, а затем из результата вычитается два зарезервированных адреса (сети и широковещания). l Аналогичным способом легко вычислить и возможное количество сетей классов А, В или С, если учесть, что первые биты в октете уже зарезервированы, а в классе А нельзя использовать IP адреса 0. 0 и 127. 0. 0. 0 для адресации сети.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-18.jpg" alt=">IP addresses for local networks l All addresses used on the Internet, must register with"> IP-адреса для локальных сетей l Все используемые в Интернете адреса, должны регистрироваться в IANA, что гарантирует их уникальность в масштабе всей планеты. Такие адреса называют реальными, или публичными (public) IP адресами. l Для локальных сетей, не подключенных к Интернету, регистрация IP адресов, естественно, не требуется, так что, в принципе, здесь можно использовать любые возможные адреса. Однако, чтобы не допускать возможных конфликтов при последующем подключении такой сети к Интернету, RFC 1918 рекомендует применять в локальных сетях только следующие диапазоны так называемых частных (private) IP адресов (в Интернете эти адреса не существуют и использовать их там нет возможности): ¡ 10. 0- 10. 255; ¡ 172. 16. 0. 0- 172. 31. 255; а!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-19.jpg" alt=">IP routing basics l to properly communicate with other computers and networks , every"> Основы IР-маршрутизации l чтобы правильно взаимодействовать с другими компьютерами и сетями, каждый компьютер определяет, какие IP адреса принадлежат его локальной сети, а какие - удаленным сетям. l если выясняется, что IP адрес компьютера назначения принадлежит локальной сети, пакет посылается непосредственно компьютеру назначения, если же это адрес удаленной сети, то пакет посылается по адресу основного шлюза.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-20.jpg" alt=">Example COMPUTER l IP address - 192. 168. 5. 200 ; l subnet mask -"> Пример КОМПЬЮТЕР l IP адрес - 192. 168. 5. 200; l маска подсети - 255. 0; l основной шлюз - 192. 168. 5. 1. При запуске протокола IP на компьютере выполняется операция логического «И» между его собственными IP адресом и маской подсети l IP адрес в 32 разрядном виде 11000000 10101000 00000101 11001000; l маска подсети - 11111111 0000; l идентификатор сети - 11000000 10101000 00000101 0000 Т. е. 192. 168. 5. 0 идентификатор собственной сети!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-21.jpg" alt=">Example Task: send an IP packet to address 192. 168. 5. 15. l the computer performs"> Пример Задача: отправить IP-пакет по адресу 192. 168. 5. 15. l компьютер выполняет операцию логического «И» с IP адресом компьютера назначения и собственной маской подсети. l полученный в результате идентификатор сети назначения будет совпадать с идентификатором собственной сети компьютера отправителя.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-22.jpg" alt=">Example This is how our computer will determine that the destination computer is in the same him"> Пример Так наш компьютер определит, что компьютер назначения находится в одной с ним сети, и выполнит следующие операции: l с помощью протокола ARP будет определен физический МАС адрес, соответствующий IP адресу компьютера назначения; l с помощью протоколов канального и физического уровня по этому МАС адресу будет послана !} necessary information.

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-23.jpg" alt=">Example 2 Task: send an IP packet to address 192. 168 10. 20. l The computer will perform"> Пример 2 Задача: отправить IP-пакет по адресу 192. 168. 10. 20. l Компьютер выполнит аналогичную процедуру определения идентификатора сети назначения. l В результате будет получен адрес 192. 168. 10. 0, не совпадающий с идентификатором сети компьютера отправителя. l Так будет установлено, что компьютер назначения находится в удаленной сети, и алгоритм действий компьютера отправителя изменится: 1. будет определен МАС адрес не компьютера назначения, а маршрутизатора; 2. с помощью протоколов канального и физического уровня по этому МАС адресу на маршрутизатор будет послана нужная информация. Дальнейшая судьба IP пакета зависит от правильной настройки маршрутизаторов, объединя ющих сети 192. 168. 5. 0 и 192. 168. 10. 0. важна !} correct setting subnet masks in IP addressing parameters!!!

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-24.jpg" alt=">Ways to configure IP parameters and check functionality 1. assign manually (easy make a mistake when"> Способами настройки параметров IP и проверка работоспособности 1. назначить вручную (легко ошибиться, при изменении надо перенастраивать, сетевые администраторы полностью контролируют все IP адреса, невозможно работать в крупных корпоративных сетях с !} mobile devices such as laptops or PDAs that often move from one network segment to another) 2. automatic acquisition of an IP address. Special servers that support the Dynamic Host Configuration Protocol (DHCP), whose task is to service client requests for an IP address and other information necessary for proper operation online. If the DHCP server is unavailable (missing or not working), then starting from Windows versions 98 computers independently assign themselves an IP address. In this case, the mechanism of automatic private IP addressing (APIPA) is used, for which the address range 169.254.0.0 - 169.254.255 was registered by Microsoft Corporation in IANA.

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-25.jpg" alt=">Checking the parameters and functionality of the IP protocol 1. IPCONFIG /ALL. 2 .PING 127."> Проверка параметров и работоспособности протокола IP 1. IPCONFIG /ALL. 2. PING 127. 0. 0. 1 3. PING w. x. y. z, где w. x. y. z - IP адрес соседнего компьютера. 4. PING w. x. y. z, где w. x. y. z - IP адрес основного шлюза. 5. PING w. x. y. z, гдеw. x. y. z - IP адрес любого удаленного компьютера.!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-26.jpg" alt=">Questions 1. What parameters and settings are required to ensure the operation of the TCP protocol stack /IP?2."> Вопросы 1. Какие параметры и настройки обязательны дляобеспечения работы стека протоколов TCP/IP? 2. Что такое IP адрес? Какова его структура? Какиевозможны способы представления IP адресов? 3. Чем отличаются версии 4 и 6 протокола IP? Какие преимущества обеспечит версия 6 протокола IP? Почему возникла необходимость в переходе на версию 6 протокола IP? 4. Что такое маска подсети? Для чего она нужна? 5. В чем заключается смысл разделения IP адреса на идентификаторы сети и узла? Для чего это требуется? 6. Какие IP адреса и маски являются допустимыми, а какие - нет? Почему? 7. В чем различие между классовой и бесклассовой IP адресациями? Каковы их преимущества и недостатки?!}

Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-27.jpg" alt=">Questions 1. What are classes of IP addresses? By what rules do they are determined?2."> Вопросы 1. Что такое классы IP адресов? По каким правилам они определяются? 2. Как назначить IP адреса в локальной сети (без выхода в Интернет)? 3. Каковы основные принципы маршрутизации пакетов в локальных и !} remote networks? 4. What is a route table (routing table)? Explain the meaning of each of its columns. 5. How to “register” something missing in the routing table new route? 6. What is dynamic node configuration? What is it for? 7. What is the technology of automatic personal IP addressing? 8. What is a typical algorithm for checking the functionality of the IP protocol?

IP stands for Internet Protocol, and version 4 of this protocol is currently the most common. IPv4 is defined through RFC 791.

Within OSI, it is a network (3rd) layer protocol. This level, I remind you, is intended to determine the data transmission path.

IPv4 uses packet switching. In this case, the original transmitted message is divided into parts small size(packets) that are transmitted independently over the network.

In addition, IPv4 does not guarantee packet delivery or the absence of duplicates. This is the so-called “best effort delivery” (as opposed to guaranteed delivery). Accordingly, these tasks are transferred to protocols more high level eg TCP.

Addressing

IPv4 identifies the sender and recipient using a 32-bit address, which limits the number of possible addresses to 4,294,967,296. From this number, IPv4 reserves special address ranges called private (~18 million) and multicast (~270 million).

Addresses are usually written as four dotted decimal octets, for example: 198.51.100.25 corresponds to the number C6336419 16.

When using the global address space, it is necessary to distinguish between the addresses available in local physical network that does not require routing, and addresses that are physically located on another network. In the case of the latter, the packets are sent to the router, which must forward them further.

In the first versions of the standard, the first octet was used to identify the network, the rest - to identify the node. It quickly became clear that 256 networks were not enough. Therefore, classes of networks were introduced:

Class First bits Network address length Node address length
A 0 8 24
B 10 16 16
C 110 24 8
D 1110 N/A N/A
E 1111 N/A N/A
Class Start of range End of range
A 0.0.0.0 127.255.255.255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255

Class D is reserved for multicast, class E is simply reserved “just in case”.

The length of the network address and the length of the node address were determined by the first bits of the address. Since about 1985, this has also been abandoned. The reasons for this are that many organizations required more addresses than the class C network provided and received a class B network. The class B network, however, exceeded the organization's requirements many times over.

Network classes have been replaced by network masks. This is a bitmask that specifies which bits of the address are network-specific and which are host-specific. By standard convention, the mask should be filled from left to right, so that the network address is always in the most significant bits. This allows you to specify only network address length, instead of the entire network mask.

For example, 192.0.2.0/24 means that the first 24 bits (three octets) are the network address and the rest are the host address. /24 is equivalent to the netmask 255.255.255.0.

The use of netmasks is described in RFC 1517.

Numerous standards also reserve different address ranges for special needs.

Range Description RFC
0.0.0.0/8 Current network (source address) 6890
10.0.0.0/8 Private network 1918
100.64.0.0/10 CGN shared address space 6598
127.0.0.0/8 Loopback 6890
169.254.0.0/16 Autoconfiguration 3927
172.16.0.0/12 Private network 1918
192.0.0.0/24 IETF Protocol Assignments 6890
192.0.2.0/24 Documentation and examples 1 5737
192.88.99.0/24 Relay ipv6 to ipv4 3068
192.168.0.0/16 Private network 1918
198.18.0.0/15 Testing bandwidth networks 2544
198.51.100.0/24 Documentation and examples 2 5737
203.0.113.0/24 Documentation and examples 3 5737
224.0.0.0/4 Multicast 5771
240.0.0.0/4 Reserved 1700
255.255.255.255 Broadcast Request 919

Host addresses are also reserved, in binary representation consisting of zeros (indicates the entire network, reserved) and ones (broadcast request for a given network).

For example, 203.0.113.0 means (in the text) network 203.0.113.0/24, and 203.0.113.255 is a broadcast request to this network.

Package format

The packet consists of a header and data. IP does not involve any integrity checking. The underlying protocol (say, Ethernet) already provides integrity checking at the data link layer, and the higher-lying one (say, TCP) does so at the data layer.

Version, 4 bits First header field. In IPv4 it has the value 0010 2, i.e. 4. Header length, 4 bits The number of 32-bit words in the header. The minimum value is 5, which corresponds to a header length of 20 bytes. Maximum – 15, header length 60 bytes. DSCP or ToS – type of service, 6 bits Determines the prioritization, say, for VoIP. ECN, 2 bits Explicit network congestion flag. Requires support from both sides (receiving and transmitting). When this flag is received, the transmission speed is reduced. If the flag is not supported, the packets are simply discarded. Total Length, 16 bits The total length of the packet in bytes, including header and data. The minimum length is 20, the maximum is 65535. Identification, 16 bits Used to uniquely identify a datagram. Since it may be necessary to split a packet into smaller parts when transmitted over different networks, this field serves to identify the parts that belong to the same packet. Flags, 3 bits

Bit flags:

  1. Reserved, always 0
  2. Don't fragment. If further transmission of the packet requires fragmentation, the packet is discarded.
  3. More fragments. For fragmented packets, all but the last one have this flag set to 1.
Shift, 13 bits The shift of a fragment relative to the beginning of the datagram, measured in blocks of 64 bits. The first fragment has an offset of 0. The maximum offset is 65528 bytes, which is greater than the maximum packet length of 65515 (minus the 20-byte header). Time to Live (TTL), 8 bits When a packet passes through a router, this field is decremented by 1. If this field is zero, the router discards it. Protocol, 8 bit
  • 1 - ICMP
  • 6 - TCP
  • 17 - UDP
Header checksum, 16 bits The sum of 16-bit words in the header is calculated, except for the checksum itself. This sum is also summed in blocks of 16 bits until one remains. Negation is then applied to the result bitwise. Sender address, 32 bits Everything is clear here Recipient address, 32 bits Everything is clear here too. Options (optional field)

Rarely used. Consists of header-data blocks. The option header is 8-16 bits long and consists of the following fields:

  • Option type, 8 bits – a field that determines what kind of option it is. The value “0” means the end of the list of options. A total of 26 codes are registered.
  • Length, 8 bits – the size of the entire option in bits, including the header. For some types of options may not be available.

ARP

IP defines logical addresses. However, to send the package to Ethernet networks, you also need to know the physical address of the target node (or router). ARP is used to map one to the other.

ARP (Address Resolution Protocol) is formally a network (3rd) layer protocol in the OSI model, although in fact it ensures interaction between layers 2 and 3. ARP is implemented for various pairs of Layer 2 and Layer 3 protocols.

The protocol itself is built on a simple request-response scheme. Let's look at a specific example.

If host A, say, with logical address 198.51.100.1 (on network 198.51.100.0/24) wants to send a packet to host B, with logical address 198.51.100.2, it sends a Layer 2 protocol (in this case Ethernet) broadcast request with the encapsulated message An ARP asking network nodes what is the physical address of the node with the logical address 198.51.100.2, and containing the logical and physical addresses of node A. Node B, seeing its own logical address in the request, sends a response to node A at the logical and physical address received in the request. Query results are cached.

ARP messages have the following structure:

Physical protocol (HTYPE), 2 bytes Layer 2 protocol used. Ethernet has an ID of 1. Logical Protocol (PTYPE), 2 bytes Layer 3 protocol used. Corresponds to EtherTypes. IPv4 has an ID of 0x0800. Physical address length (HLEN), 1 byte Physical address length in octets, for Ethernet – 6 Logical address length (PLEN), 1 byte Logical address length in octets, for IPv4 – 4 Operation (OPER), 2 bytes 1 for request, 2 for an answer, and many other options for protocol extensions. Sender's physical address (SHA), HLEN byte In the request - the requester's address. The response contains the address of the requested node. Logical sender address (SPA), PLEN bytes
The recipient's physical address (THA), HLEN byte is ignored in the request. The response contains the address of the requester. Receiver logical address (TPA), PLEN byte

Typically, network hosts also send ARP messages when changing the IP address or when turning on. Typically this is implemented as an APR request where TPA=SPA and THA=0. Another option is an ARP response in which TPA=SPA and THA=SHA.

In addition, ARP can be used to detect a logical address conflict (with SPA=0).

There are protocol extensions that perform reverse operations, InARP (Inverse ARP), which obtains an L3 address from an L2 address, and RARP, which obtains the L3 address of the requesting node.

RARP was used for auto-configuring L3 addresses. Subsequently replaced by BOOTP and then DHCP.

Routing in IPv4 networks

The basic routing algorithm in IPv4 networks is called the forwarding algorithm.

If there is a target address D and a network prefix N, then

  • If N matches the network prefix of the current node, send the data over the local link.
  • If there is a route for N in the routing table, send the data to the next-hop router.
  • If there is a default route, send next-hop data to the default router
  • Otherwise - an error.

The routing table is a table of mapping network addresses and next-hop router addresses for these networks. So, for example, a node with the address 198.51.100.54/24 may have the following routing table: 203.0.113.0/24

Destination Gateway Device
198.51.100.0/24 0.0.0.0 eth0
203.0.113.0/24 198.51.100.1 eth0
0.0.0.0/0 203.0.113.1 eth0

Fundamentally, the route is also tied to network device, from which the data should be sent.

If a node can be reached via multiple routes, the route with the longer netmask (i.e., more specific) is selected. There can only be one default route.

For example, node 198.51.100.54/24 has a routing table:

Destination Gateway Device
198.51.100.0/24 0.0.0.0 eth0
203.0.113.0/24 198.51.100.1 eth0
203.0.113.224/27 198.51.100.5 eth0

Internal routing protocol RIP

This routing protocol is designed for relatively small and relatively homogeneous networks. The route is characterized by a vector of distance to the destination. Each router is assumed to be the starting point of multiple routes to the networks it is associated with. Descriptions of these routes are stored in a special table called a routing table. The RIP routing table contains an entry for each machine being served (for each route). The entry must include:

  • Destination IP address.
  • Route metric (from 1 to 15; number of steps to destination).
  • IP address of the closest router (gateway) on the way to the destination.
  • Route timers.

Periodically (every 30 seconds), each router broadcasts a copy of its routing table to all neighboring routers with which it is directly connected. The destination router looks up the table. If a new path is present in the table or a message about a shorter route, or there are changes in path lengths, these changes are recorded by the recipient in its routing table. The RIP protocol must be able to handle three types of errors:

Cyclic routes.

To suppress instabilities, the RIP should use a small value for the maximum possible number of steps (no more than 16).

Slow distribution of routing information across the network creates problems when the routing situation changes dynamically (the system does not keep up with the changes). A small metric limit improves convergence, but does not eliminate the problem.

OSPF Link State Protocol

The OSPF (Open Shortest Path Firs) protocol is an implementation of the link state algorithm (adopted in 1991) and has many features designed for use in large heterogeneous networks.

The OSPF protocol computes routes on IP networks while preserving other protocols for exchanging routing information.

Directly connected routers are called "neighbors". Each router stores information about what state it thinks its neighbor is in. The router relies on neighboring routers and forwards data packets to them only if it is confident that they are fully operational. To find out the state of connections, neighboring routers quite often exchange short HELLO messages.

To distribute link status information throughout the network, routers exchange other types of messages. These messages are called router links advertisement - an announcement about the router links (more precisely, about the state of the links). OSPF routers exchange not only their own, but also other people's connection advertisements, ultimately receiving information about the state of all connections in the network. This information forms a graph of network connections, which, of course, is the same for all routers on the network.

BGP protocol

The general scheme of how BGP works is as follows. BGP routers of neighboring systems that decide to exchange routing information establish connections with each other using the BGP protocol and become BGP neighbors (BGP peers).

Next, BGP uses an approach called path vector, which is a development of the distance vector approach. BGP neighbors send (announce, advertise) path vectors to each other. A path vector, unlike a distance vector, contains not just the network address and distance to it, but the network address and a list of path attributes that describe various characteristics route from the sending router to the specified network. In the following, for brevity, we will call a set of data consisting of a network address and attributes of the path to this network a route to this network.

BGP Implementation

A pair of BGP neighbors establishes a connection with each other using the TCP protocol, port 179. Neighbors belonging to different ASs must be directly accessible to each other; for neighbors from the same AS there is no such restriction, since the internal routing protocol will ensure the availability of all necessary routes between nodes of one autonomous system.

The flow of information exchanged between BGP neighbors over TCP consists of a sequence of BGP messages. The maximum message length is 4096 octets, the minimum is 19. There are 4 types of messages.

Or gateway, is a network node with several IP interfaces (containing its own MAC address and IP address) connected to different IP networks, which, based on solving the routing problem, redirects datagrams from one network to another for delivery from the sender to the recipient.

They are either specialized computing machines, or computers with several IP interfaces, the operation of which is controlled by special software.

Routing in IP networks

Routing is used to receive a packet from one device and forward it across the network to another device via other networks. If there are no routers on the network, then routing is not supported. Routers route (forward) traffic to all networks that make up the internetwork.

To route a packet, the router must have the following information:

  • Destination address
  • A nearby router from which it can learn about remote networks
  • Available paths to all remote networks
  • The best path to each remote network
  • Methods for maintaining and checking routing information

The router learns about remote networks from neighboring routers or from network administrator. The router then builds a routing table that describes how to find remote networks.

If the network is connected directly to the router, it already knows how to route the packet to that network. If the network is not directly connected, the router must learn (learn) access paths to the remote network using static routing (the administrator manually enters the location of all networks into the routing table) or using dynamic routing.

Dynamic routing is a routing protocol process that determines how a device communicates with neighboring routers. The router will update information about each network it learns. If a change occurs in the network, the dynamic routing protocol automatically informs all routers of the change. If static routing is used, the system administrator will have to update the routing tables on all devices.

IP routing is a simple process that is the same on networks of any size. For example, the figure shows the process of step-by-step interaction between host A and host B on another network. In the example, the user of host A requests the IP address of host B by ping. Further operations are not so simple, so let’s look at them in more detail:

  • IP calls ARP to find out the destination network for the packet by looking at the IP address and subnet mask of host A. This is a request to the remote host, i.e. the packet is not destined for a host on the local network, so the packet must be forwarded to the router to be forwarded to the desired remote network.
  • In order for host A to send a packet to the router, the host must know the hardware address of the router interface connected to the local network. The network layer passes the packet and hardware destination address to the data link layer to be framed and forwarded to the local host. To obtain a hardware address, the host looks up the location of the destination in its own memory, called the ARP cache.
  • If the IP address has not yet been reached and is not present in the ARP cache, the host sends an ARP broadcast to look up the hardware address at IP address 172.16.10.1. This is why the first Ping request will usually time out, but the other four requests will succeed. Once an address is cached, there is usually no timeout.
  • The router responds and reports the hardware address of the Ethernet interface connected to the local network. Now the host has all the information to forward the packet to the router over the local network. The network layer passes the packet down to generate an ICMP echo request (Ping) at the data link layer, appending the packet with the hardware address to which the host should send the packet. The packet has source and destination IP addresses along with an indication of the packet type (ICMP) in the network layer protocol field.
  • The data link layer forms a frame that encapsulates the packet along with the control information necessary for forwarding over the local network. This information includes the source and destination hardware addresses, as well as the value in the type field set by the network layer protocol (this will be the type field since IP uses Ethernet_II frames by default). Figure 3 shows a frame generated at the link layer and forwarded over the local media. Figure 3 shows all the information needed to communicate with the router: source and destination hardware addresses, source and destination IP addresses, data, and check sum Frame CRC, located in the FCS (Frame Check Sequence) field.
  • Host A's link layer transmits the frame physical level. There, zeros and ones are encoded into a digital signal and then transmitted over a local physical network.

  • The signal reaches the router's Ethernet 0 interface, which is synchronized to the digital signal preamble to retrieve the frame. After constructing the frame, the router interface checks the CRC, and at the end of receiving the frame, compares the received value with the contents of the FCS field. In addition, it checks the transfer process for media fragmentation and conflicts.
  • The destination hardware address is checked. Since it matches the router's address, the frame type field is analyzed to determine what to do next with this data packet. The type field specifies the IP protocol, so the router passes the packet to the IP protocol process running on the router. The frame is deleted. The original packet (generated by host A) is placed in the router's buffer.
  • The IP protocol looks at the destination IP address in the packet to determine whether the packet is destined for the router itself. Since the destination IP address is 172.16.20.2, the router determines from its routing table that network 172.16.20.0 is directly connected to Ethernet interface 1.
  • The router forwards the packet from the buffer to Ethernet interface 1. The router needs to frame it to forward the packet to the destination host. The router first checks its ARP cache to determine whether the hardware address has already been resolved during previous interactions with the given network. If the address is not in the ARP cache, the router sends an ARP broadcast request to Ethernet interface 1 to look up the hardware address for IP address 172.16.20.2.
  • Host B responds with the hardware address of its network adapter to an ARP request. The router's Ethernet 1 interface now has everything it needs to forward the packet to its final destination. The figure shows a frame generated by the router and transmitted over the local physical network.

The frame generated by the router's Ethernet 1 interface has a source hardware address from Ethernet interface 1 and a destination hardware address for the host B network adapter. It is important to note that, despite changes in the source and destination hardware addresses, on each router interface that sent the packet, the IP addresses source and destination never change. The package is not modified in any way, but the frames are changed.

  • Host B receives the frame and checks the CRC. If the check is successful, the frame is discarded and the packet is transferred to the IP protocol. It analyzes the destination IP address. Since the destination IP address is the same as the address set in Host B, the IP protocol examines the protocol field to determine the destination of the packet.
  • Our packet contains an ICMP echo request, so Host B generates a new ICMP echo reply with a source IP address equal to Host B and a destination IP address equal to Host A. The process starts again, but in the opposite direction. However, the hardware addresses of all devices along the packet's path are already known, so all devices will be able to obtain the hardware addresses of the interfaces from their own ARP caches.

In large networks, the process is similar, but the packet will have to travel more hops on the way to the destination host.

Routing tables

In the TCP/IP stack, routers and end nodes make decisions about who to pass a packet to in order to successfully deliver it to the destination node, based on so-called routing tables.

The table is a typical example of a route table using network IP addresses for the network shown in the figure.

Routing table for Router 2

The table shows a multi-route routing table, since it contains two routes to network 116.0.0.0. In the case of constructing a single-route routing table, it is necessary to specify only one path to network 116.0.0.0 based on the lowest metric value.

As you can easily see, several routes with different parameters are defined in the table. You need to read each such entry in the routing table as follows:

To deliver a packet to a network with an address from the field Network address and a mask from the Network Mask field, you need to send a packet from the interface with the IP address from the Interface field to the IP address from the Gateway Address field, and the “cost” of such delivery will be equal to the number from the Metrics field.

In this table, the "Destination Network Address" column indicates the addresses of all networks to which this router can transmit packets. The TCP/IP stack adopts the so-called one-hop approach to optimizing the packet forwarding route (next-hop routing) - each router and end node takes part in choosing only one packet transmission step. Therefore, each line of the routing table does not indicate the entire route as a sequence of IP addresses of the routers through which the packet must pass, but only one IP address - the address of the next router to which the packet must be transmitted. Along with the packet, responsibility for choosing is transferred to the next router next step routing The one-hop approach to routing means a distributed solution to the route selection problem. This removes the restriction on the maximum number of transit routers along the packet's path.

To forward a packet to the next router, knowledge of its local address is required, but in the TCP/IP stack it is common practice to use only IP addresses in routing tables to store them universal format, independent of the type of networks included in the Internet. To find a local address from a known IP address, you must use the ARP protocol.

One-hop routing has another advantage - it allows you to reduce the size of routing tables in end nodes and routers by using the so-called default route (0.0.0.0) as the destination network number, which usually occupies the routing table last line. If there is such an entry in the routing table, then all packets with network numbers that are not in the routing table are sent to the router specified in the default line. Therefore, routers often store limited information about Internet networks in their tables, forwarding packets for other networks to the default port and router. The default router is assumed to forward the packet to the backbone, and routers connected to the backbone have full information about the composition of the Internet.

In addition to the default route, there may be two types of special entries in the routing table - an entry about a host-specific route and an entry about the addresses of networks directly connected to the router ports.

A host-specific route contains a full IP address instead of a network number, that is, an address that has non-zero information not only in the network number field, but also in the host number field. It is assumed that for such an end node the route should be chosen differently from all other nodes in the network to which it belongs. In the case when the table contains different records about the progress of packets for the entire network N and its individual node, which has address N,D, upon arrival of a packet addressed to node N,D, the router will give preference to the entry for N,D.

Entries in the routing table related to networks directly connected to the router contain zeros (“connected”) in the “Metrics” field.

Routing Algorithms

Basic requirements for routing algorithms:

  • accuracy;
  • simplicity;
  • reliability;
  • stability;
  • justice;
  • optimality.

There are various algorithms for constructing tables for one-hop routing. They can be divided into three classes:

  • simple routing algorithms;
  • fixed routing algorithms;
  • adaptive routing algorithms.

Regardless of the algorithm used to build the routing table, the result of their work has a single format. Due to this, in the same network, different nodes can build routing tables according to their own algorithms, and then exchange missing data with each other, since the formats of these tables are fixed. Therefore, a router using an adaptive routing algorithm can provide an end node using a fixed routing algorithm with path information to a network that the end node knows nothing about.

Easy routing

This is a routing method that does not change when the topology and state of the data transmission network (DTN) changes.

Simple routing is provided by various algorithms, typical of which are the following:

  • Random routing is the transmission of a message from a node in any randomly selected direction, with the exception of the directions in which the message was received by the node.
  • Flooding routing is the transmission of a message from a node in all directions except the direction in which the message arrived at the node. This routing guarantees short packet delivery time, at the expense of throughput degradation.
  • Routing based on previous experience - each packet has a counter for the number of nodes passed, in each communication node the counter is analyzed and the route that corresponds to the minimum value of the counter is remembered. This algorithm allows you to adapt to changes in network topology, but the adaptation process is slow and ineffective.

In general, simple routing does not provide directional packet transmission and has low efficiency. Its main advantage is to ensure stable operation of the network in the event of failure of various parts of the network.

Fixed Routing

This algorithm is used in networks with a simple connection topology and is based on the manual compilation of a routing table by the network administrator. The algorithm often works effectively also for backbones of large networks, since the backbone itself can have a simple structure with obvious the best ways The following algorithms distinguish packets in subnets connected to the backbone:

  • Single-path fixed routing is when a single path is established between two subscribers. A network with such routing is unstable to failures and overloads.
  • Multi-path fixed routing - several possible paths can be established and a path selection rule is introduced. The efficiency of such routing decreases as the load increases. If any communication line fails, it is necessary to change the routing table; for this, several tables are stored in each communication node.

Adaptive Routing

This is the main type of routing algorithms used by routers in modern networks with complex topologies. Adaptive routing is based on the fact that routers periodically exchange special topological information about the networks available on the Internet, as well as about the connections between routers. Usually, not only the topology of links is taken into account, but also their capacity and condition.

Adaptive protocols allow all routers to collect information about the topology of connections in the network, quickly processing all changes in the connection configuration. These protocols are distributed in nature, which is expressed in the fact that there are no dedicated routers in the network that would collect and summarize topological information: this work is distributed among all routers, the following algorithms are distinguished:

  • Local adaptive routing - each node contains information about the link state, queue length and routing table.
  • Global adaptive routing is based on the use of information received from neighboring nodes. To do this, each node contains a routing table, which indicates the transit time of messages. Based on information received from neighboring nodes, the table value is recalculated taking into account the queue length in the node itself.
  • Centralized adaptive routing - there is some central node that collects information about the state of the network. This center generates control packets containing routing tables and sends them to communication nodes.
  • Hybrid adaptive routing is based on the use of a table periodically sent by the center and on analyzing the queue length from the node itself.

Algorithm indicators (metrics)

Routing tables contain information that switching programs use to select the best route. What characterizes the construction of routing tables? What is the nature of the information they contain? IN this section, dedicated to the performance of algorithms, an attempt is made to answer the question of how an algorithm determines the preference of one route over others.

Routing algorithms use many different metrics. Complex routing algorithms can rely on multiple metrics when selecting a route, combining them in such a way that the result is one hybrid metric. The following are the metrics used in routing algorithms:

  • Route length.
  • Reliability.
  • Delay.
  • Bandwidth.

Route length.

Route length is the most common routing metric. Some routing protocols allow network administrators to assign arbitrary prices to each network link. In this case, the path length is the sum of the costs associated with each channel that was traversed. Other routing protocols define a "hop count," a metric that describes the number of trips a packet must make on its way from its source to its destination through network aggregation elements (such as routers).

Reliability.

Reliability, in the context of routing algorithms, refers to the reliability of each link in the network (usually described in terms of bit-to-error ratio). Some network links may fail more often than others. Failures of some network links can be resolved more easily or quickly than failures of other links. When assigning reliability ratings, any reliability factors can be taken into account. Reliability ratings are typically assigned to network channels by administrators. As a rule, these are arbitrary digital values.

Delay.

Routing latency typically refers to the length of time it takes for a packet to travel from its source to its destination across an internetwork. Latency depends on many factors, including the bandwidth of the intermediate links in the network, the queues at the port of each router along the packet's path, network congestion on all intermediate links in the network, and the physical distance over which the packet must travel. Because there is a conglomeration of several important variables, latency is the most common and useful metric.

Bandwidth.

Bandwidth refers to the available traffic capacity of any link. All other things being equal, a 10 Mbps Ethernet channel is preferable to any leased line with a 64 KB/s bandwidth. Although bandwidth is an estimate of the maximum achievable capacity of a link, routes passing through higher-bandwidth links are not necessarily better than routes passing through slower links.