Signal Routing
Last updated
Last updated
In networks with routers, nodes need a way to address each other. Even if a router forwards signals to all its links like a hub, nodes must determine if they are the intended recipients of messages.
This is achieved by assigning a unique identifier, called a network address, to each node. Each message includes the recipient's identifier, allowing routers to know where to forward communications. This system works best when addresses are assigned based on the network's geographical structure rather than randomly.
Routing is the process of selecting a path between two nodes across a network. Routers handle this task using a routing table, which tells the router where to forward communication for each node. For example, in the routing table below, router A forwards messages for node A2 on link 2, regardless of where it receives them from.
Example Routing Table for Router A:
Destination | Link | Cost |
---|---|---|
A1 | 1 | 4 |
A2 | 2 | 2 |
B? | 3 | 5 |
B? | 4 | 8 |
C? | 3 | 9 |
C? | 4 | 6 |
The router chooses routes based on cost, which could be based on network delay or transmission cost. In this case, router A forwards communications for nodes starting with C on link 4 because it has a lower cost.
A forwarding table is a simplified version of the routing table. It only contains the optimal routes, which makes it smaller and faster for lookup, important for low-latency routing.
Example Forwarding Table for Router A:
Destination | Link |
---|---|
A1 | 1 |
A2 | 2 |
B? | 3 |
C? | 4 |
Routers can fail, and new nodes are added to networks often. To keep routing tables current, routers use routing protocols to communicate changes. For instance, if router A stops hearing from router C, it will update its table to send communications to C through router B.
Signals can be relayed through a network using either circuit switching or packet switching.
In a circuit-switched network, a dedicated communication channel is established for the duration of the call.
Example: Early telephone networks required a switchboard operator to connect two telephones, creating a closed circuit.
Advantages: Signal delay remains constant, and messages arrive in the same order.
Disadvantages: Inefficient use of capacity, as other users cannot access the channel when it's idle (e.g., during pauses in conversation).
In a packet-switched network, data is divided into packets, which consist of a header and a payload.
Header: Contains delivery information, such as sender and recipient addresses.
Each router has a queue for incoming packets and forwards them based on its forwarding table.
Packet-switching routers do not maintain state, meaning no channels are opened or closed at the routing level.