Linuxword Global
当前位置: 通信协议 > Cisco交换机IOS配置介绍

一、模式
• 用户模式(>):
• 特权模式(#):
• 全局配置模式(config#):
• 接口配置模式(config-if#):
• 线路模式(#config-line):
二、基本IOS命令结构
•每个IOS 命令都具有特定的格式或语法,并在相应的提示符下执行。
•常规命令语法为命令后接相应的关键字和参数。
•某些命令包含一个关键字和参数子集,此子集可提供额外功能。

1273933-20171226111416884-677266136

三、相关配置
1、 进入用户模式,命令提示符是>号(正常登陆设备CLI(command-line interface,命令行界面)后的第一个配置模式,主要用于查看统计信息,可用的命令比较少,查看部分简单配置,不可修改,配置)
Switch>
Switch>?
Exec commands:
connect Open a terminal connection
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
exit Exit from the EXEC
logout Exit from the EXEC
ping Send echo messages
resume Resume an active network connection
show Show running system information
telnet Open a telnet connection
terminal Set terminal line parameters
traceroute Trace route to destination

2、 输入enable进入特权模式,命令提示符是#号(从用户模式进入,可用命令比较多,查看所有配置,部分修改(保存,恢复出厂等))
Switch>enable
Switch#
Switch#?
Exec commands:
clear Reset functions
clock Manage the system clock
configure Enter configuration mode
connect Open a terminal connection
copy Copy from one file to another
debug Debugging functions (see also 'undebug')
delete Delete a file
dir List files on a filesystem
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
erase Erase a filesystem
exit Exit from the EXEC
logout Exit from the EXEC
more Display the contents of a file
no Disable debugging informations
ping Send echo messages
reload Halt and perform a cold restart
resume Resume an active network connection
setup Run the SETUP command facility
show Show running system information
--More--

3、 输入disable从特权模式退到用户模式
Switch#disable
Switch>

4、 输入configure terminal进入全局配置模式(需要从特权模式进入,在全局模式下执行命令将影响整个设备,大配置操作都在这个模式下或从这个模式进入其他模式)
Switch#configure terminal
Switch(config)#

5、输入exit从全局配置模式退到特权模式
Switch(config)#exit
Switch#

6、在全局配置模式下可以设置特权密码(进入特权模式的密码,用于限制人员访问特权执行模式),输入enable password
Switch(config)#enable password 1234 #密码为1234

Switch>enable
Password: #再从用户模式进入特权模式提示输入密码

7、进入某个接口配置模式
Switch(config)#interface vlan 100
Switch(config-if)#

Switch(config)#interface gigabitEthernet 0/1
Switch(config-if)#

1273933-20171226151611229-736157842

8、现在开始配置vlan 100 的管理ip 和子网掩码
Switch(config-if)#ip address 192.168.100.100 255.255.255.0

9、配置一条线路(实际线路或虚拟线路,每个连接这个设备的用户都要占用一个线路例Console、AUX 或VTY等连接方式,这里VTY(Virtual Type Terminal) 是虚拟终端的意思)

Switch(config)#line vty 0 4
line vty 0 4表示设置0到4号5个线路为远程登录,设置为0 3,0 2,0 1完全是可以的,0 4表示最多可以同时5个线路连接,默认0线路被Console占用)
Switch(config-line)#

10、在全局配置模式下可以设置Console密码(用于限制人员通过控制台(Console)连接访问设备)
Switch(config)#line console 0 #配置console线路
Switch(config-line)#password 1234 #密码为1234
Switch(config-line)#login #登录启用密码检查

11、在全局配置模式下可以设置VTY线路登录密码(用于限制人员通过VTY接访问设备)

Switch(config)#line vty 0 10 #通过VTY线路同时连接的最大用户是10
Switch(config-line)#password 12345 #VTY线路登录密码12345
Switch(config-line)#login #登录启用密码检查

「梦想一旦被付诸行动,就会变得神圣,如果觉得我的文章对您有用,请帮助本站成长」

赞(0) 打赏
一分也是爱

支付宝扫一扫打赏

微信扫一扫打赏

上一篇:

下一篇:

相关推荐

博客简介

本站CDN采用VmShell免费提供离中国大陆最近的香港CMI高速网络做支撑,ToToTel打造全球最快速的边沿网络支撑服务,具体详情请见 :https://vmshell.com/ 以及 https://tototel.com/,网站所有的文件和内容禁止大陆网站搬迁复制,谢谢,VPS营销投稿邮箱: admin@linuxxword.com,我们免费帮大家发布,不收取任何费用,请提供完整测试文稿!

精彩评论

友情链接

他们同样是一群网虫,却不是每天泡在网上游走在淘宝和网游之间、刷着本来就快要透支的信用卡。他们或许没有踏出国门一步,但同学却不局限在一国一校,而是遍及全球!申请交换友链

站点统计

  • 文章总数: 2334 篇
  • 草稿数目: 12 篇
  • 分类数目: 6 个
  • 独立页面: 0 个
  • 评论总数: 2 条
  • 链接总数: 0 个
  • 标签总数: 5988 个
  • 注册用户: 139 人
  • 访问总量: 8,655,816 次
  • 最近更新: 2024年4月27日