5 Command Line Interface PDF
5 Command Line Interface PDF
DGS-1210-28>
Figure 5.1 – Command Prompt
The user session is automatically terminated if idle for the login timeout period. The default login timeout
period is 5 minutes. To change the login timeout session, please refer to chapter 5.
CLI Commands:
The Basic Switch commands in the Command Line Interface (CLI) are listed (along with the appropriate
parameters) in the following table.
Command Parameter
?
logout
ping <ip_addr>
ping6 <ipv6addr>
create iproute default <ipaddr>
delete iproute {default}
show iproute { <ipaddr> | static }
reboot
reset config
show ipif
87
5 Command Line Interface D-Link Web Smart Switch User Manual
Command Parameter
show switch
save
debug info
Each command is listed in detail, as follows:
?
Purpose To display a list of commands.
Syntax ?
Description The ? command displays a list of commands of the switch.
Parameters None.
Restrictions None.
Example usage:
download
Purpose To download and install a firmware, boot, or switch configuration
file from a TFTP server.
Syntax download { firmware_fromTFTP | cfg_fromTFTP } {<ipaddr> |
<ipv6addr>} <path_filename>
88
5 Command Line Interface D-Link Web Smart Switch User Manual
Example usage:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DGS-1210-28>
upload
Purpose To upload the firmware file or a Switch configuration file to a TFTP
server.
89
5 Command Line Interface D-Link Web Smart Switch User Manual
DGS-1210-28>
90
5 Command Line Interface D-Link Web Smart Switch User Manual
Success.
DGS-1210-28>
Success.
DGS-1210-28>
logout
Purpose To log out a user from the Switch’s console.
Syntax logout
Description The logout command terminates the current user’s session on
the Switch’s console.
Parameters None.
Restrictions None.
Example usage:
91
5 Command Line Interface D-Link Web Smart Switch User Manual
ping
Purpose To test the connectivity between network devices.
Syntax <ipaddr>
Description The ping command checks if another IP address is reachable on
the network. You can ping the IP address connected to through
the managed VLAN (VLAN 1 by default), as long as there is a
physical path between the switch and the target IP equipment. By
default, Switch sends five pings to the target IP.
Parameters <ipaddr> - The IP address of the host.
Restrictions None.
Example usage:
DGS-1210-28>
ping6
Purpose To test the connectivity between network devices.
Syntax ping6 <ipv6addr>
Description The pingv6 command checks if another IP address is reachable
on the network. You can ping the IP address connected to through
the managed VLAN (VLAN 1 by default), as long as there is a
physical path between the switch and the target IP equipment. By
default, Switch sends five pings to the target IP.
Parameters <ipv6addr> - The IPv6 address of the host.
Restrictions None.
Example usage:
DGS-1210-28>
92
5 Command Line Interface D-Link Web Smart Switch User Manual
create iproute
Purpose Used to create IP route entries to the Switch’s IP routing table.
Syntax create iproute default <ipaddr>
Description The create iproute command is used to create a default static IP
route entry to the Switch’s IP routing table.
Parameters default – Specifies to create a default IP route entry.
<ipaddr> − The gateway IP address for the next hop router.
Restrictions Only Administrator, operator and power user-level users can issue
this command.
Example usage:
Success.
DGS-1210-28>
delete iproute
Purpose Used to delete an IP route entry from the Switch’s IP routing table.
Syntax delete iproute {default}
Description The delete iproute command will delete an existing IP route entry
from the Switch’s IP routing table.
Parameters {default} – Specifies to delete a default IP route entry.
Restrictions Only Administrator, operator and power user-level users can issue
this command.
Example usage:
Success.
DGS-1210-28>
show iproute
Purpose Used to display the Switch’s current IP routing table.
93
5 Command Line Interface D-Link Web Smart Switch User Manual
Routing Table
Total Entries :0
DGS-1210-28>
reboot
Purpose To reboot the Switch. If the Switch is a member of a stack, it may
be rebooted individually, without affecting the other members of
the stack.
Syntax reboot
Description The reboot command reboots the system. All network
connections are terminated and the boot code executes.
Parameters None.
Restrictions None.
Example usage:
DGS-1210-28>
reset config
Purpose To reset the Switch to the factory default settings.
Syntax reset config
Description All configurations will be reset to the default settings.
Parameters None.
Restrictions None.
Example usage:
94
5 Command Line Interface D-Link Web Smart Switch User Manual
DGS-1210-28>
show ipif
Purpose To display the configuration of an IP interface on the Switch.
Syntax show ipif
Description The show ipif command displays the current IP address of the
switch.
Parameters None.
Restrictions None.
Example usage:
DGS-1210-28>
show switch
Purpose To display information about the Switch.
Syntax show switch
Description The show switch command displays the status of the switch.
Parameters None.
Restrictions None.
Example usage:
95
5 Command Line Interface D-Link Web Smart Switch User Manual
DGS-1210-28>
DGS-1210-28>
save
Purpose To save changes in the Switch’s configuration to non-volatile
RAM.
Syntax save
Description The save command saves the configuration changes to the
memory.
Parameters None.
Restrictions None.
Example usage:
96
5 Command Line Interface D-Link Web Smart Switch User Manual
DGS-1210-28> save
Building configuration ...
[OK]
DGS-1210-28>
debug info
Purpose To display the ARP table and MAC FDB information of the Switch.
Syntax debug info
Description The debut info command displays the ARP table and MAC FDB
of the Switch.
Parameters None.
Restrictions None.
Example usage:
To display the ARP table and MAC FDB information of the Switch:
DGS-1210-28> debug info
% segmentation fault log file:
% MAC table :
DGS-1210-28>
97