一 CISCO交换机和路由器基本配置
交换机的配置
1 用户模式 switch > 2 进入特权模式 switch > enable
3 进入全局配置模式 , 全局模式的配置对整个交换机生效 switch # config terminal switch (config)#
4 进入接口模式 , 配置只对当前的接口生效
switch(config) # interface f0/1 switch(config-if) #
进入 line 模式, 这个模式主要用来对控制台做相应的配置
5 switch(config) # line console 0 switch(config-line) 6 配置主机名
switch(config) #hostname 主机名 7 配置使能口令
switch(config) # enable password 密码 8 配置加密使能口令
switch(config) # enable secret 密码 9 配置 ip 地址
switch(config) # add ip 地址 子网掩码 ip
switch(config) # no shutdown 10 配置交换机的网关
switch(config) # ip default-gateway ip 地址 11 保存配置
switch # copy runing-config startup-config switch # write 12 清空配置
switch # erase startup-config 13 清空接口配置
switch (config) # interface f0/1
switch (config-if) # default interface f0/1 14 清空交换机密码 (1) 关闭电源 .
⑵ 开启电源,并且按住交换机的 mode键,当交换机进入
flash_init load_helper boot
switch:
(3) 在 switch 后执行 flash_init 命令
(4) 在查看 flash 中的文件