交換機的初始化配置方式分為兩種,一種是steup的交互式配置模式,一種是逐條命令的配置模式
提要1:同時配置明文密碼與暗文密碼時,暗文密碼生效而明文密碼不生效
這里將首先演示setup的方式配置
進入特權模式
Switch> enable
輸入setup
Switch#setup
確認配置
Continue with configuration dialog? [yes/no]: yes
輸入主機名sd
Enter host name [Switch]: sd
輸入加密密碼
Enter enable secret: 123
輸入明文密碼
Enter enable password: 456
輸入遠程鏈接密碼
Enter virtual terminal password: 789
不啟動snmp
Configure SNMP Network Management? [no]:no
進入接口vlan1
management network from the above interface summary: vlan1
是否配置vlan1
Configuring interface Vlan1:
Configure IP on this interface? [yes]:yes
配置vlan1的ip並確認
IP address for this interface: 192.168.0.1 配置IP
Subnet mask for this interface [255.255.255.0] : 確認子網掩碼
Would you like to enable as a cluster command switch? [yes/no]:yes 確認
確認配置保存
[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.
Enter your selection [2]: 2
命令配置模式
enable 進入特權模式
conf t 進入全局配置模式
no ip domain-lookup 去除域名解析(使命令誤輸入之后不會陷入假死狀態)
hostname qsq 更改交換機名稱
enable password 123 設置明文密碼
enable secret 456 設置暗文密碼
line vty 0 4 設置遠程登陸終端上限
password 789 設置遠程登陸密碼
login 啟用遠程登陸密碼驗證
exit 退出
interface vlan1 進入vlan1
ip address 192.168.1.1 255.255.255.0 配置vlan1的IP地址與子網掩碼
no shutdown 激活vlan1
end 返回至特權模式
copy running-config startup-config 保存配置