交æ¢æºé
ç½®å½ä»¤
ç±»å« å½ä»¤æ ¼å¼ å½ä»¤å«ä¹
åºæ¬é
ç½® S> enable è¿å
¥ç¹æ模å¼
S# configure terminal è¿å
¥å
¨å±é
置模å¼
S(config)# hostname name æ¹å交æ¢æºå称
S(config)# enable password level level_# password 设置ç¨æ·å£ä»¤ï¼level_#=1)æç¹æå£ä»¤ï¼level_#=15)
S(config)# line console 0 è¿å
¥æ§å¶å°æ¥å£
S(config-line)# password console_password æ¥ä¸ä¸æ¡å½ä»¤ï¼è®¾ç½®æ§å¶å°å£ä»¤
S(config)# line vty 0 15 è¿å
¥èæç»ç«¯
S(config-line)# password telnet_password æ¥ä¸ä¸æ¡å½ä»¤ï¼è®¾ç½®Telnetå£ä»¤
S(config-line)# login å
许Telnetç»å½
S(config)# enable password|secret privilege_password é
ç½®ç¹æå£ä»¤ï¼å å¯æä¸å å¯ï¼
S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# è¿å
¥æ¥å£åé
置模å¼
S(config-if)# [no] shutdown å
³éæå¯ç¨è¯¥æ¥å£ï¼é»è®¤å¯ç¨ï¼
S(config)# ip address IP_address sunbet_mask æå®IPå°å
S(config)# ip default-gateway router's_IP_address æå®åªå°è·¯ç±å¨å°å为é»è®¤ç½å
³
S# show running-config æ¥çå½åçé
ç½®
S# copy running-config startup-config å°RAMä¸çå½åé
ç½®ä¿åå°NVRAMä¸
S> show interface [type slot_#/port_#] æ¥çææææå®æ¥å£çä¿¡æ¯
S> show ip æ¾ç¤ºäº¤æ¢æºçIPé
ç½®ï¼åªå¨1900ç³»åä¸å¯ç¨ï¼
S> show version æ¥ç设å¤ä¿¡æ¯
S# show ip interface brief éªè¯IPé
ç½®
S(config-if)# speed 10|100|auto 设置æ¥å£éç
S(config-if)# duplex auto|full|half 设置æ¥å£å工模å¼
S> show mac-address-table æ¥çCAM表
S# clear mac-address-table æ¸
é¤CAM表ä¸çå¨ææ¡ç®
1900(config)# mac-address-table permanent MAC_address type [slot_#/]port_# å¨CAM表ä¸å建éææ¡ç®
2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# å¨CAM表ä¸å建éææ¡ç®
1900(config)# mac-address-table restricted static MAC_address source_port list_of_allowed_interface 设置éæ端å£å®å
¨æªæ½
1900(config-if)# port secure å¯ç¨ç²æ§å¦ä¹
1900(config-if)# port secure max-mac-count value 设置ç²æ§å¦ä¹ ç¹æ§è½å¤å¦å°çå°åæ°éï¼é»è®¤132ï¼åå¼èå´æ¯1-132ï¼
1900(config)# address-violation suspend|ignore|disable æ¹åå®å
¨é项
1900> show mac-address-table security éªè¯ç«¯å£å®å
¨æªæ½
2950(config)# switchport mode access å®ä¹æ¥å£ä¸ºä¸»æºç«¯å£èä¸æ¯ä¸ç»§ç«¯å£
2950(config)# switchport port-security å¯ç¨ç«¯å£å®å
¨æªæ½
2950(config)# switchport port-security maximum value æå®å¯ä¸æ¤æ¥å£ç¸å
³ç设å¤çæ大æ°é
2950(config)# switchport port-security violation protect|restrict|shutdown æå®åºç°å®å
¨è¿è§æ¶åºè¯¥åççäº
2950(config)# switchport port-security mac-address MAC_address æå®å
许ä¸æ¤æ¥å£ç¸å
³çç¡®åçMACå°å
温馨提示:答案为网友推荐,仅供参考