Desafios e Soluções em Redes UFMG
Desafios e Soluções em Redes UFMG
The 'flush_routerList' function serves to maintain the validity of the routing table by removing entries that are no longer up-to-date. It iteratively checks each route in the RouterList against a predefined time criterion, discarding any entries whose validity has expired. This proactive cleansing is important in the overall network routing strategy as it prevents stale or incorrect data from influencing routing decisions, ensures the accuracy of routing information, and facilitates timely and efficient routing updates across the network. The function therefore plays a crucial role in sustaining network robustness and reliability .
The concept of 'Split Horizon' implemented by the UFMG team involves optimizing routing update packets by excluding routes that should not be advertised back to their originating neighbors. When creating an update packet for a specific neighbor, the algorithm iterates over the RouterList to add distances. If an entry's destination matches the packet's destination, the iteration is skipped using a continue command. Additionally, within each distance list in RouterList[i][2], the routing logic checks if any routes correspond to the update packet's destination. If so, a flag is set, and those routes are not included. This method ensures that routes originating from a node are not included in update packets to that node, maintaining the optimization strategy of split horizon .
The primary challenge faced by the UFMG team was the trade-off between grouping a lot of information into tables used in the code without making it too complicated to manage and detect possible errors. They needed to maintain data synchronization to prevent unexpected situations, such as reading empty structures or duplicating entries due to time constraints in checks. They tackled these challenges by using a Python dictionary structure to simplify packet manipulation, which initially caused some misunderstanding because they initially considered the packet format as a large string with a specific format, leading them to spend time creating encoding and decoding functions unnecessarily .
The UFMG team implemented a periodic update strategy using a dedicated thread that cyclically executed flush and update routines. This approach involved flushing outdated entries from neighbor and routing lists, sending carefully constructed update packets to reflect current routing paths accurately, and leveraging the split horizon principle to prevent routing loops. By maintaining a regular cadence of these operations through timed sleeps (π seconds), the team ensured their routing data stayed current and synchronized across the network, enhancing overall efficiency and reducing redundant or incorrect route advertisements .
The team implemented load balancing by cycling through the list of possible routes for a destination within their distance table (RoutersList). When searching for a path to a destination, the packet is sent through the first entry of the route list. This entry is then moved to the end of the list, ensuring an even distribution of traffic across all possible paths over time. The primary advantage of this approach is that it naturally distributes network load without requiring additional complex algorithms, as each possible path is used in turn .
The UFMG team used a separate thread running an infinite loop to perform periodic updates and clean-ups. They employed two flush functions to remove expired entries from both the distance vector of each neighbor (NeighRouters) and their own routing table (RouterList). This process prevented the transmission of expired information to neighbors and ensured that routing updates were accurate and synchronized. The flush functions were executed before creating and sending update packets to neighbors, and the thread was set to sleep for a specified period (π seconds) to regulate the timing of these updates .
The 'search_path_routing' function serves as a key component in the network's path selection process by finding available routes to a specific destination in the routing table. Once a route is used, the function cycles the selected route to the end of the list, ensuring that subsequent queries distribute traffic across all available routes. This cyclic path selection thus acts as a mechanism for load balancing, as it rotates the usage evenly across multiple routes, preventing any single path from becoming overburdened and optimizing network throughput .
The team handled immediate rerouting by iterating over neighboring routers and examining each neighbor's distance table. The algorithm searched for alternative paths by checking the distance field for each destination. If a route to the desired destination was found with a smaller distance than previously recorded, it updated the path and recorded this as the current best route. This process prioritized routes with the smallest possible distances, ensuring that the most efficient alternative routes were selected for rerouting .
The update packet creation process respects the split horizon optimization strategy by ensuring that update packets exclude any information about routes that would lead back to the source of those routes. This is achieved by iterating through the routing table and skipping any entry where the route destination matches the packet destination, thus adhering to the split horizon rule. By preventing the advertisement of routes back to their origin, this strategy mitigates routing loops and enhances the accuracy of the information shared between routers .
To ensure the removal of outdated routes, the UFMG team used two main strategies: periodic flush operations and threshold-based removal criteria. The flush functions were called before sending packets or creating update packets, checking both the NeighRouters and RouterList to identify expired entries based on recorded timestamps. If the timestamp indicated expiration (exceeding four times a specified period), the route was removed. This process is crucial for network management because it prevents the propagation of outdated and potentially incorrect routing information, improving the accuracy and reliability of routing tables .