Pre-requisite: Open Shortest Path First (OSPF) Protocol fundamentals, Open shortest path first (OSPF) router roles and configuration
OSPF Maximum Paths :
- Open Shortest Path First (OSPF) does equal cost load balancing.
- It is used to perform dynamic routing by exchanging routing table information using LSAs within a single Autonomous System (AS) in a network.
- And if you have multiple routes with equal cost paths to the same destination, then OSPF will do load sharing.
- OSPF allows entry of up to 4 multiple paths of a single network with identical metrics by default, and can be increased to a maximum of 16 paths and a minimum of 1 path.
- Default settings and range of Maximum-paths vary depending on router platform/model.
OSPF Maximum Paths command :
R1(config-router)#maximum-paths <1-16>
Configuring OSPF Maximum Paths :
Step 1: Create the physical topology in GNS3 as shown in the image below :
Step 2: Configure the IPv4 address on the physical interface on the routers :
On R1 :
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface FastEthernet1/0
R1(config-if)#ip address 13.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface FastEthernet1/1
R1(config-if)#ip address 14.1.1.1 255.255.255.0
R1(config-if)#no shutdown
On R2 :
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface FastEthernet1/0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shutdown
On R3 :
R3(config)#interface FastEthernet0/0
R3(config-if)#ip address 13.1.1.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface FastEthernet1/0
R3(config-if)#ip address 10.1.1.3 255.255.255.0
R3(config-if)#no shutdown
On R4 :
R4(config)#interface FastEthernet0/0
R4(config-if)#ip address 14.1.1.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#interface FastEthernet1/0
R4(config-if)#ip address 10.1.1.4 255.255.255.0
R4(config-if)#no shutdown
On SERVER :
SERVER(config)#interface FastEthernet0/0
SERVER(config-if)ip address 10.1.1.1 255.255.255.0
SERVER(config-if)#no shutdown
Step 3: Configuring the OSPF process on all the routers with the command router ospf <process-id> :
R1(config)#router ospf 1
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#exit
R4(config)#router ospf 1
R4(config-router)#exit
SERVER(config)#router ospf 1
SERVER(config-router)#exit
Step 4: Enabling OSPF on the interfaces with the interface level sub-command ip ospf <process-id> area <area-id> :
R1(config)#interface FastEthernet0/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#interface FastEthernet1/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#interface FastEthernet1/1
R1(config-if)#ip ospf 1 area 0
R2(config)#interface FastEthernet0/0
R2(config-if)#ip ospf 1 area 0
R2(config-if)#interface FastEthernet1/0
R2(config-if)#ip ospf 1 area 0
R3(config)#interface FastEthernet0/0
R3(config-if)#ip ospf 1 area 0
R3(config-if)#interface FastEthernet1/0
R3(config-if)#ip ospf 1 area 0
R4(config)#interface FastEthernet0/0
R4(config-if)#ip ospf 1 area 0
R4(config-if)#interface FastEthernet1/0
R4(config-if)#ip ospf 1 area 0
SERVER(config)#interface FastEthernet0/0
SERVER(config-if)ip ospf 1 area 0
Step 5: Checking the IPv4 routing table on the routers and seeing OSPF route entry :
R1#show ip route
R2#show ip route
R3#show ip route
R4#show ip route
SERVER#show ip route
Step 6: Configure R1 to use no more than 1 path to get to any given destination, with router subcommand maximum-paths <1-16> :
R1(config)#router ospf 1
R1(config-router)#maximum-paths 1
Step 7: Checking the IPv4 routing table of R1 again to verify the changes in the maximum-paths :
R1#show ip route
Step 8: Verifying the connectivity throughout the topology :
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!