service timestamps debug datetime localtime 配置 debug 记录时间戳为每日时间,本地时钟 service timestamps log datetime localtime 配置 loggin 日志 记录时间戳为每日时间,本地时钟 service password-encryption 加密明文密码! hostname xxxx-XXXX-C2960-01 给设备命名!enable secret xxxx 配置特权密码为 xxxx! username xxxx pass xxxx 配置本地数据库用户名xxxx 密码 xxxx aaa new-modelsystem mtu routing 1500vtp mode transparent 定义此设备VTP 模式为透明模式ip subnet-zero!no ip domain-lookup 关闭域名自动查找!no file verify autospanning-tree mode pvstspanning-tree extend system-id!vlan internal allocation policy ascending! vlan xxxx 设置本交换机的接入VLAN ID和名字 name xxxxvlan 300 定义暂时的管理VLAN ID 和名字 name xxxvlan xxxx 定义割接后的VLAN ID 和名字name xxxx !interface FastEthernet0/1 进入F0/1口 switchport access vlan xxx 把这个口划入XXX vlan switchport mode access 定义这个口为访问端口 (连接终端设备的接口) spanning-tree portfast 定位这个口为快速转发口 (减少生成树的计算30秒左右)!interface FastEthernet0/2 switchport access vlan xxx switchport mode access spanning-tree portfast!interface FastEthernet0/3 switchport access vlan xxx switchport mode access spanning-tree portfast!interface FastEthernet0/4 switchport access vlan xxx switchport mode access spanning-tree portfast!interface FastEthernet0/5 switchport access vlan xxx switchport mode access spanning-tree portfast!interface FastEthernet0/6 switchport access vlan xxx switchport mode access spanning-tree portfast!interface FastEthe。
全部