Routing in FE Electrical
Understanding routing in the FE Electrical exam is crucial for success per the NCEES® FE Electrical exam guidelines and syllabus. It not only helps students pass the exam with a high passing margin but lets them succeed in the diverse electrical engineering career as an Electrical or Communication engineer.
This study guide will help you unwrap the critical routing concepts in the FE Electrical exam. Let’s discuss this in detail.
Basics of Routing
Routing determines the optimal path for data packets to travel from a source to a destination across a network. It operates at the OSI model’s network layer (Layer 3) and involves making decisions based on logical addressing, such as IP addresses.
Fundamentally, it deals with IP Address Management in the routing table and choosing the most accurate route to forward packets. Routers are the devices responsible for executing routing functions.
Let’s discuss the basics of Routing in FE Electrical that you must know.
How Routing Works?
Let’s go through the critical technicalities of routing step-by-step to understand how it works.
The Layer of Operation
- Routing operates at the OSI model’s network layer (Layer 3), differentiating it from switching.
Read our detailed guide of this series to understand switching in the FE Electrical exam.
- Routers use logical addressing, typically IP addresses, to make forwarding decisions.
- Each router maintains a routing table, which lists known networks and the corresponding paths to reach them.
- Entries in the routing table include destination network addresses, next-hop routers, and associated metrics.
- When a router receives a packet, it examines the destination IP address.
- The router consults its routing table to determine the best path to reach the destination network.
- It includes routing algorithms, such as the Shortest Path First (SPF) algorithm or the Routing Information Protocol (RIP).
- RIPs calculate the best path based on hop count, link cost, or bandwidth. [Details will be discussed in the following sections].
- Once the router determines the best path, it forwards the packet to the next-hop router or directly to the destination network.
- Routers enable communication between different networks by forwarding packets across network boundaries.
- They use logical addressing to distinguish between different networks.
Introduction to Routing Algorithms
Routing algorithms determine how data packets are transmitted across a network. There are two main types of routing algorithms: static and dynamic.
How Does It Work?
Let’s uncover how static routing works.
Network administrators manually perform VLAN configuration to configure the routing table on each router. The administrator specifies the destination network and the corresponding next hop for each entry in the routing table.
The routing table contains entries that define specific routes for each destination in the network. Each entry typically includes the destination IP address or network, the subnet mask, and the next-hop IP address or exit interface.
Once configured, the routing table remains unchanged unless a network administrator manually updates it. Unlike dynamic routing, it entertains no dynamic adaptation to changes in the network topology.
- Fast – Static routing is generally faster because routers do not need to engage in the process of dynamically updating and recalculating routes.
- Low Overhead – There is minimal overhead on the routers as they don’t need to exchange routing information with other routers.
- Changes to the routing table take effect immediately after manual configuration.
- Static routing is cost-effective as it doesn’t require the implementation of dynamic routing protocols or continuous communication between routers.
- Routing Table Update – When a packet is transmitted, the router uses the preconfigured static routes in its routing table to determine the next hop.
- Routing Decision – The router checks the destination IP address of the packet against its static routing table to decide the appropriate outgoing interface or next-hop IP address.
- Transmission – The packet is then forwarded to the next hop based on the static route information.
How Does it Work?
Routers use dynamic routing protocols to discover and maintain neighbor relationships. Standard dynamic routing protocols include RIP (Routing Information Protocol), OSPF (Open Shortest Path First), and EIGRP (Enhanced Interior Gateway Routing Protocol).
Routing Information Exchange
Routers periodically exchange routing information or in response to changes in the network topology. Information exchanged includes the network topology, reachable destinations, and associated metrics.
Update and Adaptation
Routers update their routing tables dynamically based on the received routing information. The routing algorithm adapts to changes in the network by recalculating routes in response to new information.
- Adaptive – Dynamic routing adapts to changes in the network, making it suitable for environments where the topology is subject to frequent modifications.
- Scalable – Dynamic routing can efficiently handle large and complex networks.
- Convergence time, the time it takes for routers to adjust to changes in the network, can vary and may take some time to stabilize.
- Low Cost – Dynamic routing requires more computational resources as routers communicate continuously to exchange routing information.
- Bandwidth Utilization – There is an additional cost regarding bandwidth utilization for the transmission of routing updates.
- Routing Table Update – Routers periodically exchange routing updates containing information about network changes.
- Dynamic Decision – The router dynamically recalculates the best path to reach the destination based on the received routing updates and associated metrics.
- Forwarding – The packet is then forwarded to the next hop determined by the dynamic routing algorithm.
Static or Dynamic Routing – Which One is Better?
The choice between static and dynamic routing depends on factors such as network size, stability, and the need for adaptability. Static routing is more straightforward and more suitable for small, stable networks, while dynamic routing is scalable and better suited for large, dynamic networks where adaptability to changes is crucial.
Routing Tables and Routing Information Protocol (RIP)
A routing table is a crucial component of a router’s functionality, providing a roadmap for packet forwarding within a network. It contains information about the paths to different destination networks and helps the router decide where to send packets.
How do Routing Tables Work?
Let’s uncover the process of routing operations in the routing table.
Entry Format and Subnetting Techniques
Each entry in the routing table typically consists of the destination network or host, the subnet mask, the gateway or next-hop IP address, and the interface through which the packet should be forwarded.
When a router receives a packet, it checks its routing table to determine the best path forwarding it. The router looks for the most specific match between the destination IP address of the packet and the entries in its routing table.
Static vs. Dynamic Entries
- Static Entries: Configured manually by network administrators.
- Dynamic Entries: Generated automatically through dynamic routing protocols.
A default route is used when there is no specific match for the destination IP address in the routing table. It is often denoted as 0.0.0.0/0.
Routing Information Protocol (RIP)
RIP is one of the oldest network routing protocols used to exchange routing information between routers in a network. It falls under the distance-vector routing protocols, where routers exchange information about the distance (hop count) to reach different networks.
How Does RIP Work?
RIP uses the Bellman-Ford algorithm to determine the best path to a destination based on the number of hops.
RIP uses hop count as its metric. Each router advertises the number of hops it is away from a particular network.
- RIP v1: Classful routing protocol that does not include subnet information in routing updates.
- RIP v2: Supports classless inter-domain routing (CIDR) and includes subnet information in updates.
Routing Table Update
RIP routers periodically send routing updates to neighboring routers. Updates contain information about the router’s directly connected networks and the associated hop count.
RIP employs the split horizon rule to prevent routing loops. If a route is learned from a neighbor, it is not advertised back to that neighbor.
When a network becomes unreachable, RIP routers use route poisoning to inform other routers that the route is no longer valid. The metric is set to infinity (16 for RIP).
Information Exchange in RIP
Let’s see how information exchange takes place in RIP.
Routers discover neighboring routers through periodic multicast messages (RIP advertisements). Multicast addresses (22.214.171.124 for RIP v2) are used for routing updates.
Routing Update Message
RIP routers send periodic updates containing information about the networks they can reach and the associated hop counts.
Routing Table Update
Upon receiving an update, a router updates its routing table based on the new information. It recalculates the best path to each destination network.
Split Horizon and Route Poisoning
Split horizon prevents a router from advertising routes back to the router from which it learned them. Route poisoning ensures that unreachable routes are communicated with an infinite metric.
To block a user from connecting using routing table configurations:
Access Control Lists (ACLs)
- Use ACLs to filter traffic based on source or destination IP addresses.
- Deny the user’s IP address or range in the ACL.
- Create a null route for the user’s IP address, effectively discarding packets destined for that address.
- This can be done using a command like ip route <user_IP_address> 255.255.255.255 null0.
Policy-Based Routing (PBR)
- Implement PBR to route traffic based on user-specific criteria.
- Create a policy that denies traffic from the user and applies it to the appropriate interface.
Routing Protocols for Routing in FE Electrical Exam
Let’s discuss Routing Protocols that are integral in founding and supervising modern routing algorithms.
Open Shortest Path First (OSPF)
OSPF is a link-state routing protocol that provides a standardized way of calculating the shortest path between routers in an autonomous system (AS).
Why There is a Need for OSPF
- OSPF is designed for scalability and faster convergence in large networks.
- It uses a hierarchical structure with areas to reduce the amount of routing information exchanged.
- OSPF adapts to changes in network topology quickly.
How Does OSPF Work?
Routers discover neighboring routers using OSPF Hello packets and neighbors establish bidirectional communication to exchange routing information.
Link-State Database (LSDB) Initialization
Each router collects information about its directly connected links. LSDB contains link-state advertisements (LSAs) representing the network topology.
Shortest Path Calculation
OSPF routers use the Dijkstra algorithm to calculate the shortest path tree. The tree determines the best path to each network in the OSPF domain.
Routers flood LSAs to their neighbors, propagating information about link states. LSAs are only flooded within an OSPF area, reducing the amount of information exchanged.
Routers synchronize their LSDBs, ensuring a consistent view of the network topology. OSPF routers within an area have the same LSDB, facilitating accurate SPF tree calculation.
Routing Table Update
OSPF routers use the SPF tree to update their routing tables. Each router determines the next hop for each destination network based on the calculated shortest path.
Enhanced Interior Gateway Routing Protocol (EIGRP)
EIGRP is a hybrid routing protocol, incorporating aspects of distance-vector and link-state protocols. It focuses on efficiency by minimizing the amount of information exchanged.
Why There is a Need for EIGRP?
- EIGRP provides rapid convergence by incrementally updating only routes that have changed.
- It supports unequal-cost load balancing, allowing routers to use multiple paths simultaneously.
How Does EIGRP Work?
Routers discover neighbors through Hello packets. EIGRP establishes neighbor relationships based on configurable parameters like the autonomous system number.
Initial Route Advertisement
Routers exchange full routing tables during the initial neighbor establishment. Each router learns about each destination’s feasible successors (backup paths).
EIGRP uses the Diffusing Update Algorithm (DUAL) to calculate the best path to each destination. DUAL considers both the primary and backup paths, facilitating fast convergence.
Route Update and Queries
Incremental updates are sent when there is a change in the network. Routers query neighbors to find a feasible successor if a route is lost.
Topology Table Update
The topology table is updated based on information received from neighbors, and feasible successors are maintained for each destination to ensure quick recovery.
Routing Table Update
The best path is selected for each destination, and the routing table is updated accordingly.
Border Gateway Protocol (BGP)
BGP is an inter-domain routing protocol between different autonomous systems (AS). It uses a path vector algorithm, considering policy-based routing decisions.
Why There is a Need for BGP?
- BGP is designed for the Internet’s scale, allowing diverse and policy-driven routing.
- It accommodates multiple paths to a destination, supporting path selection based on policies.
How Does BGP Work?
BGP routers establish TCP connections with neighboring routers. Peering relationships are established, forming the basis for BGP communication.
BGP routers advertise routes to their neighbors using UPDATE messages. Routes include path attributes such as AS path, next-hop, and route origin.
BGP uses the path vector algorithm to select the best route to a destination, and its decision factors include the shortest AS path, route origin, and local preferences.
BGP routers enforce routing policies based on local configurations. These policies influence route selection and filtering.
BGP supports route aggregation to reduce the size of the routing tables. Aggregated routes represent a summary of multiple more minor routes.
Path Attributes and Route Filtering
BGP routers exchange information about path attributes to make informed routing decisions. Filtering mechanisms allow administrators to control which routes are accepted or rejected.
Inter-domain routing (IDR) is a broader term encompassing protocols like BGP for routing between different autonomous systems.
Why There is a Need for IDR?
- IDR is essential for connecting diverse networks, such as those operated by different Internet service providers (ISPs).
- It enables the Internet to function as a collection of interconnected ASes.
How Does IDR Work?
AS Number Assignment
Each autonomous system is assigned a unique Autonomous System Number (ASN). It identifies an AS on the Internet.
BGP is commonly used for IDR between autonomous systems. BGP routers exchange routing information, allowing them to reach networks in other ASes.
IDR often involves route aggregation to minimize the size of routing tables. Aggregated routes represent multiple more minor routes, reducing the number of entries.
IDR allows for policy-based routing decisions between ASes. Policies define how routing decisions are made and influence route propagation.
Internet Exchange Points (IXPs)
IXPs facilitate the exchange of traffic between different ASes. Multiple ASes connect to a common point to exchange traffic efficiently.
Global Routing Table
The global routing table comprehensively views the Internet’s routing information. It includes entries for networks in various ASes and forms the basis for global Internet routing.
Routing Algorithms for Routing in FE Electrical
Routing protocols are crucial components of network communication, facilitating the exchange of routing information between routers to determine the optimal path for data packets. This is called routing table optimization. Two fundamental categories of routing protocols are Distance Vector Routing and Link-State Routing.
Distance Vector Routing vs. Link-State Routing
Distance Vector Routing
- Based on the Bellman-Ford algorithm.
- Routers exchange routing tables with their neighbors.
- Each router maintains a vector of distances (metrics) to reach destination networks.
- Typically uses hop count as the metric.
- Decisions are made based on the number of router hops to reach a destination.
Routing Information Protocol (RIP) is a classic distance vector protocol.
- Based on Dijkstra’s algorithm.
- Routers exchange information about the state of their links.
- Each router constructs a complete map (link-state database) of the network.
- Various metrics like bandwidth, delay, and reliability can be considered.
- Decisions are based on the shortest path calculated from the link-state database.
Open Shortest Path First (OSPF) is a standard link-state protocol.
More About Network Routing Protocols
Routing protocols use metrics to determine the best path to reach a destination. Common metrics include hop count, bandwidth, delay, reliability, and cost.
Critical Routing Protocol Metrics
- The number of routers or hops a packet must traverse to reach a destination.
- Commonly used in distance vector routing protocols.
- The shortest path is determined by the minimum hop count.
- The amount of data that can be transmitted over a network link in a given time.
- Used to measure the capacity of a link.
- High bandwidth links are preferred for data-intensive applications.
- The time it takes for a packet to travel from source to destination.
- Reflects the propagation delay and transmission delay.
- Low delay values are favored for real-time applications.
Routing Protocol Convergence and Path Selection Algorithms
Routing Protocol Convergence
It is defined as the time it takes for routers to agree on the network’s topology after a change.
Factors Influencing Convergence
- Topology Changes: Events like link failures trigger convergence.
- Routing Protocol Design: Distance vector protocols generally take longer to converge than link-state protocols.
Path Selection Algorithms
- It is used in link-state routing.
- It calculates the shortest path to each destination based on link weights.
- It is used in distance vector routing.
- It iteratively updates distance vectors until convergence is reached.
This is it for routing in the FE Electrical exam. Read our detailed guide on switching in the FE Electrical exam to learn how switching works and why it differs from Routing. For FE Electrical exam preparation, connect with Study for FE – your go-to platform for all things FE.