通过串口线连接连接到CISCO Ethernet Switch的Console:
红色部分修改为9600,蓝色部分不用改(缺省就是8 bit):
Serial连接参数如下:
Protocol: Serial
Baud rate: 9600
Data bits: 8
Parity: None
Stop bits: 1
no handshake
按回车键开始
切换至enable模式:
Switch>enable
Password: welcome1
Switch#
配置VLAN:
Switch#configure terminal
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.100.4 255.255.255.0
Switch(config-if)#end
Switch#write memory
禁用路由转发功能和配置默认路由:
Switch#configure terminal
Switch(config)#no ip routing
Switch(config)#ip default-gateway 192.168.100.254
Switch(config)#end
Switch#write memory
设置hostname:
Switch# configure terminal
Switch(config)#hostname dm01sw-adm
dm01sw-adm (config)#end
dm01sw-adm #write memory
设置密码:
dm01sw-adm #configure terminal
dm01sw-adm (config)#enable password welcome1
dm01sw-adm (config)#enable secret welcome1
dm01sw-adm (config)#end
dm01sw-adm #write memory
设置SSH接入的密码:
dm01sw-adm #configure terminal
dm01sw-adm(config)#line vty 0 15
dm01sw-adm(config-line)#password welcome1
dm01sw-adm(config-line)#login
dm01sw-adm(config-line)#end
dm01sw-adm#write memory
DNS服务器配置:
dm01sw-adm #configure terminal
dm01sw-adm(config-line)#ip domain-name cangpin.com
dm01sw-adm(config)#ip name-server 192.168.100.150
dm01sw-adm(config)#ip name-server 192.168.100.151
dm01sw-adm(config)#end
dm01sw-adm#write memory
设置时区和ntp服务器:
dm01sw-adm #configure terminal
szxdm02sw-ip(config)#clock timezone GMT +8
szxdm02sw-ip(config)#ntp server 192.168.100.155 prefer
szxdm02sw-ip(config)#ntp server 192.168.100.156
szxdm02sw-ip(config)#end
dm01sw-adm#write memory
dm01sw-adm#show ntp status
dm01sw-adm#show clock
检查配置:
dm01sw-adm#show running-config