1 switch> 命令行模式;config#特权模式 一、配置交换机 vlan 模式;有两种方式 第一种: config#vlan ID 这里的 ID 是需要你个人给要划分的 vlan 起的编号 config-if#name 名字 switch#show vlan brief 查看 vlan 用来检验是否配置成功 第二种: switch#vlan database 交换机的 vlan 配置状态 switch(vlan)#vlan ID name 名字 配置 vlan 并且分配相应的名字 二、3560 上开启路由功能配置 switch(config)#ip routing switch(config)#ip route ipaddress net-hop 配置路由(静态) switch(config)#ip default-gateway ipaddress 配置网关 三、开启聚合链路配置 #conf t SW(config)#interface range f1/1 - 2 SW(config-if)#channel-group 1 mode desirable/on SW(config-if)#swithport SW(config-if)#switchport mode trunk SW(config-if)#switchport trunk encap dot1q 四、启动 telnet 管理模式 switch(config)#line vty 0 4 switch(config-line)#password 密码 switch(config-line)#login 五、开启 cisco 日志功能 switch(config)#logging on switch(config)#logging trap 信息 switch(config)#logging host