rss logo

Some Netgear Switching useful commands

Netgear logo


  • Switch model : Netgear M4300-28G


  • Privileged EXEC mode :
Switch> enable
  • Global config mode :
Switch# configure
  • Get firmware, serial number and hardware informations :
Switch# show version
  • Change hostname :
Switch (config)# hostname Switch
  • Save current config :
Switch# copy system:running-config nvram:startup-config
  • Set switch ip :
Switch (config)# interface vlan1 ip address /24
  • Add ip gateway :
Switch (config)# ip default-gateway
  • Set dns :
Switch (config)# ip name server
  • Reboot :
Switch# reload
  • Interface range :
Switch (config)# interface 1/0/1-1/0/4
  • Set clibanner :
Switch (config)# set clibanner "Access to this device is prohibited Enter a banner message. End with the '"' symbol. "


  • Remove guest user :
Switch (config)# no username guest
  • Set admin password :
Switch (config)# username admin password "password"
  • Show users :
Switch # show users


  • Generate rsa and dsa keys :
Switch (config)# crypto key generate rsa Switch (config)# crypto key generate dsa
  • Enable ssh service :
Switch (config)# ip ssh server enable


  • Create a VLAN :
Switch (config)# vlan database Switch (config-vlan)# vlan 20 Switch (config-vlan)# vlan name 20 ToIP Switch (config-vlan)# vlan pvid 20
  • Set the access VLAN to an interface :
Switch (config)# interface 1/0/1-1/0/4 Switch (config-if)# switchport mode access Switch (config-if)# switchport access vlan 20
  • Configure the allowed VLANs to an interface (Trunk) :
Switch (config)# interface 1/0/1 Switch (config-if)# switchport mode trunk Switch (config-if)# switchport trunk allowed vlan 1,20


  • Set RSTP :
Switch (config)# spanning-tree mode rstp
  • Set bridge priority :
Switch (config)# spanning-tree mst priority 0 4096
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address