ycycoco 发表于 2018-7-21 07:31:14

Cisco设备初始配置的几个必备点

  当我们拿到一个新的cisco的设备的时候,我们需要知道做哪些初始化的操作,一下我们分为5部来看一下,比较简单,只是给自己留的笔记,来分享一下!
  1.(設置超時)
  Switch>enable(進入特權模式)
  Switch#config terminal(進入全局模式)
  Switch(config)#line console 0(進入控制台端口)
  Switch(config-line)#exec-timeout 5 0(配置系統超時時間為5分鐘)
  Switch(config-line)#logging synchronous(避免被系統出現的控制信息打斷命令)
  Switch (config-line)#end (返回到特權模式)
  Switch#write (保存配置)
  2.(配置主機名啟用telnet登錄)
  Switch>enable(進入特權模式)
  Switch#config terminal(進入全局模式)
  Switch(config)#hostname cnsw04 (配置交換機的名字為cnsw04)
  cnsw04(config)#line vty 0 4(進入telnet登錄配置模式)
  cnsw04(config-line)#password 123!@# (配置密碼為123!@#)
  cnsw04(config-line)#login (啟用登錄密碼功能)
  cnsw04(config-line)#end (返回到特權模式)
  cnsw04#write (保存配置)
  3.(配置console口密碼)
  cnsw04>enable(進入特權模式)
  cnsw04#config terminal(進入全局模式)
  cnsw04 (config)#line console 0(進入控制台端口)
  cnsw04(config-line)#password 123!@#
  cnsw04(config-line)#login (啟用登錄密碼功能)
  cnsw04 (config-line)#end (返回到特權模式)
  cnsw04#write (保存配置)
  4.(啟用enable密碼)
  cnsw04>enable(進入特權模式)
  cnsw04#config terminal(進入全局模式)
  cnsw04(config)#enable secret 123!@# (配置enable登錄的密文密碼)
  cnsw04(config)#interface vlan 1 (進入默認管理vlan1的配置模式)
  cnsw04(config-if)#no shutdown(啟用端口)
  cnsw04(config-if)#ip address 192.168.1.2 255.255.255.0(為默認管理vlan 1配置IP地址)
  cnsw04(config-if)#ip default-gateway 192.168.1.1(配置默認網関)
  cnsw04 (config-line)#end (返回到特權模式)
  cnsw04#write (保存配置)
  5.(配置用戶和時間服務器)
  cnsw04>enable(進入特權模式)
  cnsw04#config terminal(進入全局模式)
  cnsw04(config)#username mis privilege 1 secret 123!@# (配置登錄用戶設置登錄等級并設置密文密碼)
  cnsw04(config)#line vty 0 4 (進入telnet配置模式)
  cnsw04(config-line)#login local (启用telnet方式的用户和密码验证)
  cnsw04(config-line)#exit (返回全局模式)
  cnsw04(config)#service password-encryption (为所有密码加密)
  cnsw04(config)#ntp server 192.168.1.1 (配置时间服务器)
  cnsw04 (config-line)#end (返回到特權模式)
  cnsw04#write (保存配置)
页: [1]
查看完整版本: Cisco设备初始配置的几个必备点