Unicast means the transmission from a single sender to a single receiver. It is a point-to-point communication between the sender and receiver. There are various unicast protocols such as TCP, HTTP, etc.
TCP (Transmission Control Protocol) is the most commonly used unicast protocol. It is a connection-oriented protocol that relies on acknowledgment from the receiver side.
HTTP stands for HyperText Transfer Protocol. It is an object-oriented protocol for communication.
Distance Vector Routing: Distance-Vector routers use a distributed algorithm to compute their routing tables.
Link-State Routing: Link-State routing uses link-state routers to exchange messages that allow each router to learn the entire network topology.
Path-Vector Routing: It is a routing protocol that maintains the path that is updated dynamically.
Link State Routing
Link State Routing is a protocol where each router learns the entire network topology instead of just neighbor information. Using this knowledge, routers calculate the shortest path to every destination with Dijkstraβs algorithm.
Key Features:
Neighborhood Knowledge: Each router shares information about its directly connected links (cost and identity) rather than the full routing table.
Flooding: This information is broadcast to all routers in the network so that everyone has the same view of the topology.
Information Sharing: Updates are sent only when changes occur (not periodically).
Phases of LSR:
Reliable Flooding: Every router eventually learns the complete network graph.
Route Calculation: Each router applies Dijkstraβs algorithm to compute the optimal path to every other node.
Features
Link State Packet: A small packet that contains routing information.
Link-State Database: A collection of information gathered from the link-state packet.
Shortest Path First Algorithm (Dijkstra algorithm): A calculation performed on the database results in the shortest path
Routing Table: A list of known paths and interfaces.
Calculation of Shortest Path
To find the shortest path, each node needs to run the famous Dijkstra algorithm. Let us understand how can we find the shortest path using an example.
Note: We use a boolean array sptSet[] to represent the set of vertices included in SPT. If a value sptSet[v] is true, then vertex v is included in SPT, otherwise not. Array dist[] is used to store the shortest distance values of all vertices.
STEP 2: Pick the vertex with minimum distance value and not already included in SPT (not in sptSET). The vertex 1 is picked and added to sptSet. So sptSet now becomes {0, 1}. Update the distance values of adjacent vertices of 1. The distance value of vertex 2 becomes 12.
STEP 3: Pick the vertex with minimum distance value and not already included in SPT (not in sptSET). Vertex 7 is picked. So sptSet now becomes {0, 1, 7}. Update the distance values of adjacent vertices of 7. The distance value of vertex 6 and 8 becomes finite (15 and 9 respectively).
STEP 4: Pick the vertex with minimum distance value and not already included in SPT (not in sptSET). Vertex 6 is picked. So sptSet now becomes {0, 1, 7, 6}. Update the distance values of adjacent vertices of 6. The distance value of vertex 5 and 8 are updated.