1 .TH NGCLI "1" "October 2013" "NgAdmin 0.1" "User Commands"
3 ngcli \- command line interface tool for GS10[58]E administration
11 This is a cli tool intended for administration of Netgear switches that use
12 NSDP. Currently, only the GS105E and GS108E are concerned.
14 It uses the readline library (if enabled at compilation) to read command lines
15 and supports command auto-completion with the TAB key.
21 By default, NgCli uses readline to provide an interactive command line
22 interface. You can disable this and use basic text input, which can be useful
23 for scripting purposes. You can also see \fB\-m\fR, \fB\-p\fR and \fB\-r\fR
26 If readline is disabled at compilation time, it is the default and only choice.
29 .B "\-b, \-\-keep\-broadcasting"
30 Keep broadcasting even when talking with a particular switch.
31 By default, once you login on a switch, NgAdmin talks with it using unicast.
32 This prevents the password from being sent to all your network. The switch
33 still replies using broadcast, but the password is not included in the replies.
35 This option allows you to disable this feature and do like the official Windows
36 application that always use broadcast packets. This also allows to configure a
37 switch which is not on your network range without forcing the interface.
39 When you enable this option, you must be aware that on every modification
40 you make, your password is broadcasted to all your network.
43 .B "\-f, \-\-force\-interface"
44 Force traffic to go through the specified interface. This can be useful when
45 you have multiple interfaces or the switch is not on your network range.
47 Requires root privileges.
51 Show basic help instructions.
54 \fB\-i, \-\-interface\fI iface
55 Set the interface to use to \fIiface\fR. Defaults to eth0 when not specified.
56 However, this does not force the traffic to go through this interface.
57 If you have multiple interfaces, you can use \fB\-l\fR or \fB\-f\fR options.
60 .B "\-l, \-\-local\-broadcast"
61 By default, NgCli uses the global broadcast address (255.255.255.255) to send
62 data to all the network. With this option, the interface broadcast address will
63 be used instead (for example 192.168.1.255). This can be useful to force
64 traffic to go through the specified interface without forcing the interface.
66 However, some switches seem to ignore packets sent to this type of addresses.
69 \fB\-m, \-\-mac\fI mac
70 Enable automatic login. NgCli will automatically scan the network and try to
71 login on the switch with the MAC address \fImac\fR. \fImac\fR must be specified
72 as six hexadecimal bytes separated by a colon.
75 \fB\-p, \-\-password\fI password
76 Set the password to use with automatic login to \fIpassword\fR. Be aware that
77 the password will be part of the command line, which means everybody on the
78 machine can do a "ps" to see it.
81 \fB\-r, \-\-retries\fI count
82 Set the maximum scan and login attempts in automatic login mode to \fIcount\fR.
83 Defaults to 3 when not specified and 0 means unlimited attempts.
86 \fB\-t, \-\-timeout\fI value
87 Define the maximum to wait for switch replies in \fIvalue\fR milliseconds.
88 Defaults to 4 seconds when not specified.
94 \fBbitrate set\fR [ all [ inout \fIspeed\fR ] [ in \fIspeed\fR ] \
95 [ out \fIspeed\fR ] ] [ \fIport\fR [ inout \fIspeed\fR ] [ in \fIspeed\fR ] \
96 [ out \fIspeed\fR ] ] [...]
97 Set the bitrate limit on several several \fIport\fR. Setting the first port to
98 "all" assigns the same value to all the ports.
100 Acceptable \fIspeed\fR values are:
101 nl (no limit), 512K, 1M, 2M, 4M, 8M, 16M, 32M, 64M, 128M, 256M, 512M
105 Show bitrate limitation configuration.
108 \fBcabletest\fI port\fR [...]
109 Perform a cable test on one or several \fIport\fR.
113 Reset the switch to the defaults parameters. Automatically delogs from the
118 Show the current firmware version.
121 \fBfirmware upgrade\fI file
122 Upgrade the firmware contained in the \fIfile\fR.
126 Display all the commands.
129 \fBigmp set \fIenable vlan validate block
130 Set IGMP filtering related options. \fIenable\fR, \fIvalidate\fR and
131 \fIblock\fR must set either to 0 to disable or 1 to enable. \fIvlan\fR must be
134 \fIenable\fR : enable or disable IGMP filtering
136 \fIvlan\fR : VLAN number on which the filtering is performed
138 \fIvalidate\fR : enable or disable IGMPv3 header validation
140 \fIblock\fR : enable or disable blocking of unknown addresses
144 Show IGMP filtering configuration.
148 List the detected switches on the network.
152 Login on switch with ID \fIid\fR. The \fBlist\fR command shows IDs of detected
153 switches. This command delogs from the current switch, whether the login
154 attempt is successful or not.
158 Disable port mirroring.
161 \fBmirror set\fI outport\fR clone\fI port\fR [...]
162 Enable port mirroring, copy data from one or several \fIport\fR and output
163 data on \fIoutport\fR. Obviously, \fIoutport\fR must not be in the source ports
168 Show port mirroring configuration.
172 Clear the switch name.
176 Set the switch name to \fIname\fR.
180 Show the switch name.
184 Show the network configuration.
187 \fBnetconf set\fR [ dhcp yes|no ] [ ip \fIip\fR ] [ mask\fI mask\fR ] \
189 Set various network related options. \fIip\fR, \fImask\fR and \fIgw\fR must be
190 IPv4 addresses in dotted quad form.
192 dhcp : enable or disable DHCP client on the switch
194 ip : set the switch IP to \fIip\fR
196 mask : set the switch netmask to \fImask\fR
198 gw : set the switch gateway to \fIgw\fR
201 \fBpassword change\fI password
202 Change the switch password to \fIpassword\fR.
205 \fBpassword set\fR [ \fIpassword\fR ]
206 Set the password used to connect to \fIpassword\fR. If not specified, it is
207 asked from user (with terminal echo disabled).
211 Show the ports state and speed.
214 \fBports statistics reset
215 Reset the ports statistics.
218 \fBports statistics show
219 Show the ports statistics.
222 \fBqos mode\fR port|802.1p
223 Set QoS mode to either port based or 802.1p based.
226 \fBqos set\fR all\fI prio
227 In port based mode, set all ports priority to \fIprio\fR.
229 Acceptable values for \fIprio\fR are high, medium, normal and low.
232 \fBqos set \fIport prio\fR [...]
233 In port based mode, set priority of several couples of \fIport\fR to \fIprio\fR.
234 \fIprio\fR is the same format as in the above command.
238 Show QoS configuration.
250 Scan the network for switches.
253 \fBstormfilter enable
254 Enable storm filtering.
257 \fBstormfilter disable
258 Disable storm filtering.
261 \fBstormfilter set\fR all\fI speed
262 Set the storm filter bitrate of all ports to \fIspeed\fR. \fIspeed\fR is the
263 same format as in the \fBbitrate set\fR command.
266 \fBstormfilter set\fI port speed\fR [...]
267 Set the storm filter bitrate of several couples of \fIport\fR to \fIspeed\fR.
268 \fIspeed\fR is the same format as in the \fBbitrate set\fR command.
272 Show storm filtering configuration.
276 Display all the commands and their subcommands.
279 \fBvlan 802.1q del\fI vlan
280 Delete 802.1Q VLAN \fIvlan\fR.
283 \fBvlan 802.1q set\fI vlan\fR [ all unspec|no|untagged|tagged ] \
284 [ \fIport\fR unspec|no|untagged|tagged ] [...]
285 In 802.1Q based mode, set a particular VLAN membership of several \fIport\fR.
286 \fIvlan\fR is a VLAN number between 1 and 4093 inclusive.
287 Setting the port of the first couple to "all" assigns the same value to all the
290 Also do not forget to set the PVID configuration as well with the
291 \fBvlan pvid set\fR command.
293 When creating a new VLAN, no port must be in an unspecified state or the VLAN
296 Acceptable membership values are:
298 unspec : unspecified (default), the configuration of this port is left unchanged
300 no : the port is not member of this VLAN
302 untagged : the port is member of this VLAN as untagged
304 tagged : the port is member of this VLAN as tagged
308 Show 8021Q based VLAN configuration.
311 \fBvlan mode set\fI mode
312 Set VLAN mode to \fImode\fR, acceptable values are:
318 2 - advanced port based
329 \fBvlan port set\fR [ all\fI vlan\fR ] [ \fIport vlan\fR ] [...]
330 In port based mode, set the VLAN membership of several couples of \fIport\fR to
331 \fIvlan\fR. Setting the port of the first couple to "all" assigns the same VLAN
334 \fIvlan\fR is a VLAN number between 1 and 9 inclusive.
338 Show port based VLAN configuration.
341 \fBvlan pvid set\fI port vlan
342 Set \fIport\fR PVID to \fIvlan\fR.
346 Show VLAN PVID configuration.
351 Firmware upgrade is not implemented, because it would require some work in the
352 library and a TFTP client.
354 And overvall, it could be dangerous, as it is not sure that the switch checks
355 whatever you send to it, which could lead to a bricked device.
358 Cabletest is not totally reversed, only raw values are shown.
360 Also, you must manually increase timeout to be able to receive results.
363 Saving and loading whole configuration into/from a file is not implemented.
366 Written by Hervé Boisse (admin@darkcoven.tk).