When to use secondary IP address

Unanswered Question
Feb 23rd, 2009

I found the following cases when it is needed to configure secondary IP address on an interface:

- for forcing unequal load sharing between different interfaces

- for increasing the number of IPs in a LAN when no more IPs are available from that subnet, by adding a second subnet there

- for solving the problems with discontiguous subnets and classful routing protocols

Is my list exhaustive or I'm missing some other potential usage of secondary IP address?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Richard Burts Mon, 02/23/2009 - 20:59

Petru

I have never seen secondary addressing used as a part of unequal load sharing. I would be very interested to know how it is used for that. Can you provide any scenario where that is used or can you provide any reference for this usage?

I believe that the other common useage of secondary addressing is to assist in the process of converting a network from one addressing range to another addressing range. For an example lets us think about a network that has been configured using IP address range 192.168.5.0. And let us assume that there is a need to convert this network to use addresses in the range 172.22.0.0. Our choices would be either to make a complete conversion of the entire network at one time. Our other choice would be to keep the primary address of 192.168.5.x on the router interface and to assign 172.22.y.y as a secondary address on the interface. This would allow us to make a phased conversion in which hosts in 192.168.5.0 would be able to communicate with hosts in 172.22.0.0 on the same local subnet. When the conversion is complete and all hosts are now in 172.22.0.0 they we replace the router primary address of 192.168.5.x with a new primary address of 172.22.y.y.

HTH

Rick

badalam_nt Tue, 02/24/2009 - 03:25

Thanks Rick, so this is a 4th use and in your view it is the most common one to be encountered in real networks.

Here's a description of how secondary IP@ can be used for unequal load sharing (found on net, it is not my own finding):

"Static routes allow you to set up load balancing after a fashion. Keep in mind that the IOS load balances across routes first and not interfaces. The easiest way to configure multiple routes on the same interface is to use the secondary IP command

Router 1

!

interface serial 0

ip address 192.0.0.1 255.255.255.0

ip address 192.0.0.2 255.255.255.0 secondary ! second route on same interface

interface serial 1

ip address 192.1.0.1 255.255.255.0

ip address 192.1.0.2 255.255.255.0 secondary

ip route 200.2.0.0 255.255.255.0 196.0.0.4; goes to serial 0

ip route 200.2.0.0 255.255.255.0 196.0.0.5; goes to serial 0

ip route 200.2.0.0 255.255.255.0 196.1.0.4; goes to serial 1

Router 2

!

interface ethernet 0

ip address 200.2.0.1 255.255.255.0

!

interface serial 0

ip address 196.0.0.4 255.255.255.0

ip address 196.0.0.5 255.255.255.0 secondary

!

interface serial 1

ip address 196.1.0.4 255.255.255.0

ip address 196.1.0.5 255.255.255.0 secondary

The traffic would go out router 1 across the two IPs on serial 0 first then across 1 IP on serial 1

This gives you unequal load balancing."

Richard Burts Tue, 02/24/2009 - 05:11

Petru

Thank you for the explanation that you found. If you wanted multiple routes on an interface for some reason this would be a way to get it.

I did not say that secondary addressing used for changing addressing was the most common reason for secondary addressing. I believe that providing more IP addresses in a VLAN or on an interface is the most common use of secondary addressing. I just said that there was one more use to add to your list.

HTH

Rick

badalam_nt Tue, 02/24/2009 - 05:21

You're right Rick, I was quick and instead of reading "the OTHER common" I took it as "the MOST common".

It's good you helped me increase the list to 4.

Actions

This Discussion