Switch configuration

Solved
etbienwi Posted messages 20 Status Member -  
etbienwi Posted messages 20 Status Member -
Hello,
I am configuring a switch. I created VLAN 30, but I can’t assign it an IP address; every time it says "invalid input."

S2(config)#
S2(config)#vlan 30
S2(config-vlan)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
exit
S2(config)#interface vlan30
S2(config-if)#ip address 198.168.30.0/24
^
% Invalid input detected at '^' marker.

S2(config-if)#
S2#
%SYS-5-CONFIG_I: Configured from console by console



I already did this once, and it worked; I can’t find the problem.
Thank you in advance.
Configuration: Windows / Chrome 61.0.3163.100

1 answer

  1. brupala Posted messages 111157 Registration date   Status Member Last intervention   14 452
     
    Hello,
    some commands are still pre-CIDR, we could say at the level of the apple tree :-)
    you need to write
    interface vlan30
    ip add 192.168.30.1 255.255.255.0

    also,
    192.168.30.0 255.255.255.0 is an invalid address (the network number)
    for it to be valid, it would need a /22 mask or larger:
    192.168.30.0 255.255.252.0
    because below /23 included, it indicates a network number.

    and ... There you go, there you are!
    0
    1. etbienwi Posted messages 20 Status Member
       
      ok, it works now.
      Thank you
      0