cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1840
Views
2
Helpful
22
Replies

load balancing OSPF

mayurrathod3795
Level 1
Level 1

I want to configure load balancing using OSPF for two p2p link on r1941 router .

router 1:

192.168.1.0/24 is variably sub-netted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0

L 192.168.1.1/32 is directly connected, GigabitEthernet0/0

O 192.168.2.0/24 [110/65] via 213.2.2.2, 00:00:05, Serial0/1/1

213.2.2.0/24 is variably sub-netted, 2 subnets, 2 masks

C 213.2.2.0/24 is directly connected, Serial0/1/1

L 213.2.2.1/32 is directly connected, Serial0/1/1

OSPF :

Router #show IP OSPF database

OSPF Router with ID (213.2.1.1) (Process ID 1)




Router Link States (Area 0)




Link ID ADV Router Age Sequence # Checksum Link count

213.2.1.1 213.2.1.1 10 0x80000006 0x0030d1 3

213.2.2.2 213.2.2.2 10 0x80000006 0x0006f7 3

router 2:
O 192.168.1.0/24 [110/65] via 213.2.2.1, 00:00:05, Serial0/1/1
192.168.2.0/24 is variably sub-netted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, GigabitEthernet0/0
L 192.168.2.1/32 is directly connected, GigabitEthernet0/0
213.2.2.0/24 is variably sub-netted, 2 subnets, 2 masks
C 213.2.2.0/24 is directly connected, Serial0/1/1
L 213.2.2.2/32 is directly connected, Serial0/1/1

OSPF:

Router #show IP OSPF database

OSPF Router with ID (213.2.2.2) (Process ID 1)




Router Link States (Area 0)




Link ID ADV Router Age Sequence # Checksum Link count

213.2.2.2 213.2.2.2 347 0x80000005 0x00f4dd 5

213.2.1.1 213.2.1.1 347 0x80000005 0x00488d 5

 

I want to load balancing on two paths pc1 to router link 1 to pc2 and back-route is pc2 to link 2 to pc1.

is it possible in OSPF?

 

 

1 Accepted Solution

Accepted Solutions

Gopinath_Pigili
Spotlight
Spotlight

Hi   mayurrathod3795

I got this just before...

dynamic routing protocols like OSPF and EIGRP(also called unicast routing protocols) that are used to build the  symmetrical network and its forwarding paths. Means it is it's default behavior to use same path for send and receive... Still if you want to change default behaviour...you can change using conditional forwarding or PBR (policy based routing)

only Asymmetric network(Multicast routing) allows to use defferent paths for sending and receiving....

Best regards
******* If This Helps, Please Rate *******

View solution in original post

22 Replies 22

balaji.bandi
Hall of Fame
Hall of Fame
I want to load balancing on two paths pc1 to router link 1 to pc2 and back-route is pc2 to link 2 to pc1.

everything is pssible based on the Traffic engineering using cost, but you need to make small diagram how that traffic flows, the requirement is not clear here.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

M02@rt37
VIP
VIP

Hello @mayurrathod3795,

If you want to fine-tune load balancing or if the cost values are not equal for some reason, you can use OSPF path cost manipulation techniques to make sure both paths have equal cost. You can adjust the OSPF interface cost or use OSPF reference bandwidth configuration to control the metric calculation.

Please provide us toplogy or diagram. Thanks a lot.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

consider above image for reference

For your posted topology's WAN (serial) links, for OSPF's ECMP to work, each serial interface needs to have the same OSPF cost.  By default, Cisco's OSPF will compute a cost based on what device believes is the interface bandwidth.  If the serial interfaces do not have the same bandwidth, you can use the bandwidth statement to make them the same or set the OSPF cost per interface to be the same.

mayurrathod3795
Level 1
Level 1

Screenshot 2023-10-09 182345.png

In packet tracker go to the simulation mode...you track how the traffic is going and coming back...

or you can use

traceroute ip address (ex: traceroute 192.168.2.1) 

command to track the path...

so you will come to know which link is used for forwarding and return traffic...

Best regards
******* If This Helps, Please Rate *******

 

i checked path in simulation mode its showing same path . 

I think....that's how equal path load-balancing will heppen...

1st packet both request and reply through link1

2nd packet both request and reply through link2

3rd packet both request and reply thgrough link1

4th packet both request and reply through link2 and so on....

If you want change this default behaviour....you will needed to implement Conditional forwarding or Policy Based Routing (PBR)....on routers....

Best regards
******* If This Helps, Please Rate *******

'I think....that's how equal path load-balancing will heppen..."

Return path selection is independent of request path.

For ECMP, non fast path forwarding round robins or CEF packet-by-packet mode round robins, otherwise "flow" use the same path for all packets.

Something like

ping

each packet is considered its own flow.

Yes....that is called Round-robin Loadbalancing.... used by routers....

Thanks

@mayurrathod3795 

If you want to fine-tune load balancing or if the cost values are not equal for some reason, you can use OSPF path cost manipulation techniques to make sure both paths have equal cost. You can adjust the OSPF interface cost or use OSPF reference bandwidth configuration to control the metric calculation.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

cost value is same 64 in both path, also i tried bandwidth but its not applicable here.

Does route table show same destination network more than once?

If this is PT, could you post it?

Show ip ospf database 

As I see it show only link between router.

I need to see subnet of PC on both side

Do you use

redistrubte 

connect? 

If yes then remove

redistrubte 

connect and add

network

command under each opsf process for PC subnet.

If you want one side load and other not 

Make one side cost same and make other side cost difference.

Review Cisco Networking for a $25 gift card