码迷,mamicode.com
首页 > 其他好文 > 详细

交换机的基本配置

时间:2016-04-27 18:58:04      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:交换机配置   password   secret   enable   enter   

 

交换机的基本配置

 

    Switch>    首先看到的是用户模式

  Switch>en  输入en(即enable)进入特权模式

  Switch#conf t 进入配置模式

  Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname sw2960 给交换机命名

sw2960(config)#enable secret Cisco  设置特权加密口令

sw2960(config)#enable password Cisco 给交换机配置特权管理口令(明码的)

sw2960(config)#line consle 0  进入控制台口(RS232

sw2960(config-line)#password Cisco  设置登录口令

sw2960(config-line)#login  登录要求口令验证

sw2960(config-line)#exit 退出到上级目录

  sw2960(config)#line vty 0 4 给交换机开启远程管理  

  sw2960(config-line)#pass Cisco! 设置远程管理口令

  sw2960(config-line)#login 允许远程登陆

  sw2960(config-line)#exit 退出到上级目录

  sw2960(config)#int vlan 1 进入vlan1 接口

  sw2960(config-if)#no shut 开启此接口

  1y13w: %LINK-3-UPDOWN: Interface Vlan1, changed state to up

  1y13w: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

  sw2960(config-if)#ip add 192.168.1.2 255.255.255.0 设置此接口地址

  sw2960(config-if)#exit 退出到上一层

sw2960(config-if-range)#exit 退出到上一级目录

sw2960(config)#show run  查看配置信息

  sw2960(config)#end 退到根目录

sw2960#write 保存配置

4d00h: %SYS-5-CONFIG_I: Configured from console by console

  Building configuration...

  [OK] (保存生效)

 

本文出自 “INFO” 博客,请务必保留此出处http://infozp.blog.51cto.com/10670353/1768327

交换机的基本配置

标签:交换机配置   password   secret   enable   enter   

原文地址:http://infozp.blog.51cto.com/10670353/1768327

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!