The global computer network Internet was originally built according to the following scheme: a backbone network, networks called autonomous systems join it. 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 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) carry 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 other autonomous systems.
OSPF (Open Shortest Path First) was adopted in 1991. This is a modern protocol designed to work in large heterogeneous networks with a complex topology, including loops. It is based on the link state algorithm, which is highly resistant to network topology changes.
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 the transport layer.
The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) operate at this layer. The TCP protocol provides reliable message passing between remote application processes through the formation of logical connections. This protocol allows peer entities on the sending and receiving computers to communicate in duplex mode. TCP allows error-free delivery of a byte stream generated on one of the computers to any other computer that is part of the composite network. TCP divides the stream of bytes into parts - segments, and transfers them to the underlying level of internetworking. Once these segments have been delivered by the internetworking layer to their destination, TCP will reassemble them into a continuous stream of bytes.
The UDP protocol provides the transfer of application packets in a datagram manner, like the main protocol of the IP internetworking layer, and acts 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 to check stack configuration and test network connectivity.
Utility | Application |
arp | Displays for viewing and editing the address translation table used by the ARP (Address Resolution Protocol) address resolution protocol - determines the local address from an IP address |
hostname | Displays the name of the local host. Used without parameters. |
ipconfig | Displays values for the current TCP/IP stack configuration: IP address, subnet mask, default gateway address, WINS (Windows Internet Naming Service) and DNS (Domain Name System) addresses |
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 a TCP/IP connection. |
nslookup | Performs verification of records and domain aliases of hosts, domain services of hosts, and information operating system, by querying DNS servers. |
ping | Performs validation of TCP/IP configuration and pings to a remote host. |
route | Modifies IP routing tables. Displays the contents of the table, adds and removes IP routes. |
tracert | Verifies the route to a remote computer by sending ICMP (Internet Control Message Protocol) echo packets. Displays the path of packets to the remote computer. |
The ipconfig utility is used to verify that TCP/IP is configured correctly. This command is useful on computers running Dynamic Host Configuration Protocol (DHCP) 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 if the configuration is initialized and if there are duplicate IP addresses:
- if the configuration is initialized, then the IP address, mask, gateway appears;
- if IP addresses are duplicated, then the netmask will be 0.0.0.0;
- if using DHCP the computer could not obtain an IP address, then it will be equal to 0.0.0.0 .
The ping (Packet Internet Grouper) utility is used to check 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 the network host.
The ping command verifies a connection to a remote host by sending ICMP echo packets to that host and listening for echo responses. Ping waits for each packet sent and prints the number of packets sent and received. Each received packet is checked against the transmitted message. If communication between hosts is bad, the ping messages will show how many packets are lost.
By default, 4 echo packets are sent, 32 bytes long (a periodic sequence of uppercase alphabetic characters). Ping allows you to change the size and number of packets, specify whether the route it uses should be recorded, 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 returns back. Because the default value for waiting for a response is 1 second, all values in this field will be less than 1000 milliseconds. If you get a "Request time out" message, it's possible that if you increase the response timeout, the packet will reach the remote host.
Ping can be used to test both the hostname (DNS or NetBIOS) and its IP address. If the ping succeeds with the IP address but fails with the name, the problem is with the address/name match, not with the network connection.
The ping utility is used in the following ways:
1) To verify that TCP/IP is installed and properly configured on the local machine, the ping command specifies the loopback address: ping 127.0.0.1
2) To make sure that the computer is correctly added to the network and the IP address is not duplicated, the IP address of the local computer is used:
ping localhost_ip_address
3) To verify that the default gateway is functioning and that any local host on the local network can be connected, the IP address of the default gateway is set:
ping gateway_ip address
4) To check the possibility of establishing a connection through the router, the ping command specifies the IP address of the remote host:
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 the ICMP error message to determine the route from one host to another.
The tracert utility can be more informative and convenient than ping, especially in cases where the remote host is unreachable. It can be used to determine the area of communication problems (at the ISP, on the core network, on the remote host network) by how far the route will be tracked. If there are problems, the utility displays asterisks (*) or messages like "Destination net unreachable", "Destination host unreachable", "Request time out", "Time Exeeded".
The tracert utility works like this: it sends 3 probe echo packets to each host through which the route to the remote host passes. At the same time, the response time for each packet is displayed on the screen (It can be changed using a special parameter). Packets are sent with different time-to-live values. Each router along the path decrements the TTL value by one before forwarding the packet. Thus, the lifetime is a counter of intermediate delivery points (hops). When the packet lifetime 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 on each successive packet until either the packet reaches the remote host or the maximum possible TTL 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 to the 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 stored in the cache permanently. Dynamic entries are cached as a result of broadcast requests. For them there is a concept of lifetime. If within a certain time (by default 2 minutes) the entry has not been claimed, then it is removed from the cache.
The netstat utility allows you to get 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, it can be used to detect network perimeter security breaches.
Syntax:
netstat [-a] [-e] [-n] [-s] [-p protocol] [-r]
Options:
-a lists all network connections and listening ports of the local computer;
-e displays statistics for Ethernet interfaces (for example, the number of bytes received and sent);
-n displays information on all current connections (for example, TCP) for all network interfaces of 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 UDP, TCP, ICMP, IP protocols. The "/more" key allows you to view information page by page;
-r displays the contents of the routing table.
TCP/IP communication protocol
The Internet, which is a network of networks and unites a huge number of different local, regional and corporate networks, functions and develops thanks to the use of a single TCP / IP data transfer protocol. The term TCP/IP includes the names of two protocols:
- Transmission Control Protocol (TCP) - transport protocol;
- Internet Protocol (IP) is a routing protocol.
Routing protocol. The IP protocol provides for the transfer of information between computers on a network. Let's consider the operation of this protocol by analogy with the transfer of information using regular mail. In order for the letter to reach its destination, the address of the recipient (to whom the letter is) and the address of the sender (from whom the letter is from) are indicated on the envelope.
Similarly, information transmitted over the network is "packed into an envelope" on which the IP addresses of the recipient's and sender's computers are "written", for example, "To: 198.78.213.185", "From: 193.124.5.33". The contents of the envelope in computer language is called by IP packet and is a set of bytes.
In the process of forwarding ordinary letters, they are first delivered to the post office closest to the sender, and then transferred along the chain of post offices to the post office closest to the recipient. At intermediate post offices, letters are sorted, that is, it is determined to which next post office a particular letter must be sent.
IP packets on the way to the recipient computer also pass through numerous intermediate Internet servers on which the operation is performed. routing. As a result of routing, IP packets are sent from one Internet server to another, gradually approaching the recipient computer.
Internet Protocol (IP) provides routing of IP packets, that is, the delivery of information from the sending computer to the receiving computer.
Determination of the route of information passage. The "geography" of the Internet differs significantly from the geography we are accustomed to. The speed of obtaining information does not depend on the remoteness of the Web server, but on the number of intermediate servers and the quality of the communication lines (their bandwidth) through which information is transmitted from node to node.
You can get acquainted with the route of information on the Internet quite simply. Special Program tracert.exe, which is included with Windows, allows you to track through which servers and with what delay information is transmitted from the selected Internet server to your computer.
Let's see how access to information is realized in the "Moscow" part of the Internet to one of the most popular search servers of the Russian Internet www.rambler.ru.
Determination of the information flow path
2. In the window MS-DOS session in response to the system prompt to enter the command .
3. After a while, a trace of information transfer will appear, that is, a list of nodes through which information is transmitted to your computer, and the time of transmission between nodes.
Tracing the information transfer route shows that the www.rambler.ru server is at a "distance" of 7 hops from us, i.e. the information is transmitted through six intermediate Internet servers (through the servers of the Moscow providers MTU-Inform and Demos). The speed of information transfer between nodes is quite high, one "transition" takes from 126 to 138 ms.
transport protocol. Now imagine that we need to send a multi-page manuscript by mail, but the post office does not accept parcels and parcels. The idea is simple: if the manuscript does not fit into a regular postal envelope, it should be sorted into sheets and sent in several envelopes. At the same time, the sheets of the manuscript must be numbered, so that the recipient knows in what sequence these sheets should be joined later.
On the Internet, a similar situation often occurs when computers exchange large files. If you send such a file in its entirety, then it can "clog" the communication channel for a long time, making it inaccessible for sending other messages.
To prevent this from happening, on the sender computer, it is necessary to split a large file into small parts, number them and transport them in separate IP packets to the recipient computer. On the receiving computer, you need to assemble the source file from the individual parts in the correct sequence.
Transmission Control Protocol (TCP), that is, the transport protocol, provides for splitting files into IP packets during transmission and assembling files during receipt.
Interestingly, for the IP protocol responsible for routing, these packets are completely unrelated to each other. Therefore, the last IP packet may well overtake the first IP packet along the way. It may happen that even the delivery routes of these packages will be completely different. However, TCP will wait for the first IP packet and reassemble the source file in the correct sequence.
Determination of the time of exchange of IP packets. The time of IP packet exchange between the local computer and the Internet server can be determined using the ping utility, which is part of the operating system. Windows systems. The utility sends four IP packets to the specified address and shows the total transmission and reception time for each packet.
Determination of IP packet exchange time
1. Connect to the Internet, enter the [Programs-MS-DOS Session] command.
2. In the window MS-DOS session in response to the system prompt to enter the command .
3. In the window MS-DOS session the result of the test passage of the signal in four attempts will be displayed. The response time characterizes the speed parameters of the entire chain of communication lines from the server to the local computer.
Questions for reflection
1. What ensures the holistic functioning of the global computer network Internet?
Practical tasks
4.5. Track the route of information from one of the most popular Internet search servers www.yahoo.com, located in the "American" segment of the Internet.
4.6. Determine the time of exchange of IP packets with the www.yahoo.com server.
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-2.jpg" alt="(!LANG:>IP Routing Protocol">!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-3.jpg" alt="(!LANG:>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="(!LANG:>IP version l version 4, or IPv 4 l version 6 (IPv6)"> Версии 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="(!LANG:>Structure l For convenience 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="(!LANG:>Subnet mask l The subnet mask is a 32-bit number consisting of going"> Маска подсети l Маска подсети - это 32 разрядное число, состоящее из идущих вначале единиц, а затем - нулей, например (в десятичном представлении) 255. 0 ИЛИ 255. 240. 0.!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-7.jpg" alt="(!LANG:>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="(!LANG:>Rules for assigning network and host IP addresses 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="(!LANG:>Rules for assigning network and host IP addresses l host 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="(!LANG:>l IP addresses are allocated globally 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="(!LANG:>Classic and classless IP addressing">!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-12.jpg" alt="(!LANG:>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="(!LANG:>Address classes in original IP addressing scheme Class First Possible number of bits in"> Классы адресов в первоначальной схеме 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="(!LANG:>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="(!LANG:>Problem Solving 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="(!LANG:>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="(!LANG:>l Calculate 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="(!LANG:>LANG IP addresses l All addresses used on the Internet, must register in"> 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="(!LANG:>IP Routing Basics l to properly communicate with other computers and networks , each"> Основы IР-маршрутизации l чтобы правильно взаимодействовать с другими компьютерами и сетями, каждый компьютер определяет, какие IP адреса принадлежат его локальной сети, а какие - удаленным сетям. l если выясняется, что IP адрес компьютера назначения принадлежит локальной сети, пакет посылается непосредственно компьютеру назначения, если же это адрес удаленной сети, то пакет посылается по адресу основного шлюза.!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-20.jpg" alt="(!LANG:>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="(!LANG:>Example Task: send an IP packet to address 192. 168. 5. 15. l the computer is performing"> Пример Задача: отправить IP-пакет по адресу 192. 168. 5. 15. l компьютер выполняет операцию логического «И» с IP адресом компьютера назначения и собственной маской подсети. l полученный в результате идентификатор сети назначения будет совпадать с идентификатором собственной сети компьютера отправителя.!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-22.jpg" alt="(!LANG:>Example him"> Пример Так наш компьютер определит, что компьютер назначения находится в одной с ним сети, и выполнит следующие операции: l с помощью протокола ARP будет определен физический МАС адрес, соответствующий IP адресу компьютера назначения; l с помощью протоколов канального и физического уровня по этому МАС адресу будет послана нужная информация.!}
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-23.jpg" alt="(!LANG:>Example 2 Task: send an IP packet to address 192. 168 10. 20. l The computer will"> Пример 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="(!LANG:> Ways to configure IP settings and check if it works 1. manually assign (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. automatically obtain an IP address. Dedicated servers that support the Dynamic Host Configuration Protocol (DHCP) f function to serve requests from clients for an IP address and other information necessary for proper network operation. If the DHCP server is not available (missing or not working), then starting from Windows versions 98 computers assign themselves an IP address. This uses the Automatic Private IP Addressing (APIPA) mechanism, for which the address range 169.254.0.0 - 169.254.255 has been registered by Microsoft with IANA.
Src="https://present5.com/presentation/3/159928527_437552731.pdf-img/159928527_437552731.pdf-25.jpg" alt="(!LANG:>Checking IP 1. IPCONFIG /ALL. 2 parameters and functionality 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="(!LANG:>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="(!LANG:>Questions 1. What are IP address classes? determined? 2."> Вопросы 1. Что такое классы IP адресов? По каким правилам они определяются? 2. Как назначить IP адреса в локальной сети (без выхода в Интернет)? 3. Каковы основные принципы маршрутизации пакетов в локальных и удаленных сетях? 4. Что такое таблица маршрутов (таблица маршрутизации)? Объясните смысл каждой из ее колонок. 5. Как «прописать» в таблице маршрутизации отсутствующий в ней новый маршрут? 6. Что такое динамическая конфигурация узлов? Для чего она нужна? 7. В чем заключается технология автоматической личной IP адресации? 8. Каков типовой алгоритм проверки работоспособности протокола IP?!}
Protocol RIP (Routing Information Protocol) is one of the oldest protocols for the exchange of routing information, but it is still extremely common in computer networks. In addition to a RIP version for TCP/IP networks, there is also a RIP version for IPX/SPX networks from Novell.
In this protocol, all networks have numbers (the way the number is formed depends on the network layer protocol used in the network), and all routers have identifiers. The RIP protocol makes extensive use of the concept of "distance vector". The distance vector is a set of pairs of numbers that are numbers of networks and distances to them in hops.
Distance vectors are iteratively propagated by routers over the network, and after a few steps each router has data on the networks it can reach and the distances to them. If the connection with any network breaks, then the router notes this fact by assigning the maximum possible value to the vector element corresponding to the distance to this network, which has a special meaning - "no connection". This value in the RIP protocol is the number 16.
Figure 8.1 shows an example of a network consisting of six routers with IDs 1 to 6 and six networks A to F formed by direct point-to-point links.
Rice. 8.1. Exchange of routing information using the RIP protocol
The figure shows the initial information contained in the topological base of router 2, as well as information in the same base after two iterations of the exchange of routing packets of the RIP protocol. After a certain number of iterations, router 2 will know the distances to all networks on the Internet, and it may have several alternative options for sending a packet to the destination network. Let in our example, the destination network is network D.
When it needs to send a packet to network D, the router looks up its route database and selects the port that has the shortest distance to the destination network (in this case, the port that connects it to router 3).
A timer is associated with each routing table entry to adapt to changes in the state of links and equipment. If no new message is received within the timeout confirming this route, then it is removed from the routing table.
When using the RIP protocol, the heuristic Bellman-Ford dynamic programming algorithm works, and the solution found with its help is not optimal, but close to optimal. The advantage of the RIP protocol is its computational simplicity, and the disadvantages are the increase in traffic with periodic broadcast packets and the non-optimality of the found route.
Figure 8.2 shows a case of unstable network operation via the RIP protocol when the configuration is changed - the communication link between router M1 and network 1 fails. When this connection is operational, each router has an entry in the route table about network number 1 and the corresponding distance to it.
Rice. 8.2. An example of unstable network operation when using the RIP protocol
When the connection with network 1 is broken, router M1 notes that the distance to this network has taken the value 16. However, after receiving a routing message from router M2 after some time that the distance from it to network 1 is 2 hops, router M1 increases this distance by 1 and notes that network 1 is reachable through router 2. As a result, a packet destined for network 1 will circulate between routers M1 and M2 until the network 1 entry in router 2 expires and it transmits this information router M1.
To avoid such situations, routing information about the network known to the router is not transmitted to the router from which it came.
There are other, more complex cases of unstable behavior of networks using the RIP protocol when the state of the links or routers of the network changes.
5.4.1. Internal and external Internet routing protocols
Most of the routing protocols used in today's packet-switched networks have their origins in the Internet and its predecessor, the ARPANET. In order to understand their purpose and features, it is useful to first become familiar with the structure of the Internet, which has left its mark on the terminology and types of protocols.
The Internet was originally built as a network connecting a large number of existing systems. From the very beginning, its structure was distinguished backbone network (care backbone network), and the networks attached to the backbone were considered as autonomous systems (autonomous systems, AS). The backbone network and each of the autonomous systems had their own administration and their own routing protocols. It should be emphasized that the autonomous system and the Internet name domain are different concepts that serve different purposes. An autonomous system combines networks in which routing is carried out under the general administrative control of one organization, and a domain combines computers (possibly belonging to different networks) in which unique symbolic names are assigned under the general administrative control of one organization. Naturally, the scope of an autonomous system and a name domain may in a particular case overlap if one organization performs both of these functions.
The general scheme of the Internet network architecture is shown in fig. 5.25. In what follows, we will refer to routers as gateways to stay in line with traditional Internet terminology.
The gateways that are used to form networks and subnets within an autonomous system are called internal gateways (interiorgateways), and the gateways by which autonomous systems join the backbone of the network are called external gateways. The backbone of the network is also an autonomous system. All autonomous systems have a unique 16-digit number, which is allocated by the organization that established the new autonomous system, InterNIC.
Accordingly, routing protocols within autonomous systems are called interior gateway protocols (IGP), and the protocols that determine the exchange of routing information between external gateways and gateways of the backbone network - external gateway protocols (EGP). Within the backbone, any proprietary internal IGP is also allowed.
The point of dividing the entire Internet into autonomous systems is in its layered modularization, which is necessary for any large system capable of expanding on a large scale. Changing the routing protocols within an autonomous system should not affect the operation of other autonomous systems in any way. In addition, the division of the Internet into autonomous
418 Chapter 5 The Network Layer as a Builder large networks
the system should facilitate the aggregation of information in backbone and external gateways. Internal gateways can use sufficiently detailed interconnect graphs for internal routing to select the most rational route. However, if information of this level of detail is stored in all routers of the network, then the topological databases will grow so large that they require gigantic memory, and the time for making routing decisions will become unacceptably long.
Therefore, detailed topological information remains inside the autonomous system, and the autonomous system as a whole for the rest of the Internet is represented by external gateways that report the minimum necessary information about the internal composition of the autonomous system - the number of IP networks, their addresses and the internal distance to these networks from this external gateway.
The classless CIDR routing technique can significantly reduce the amount of routing information sent between autonomous systems. Thus, if all networks within an autonomous system begin with a common prefix, such as 194.27.0.0/16, then the external gateway of that autonomous system should advertise only about this address, without separately reporting the existence within this autonomous system, for example, network 194.27. 32.0/19 or 194.27.40.0/21, since these addresses are aggregated into the address 194.27.0.0/16.
5.4. Routing protocols in IP networks 419
Shown in fig. 5.25, the structure of the Internet with a single backbone corresponded to reality for a long time, therefore, a protocol for the exchange of routing information between autonomous systems, called EGP, was developed specifically for it. However, as service provider networks have evolved, the structure of the Internet has become much more complex, with arbitrary connections between autonomous systems. Therefore, the EGP protocol has given way to the BGP protocol, which allows you to recognize the presence of loops between autonomous systems and exclude them from intersystem routes. The EGP and BGP protocols are used only in external gateways of autonomous systems, which are most often organized by Internet service providers. Enterprise routers run internal routing protocols such as RIP and OSPF.
5.4.2. Distance Vector Protocol RIP
Building a routing table
RIP (Routing Information Protocol) is an internal routing protocol of the distance vector type, it is one of the earliest protocols for the exchange of routing information and is still extremely common in computer networks due to its ease of implementation. In addition to the RIP version for TCP/IP networks, there is also a RIP version for IPX/SPX networks from Novell.
For IP, there are two versions of the RIP protocol: one and two. The RIPvl protocol does not support masks, that is, it distributes between routers only information about network numbers and distances to them, and does not distribute information about the masks of these networks, considering that all addresses belong to standard classes A, B or C. The RIPv2 protocol transmits information about net masks, so it is more in line with today's requirements. Since the operation of version 2 does not fundamentally differ from version 1 in the construction of routing tables, in the future, to simplify the records, the operation of the first version will be described.
As a distance to the network, the RIP protocol standards allow various types of metrics: hops, metrics that take into account throughput, introduced delays and network reliability (that is, corresponding to the signs D, T and R in the "Quality of Service" field of the IP packet), as well as any combinations of these metrics. The metric must have the property of additivity - the metric of a composite path must be equal to the sum of the metrics of the components of this path. Most implementations of RIP use the simplest metric - the number of hops, that is, the number of intermediate routers that a packet needs to overcome to reach its destination network.
Consider the process of building a routing table using the RIP protocol using the example of a composite network shown in fig. 5.26.
Stage 1 - creating minimal tables
This network has eight IP networks connected by four routers with identifiers: Ml, M2, M3 and M4. RIP routers may have identifiers, but they are not necessary for the protocol to work. RIP messages do not carry these identifiers.
Initially in each router software the TCP/IP stack automatically generates a minimal routing table that takes into account only directly connected networks. In the figure, the addresses of the ports of the routers, in contrast to the addresses of the networks, are placed in ovals.
Table 5.14 allows you to evaluate the approximate form of the minimum routing table of the router Ml.
After each router is initialized, it starts sending RIP messages to its neighbors containing its minimum table.
5.4. Routing protocols in IP networks 421
RIP messages are sent in UDP packets and include two parameters for each network: its IP address and its distance from the sending router.
Neighbors are those routers to which this router can directly transmit an IP packet over any of its networks without using the services of intermediate routers. For example, for router Ml, the neighbors are routers M2 and M3, and for router M4, routers M2 and M3.
Thus, router M1 sends the following message to router M2 and M3:
network 201.36.14.0, distance 1;
network 132.11.0.0, distance 1;
network 194.27.18.0, distance 1.
Stage 3 - receiving RIP messages from neighbors and processing the received information
After receiving similar messages from routers M2 and M3, router Ml increments each received metric field by one and remembers through which port and from which router new information was received (the address of this router will be the address of the next router if this entry is entered in the routing table). The router then begins comparing the new information with that stored in its routing table (Table 5.16).
Table 5.16. Ml Router Routing Table