思科3560G交换机常用配置
一.配置telnet登陆账号和密码
用串口线连上交换机
Switch(config)#userna
Switch(config)#username admin pas
Switch(config)#username admin password 123
Switch(config)#line vty 0 4
Switch(config-line)#login local
Switch(config-line)#end
%SYS-5-CONFIG_I: Configured from console by console
Switch#wr
二.配特权密码
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password 456
三.划分vlan
Switch(config)#vlan 10
Switch(config-vlan)#int vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
Switch(config-if)#ip add 192.168.10.1 255.255.255.0
四.配dhcp
Switch(config)#ip dhcp pool vlan10
Switch(dhcp-config)#network 192.168.10.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.10.1
Switch(dhcp-config)#dns-server 192.168.1.1
Switch(dhcp-config)#
五.划分端口
Switch(config)#int range fastEthernet 0/1-5 进入1-5端口
Switch(config-if-range)#switchport mode access 并把接口方式改为access
Switch(config-if-range)#switchport access vlan 10把1-5端口划vlan 10
Switch(config-if-range)#no sh
六. 配静态路由
Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2 192.168.10.2是一跳地址七. 配置完一定要保存
Switch#wr
Building configuration...
[OK]。