0% found this document useful (0 votes)
148 views11 pages

5 Command Line Interface PDF

The document describes the Command Line Interface (CLI) of the D-Link Web Smart Switch. It provides instructions on how to connect to the switch via Telnet and log in using the default username and password of "admin". It then lists and describes some basic CLI commands for monitoring and configuring the switch, including commands to download or upload firmware or configuration files via TFTP, configure IP interfaces, ping addresses, reboot the switch, and more.

Uploaded by

Javier
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views11 pages

5 Command Line Interface PDF

The document describes the Command Line Interface (CLI) of the D-Link Web Smart Switch. It provides instructions on how to connect to the switch via Telnet and log in using the default username and password of "admin". It then lists and describes some basic CLI commands for monitoring and configuring the switch, including commands to download or upload firmware or configuration files via TFTP, configure IP interfaces, ping addresses, reboot the switch, and more.

Uploaded by

Javier
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

5 Command Line Interface D-Link Web Smart Switch User Manual

5 Command Line Interface


The D-Link Web Smart Switch allows a computer or terminal to perform some basic monitoring and
configuration tasks by using the Command Line Interface (CLI) via TELNET protocol
To connect a switch via TELNET:
1. Make sure the network connection between the switch and PC is active.
2. To connect, launch any terminal software like HyperTerminal in Microsoft Windows, or just use the
command prompt by typing the command telnet followed by the switch IP address, eg. telnet 10.90.90.90.
3. The logon prompt will appear.

Logging on to the Command Line Interface:


Enter your User Name and Password to log in. The default user name and password is admin. Note that the
user name and password are case-sensitive. Press Enter in both the Username and Password fields. The
command prompt will appear as shown below (DGS-1210-28>):
DGS-1210-28 login: admin
Password:

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
?

{ firmware_fromTFTP | cfg_fromTFTP } {<ipaddr> | <ipv6addr>}


download
<path_filename>
{ firmware_fromTFTP | cfg_fromTFTP } {<ipaddr> | <ipv6addr>}
Upload
<path_filename>
{ ipaddress <ip-address> <subnet-mask> gateway <gw-address> | dhcp |
config ipif system
bootp }
config ipif system { ipv6 ipv6address <ipv6networkaddr> | dhcpv6_client [enable | disable] }

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

config account admin


<passwd>
password

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:

To display a list of commands of the switch:


