Switch comands

CiscoHP 3500 & 6200HP 5500Extreme 440
Accesso all’apparato
Reset factory defaultwrite eraseunconfigure switch all
Localizzazione dell’apparato
Blink apparatochassislocate [ blink | on | off ]chassislocate [ blink | on | off ]
Ottenere informazioni sull’apparato / os
Info sistemashow system
Info firmwareshow versionshow versiondisplay versionshow switch
Ottenere informazioni sulla configurazione
Info configurazione corrente apparatoshow running-configshow running-configdisplay current-configurationshow configuration
Info configurazione di start-up apparatoshow startup-configshow configdisplay startup
Consultazione file di log
Visualizza log-fileshow loggingshow loggingdisplay logbuffershow log
Ottenere informazioni sugli apparati collegati
Info apparati vicinishow cdp neighborsshow cdp neighborsdisplay lldp neighbor-information [ list ]show lldp neighbors
Power Over Ethernet
Info POEshow power inlineshow power-over-ethernet [brief | <ports-list>]show inline-power info ports <ports-list>
Mac & Arp Table
Info
MAC Address Table
show mac address-tableshow mac-addressdisplay mac-addressshow fdb
Info
ARP Table
show arpshow arpdisplay arpshow iparp
Gestione interfacce
Info specifica portashow interfaces <port-id>show interfaces <port-id>display interface [brief]show ports <port-id>
Info stato porteshow interfaces statusshow interfaces briefshow ports [no-refresh]
Info traffico porteshow interfaces countersshow interfaces port-utilizationshow ports statistics
Disabilitazione portaconfigure terminal

interface <PORT-ID>

shutdown
configure terminal

interface 17 disable
system-view

interface GigabitEthernet 1/0/17

shutdown
disable ports <PORT-ID>
Abilitazione portaconfigure terminal

interface <PORT-ID>

no shutdown
configure terminal

interface <PORT-ID> enable
system-view

interface GigabitEthernet 1/0/17

undo shutdown
enable ports <PORT-ID>
Descrizioniconfigure terminal

interface <PORT-ID>

[no] description [<text>]
configure ports <port-id> display-string <str.>
Gestione VLAN
Info su VLANs apparatoshow vlanshow vlansdisplay vlanshow vlan
VLAN(s) di una portashow vlan briefshow vlans ports <PORT-ID>?show ports <PORT-ID> no-refresh
Porte di una VLANshow vlan briefshow vlans <VLAN-ID>display vlan <VLAN-ID>show vlan “<VLAN-ID>”
Creazione di una VLANconfigure terminal

vlan <VLAN-ID>

name “<VLAN-Name>”
configure terminal

vlan <VLAN-ID>

name “<VLAN-Name>”
Rimozione porta da VLANconfigure terminal

interface <PORT-ID>

switchport mode access

switchport access vlan 1
configure terminal

no vlan <VLAN-ID> [tagged | untagged] <PORT-ID>
interface [GigabitEthernet] <port_id>

undo port [trunk] permit vlan [<vlan_list> | all]
configure vlan “<VLAN-ID>” delete ports <PORT-ID>
Assegnazione porta a VLANconfigure terminal

interface <PORT-ID>

switchport mode access

switchport access vlan <VLAN-ID>
configure terminal

vlan <VLAN-ID> [tagged | untagged] <PORT-ID>
interface GigabitEthernet <port_id>

port [trunk] permit vlan [<vlan_list> | all]
configure vlan “<VLAN-ID>” add ports <PORT-ID> [tagged | untagged]
Configurazione porta per collegamento PC & VOIPconfigure terminal

interface <PORT-ID>

switchport mode access

switchport access vlan <VLAN-ID-DATI>

switchport voice vlan <VLAN-ID-VOIP>
Configurazione porta in Trunk (totale)configure terminal

[switchport encapsulation dot1q]

interface <PORT-ID>

switchport mode trunk

switchport trunk native vlan <VLAN-ID-DATI>
Aggiunta di una VLAN ad un trunkconfigure terminal

[switchport encapsulation dot1q]

interface <PORT-ID>

