# Customer-Oriented Quality of Service Management Method for the Future Intent-Based Networking
## 3 A Description of the Proposed Customer-Oriented Quality of Service Management Method for IBN
### Development of a Simulation Model of Intent-Based Networking
#### 3.1.1 General Stages of Network Simulation
All routers contain a collection of switches they serve. When the router works, all switches are serviced while browsing this collection. There are available methods for adding switches and removing switches. Similarly, in these methods, they are added to the local collection for processing, or removal from it. Each router contains additional collections of local and global interfaces. Given the new level of packet handling in this class, there are the necessary elements for this:  
1. Route tables and methods for sending and updating;
2. A method for switching the used algorithm (traditional or proposed);
3. A method for collecting load information of all its ports, both local and global;
4. A method for collecting information from subordinate switches;
5. A method for obtaining a collection of subordinate switches;
6. A methods for adding and removing switches;
7. Other auxiliary methods. The work of such a router is different from the operation of the switch by the introduction of additional logic. First, there is a process of updating routing tables. This includes methods for sending its own table to neighbors, receiving tables from neighbors, and processing data tables and summaries in a single table, according to which the routing process will take place. The process of processing several tables and summaries to one will be considered later. After routing tables' updating, the direct received packets' processing begins. For this purpose, packets are collected from all local and global interfaces to a single collection using the _getPacketsForRouter()_ method. After that, this collection is sorted according to the active method (traditional or proposed). The following is processed according to the routing tables. To do this, we take a collection of sorted packets and process each packet separately. Then, only the header of the packet with routing addresses is read. Having read the address data from the packet when iterating the collection, we analyze the destination network. To do this, we call an auxiliary method for obtaining the destination IP address and its subnet. Next, we look for this subnet in the routing table. If the searches were unsuccessful, the packet must go to the default router (default getaway). The routing algorithm is depicted in \[M=n_{\text{hops}}\cdot\rho_{\text{port}} \tag{1}\]7  
\[M=n_{\text{hops}}\cdot\rho_{\text{port}} \tag{1}\]8 Packet routing algorithm. After processing all packets, a method for direct packet forwarding is called. Two comparators (a special class of Java programming language for object comparisons) were created for simplification and easy switching between service modes (traditional and proposed). Since these are two implementations of the same class, we have the ability to substitute any of them into methods where their base class is used. Therefore, to change the service algorithm, a special method is created that accepts a Boolean variable (true or false). Furthermore, depending on the value of this variable, we \"turn on\" and \"turn off\" the new method's working. We can do this at any time and any number of times. We call this method from the main class, which runs an infinite loop that symbolizes the work of the network and is engaged in collecting and displaying statistics and information.