cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
629
Views
0
Helpful
7
Replies

load balancing - OSPF & static routes

net guru
Level 1
Level 1

Hello friends,

 i've got a problem trying to resolve for a while ,  it's about load balancing between two different routing technologies , like OSPF and a static routes. 

to be precise I have a Router(B) linked to : a dynamic ISP-Router , and a static ISP-Router. which both of them lead to an HQ router. 

when I type traceroute to loopback interface of the HQ router , i should have the static route displayed ( since it has the lesser AD ) . but it seems i only see the dynamic route displayed. 

i desperately  changed the static route metric to 110 but with no use.

so my question here : if anyone has an idea to how this could be fixed , or any useful docs i could read ? 

thank you so much for any help. 

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

A static route should always be preferred provided you have not modified the AD to be greater than OSPF's AD.

Can you post the output of "sh ip route <loopback interface IP>" and also a "sh run" from router B.

Jon

Hello , Sir Jon 

please note that i have added another dynamic isp router which lead us to have "2 Dynamic-ISP,1 Static-ISP" ( since I am working on a DMVPN lab and load balancing on a branch is a factor )  

#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 192.168.4.1 on GigabitEthernet1/0, 00:00:28 ago
Routing Descriptor Blocks:
* 192.168.10.1, from 1.1.1.1, 00:00:28 ago, via GigabitEthernet3/0
Route metric is 3, traffic share count is 1
192.168.4.1, from 1.1.1.1, 00:00:28 ago, via GigabitEthernet1/0
Route metric is 3, traffic share count is 1

#sh run 

!
interface Tunnel1
ip address 176.16.1.2 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication Attijari
ip nhrp map multicast dynamic
ip nhrp map 176.16.1.1 192.168.1.2
ip nhrp network-id 1
ip nhrp nhs 176.16.1.1
ip tcp adjust-mss 1360
ip ospf network broadcast
ip ospf cost 1
ip ospf dead-interval 10
ip ospf hello-interval 1
ip ospf priority 0
tunnel source GigabitEthernet1/0
tunnel mode gre multipoint
tunnel key 1
tunnel protection ipsec profile protect-tun
!
interface Tunnel2
ip address 176.16.2.2 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication Attijari
ip nhrp map multicast dynamic
ip nhrp map 176.16.2.1 192.168.2.2
ip nhrp network-id 2
ip nhrp nhs 176.16.2.1
ip tcp adjust-mss 1360
ip ospf network broadcast
ip ospf cost 1
ip ospf dead-interval 10
ip ospf hello-interval 1
ip ospf priority 0
tunnel source GigabitEthernet2/0
tunnel mode gre multipoint
tunnel key 2
tunnel protection ipsec profile protect-tun
!
interface Tunnel3
bandwidth 1000
ip address 176.16.3.2 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication Attijari
ip nhrp map multicast dynamic
ip nhrp map 176.16.3.1 192.168.3.2
ip nhrp network-id 3
ip nhrp nhs 176.16.3.1
ip tcp adjust-mss 1360
ip ospf network broadcast
ip ospf cost 1
ip ospf dead-interval 10
ip ospf hello-interval 1
ip ospf priority 0
tunnel source GigabitEthernet3/0
tunnel mode gre multipoint
tunnel key 3
tunnel protection ipsec profile protect-tun
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface GigabitEthernet1/0
ip address 192.168.4.2 255.255.255.0
ip ospf 1 area 0
negotiation auto
!
interface GigabitEthernet2/0
ip address 192.168.6.2 255.255.255.0
negotiation auto
!
interface GigabitEthernet3/0
ip address 192.168.10.2 255.255.255.0
negotiation auto
!
router ospf 1
router-id 4.4.4.4
network 176.16.1.0 0.0.0.255 area 0
network 176.16.2.0 0.0.0.255 area 0
network 176.16.3.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 1.1.1.0 255.255.255.0 192.168.6.1 110
ip route 192.168.2.0 255.255.255.0 192.168.6.1
ip route 192.168.7.0 255.255.255.0 192.168.6.1
ip route 192.168.20.0 255.255.255.0 192.168.6.1
!

-

Actually ignore what I said in last post because  even if you make the route the same in terms of prefix length and you set the same AD the metrics will be different and it will always pick the static route because of the lower metric.

Not sure if there is a solution at the moment unless you use statics for all the routes.

Jon

I've been searching for quite a while and I've read about "redistributing subnet" , i couldn't correspond this command to my issue. 
  

Try to set up under the loopback the following line:

ip ospf network point-to-point.

As Jon mentioned, static route will be preferred but if it is more specific than the prefix received by the routing protocol.




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hello Sir Julio , 

I did try that but i can't see dynamic routes anymore to the LO interface on the routing table of B router 

Review Cisco Networking for a $25 gift card