温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

cisco交换机

发布时间:2020-07-01 10:31:38 来源:网络 阅读:456 作者:小小三郎1 栏目:网络安全

用户模式、特权模式、全局模式

Switch>   用户模式  enable

Switch#   特权模式   configure terminal

Switch(config)#    



Switch(config)#no ip domain-lookup  #关闭域名查找的功能


Switch(config-line)#logging   synchronous  #配置鼠标选项

Switch(config)#hostname  ccna  #配置主机名

ccna(config)#no  hostname  ccna  #取消主机名


line console   0  

exec-timeout  0  0   #console  口配置  exec-timeout  5  30  五分钟30s   0  0  不配置超时

回到上一层  exit

回到最初 用end



#安全 配置用户模式下用户密码登陆

全局模式:

line console  0

password  123456

login

推出保存 下次登陆有密码  这个密码是进入用户模式时候的密码


配置特权模式的密码:

全局模式下配置 enable secret  123456  #加密的密码



#配置telnet密码


Switch(config)#line vty  0 3  #最多可以有四个人登陆

Switch(config-line)#pas

Switch(config-line)#password  123456

Switch(config-line)#login

Switch(config-line)#



#############保存配置 开机启动过的配置

Switch#copy running-config  startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Switch#


Switch#w  #wr或者w都可以  尝试

Building configuration...

[OK]

Switch#



# 特权模式下  reload  代表重启系统  



Switch#erase   startup-config

Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]

[OK]

Erase of nvram: complete

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

Switch#



#配置交换机的管理端口

interface vlan 1

Switch(config-if)#ip address   192.168.1.1  255.255.255.0

Switch(config-if)#no shu

Switch(config-if)#no shutdown


Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan1, changed state to up


Switch(config-if)#



##配置交换机的默认网关

Switch(config)#ip default-gateway  192.168.1.254

Switch(config)#



  1. no ip domain-lookup  #关闭域名查找的功能

  2. line console  0

    Switch(config-line)#logging  synchronous

  3. Switch(config-line)#exec-timeout     0   0

外加安全设置 


#查看端口的状态

Switch#show  ip  interface   brief

Interface              IP-Address      OK? Method Status                Protocol


FastEthernet0/1        unassigned      YES manual down                  down


FastEthernet0/2        unassigned      YES manual down                  down


FastEthernet0/3        unassigned      YES manual down                  down


FastEthernet0/4        unassigned      YES manual down                  down


##############整理思路

1.配置主机名

hostname 

2.时钟同步

clock timezone GMT 8

3.配置路由器的motd

banner motd #Hello , This is a LAB of ccietea.com#

4.配置console 口

R1(config)# line console 0 !! 进入console口

R1(config-line)# no exec-time !! 配置console永不超时,也可用命令exec-time 0 0

R1(config-line)# logging synchronous !! 配置console的日志同步功能,使得命令行界面弹出的日志信息不回打断用户正在输入中的配置命令

R1(config-line)# exit

R1(config)# no ip domain lookup !! 关闭域名解析,以防在特权模式下敲错命令而陷入域名解析的过程

5.密码配置  第一console口密码 特权密码

全局模式:

line console  0

password  123456

login

推出保存 下次登陆有密码  这个密码是进入用户模式时候的密码


配置特权模式的密码:

全局模式下配置 enable secret  123456  #加密的密码


6.配置telnet密码

R1(config)# line vty 0 4 !! 进入VTY 0-4线路

R1(config-line)# password ccietea !! 设置VTY线路密码,即用户通过telnet登入路由器时输入的密码

R1(config-line)# login !! 使得Telnet登录到本设备需用密码验证

R1(config-line)# exit


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI