Example Commands

 

*The following are examples of what command. Please reference the owner's manual to confirm what commands you should run to perform a specific task.

 

Ports can be disabled using the following commands:

console# config

console(config)# interface ethernet g5

console(config-if)# shutdown

 

Enable a port using the following command:

console(config-if)# no shutdown

 

Creating LAGs – Static Two-port LAG

console> enable

console# configure

console(config)# interface range ethernet g1-2

console(config-if)# channel-group 1 mode on

console(config-if)# exit

console(config)#

 

Creating LAGs – Dynamic LACP LAG

console> enable

console# configure

console(config)# interface range ethernet g1-2

console(config-if)# channel-group 1 mode auto

console(config-if)# exit

console(config)#

 

Creating VLANs

console> enable

console# config

console(config)# vlan database

console(config-vlan)# vlan 2

console(config-vlan)# exit

console(config)# interface vlan 2

console(config-if)# name Marketing

console(config-if)# end

 

Change Management VLAN

console > enable

console# configure

console(config)#ip address vlan 5

 

Removing VLANs

console> enable

console# config

console(config)# vlan database

console(config-vlan)# no vlan 2

 

Remove Port From VLAN

console> enable

console# config

console(config)# interface ethernet 1/e1

console(config-if)# switchport access vlan 1

 

VLAN routing

console#config

console(config)#ip routing

console(config)#interface vlan 2

console(config-if-vlan2)#routing

console(config-if-vlan2)#exit

 

Creating Static Routes

console> enable

console# config

console(config)# ip route 172.16.0.0 255.255.0.0 10.0.0.2

console(config)# end

console#

 

 Configure LLDP – Marvell-based Switch

console> enable

console# config

console(config)# interface range ethernet 1/e5-10

console(config-if)# lldp optional-tlv port-desc sys-name sys-desc sys-cap

console(config-if)# end

console#

 

Configure LLDP 62xx Series

console>enable

console#config

console(config)#lldp notification-interval 10

console(config)#interface range ethernet 1/g1-1/g24

console(config-if)#lldp transmit-tlv port-desc sys-name sys-desc sys-cap

console(config-if)#lldp transmit-mgmt

console(config-if)#lldp notification

console(config-if)#end

console#

 

 

Configure LLDP – 8024/8024F Series (v3.1.4.5 or later)

console>enable

console#config

console(config)#lldp notification-interval 10

console(config)#interface range ethernet 1/xg1-1/xg24

 

console(config-if)#lldp transmit-tlv port-desc sys-name sys-desc sys-cap

console(config-if)#lldp transmit-mgmt

console(config-if)#lldp notification

console(config-if)#end

console#

 

To configure Bridge priority for a Root Switch:

console# config

console(config)# spanning-tree priority 4096 ß Global config sets bridge priority

console(config)# exit

 

To configure Portfast on an interface:

console# config

console(config)# interface ethernet g5 ß this command will vary on different vendor platforms

console(config-if)# spanning-tree portfast ß this enables Portfast on this port

console(config-if)# exit

 

To reset a switch to factory defaults use the following commands:

delete startup-config or simply del start.

Reload

 

Snmp configuration Marvell-based switches:

console# configure

console(config)# snmp-server community public rw 172.16.0.24

console(config)# snmp-server enable traps

console(config)# snmp-server trap authentication

console(config)# snmp-server host 172.16.0.24 public

console(config)# snmp-server host 172.16.0.24 public traps 2

console(config)# snmp-server host 172.16.0.24 public informs 2

console(config)# snmp contact "John Smith"

console(config)# snmp location "First Floor"

 

Snmp configurationBroadcom-based switches:

console# configure

console(config)# snmp-server community public rw ip address 172.16.0.24

console(config)# snmp-server enable traps all

console(config)# snmp-server trap authentication

console(config)# snmp-server host 172.16.0.24 public traps v2

console(config)# snmp-server host 172.16.0.24 public informs

console(config)# snmp contact "John Smith"

console(config)# snmp location "First Floor"

 

SNTP for unicast Marvel-based switches

console(config)# clock source sntp

console(config)# clock summer-time recurring usa zone CDT

console(config)# clock timezone -6 zone CST

console(config)# sntp unicast client enable

console(config)# sntp server 10.37.112.13

 

SNTP for unicast Broadcom-based switches

console(config)# clock summer-time recurring usa zone CDT

console(config)# clock timezone -6 zone CST

console(config)# sntp unicast client enable

console(config)# sntp server 10.37.112.13