设为首页 收藏本站
查看: 1396|回复: 0

[经验分享] cisco设备的基础命令

[复制链接]

尚未签到

发表于 2018-7-11 12:37:32 | 显示全部楼层 |阅读模式
DSC0000.jpg

  switch>  #用户模式,此模式操作权限最低,只可以调试部分简单的命令
  switch>enable #通过命令 enable 切换到特权模式
  switch# #特权模式,此模式操作权限自动提升,支持比用户模式更多的命令
  switch#configure terminal #通过 configure terminal 命令切换至全局模式
  switch(config)# #全局模式,支持更多的操作操作
  switch(config)#route rip #通过 route 命名可进入路由协议模式
  sw2(config)#router  #路由器的协议模式
  bgp Border Gateway Protocol (BGP)
  eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis ISO IS-IS
  iso-igrp IGRP for OSI networks
  mobile Mobile routes
  odr On Demand stub Routes
  ospf Open Shortest Path First (OSPF)
  rip Routing Information Protocol (RIP)
  switch(config)#exit #可通过 exit 命令,退出协议模式,返回全局模式
  switch(config)#
  switch(config)#hostname sw-1 #修改路由器的名称
  sw-1(config)#
  sw-1(config)#interface ethernet 1/0 #进入接口模式
  sw-1(config-if)#ip address 1.1.1.1 255.255.255.0 #接口模式,配置接口 e1/0 IP 地址为1.1.1.1
  sw-1(config-if)#no shutdown #激活接口
  sw2(config)#interface ethernet 1/0 #进入接口模式
  sw2(config-if)#ip address 1.1.1.2 255.255.255.0 #接口模式,配置接口 e1/0 IP 地址为1.1.1.2
  sw2(config-if)#no shut
  sw2(config-if)#exit
  *Mar 1 00:03:25.259: %LINK-3-UPDOWN: Interface Ethernet1/0, changed state to up
  *Mar 1 00:03:26.259: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
  sw2(config)#do ping 1.1.1.1
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
  .!!!!
  Success rate is 80 percent (4/5), round-trip min/avg/max = 52/73/96 ms
  sw2(config)#
  以下命令在初始配置路由器和交换机时,建议配上:
  ***********************************************************************************
  switch(config)#no ip domain-lookup #取消路由器的域名解析
  switch(config)#line console 0 #进入console接口
  switch(config-line)#exec-timeout 0 0 #取消console配置界面超时
  switch(config-line)#logging synchronous #取消同步日志
  switch(config)#line vty 0 4 #进入 vty 接口
  switch(config-line)#exec-timeout 0 0 #取消 vty 配置界面超时
  switch(config)#hostname sw-1 #修改路由器的名称
  switch#copy running-config startup-config #保存当前的配置
  switch#copy startup-config running-config #将NVRAM中的文件调用至RAM中
  switch(config)#service password-encryption #加密所有密码
  ***********************************************************************************
  基本的查看命令:
  ***********************************************************************************
  show 是静态的查看路由器和交换机的配置
  switch#show ip interface brief #查看当前路由器所有接口的简单信息
  switch#show interfaces fastEthernet 0/0 #查看 f0/0 接口的信息
  switch#show ip route #查看路由表
  switch#show arp #查看ARP表项
  switch#show running-config #查看当前配置文件 (保存在RAM中)
  switch#show startup-config #查看保存在NVRAM中的文件
  sw1#show ip interface brief  #查看接口物理层、数据链路层、网络层信息
  Interface IP-Address OK? Method Status Protocol
  Serial0/0 unassigned YES unset administratively down down
  Serial0/1 unassigned YES unset administratively down down
  Serial0/2 unassigned YES unset administratively down down
  Serial0/3 unassigned YES unset administratively down down
  Ethernet1/0 1.1.1.1 YES manual up up
  Ethernet1/1 unassigned YES unset administratively down down
  Ethernet1/2 unassigned YES unset administratively down down
  Ethernet1/3 unassigned YES unset administratively down down
  原文出处: http://www.itom.net.cn/305/.html

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-536158-1-1.html 上篇帖子: Cisco认证考试心得集粹 下篇帖子: cisco 2950 交换机 配置实例
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表