cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
80238
Views
15
Helpful
11
Replies
mahesh18
Frequent Contributor

Use of secondary IP on Vlan interface

                   Hi Everyone,

Need to know how the use of secondary ip address under vlan interface is for extension of subnets.

If someone can please explain this with example?

thanks

Mahesh

1 ACCEPTED SOLUTION

Accepted Solutions

Well, there are some benefits of secondary address (pls note that these benefits are for a temp fix)...Say you have a network on an interface with 192.168.1.0/24 and you run out of IPs and you need to put more servers  there and not impact anything else. You can use sec IP on that  interface and bring up another range like 192.168.2.0/24. Another practical use of secondary address is during IP address space migrations

.

View solution in original post

11 REPLIES 11
srereddy
Beginner

Thats a very broad question. :-). Secondary address on VLAN SVI works....and you can even have a separate HSRP group for sec address....e.g.

interface gig0/1
no switchport
ip address 192.168.1.1 255.255.255.0 secondary
ip address 172.168.1.1 255.255.255.0
standby 10 ip 172.168.1.2
standby 10 priority 105
standby 20 ip 192.168.1.2
standby 20 priority 95

Note: As you may know there are routing protocol limitations whenusing secondary addresses.

mahesh18
Frequent Contributor

Hi Srereddy,

I am not using HSRP in network.

Only vlan interface  with secondary IP addresses

say int vlan 2

ip address 10.x.x.x.

ip address 192.x.x.x. secondary

thanks

Mahesh

Yeah, as i stated before, there is no issue.

mahesh18
Frequent Contributor

Hi srereddy,

So  there is no issue on using secondary IP under vlan interface but i need to know purpose of it for extension of subnets

if you can please explain this?

Thanks

Mahesh

Well, there are some benefits of secondary address (pls note that these benefits are for a temp fix)...Say you have a network on an interface with 192.168.1.0/24 and you run out of IPs and you need to put more servers  there and not impact anything else. You can use sec IP on that  interface and bring up another range like 192.168.2.0/24. Another practical use of secondary address is during IP address space migrations

.

View solution in original post

if you use a secondary ip, the default gateway still should be the primary ip, correct?

thanks,

Do you mean the default gateway of clients ?

If so no it would be whichever subnet the clients were in ie. if they were in the secondary IP subnet then the default gateway is the secondary IP.

Otherwise why use secondary IPs.

Jon

if they are all in the same network, which ip should be the default gateway? If I use .1 as default gateway, could it cause any issue?  see below:

interface vlan 100

ip address 10.10.10.2 255.255.255.224

ip address 10.10.10.1 255.255.255.224 secondary

 

someone configured the above, there is an issue. that's why I suspected that we should use .2 as a default.  

Alison

Alison

I'm not sure what the purpose of that configuration is.

Secondary IPs are used to have multiple subnets in the same vlan but those IPs are from the same IP subnet.

Surprised it even let you configure it but what is the point of it ?

Jon

Hi Srereddy,
Please let me know if secondary IP and Primary IP are equal?

Thanks

I am not sure what you are really trying to ask when you ask if primary IP and secondary IP are equal. In what respects are you measuring equal? Both primary IP and secondary IP can be configured on an interface (vlan interface or physical interface) and both primary IP and secondary IP can be the default gateway for clients in their respective subnets. In those senses they are equal. But if you do a ping or a traceroute from the interface it will always use the primary IP and not the secondary IP as the source address. If you run a routing protocol like EIGRP or OSPF on the interface it will use the primary address to form neighbor relationship and not use the secondary IP. In those senses they are not equal.

 

HTH

 

Rick

HTH

Rick