1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/3
1900#show mac-address-table
2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]
--------------------------------------------------------------------------------
ÅäÖÃÊÜÏÞ¾²Ì¬MACµØÖ·
1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}
1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1
1900#show mac-address-table
2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]
2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 1
2950#show mac-address-table ÅäÖö˿ڰ²È«ÐÔ
1900(config-if)#port secure max-mac-count count
1900(config)#interface e0/4
1900(config-if)#port secure
1900(config-if)#port secure max-mac-count 1
1900(config)#address-violation {suspend | disable | ignore
1900# show mac-address-table security
2950(config-if)#port security max-mac-count count
2950(config)#interface fa0/1
2950(config-if)#port security
2950(config-if)#port security max-mac-count 10
2950(config-if)#port security action {shutdown | trap}
2950#show mac-address-table secure
2950#show port-security ¹ÜÀíÅäÖÃÎļþ
1900#copy nvram tftp://host/dst_file
1900#copy tftp://host/src_file nvram
1950#copy nvram tftp://10.1.1.1/wgswd.cfg
2950#copy startup-config tftp://host/dst_file Çå³ý NVRAM
1900#delete nvram
2950#erase startup-config
vlanÅäÖÃ
1900 VLAN½¨Á¢
1900ÏÂ,ʹÓÃvlan [vlan#] name [name] [vlan#]ÃüÁî, ÈçÏÂ: >en
#config t
(config)#hostname 1900
1900(config)#vlan 2 name sales
1900(config)#vlan 3 name marketing
1900(config)#vlan 4 name mis
1900(config)#exit
¶Ë¿Ú·ÖÅä
1900(config)#int e0/2
1900(config-if)#vlan-membership static 2
1900(config)#int e0/4
1900(config-if)#vlan-membership static 3
1900(config)#int e0/5
1900(config-if)#vlan-membership static 4
1900(config-if)#exit
1900(config)#exit
VLANÑéÖ¤
1900#sh vlan 2900 VLAN½¨Á¢
ÔÚ2950Ï´´½¨VLAN,ÔÚÌØÈ¨Ä£Ê½ÏÂʹÓÃvlan databaseÃüÁî
2950#vlan database
2950(vlan)#vlan 2 name Marketing
VLAN 2 modified:
Name: Marketing
2950(vlan)#vlan 3 name Accounting
VLAN 3 added:
Name: Accounting
2950(vlan)#apply
APPLY complete
2950(vlan)#Ctrl+C
2950#
¶Ë¿Ú·ÖÅä
2950ϵĶ˿ÚÅäÖÃ,ʹÓÃswitchport access vlan [vlan#]ÃüÁî,
2950(config-if)#int f0/2
2950(config-if)#switchport access vlan 2
2950(config-if)#int f0/3
2950(config-if)#switchport access vlan 3
2950(config-if)#int f0/4
2950(config-if)#switchport access vlan 4
2950(config-if)#exit
2950(config)#exit
ÑéÖ¤ÅäÖÃÐÅÏ¢,ÈçÏÂ:
2950#sh vlan
»ò
2950#sh vlan brief trunkÅäÖÃ
1900 trunkÅäÖÃ
1900(config)#int f0/26
1900(config-if)#trunk on
2950ÏÂÔÚ½Ó¿ÚÅäÖÃģʽ,ʹÓÃswitchportÃüÁî,ÈçÏÂ:
2950(config)#int f0/12
2950(config-if)#switchport mode trunk
2950(config-if)# switchport trunk encapsulation {isl|dot1q}
2950(config-if)#^Z
½«Ä³VLAN´ÓÖмÌÖÐɾ³ý
2950(config-if)# switchport trunk allowed vlan remove vlan-list