栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

switch常用的交换机配置命令

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

switch常用的交换机配置命令

1.clock set:设置交换机的时间,日期。

Switch>en

Switch#clock set 12: 12: 12 10 oct 2017 //设置交换机的时间为2017年10月10日12点12分12秒

Switch#show clock //查看时间

*12: 12: 17.505 UTC ?? 10? 10 2017

2.hostname:用于修改交换机的主机名。

Switch#config terminal

Switch(config)#hostname mjl //将交换机命名为mjl

3.enable password:设置从一般用户配置模式进入特权配置模式时,需要输入的密码,明文。

Switch(config)#enable password 123456 //设置从一般用户配置模式进入特权配置模式时需要输入的密码为123456

Switch(config)# ^Z

Switch#exit                                //退出到一般模式

Switch>en                                  //从一般用户配置模式进入特权配置模式时需要输入密码

Password:                                  //输入密码123456进入特权配置模式

4.enable  secret:设置从一般用户配置模式进入特权配置模式时,需要输入的密码,密文。

Switch#config  terminal

Switch(config)#enable secret 654321   //设置从一般用户配置模式进入特权配置模式时需要输入的密码为654321

Switch(config)#^Z        //Ctrl+Z快捷键

Switch#exit                  //退出到一般模式

Switch>en

Password:                    //输入654321才能从一般用户配置模式进入特权配置模式

5.shutdown:关闭交换机的端口

Switch#config terminal

Switch(config)#interface  fastEthernet 0/1

Switch(config-if)#shutdown       //关闭交换机0/1端口

%link-5-CHANGED:Interface   FastEthernet0/1,changed  state  to  adminiseratively  down

%LINEPROTO-5-UPDOWN:Line  protocol  on  Interfaace  FastEthernet0/1,  changed  state  to  down

Switch(config-if)#no  shutdown    //否定关闭命令,打开0/1端口

%link-5-CHANGED:Interface   FastEthernet0/1,changed  state  to up

%LINEPROTO-5-UPDOWN:Line  protocol  on  Interfaace  FastEthernet0/1,  changed  state  to  up

6.reload:重启交换机。 启动配置文件 startup-config,当前运行配置文件running-config,保存当前运行配置文件为启动配置文件,以保证所做配置在交换机重启或掉电以后不好丢失。

Switch(config)#^Z         //退出到特权配置模式

Switch#reload              //重启交换机

Proceed  with  reload?[config]             //输入Y确认重启交换机

7.writ:保存当前运行配置文件为启动配置文件。

Switch>en

Switch#config  terminal

Switch(config)#enable password 123456

Switch(config)#exit

Switch#write    //保存当前运行配置文件为启动配置文件

Building configuration ...

[OK]

8.earse startup-config:删除启动配置文件

Switch>en

Password:

Switch#earse startup-config          //删除启动配置文件

Erase the nvram filesystem will remove all configuration files! Continue? [/confirm/i]

[OK]

Erase of nvram:complete

%SYS-7-NV_BLOCK_INIT:Initialized the geometry of nvram

Switch#

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/716351.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号