Difference between revisions of "H3C Switch"

From AlphaBook
Jump to: navigation, search
(Display)
(NTP)
 
(20 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
* display current-configuration interface
 
* display current-configuration interface
 
* display current-configuration interface Gigabitethernet 1/0/1
 
* display current-configuration interface Gigabitethernet 1/0/1
 +
* display interface brief
 +
* display this
 
* display saved-configuration
 
* display saved-configuration
 
* display version
 
* display version
Line 13: Line 15:
 
* speed 1000
 
* speed 1000
 
* duplex full
 
* duplex full
* port access vlan 10  
+
* port access vlan 10
 +
* show this
  
 
== VLAN ==
 
== VLAN ==
* system-view
 
 
* vlan 10
 
* vlan 10
 
* description Sales
 
* description Sales
Line 22: Line 24:
 
* interface vlan-interface 10
 
* interface vlan-interface 10
 
* ip address 192.168.10.1 255.255.255.0
 
* ip address 192.168.10.1 255.255.255.0
* quit
 
  
 
== Trunk ==
 
== Trunk ==
* system-view
 
 
* interface Gigabitethernet 1/0/48
 
* interface Gigabitethernet 1/0/48
 
* port link-type trunk
 
* port link-type trunk
Line 31: Line 31:
  
 
== Etherchanel ==
 
== Etherchanel ==
* system-view
 
 
* interface bridge-aggregation 1
 
* interface bridge-aggregation 1
 
* port link-type trunk
 
* port link-type trunk
 
* port trunk permit vlan all
 
* port trunk permit vlan all
 
* quit
 
* quit
* interface range ten-gigabitethernet 1/0/1 to 1/0/2
+
* interface range ten-gigabitethernet 1/0/47 to 1/0/48
 
* port link-aggregation group 1
 
* port link-aggregation group 1
 
* quit
 
* quit
 +
* show link-aggregation summary
 +
* show link-aggregation verbose
  
 
== SSH Login ==
 
== SSH Login ==
Line 52: Line 53:
 
* authorization-attribute user-role network-admin
 
* authorization-attribute user-role network-admin
 
* quit
 
* quit
 +
 +
== AUX Login ==
 +
* line aux 0
 +
* authentication-mode scheme
 +
* quit
 +
* local-user admin class manage
 +
* password simple 123.com
 +
* service-type terminal
 +
* authorization-attribute user-role network-admin
 +
* undo authorization-attribute user-role network-operator
 +
* quit
 +
 +
== NTP ==
 +
* clock timezone Beijing add 08:00:00
 +
* ntp-service enable
 +
* ntp-service unicast-server 192.168.10.10
 +
* ntp-service unicast-server 192.168.10.11
 +
*
 +
* display ntp sessions
 +
* display ntp status
 +
* display clock
 +
 +
== Port Security ==
 +
* port-security enable
 +
* interface ten-gigabitethernet 1/0/1
 +
* port-security max-mac-count 10
 +
* port-security intrusion-mode disableport-temporarily
 +
* show port-security interface ten-gigabitethernet 1/0/1
  
 
== LLDP ==
 
== LLDP ==
 
* sytem-view
 
* sytem-view
 
* lldp enable
 
* lldp enable
 +
 +
== SNMP ==
 +
* snmp-agent
 +
* snmp-agent sys-info version v3
 +
* snmp-agent mib-view included ZabbixMIB iso
 +
* snmp-agent group v3 ZabbixGroup privacy read-view ZabbixMIB
 +
* acl number 2000
 +
* rule 1 permit source 192.168.200.30
 +
* rule 100 deny
 +
* snmp-agent usm-user v3 ZabbixUser ZabbixGroup simple authentication-mode sha 123.com! privacy-mode aes128 123.com! acl 2000
 +
* snmp-agent trap enable
 +
* snmp-agent target-host trap address udp-domain 192.168.200.30 params securityname ZabbixUser v3 privacy
 +
* snmp-agent sys-info contact IT 010-11111111
 +
* snmp-agent sys-info location 2F
 +
* show snmp-agent statistics
 +
* show snmp-agent mib-view viewname ZabbixMIB
  
 
== General ==
 
== General ==
Line 62: Line 107:
 
* undo info-center enable
 
* undo info-center enable
 
* save
 
* save
* restore default
+
* <BJ-1F-SW01>reset saved-configuration
 
* reboot
 
* reboot

Latest revision as of 05:47, 15 August 2019

Display

  • display current-configuration
  • display current-configuration interface
  • display current-configuration interface Gigabitethernet 1/0/1
  • display interface brief
  • display this
  • display saved-configuration
  • display version
  • diaply vlan

Interface

  • interface Gigabitethernet 1/0/1
  • shutdown
  • undo shutdown
  • speed 1000
  • duplex full
  • port access vlan 10
  • show this

VLAN

  • vlan 10
  • description Sales
  • port Gigabitethernet 1/0/1
  • interface vlan-interface 10
  • ip address 192.168.10.1 255.255.255.0

Trunk

  • interface Gigabitethernet 1/0/48
  • port link-type trunk
  • port trunk permit vlan all

Etherchanel

  • interface bridge-aggregation 1
  • port link-type trunk
  • port trunk permit vlan all
  • quit
  • interface range ten-gigabitethernet 1/0/47 to 1/0/48
  • port link-aggregation group 1
  • quit
  • show link-aggregation summary
  • show link-aggregation verbose

SSH Login

  • system-view
  • public-key local create rsa
  • ssh server enable
  • line vty 0 10
  • authentication-mode scheme
  • quit
  • local-user admin class manage
  • password simple 123.com
  • service-type ssh
  • authorization-attribute user-role network-admin
  • quit

AUX Login

  • line aux 0
  • authentication-mode scheme
  • quit
  • local-user admin class manage
  • password simple 123.com
  • service-type terminal
  • authorization-attribute user-role network-admin
  • undo authorization-attribute user-role network-operator
  • quit

NTP

  • clock timezone Beijing add 08:00:00
  • ntp-service enable
  • ntp-service unicast-server 192.168.10.10
  • ntp-service unicast-server 192.168.10.11
  • display ntp sessions
  • display ntp status
  • display clock

Port Security

  • port-security enable
  • interface ten-gigabitethernet 1/0/1
  • port-security max-mac-count 10
  • port-security intrusion-mode disableport-temporarily
  • show port-security interface ten-gigabitethernet 1/0/1

LLDP

  • sytem-view
  • lldp enable

SNMP

  • snmp-agent
  • snmp-agent sys-info version v3
  • snmp-agent mib-view included ZabbixMIB iso
  • snmp-agent group v3 ZabbixGroup privacy read-view ZabbixMIB
  • acl number 2000
  • rule 1 permit source 192.168.200.30
  • rule 100 deny
  • snmp-agent usm-user v3 ZabbixUser ZabbixGroup simple authentication-mode sha 123.com! privacy-mode aes128 123.com! acl 2000
  • snmp-agent trap enable
  • snmp-agent target-host trap address udp-domain 192.168.200.30 params securityname ZabbixUser v3 privacy
  • snmp-agent sys-info contact IT 010-11111111
  • snmp-agent sys-info location 2F
  • show snmp-agent statistics
  • show snmp-agent mib-view viewname ZabbixMIB

General

  • system-view
  • sysname switch01
  • undo info-center enable
  • save
  • <BJ-1F-SW01>reset saved-configuration
  • reboot