switch trunk allowed vlan add <VLAN_ID>
Gestione Ethernet Channel
Creazione Port Channelconfigure terminal

interface range fa0/17-18

switchport mode access

switchport access vlan 10

channel-group 5 mode
[ desirable | auto | on | active | passive ]
Rimozione Port Channelconfigure terminal

no interface port-channel 5

interface fa0/17
no shutdown

interface fa0/18
no shutdown
Salvataggio configurazione
Salvare modifichecopy running-config startup-configwrite memorysavesave configuration [primary | secondary]
Disconnessione
Logoutexitexitquitexit
Riavvio sistema
Riavvioreloadreloadreboot
Riavvio programmatoreload in <min.>reload after <min.>reboot time <m dd yyyy hh mm>
Annullare riavvioreload cancelno reloadreboot time <m dd yyyy hh mm>
Abilitazione / disabilitazione modalità accesso
Imposta utente / passwordconfigure terminal

password manager user-name <user_id (=admin)> plaintext <password_in_chiaro ()>
configure account “<user_id (=admin)>” password

oppure

configure account “admin” encrypted “<encrypted-password>”
HTTPconfigure terminal

[no] ip http server
configure terminal

[no] web-management plaintext
system-view

[undo] ip http enable
enable| disable web http
HTTPSconfigure terminal

[no] ip http secure-server
configure terminal

[no] web-management ssl
system-view

[undo] ip https enable
enable|disable web https
SSH2configure terminal

[Crypto Key generate rsa general-keys modulus 768

Ip ssh version 2]

line vty 0 15

transport input ssh [telnet]

(se non specificato ‘telnet’ abilita solo SSH2, ovvero disabilita Telnet)
configure terminal

crypto key generate ssh rsa

ip ssh

(abilita SSH2)
system-view

public-key local create rsa

local-user admin

Password cipher !PanchoVilla.

Authorization-attribute level 3

Service-type ssh

quit

ssh server enable

User-interface vty 0 15

Authentication-mode scheme

Idle-timeout 0 0

Protocol inbound ssh
enable | disable ssh2
Telnetconfigure terminal

line vty 0 15

transport input telnet [ssh]

(se non specificato ‘ssh’ abilita solo Telnet, ovvero e disabilita SSH2)
configure terminal

[no] telnet-server
[undo] telnet server enableenable|disable telnet
Gestione server NTP
Visualizza orarioshow clockshow timedisplay clockshow switch | i “Current Time”
Visualizza impostazionishow ntp statusshow sntpdisplay ntp-service statusshow sntp-client
Disabilita NTPconfigure terminal

no ntp server <IP_Address>
configure terminal

no sntp server priority <priority> <IP> <version>
disable sntp-client
Abilita NTPconfigure terminal

ntp server 192.168.1.1
configure terminal

timesync sntp

sntp server priority 1 192.168.1.1

sntp unicast

time timezone 60

time daylight-time-rule middle-europe
system-view

clock timezone CET add 01:00:00

clock summer-time CET repeating 02:00:00 2018 march last Sunday 02:00:00 2018 October last Sunday 01:00:00

ntp-service unicast-server 192.168.1.1 priority version 3
configure sntp-client primary 192.168.1.1 [vr “VR-Default”]

[configure sntp-client secondary 192.168.1.1 [“VR-Default”]]

configure timezone name CET 60 autodst begins every last sunday march at 2 0

enable sntp-client
DHCP
Impostazione
IP helper-address
(solo centro stella)

conf t

interface vlan <vlan_id>

ip helper address xxx.xxx.xxx.xxx
(solo centro stella)

conf t

interface vlan <vlan_id>

ip helper address xxx.xxx.xxx.xxx
(solo centro-stella)

dhcp relay server-group 0 ip xxx.xxx.xxx.xxx

udp-helper enable

interface vlan x

dhcp select relay

dhcp relay server-select 0
(solo centro-stella)

configure bootprelay add xxx.xxx.xxx.xxx vr VR-Default

enable bootprelay ipv4 vlan <vlan_name>
Reset configurazione
Factory resetconfigure terminal

erase startup-config