2509 router does not accept wan ip with subnet

Unanswered Question
Nov 27th, 2007
User Badges:

hi i hv 2509, 2501. while configuring wan ip on serial interface its ot allowing me to configure ip with other subnet mask , its allowing only ip with default subnet mask, for eg- if i giv 202.54.10.1 255.255.255.252 on s0 of 1st router then router does not allow me to configure , but if i give 202.54.10.1 255.255.255.0 then it configure smoothly , can any body tel me why?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Richard Burts Tue, 11/27/2007 - 10:56
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

I am not confident that ip classless will help this issue. ip classless has to do with how we interpret the content of the routing table and not to do with how interfaces are configured. It is more likely that the ip subnet-zero command might be the solution for the symptom described.


I would ask for some clarification from Gulshan. When you attempt to configure the router with 202.54.10.1 does it give error message saying invalid mask? If so it is a symptom of attempting to configure an address that falls into subnet zero (which your example does). If you configure the router with ip subnet-zero and then attempt to configure the interface it should work ok.


Restriction on the use of subnet zero was common many releases of IOS ago. But those restrictions are not common in more recent versions of code. It sounds like your router is running code which enforces this restriction by default.


HTH


Rick

Collin Clark Tue, 11/27/2007 - 11:05
User Badges:
  • Purple, 4500 points or more

Rick is right (once again), I just tried it:


MKE-MPLS-Test(config)#no ip subnet-zero

MKE-MPLS-Test(config)#int fa0

MKE-MPLS-Test(config-if)#ip add 202.54.10.1 255.255.255.252

Bad mask /30 for address 202.54.10.1

MKE-MPLS-Test(config-if)#exit

MKE-MPLS-Test(config)#ip subnet-zero

MKE-MPLS-Test(config)#int fa0

MKE-MPLS-Test(config-if)#ip add 202.54.10.1 255.255.255.252

MKE-MPLS-Test(config-if)#


Points well earned.

Richard Burts Tue, 11/27/2007 - 11:35
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Collin


Thanks for the compliment (and for the rating).


It is an interesting error message - why does it say bad mask when the mask is perfectly ok?


What it is really saying is that the mask puts the address in an incorrect place.


HTH


Rick

Collin Clark Tue, 11/27/2007 - 11:40
User Badges:
  • Purple, 4500 points or more

I was reading too fast... I thought ip subnet-zero until I saw .10 which I thought was the last octet.

Actions

This Discussion