Getting Bad masks on sub-interfaces?

in CCNA & CCENT
I've been trying to configure IP addresses on the sub-interfaces on a router. This is for the purpose of setting up a router on a stick. I've done it many times before and it works fine but this time around I thought i'd try it with VLSM in mind which i have only recently read about (actually watched via cbt nuggets). Somewhere I am clearly going wrong. On my first attempt at trying to set the IP address for a sub interface I got a bad mask error message
Here's some output I got from the command entered on the router
NOTTS-R1(config)#int fa0/0.250
%LINK-5-CHANGED: Interface FastEthernet0/0.250, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.250, changed state to up
NOTTS-R1(config-subif)#
NOTTS-R1(config-subif)#encap
NOTTS-R1(config-subif)#encapsulation dot1q 250 ?
native Make this as native vlan
<cr>
NOTTS-R1(config-subif)#encapsulation dot1q 250
NOTTS-R1(config-subif)#ip address 172.16.1.0 255.255.255.240
Bad mask /28 for address 172.16.1.0
I then also tried it on the normal fa0/0 interface
NOTTS-R1(config)#int fa0/0
NOTTS-R1(config-if)#ip address 172.16.0.0 255.255.255.128
Bad mask /25 for address 172.16.0.0
It's probably something abvious I am missing or just not seeing.Anyone help me please?
Here's some output I got from the command entered on the router
NOTTS-R1(config)#int fa0/0.250
%LINK-5-CHANGED: Interface FastEthernet0/0.250, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.250, changed state to up
NOTTS-R1(config-subif)#
NOTTS-R1(config-subif)#encap
NOTTS-R1(config-subif)#encapsulation dot1q 250 ?
native Make this as native vlan
<cr>
NOTTS-R1(config-subif)#encapsulation dot1q 250
NOTTS-R1(config-subif)#ip address 172.16.1.0 255.255.255.240
Bad mask /28 for address 172.16.1.0
I then also tried it on the normal fa0/0 interface
NOTTS-R1(config)#int fa0/0
NOTTS-R1(config-if)#ip address 172.16.0.0 255.255.255.128
Bad mask /25 for address 172.16.0.0
It's probably something abvious I am missing or just not seeing.Anyone help me please?
I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
Comments
-
johnwest43 Member Posts: 294
The only way you can use .0 is with a mask of 255.255.255.254CCNP: ROUTE B][COLOR=#ff0000]x[/COLOR][/B , SWITCH B][COLOR=#ff0000]x[/COLOR][/B, TSHOOT [X ] Completed on 2/18/2014 -
ColbyG Member Posts: 1,264
johnwest43 wrote: »The only way you can use .0 is with a mask of 255.255.255.254
How about 192.168.1.0/23? -
MrXpert Member Posts: 586 ■■■□□□□□□□
lol what a wally I am.
Thanks, sorted. Sometimes i'd swear i'd forget to put socks on in the morning before going outI'm an Xpert at nothing apart from remembering useless information that nobody else cares about. -
cisco_trooper Member Posts: 1,441 ■■■■□□□□□□
How about 192.168.1.0/23?
Yep. I assigned something an IP address of A.B.C.0/23 not too long ago. People looked at me like I was retarded.