Load Balancing

mattsthe2mattsthe2 Member Posts: 304
So i have two circuits that term to another site. Both circuits term to seperate routers

Site1R1
Site2R1
|...................... |
|...................... |
Site1R2
Site2R2

The IGP is OSPF and we want to load balance the circuits in a bi-directional fashion, how would one go about that?

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    Set equal costs on the links.
    An expert is a man who has made all the mistakes which can be made.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    Set equal costs on the links.

    Mhm. I think it takes place when all things on both lines have all of the same length mask, AD, Cost, etc.

    I think the command is a config-if command and is ip ospf cost x if you want to configure unequal cost load balancing.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    chmorin wrote: »
    Mhm. I think it takes place when all things on both lines have all of the same length mask, AD, Cost, etc.

    I think the command is a config-if command and is ip ospf cost x if you want to configure unequal cost load balancing.

    What? icon_scratch.gif
    An expert is a man who has made all the mistakes which can be made.
  • burbankmarcburbankmarc Member Posts: 460
    OSPF equal cost is the way you want to go. Remember that it's not a per packet load balance due to CEF.
  • mattsthe2mattsthe2 Member Posts: 304
    there is no "ip ospf cost" statement under the interfaces but when i do a "sh ip ospf interface" both interfaces have a the same cost of 10.

    In fact the cost of 10 is on all 4 routers.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    So is it not load balancing? Do a show ip route and make sure both routers show as valid next hops.
    An expert is a man who has made all the mistakes which can be made.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    mattsthe2 wrote: »
    there is no "ip ospf cost" statement under the interfaces but when i do a "sh ip ospf interface" both interfaces have a the same cost of 10.

    In fact the cost of 10 is on all 4 routers.

    My routers begged a differ:
    R1#show ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    192.168.2.2       0   FULL/  -        00:00:37    192.168.2.2     Serial0/1
    192.168.2.2       0   FULL/  -        00:00:31    192.168.1.2     Serial0/0
    ----------------
    R2#show ip ospf neighbor
    
    Neighbor ID     Pri   State           Dead Time   Address         Interface
    1.1.1.1           0   FULL/  -        00:00:30    192.168.2.1     Serial0/1
    1.1.1.1           0   FULL/  -        00:00:39    192.168.1.1     Serial0/0
    -----------------
    R2#ping 1.1.1.1
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 8/32/84 ms
    R2#show ip route ospf
         1.0.0.0/32 is subnetted, 1 subnets
    O IA    1.1.1.1 [110/65] via 192.168.2.1, 00:04:22, Serial0/1
                    [110/65] via 192.168.1.1, 00:02:08, Serial0/0
    R2#conf t
    R2(config)#int s0/0
    R2(config-if)#ip ospf cost 999
    R2(config-if)#^Z
    R2#show ip route ospf
         1.0.0.0/32 is subnetted, 1 subnets
    O IA    1.1.1.1 [110/65] via 192.168.2.1, 00:04:50, Serial0/1
    

    Unless I am mistaken, it works. What IOS are you running?

    If the cost is 10 on all routers and they are routing to a destination that is attached to the second router, equal cost load balancing should already be taking place. What does your show ip route ospf look like? Does it show both links?
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • CyanicCyanic Member Posts: 289
    chmorin wrote: »
    My routers begged a differ:

    I think it was the way you stated it "configure unequal cost load balancing." OSPF does not do unequal load balancing but you can manipulate the costs to perform load balancing on unequal links.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    Cyanic wrote: »
    I think it was the way you stated it "configure unequal cost load balancing." OSPF does not do unequal load balancing but you can manipulate the costs to perform load balancing on unequal links.

    So what does one call configuring load balancing on ospf's unequal links? I guess just configuring load balancing?
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    chmorin wrote: »
    So what does one call configuring load balancing on ospf's unequal links? I guess just configuring load balancing?

    If the links are unequal in the eyes of OSPF (non equal costs) then they won't load balance.
    An expert is a man who has made all the mistakes which can be made.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    If the links are unequal in the eyes of OSPF (non equal costs) then they won't load balance.

    I know but you can make them equal costs with the command I just showed you even if they are not physically equal cost.

    All I know is on my routers the command works, so I want to know what the OP is using.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    chmorin wrote: »
    I know but you can make them equal costs with the command I just showed you even if they are not physically equal cost.

    All I know is on my routers the command works, so I want to know what the OP is using.


    If you make them equal cost then its not uneaqual cost load balancing man.

    If the OP doesn't have the ip ospf cost command on the interface then hes using the automatic cost based on bandwidth.
    An expert is a man who has made all the mistakes which can be made.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    If you make them equal cost then its not uneaqual cost load balancing man.

    My bad, I guess I phrased it wrong. "You can configure equal cost load balancing by changing the ospf cost on the interface with the ip ospf cost command." Better?

    I'd like to see a show ip route ospf from the OP if possible.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • CyanicCyanic Member Posts: 289
    If you are actually going to do this on a real network don't you run the risk of saturating the lowest bandwidth path? If so then I would assume you should only do this if the paths are close in throughput because otherwise you are just asking for problems right, i.e. doing this on a 10Mb and 100Mb paths?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Cyanic wrote: »
    If you are actually going to do this on a real network don't you run the risk of saturating the lowest bandwidth path? If so then I would assume you should only do this if the paths are close in throughput because otherwise you are just asking for problems right, i.e. doing this on a 10Mb and 100Mb paths?


    You are correct. The routing protocol has no way of knowing that a link is being overrun to change the path even if the other link has idle bandwidth. Its always a good idea to have equal pipes if you are going balance them.
    An expert is a man who has made all the mistakes which can be made.
  • killuah72killuah72 Member Posts: 60 ■■□□□□□□□□
    Have you considered using a route map? You can have more control with your traffic with it than trying to force OSPF to load balance on unequal links.
  • mattsthe2mattsthe2 Member Posts: 304
    Sorry for not keeping up with this i was ill and had to put the puter down!

    I think i might have found the issue, on site1R2 i am seeing some of this in the route table.

    O 172.17.50.0/24
    [110/16] via 172.19.1.209, 11:48:51, GigabitEthernet1/0/48
    [110/16] via 172.16.250.1, 11:48:51, Vlan48


    Where is that vlan48 coming from, on Site1R1 i do not see this instead i see.


    O 172.17.50.0/24
    [110/15] via 172.19.1.201, 11:55:45, GigabitEthernet1/0/48
  • burbankmarcburbankmarc Member Posts: 460
    So your R1/R2 are layer 3 switches?
  • mattsthe2mattsthe2 Member Posts: 304
    So your R1/R2 are layer 3 switches?

    Correct yes.

    and the two switches are directly cabled connected over two links, one is layer 2 trunk the other is a L3 link.

    Ive never seen that done before so i dont know if that is a good thing that it is done like that.
  • burbankmarcburbankmarc Member Posts: 460
    Your R1 is advertising the route through VLAN 48. If your switches aren't suppose to have an adjacency over VLAN 48 then make those interfaces passive.
  • mattsthe2mattsthe2 Member Posts: 304
    Beleive i have found out why this is happening.
    So if you remember Site1R1 to Site2R1 was being used more.

    Site1R2 has a higher metric for routes to Site 3 because and Site1R1 has a higher metric to sites 4.

    How can I make routes to Site 3 and Site 4 equal when traversing the links from Site 1 and 2.
    I want them balanced between Site 1 and 2.

    How does one do that???

    Site1R1
    Site2R1
    Site2R4
    P2P-WAN
    {Site3}
    |...................... |
    |...................... |
    Site1R2
    Site2R2
    Site2R3
    P2P-WAN
    {Site4}
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Just make all the costs equal and it will loadbalance on its own. Not sure what else you are asking.
    An expert is a man who has made all the mistakes which can be made.
  • mattsthe2mattsthe2 Member Posts: 304
    Just make all the costs equal and it will loadbalance on its own. Not sure what else you are asking.


    Well if i do a show ip ospf interface <WAN INTERFACE> I show this:

    process ID 1, Router ID 172.16.1.2, Network Type POINT_TO_POINT, Cost: 10

    I show a cost of 10 on the other link to.

    ??
  • networker050184networker050184 Mod Posts: 11,962 Mod
    You need to make the cumulative cost of the path equal. You may need to manually adjust the cost in order to make that happen. Some reading on OSPF and routing in general will probably help you understand.
    An expert is a man who has made all the mistakes which can be made.
  • mattsthe2mattsthe2 Member Posts: 304
    You need to make the cumulative cost of the path equal. You may need to manually adjust the cost in order to make that happen. Some reading on OSPF and routing in general will probably help you understand.

    thanks I'll lab this out and try.
Sign In or Register to comment.