cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1128
Views
0
Helpful
5
Replies

Secondary IP address problem

prafuljaded
Level 3
Level 3

Hi All,

Can we have the primary and secondary IP address of the router interface on the same subnet. Like

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.0 secondary

ip address 192.168.1.251 255.255.255.0

router#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

router#ping 192.168.1.251

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.251, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

I am able to ping both the IPs.Any ideas why this configuration exists ?

Thanx

Praful

5 Replies 5

Tony.henry
Level 1
Level 1

Praful,

I was going to reply back and say you can't do that, but you've proven that you can. I can't think of a reason that you'd want to. Maybe to change the default gateway address but that doesn't make much sense either. I would've gone with a standby HSRP address if i was doing that. Which address is usesd as the default GW for systems on that subnet?

Tony

Default GW is 192.168.1.251 for the hosts in this subnet. And I have T1 configured on this router with serial interface (ip unnumbered fa0/0) uses 192.168.1.251

Praful

I can't think of a good reason to have it then,,,,, I'd reckon you could remove the line safely.

Tony

My first reaction was like Tony to think that you should not be able to do this. But I think we were thinking in terms of the restriction that IOS imposes of not being able to put two interfaces into the same subnet (you do get an error about overlapping addresses). But if both addresses are on the same interface I guess it is legitimate.

I have been wondering why one might want to do this. And it occurred to me that if one group of PC were configured with a 255.255.255.128 mask using the lower part of the address range and another group of PC were configured with a 255.255.255.128 mask using the higher part of the address range, then this router config might make sense. But if you say that all the PCs have the same gateway address then two address ranges would not be the case.

From a functionality standpoint I do not see anything that would be impacted by removing the secondary address.

HTH

Rick

HTH

Rick

I only have a flat /24 network and no /25 subnets in this range. But I have some devices pointing to 192.168.1.2 and some pointing to 192.168.1.251 as Default GW.I better not disturb it now.

Praful