[Computer Network Technology] Summary of switch configuration

switch configuration

Cisco3500

Cisco6500

Configure the system information of the switch

Configure the hostname of the switch

Step 1: Enter global configuration mode

Step 2: Configure the hostname #hostname Switch-3528-TEST

Step 1: Enter the super user mode and enter the password

Step 2: Set the system name set system name Switch-6509-TEST

Configure IP address

switch-3528-TEST(config)#interface VLAN1

switch-3528-TEST(config-if)#ip address ip address subnet mask

switch-3528-TEST(config-if)#exit

set interface sc0 IP address subnet mask direct broadcast address

Configure default routing

switch-3528-TEST(config)#ip default-gateway default route

set ip route 0.0.0.0 default gateway

Configure remote login password

switch-3528-TEST(config)#line vty 0 4

switch-3528-TEST(config-line)#password 7 2222

Configure switch ports

Configuring the Communication Mode of a Switch Port

switch-3528-TEST(config-if)# duplex autofull/half

Switch-6509-TEST>(enable) set port duplex module number / port number auto ( full/half )

Configure the transmission rate of the port

# auto

# speed 10

Switch-6509-TEST>(enable) set port speed module number / port number speed

VLAN configuration

Cisco3500

Cisco6500

VLAN creation and deletion

Create VLAN (modify VLAN )

Step 1: Enter VLAN configuration mode. Switch-3528-TEST #vlan data

Step 2: Create VLAN . Switch-3528-TEST (vlan) # vlan id number name name

Step 3: Exit and return to privileged user mode. Switch-3528-TEST (vlan) #exit

Switch-6509-TEST>(enable) set vlan ID number name name

delete vlan

Switch-3528-TEST(vlan) #no vlan xx

Switch-6509-TEST>(enable) clear vlan ID

Assign switch ports to VLANs

Step 1: Enter Port Configuration Mode

#configure terminal

#int f0/1

Step 2: Assign a VLAN to the port

switchport access vlan vlanxx

Switch-6509-TEST>(enable) set vlan xxx port

Configuring VLAN Trunks

Step 1: Enter the switch port configuration mode.

Switch-3528-TEST # configure terminal

Switch-3528-TEST (config) #int f0/24

Step 2: Configure VLAN Trunk mode.

Switch-3528-TEST (config-if) # switchport mode trunk

Step 3: Encapsulate the VLAN protocol.

Switch-3528-TEST (config-if) # switchport trunk encapsulation dotlqislnegotiate P

步骤四:设置允许中继的VLAN

Switch-3528-TEST (config-if) #switchport trunk allowed vlan 1,101-10except 11-20

步骤一:配置VLAN Trunk模式,封装VLAN协议

Switch-6509-TEST>(enable) set trunk模块号/端口号 on dotlq

步骤二:设置允许中继的VLAN

Switch-6509-TEST>(enable) set trunk模块号/端口号 vlan 11-20

Switch-6509-TEST>(enable) clear trunk模块号/端口号 16-20

STP(生成树协议)配置

生成树的基本配置

启用STP

spanning-tree vlan xx

set spantree enable xx

关闭STP

no spanning-tree vlan xx

set spantree disable xx

设置主root

spanning-tree vlan xx root primary

set spantree root xx

设置备份root

spanning-tree vlan xx root secondary

set spantree root secondary xx

设置优先级

spanning-tree vlan xx priority xxxx

set spantree priority xxxx

生成树的增强功能原理及配置

PortFast

3528

spanning-tree portfast default

set spantree portfast 模块号/端口号 enable(打开portfast

set spantree portfast 模块号/端口号 disable(关闭portfast

set spantree portfast 模块号/端口号 default(默认启用portfast

UplinkFast

spanning-tree uplinkfast

spanning-tree uplinkfast max-update-rate <0~32000>

set spantree uplinkfast enable

set spantree uplinkfast enable rate <0~32000>

BackboneFast

spanning-tree backbonefast

set spantree backbonefast enable(开启)

set spantree backbonefast disenable(关闭)

BPDU Filtering

spanning-tree portfast bpdufilter default

set spantree portfast bpdu-filter enable/disable

Guess you like

Origin blog.csdn.net/weixin_72634509/article/details/127177384