DGS-1210-28> ?
USEREXEC commands :
config account admin password <passwd>
config ipif System { ipaddress <ip-address> <subnet-mask> gateway
<gw-address> | dhcp }
debug info
download { firmware_fromTFTP tftp://ip-address/filename | cfg_fromTFTP
tftp://ip-address/filename }
logout
ping <ip_addr>
reboot
reset config
save
show ipif
show switch
upload { firmware_toTFTP tftp://ip-address/filename | cfg_toTFTP
tftp://ip-address/filename }
DGS-1210-28>

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

Description The download command downloads a firmware, boot, or switch


configuration file from a TFTP server.
Parameters firmware_fromTFTP − Download and install new firmware on the
Switch from a TFTP server.
cfg_fromTFTP − Download a switch configuration file from a TFTP
server.
<ipaddr> − The IPv4 address of the TFTP server.
<ipv6addr> − The IPv6 address of the TFTP server.
<path_filename> − The filename of the firmware or switch
configuration file on the TFTP server. You need to specify the
DOS path if the file is not at the root directory of the TFTP server.
Restrictions None.

Example usage:

To download a firmware file:


DGS-1210-28> download firmware_fromTFTP 1.1.1.23 1\dgs_1210-10032.ros

01–Jan–2000 01:19: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!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!01–Jan–2000 01:22:49 %COPY–W–TRAP:

The copy operation was completed successfully

3920460 bytes copied in 00:03:01 [hh:mm:ss]

DGS-1210-28>

Note: Switch will reboot after restore and


all current configurations will be lost.

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

Syntax upload { firmware_fromTFTP | cfg_fromTFTP } {<ipaddr> |


<ipv6addr>} <path_filename>
Description The upload command uploads the Switch’s current settings to a
TFTP server.
Parameters firmware_toTFTP − Upload the firmware on the Switch from a
TFTP server.
cfg_toTFTP − Specifies that the Switch’s current settings will be
uploaded to the TFTP server.
<ipaddr> − The IPv4 address of the TFTP server.
<ipv6addr> − The IPv6 address of the TFTP server.
<path_filename> − The filename of the firmware or switch
configuration file on the TFTP server. You need to specify the
DOS path if the file is not at the root directory of the TFTP server.
Restrictions None.
Example usage:

To upload a firmware file:


DGS-1210-28>upload firmware_toTFTP 1.1.1.23 1\running—config

01–Jan–2000 01:26:11 %COPY–I–FILECPY: Files Copy – source URL


running–config destination URL tftp://1.1.1.23/1\running–config

…..01–Jan–2000 01:26:16 %COPY–W–TRAP: The copy operation was


completed success fully

158 bytes copied in 00:00:05 [hh:mm:ss]

DGS-1210-28>

config ipif system


Purpose To configure the System IP interface.
Syntax config ipif system { ipaddress <ip-address> <subnet-mask>
gateway <gw-address> | dhcp | bootp }
Description The config ipif system command configures the System IP
interface on the Switch.
Parameters ipaddress <ip-address> <subnet-mask> − The IP address and
subnet mask to be created. Users need to specify the address
and mask information using the traditional format (for
example,10.1.2.3/255.0.0.0)
gateway <gw-address> − The IP address of the router or
gateway.
dhcp − Allows the selection of the DHCP protocol for the
assignment of an IP address to the Switch’s System IP interface.
bootp − Allows the selection of the BOOTP to the switch.
Restrictions None.
Example usage:

To configure the IP interface System:


DGS-1210-28> config ipif System ipaddress 10.48.74.122/8

90
5 Command Line Interface D-Link Web Smart Switch User Manual

Success.

DGS-1210-28>

config ipif system


Purpose To configure the System IPv6 interface.
Syntax config ipif system { ipv6 ipv6address <ipv6networkaddr> |
dhcpv6_client [enable | disable] }
Description The config ipif system command configures the System IPv6
interface on the Switch.
Parameters ipv6 ipv6address <ipv6networkaddr> − Use this parameter to
statically assign an IPv6address to this interface. This address
should define a host address and a network prefix length. Multiple
IPv6 addresses can be configured for a single IP interface. Ex:
3ffe:501:ffff:100::1/64. The /64 represents the prefix length of the
IPv6 addresses.
dhcpv6_client [enable | disable] − Specify the DHCPv6 client to be
disabled or enabled.
Restrictions None.
Example usage:

To configure the IPv6 interface System:


DGS-1210-28> config ipif System ipv6 ipv6address 3ffe:501:ffff:100::1/64

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:

To terminate the current user’s console session:


DGS-1210-28> logout

NOTE: Save your configuration changes before


logging out.

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:

To ping the IP address 10.90.90.91:


DGS-1210-28> ping 10.90.90.91
Reply Received From :10.90.90.91, TimeTaken : 20 msecs
Reply Received From :10.90.90.91, TimeTaken : 20 msecs
Reply Received From :10.90.90.91, TimeTaken : 20 msecs

--- 10.90.90.91 Ping Statistics ---


3 Packets Transmitted, 3 Packets Received, 0% Packets Loss

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:

To ping the IP address 3000::1:


DGS-1210-28> ping6 3000 ::1
Reply Received From : 3000 ::1, TimeTaken : 20 msecs
Reply Received From : 3000 ::1, TimeTaken : 20 msecs
Reply Received From : 3000 ::1, TimeTaken : 20 msecs

--- 3000 ::1 Ping Statistics ---


3 Packets Transmitted, 3 Packets Received, 0% Packets Loss

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:

To add the default static address 10.90.90.92 to the routing table:


DGS-1210-28> create iproute default 10.90.90.92
Command: create iproute default 10.90.90.92

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:

To delete the default Gateway from the routing table:


DGS-1210-28> delete iproute
Command: delete iproute

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

Syntax show iproute {<ipaddr> | static}


Description The show iproute command will display the Switch’s current IP
routing table.
Parameters <ipaddr> - Enter the IP address used here.
static – Specifies to display all the static routes.
Restrictions None.
Example usage:

To display the contents of the IP routing table:


DGS-1210-28> show iproute
Command: show iproute

Routing Table

IP Address/Netmask Gateway Interface Hops Protocol


---------------------------- --------------- -------------- --------- ---------------

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:

To restart the Switch:


DGS-1210-28> reboot
% Device will reboot, please wait a few minutes to re-login.

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:

To restore all of the Switch’s parameters to their default values:

94
5 Command Line Interface D-Link Web Smart Switch User Manual

DGS-1210-28> reset config


% Device will reboot after reset configuration successfully.

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:

To display IP interface settings:


DGS-1210-28> show ipif
IP Setting Mode : Static
IP Address : 10.90.90.90
Subnet Mask : 255.0.0.0
Default Gateway : 0.0.0.0
DHCPv6 Client State : Disabled
IPv6 Global Unicast Address: 3ffe:501:ffff:100:100::1/64

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:

To display the switch information:

95
5 Command Line Interface D-Link Web Smart Switch User Manual

DGS-1210-28> show switch


System Name :
System Contact :
System Location :
System up time : 0 days, 6 hrs, 32 min, 17
secs
System Time : 02/01/2012 06:32:19
System hardware version : C1
System firmware version : 4.00.018
System boot version : 1.00.007
System serial number : QBDGS12102800
MAC Address : 00-12-10-03-03-03

DGS-1210-28>

config account admin password


Purpose To display the configuration of an IP interface on the Switch.
Syntax config account admin password <passwd>
Description The config account admin password command sets the
administrator password.
Parameters <passwd> − The new password of the administrator.
Restrictions None.
Example usage:

To configure the account admin password:


DGS-1210-28> config account admin password 1234

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:

To save the Switch’s current configuration to non-volatile RAM:

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:

File doesn’t exist !!!


% ARP table :

Address Hardware Address Type Interface Mapping


------- ------ ----------- ---------------- ------ ------------- -------------
10.90.90.90 00:18:8b:bf:75:30 ARPA vlan1 Static
10.90.90.98 00:19:5b:14:3d:c4 ARPA vlan1 Dynamic
10.255.255.255 ff:ff:ff:ff:ff:ff ARPA vlan1 Static

% MAC table :

Vlan Mac Address Type Ports


------ -------------------- -------- -------
1 00:00:00:00:00:26 Learnt Gi0/7

Total Mac Addresses displayed: 1

DGS-1210-28>

97

You might also like