cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3486
Views
0
Helpful
8
Replies

Secondary IP on Interface

vinoth.kumar
Level 1
Level 1

Hi,

In our network we are using an interface with the IP like below

interface GigabitEthernet0/1

ip address 192.168.191.10 255.255.255.0 secondary

ip address XX.XXX.1.2 255.255.255.0

duplex auto

speed auto

media-type rj45

no negotiation auto

standby 10 ip XX.XXX.1.1

standby 10 ip 192.168.191.1 secondary

Now we need some requirement to spilit up the subnet XX.XXX.1.0/24 into subneting

like adding one more subnet XX.XXX.1.32/27 in the same ineterface

can i do the same like this

interface GigabitEthernet0/1

ip address XX.XXX.1.61 255.255.255.224 secondary

ip address 192.168.191.10 255.255.255.0 secondary

ip address XX.XXX.1.2 255.255.255.0

duplex auto

speed auto

media-type rj45

no negotiation auto

standby 10 ip XX.XXX.1.1

standby 10 ip 192.168.191.1 secondary

standby 10 ip XX.XXX.1.33 secondary

will it make any issue since we are using the same subnet as /24 and als0 /27

can any suggest me

8 Replies 8

YANGCCIE4
Level 1
Level 1

Hi,vinoth.kumar

ip add 12.12.12.32 255.255.255.224 secondary

ip add 12.12.12.31 255.255.255.224 secondary

will not work under the interface, they are the network bit and broadcast bit for the first two /27 subnet.

hope it help

Yang

Thanks for the reply

what i need is in the inter gi o/1 we are using 10.5.1.0 /24

can i use the same interface for the subnet 10.5.1.32/27

i guess both the subnet as the different net id and broadcast id

ilke this

interface GigabitEthernet0/1

ip address 192.168.191.10 255.255.255.0 secondary

ip address 10.5.1.33 255.255.255.224 secondary

ip address 10.5.1.1 255.255.255.0

duplex auto

speed auto

media-type rj45

no negotiation auto

Hi,

currently you have 10.5.1.1 255.255.255.0, which is full class C range.

if you want to furter subnet this range to make smaller ranges then you will need to adjust the subnet mask on the current range and then add further secondry range.

your new subnets will become 10.5.1.0/27 and 10.5.1.32/27

this means your interface configuration will become af follows:-

interface GigabitEthernet0/1

ip address 192.168.191.10 255.255.255.0 secondary

ip address 10.5.1.33 255.255.255.224 secondary

ip address 10.5.1.1 255.255.255.224

duplex auto

speed auto

media-type rj45

no negotiation auto

Remember to adjust all other devices/DHCP scopes etc. with the new subnet mask and correct default gateway otherwise you will have problems.

Hope this helps.....

Shaheen

sorry i am not going to do any modification on the existing interface IP configuration

Existing is :

interface GigabitEthernet0/1

ip address 192.168.191.10 255.255.255.0 secondary

ip address 10.5.1.1 255.255.255.0

duplex auto

speed auto

media-type rj45

no negotiation auto

in the existing config i used 10.5.1.1 255.255.255.0 which is /24 prefix

Now we need to use the seperate ssubnetting for some reason

that is 10.5.1.32/255.255.255.224 which as the host range of 33-62 which is coming under the existing interface range

new what i am going to do

interface GigabitEthernet0/1

ip address 192.168.191.10 255.255.255.0 secondary

ip address 10.5.1.33 255.255.255.224 secondary

ip address 10.5.1.1 255.255.255.0

duplex auto

speed auto

media-type rj45

no negotiation auto

Will it work

no, it will not work as host range 33-62 falls in with your existing subnet 10.5.1.1/24 (which has a host range 10.5.1.1 to 10.5.1.254)

this link will help you to explain how/why to subnet

http://articles.techrepublic.com.com/5100-10878_11-5033672.html

Hope this helps...please rate all helpfull posts

Shaheen

Thanks for your information

Sorry to raise the question again

In logic if we enable a secondary Ip on the same interfcae it will act as the Logical interface

for example routing between the interface so if i assign the subneted ip range on to the interface it will work

and also i tried configuring like this and no error as came

Cat-6500# conf t

Enter configuration commands, one per line. End with CNTL/Z.

Cat-6500(config)#interface GigabitEthernet3/30

Cat-6500(config-if)#ip address 10.5.1.1 255.255.255.0

Cat-6500(config-if)#ip address 10.5.1.33 255.255.255.224 se

Cat-6500(config-if)#ip address 10.5.1.33 255.255.255.224 secondary

ICMP redirect is disabled on interfaces with secondary IP address

Cat-6500#sh run int gi 3/30

Building configuration...

Current configuration : 151 bytes

!

interface GigabitEthernet3/30

ip address 10.5.1.33 255.255.255.224 secondary

ip address 10.5.1.1 255.255.255.0

no ip redirects

shutdown

end

if iam going wrong pls apologies

you will most likely get an overlapping ip address error and it won't let you do it . Not sure what you accomplish in doing what you are proposing because you have the same address range going down the same interface. It's not really breaking it into different domains as you aren't trunking down to the next device.

vinoth

Perhaps it would help if you can explain to us what you are trying to accomplish with this configuration of secondary address. As others have attempted to explain, your secondary does not seem logical since it is a small part of your primary subnet related to your primary address.

In most useage a secondary address (and its associated subnet) are separate and independent from the primary address (and primary subnet). What is the benefit that you seek in configuring a secondary that is already a part of the primary subnet?

I think that I do not agree with Glen about there being an error of overlapping ip address. If you attempt to configure one address (and subnet) on one interface and the other (secondary) address and subnet on another interface, then I agree that the router will say it is an error. But I believe that putting it as primary address and secondary address will be accepted. But what is the benefit of doing this?

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card