1.交换机支持的命令
交换机基本状态:

hostname> ;用户模式
hostname# ;特权模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;接口状态
交换机口令设置:

switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname ;设置交换机的主机名
switch(config)#enable secret xxx ;设置特权加密口令
switch(config)#enable password xxa ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;允许登录
switch(config-line)#password xx ;设置登录口令xx
switch#exit ;返回命令
交换机VLAN设置:

switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式
交换机设置IP地址:

switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:

switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
2.路由器支持的命令
路由器显示命令:

router#show run ;显示配置信息
router#show interface ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload ;重新起动
路由器口令设置:

router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置:

router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作:

router#copy running-config startup-config ;保存配置
router#copy running-config tftp ;保存配置到tftp
router#copy startup-config tftp ;开机配置存到tftp
router#copy tftp flash: ;下传文件到flash
router#copy tftp startup-config ;下载配置文件
ROM状态:

Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset ;重新引导
rommon>copy xmodem: flash: ;从console传输文件

rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommon>TFTP_FILE=c2600.bin ;指定下载的文件
rommon>tftpdnld ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS

静态路由:

ip route ;命令格式
router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例
router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例
动态路由:

router(config)#ip routing ;启动路由转发
router(config)#router rip ;启动RIP路由协议。
router(config-router)#network ;设置发布路由
router(config-router)#negihbor ;点对点帧中继用。
帧中继命令:

router(config)#frame-relay switching ;使能帧中继交换
router(config-s0)#encapsulation frame-relay ;使能帧中继
router(config-s0)#fram-relay lmi-type cisco ;设置管理类型
router(config-s0)#frame-relay intf-type DCE ;设置为DCE
router(config-s0)#frame-relay dlci 16 ;
router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号
router(config-s0)#frame-relay interface-dlci 16 ;
router(config)#log-adjacency-changes ;记录邻接变化
router(config)#int s0/0.1 point-to-point ;设置子接口点对点
router#show frame pvc ;显示永久虚电路
router#show frame map ;显示映射
基本访问控制列表:

router(config)#access-list permit|deny
router(config)#interface ;default:deny any
router(config-if)#ip access-group in|out ;defaultut
例1:

router(config)#access-list 4 permit 10.8.1.1 router(config)#access-list 4 deny 10.8.1.0 0.0.0.255 router(config)#access-list 4 permit 10.8.0.0 0.0.255.255 router(config)#access-list 4 deny 10.0.0.0 0.255.255.255 router(config)#access-list 4 permit any router(config)#int f0/0 router(config-if)#ip access-group 4 in

扩展访问控制列表:

access-list permit|deny icmp [type]
access-list permit|deny tcp [port]

例2:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo router(config)#access-list 101 permit ip any any router(config)#int s0/0 router(config-if)#ip access-group 101 in

例3:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80 router(config)#access-list 102 permit ip any any router(config)#interface s0/1 router(config-if)#ip access-group 102 out

删除访问控制例表:

router(config)#no access-list 102
router(config-if)#no ip access-group 101 in
路由器的nat配置:

Router(config-if)#ip nat inside ;当前接口指定为内部接口
Router(config-if)#ip nat outside ;当前接口指定为外部接口
Router(config)#ip nat inside source static [p] [port]
Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translation
rotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。
overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。
外部网关协议配置:

routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP验证:

RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap|pap}

cisco 思科三层交换机配置命令相关推荐

  1. Cisco思科三层交换机配置DHCP服务

    为什么使用三层交换机配置DHCP服务器而不用专门的服务器做DHCP服务器呢? 在小型网络中直接将DHCP服务直接配置在核心三层交换机上便于网络管理员管理.在大型网络拓扑中还是建议使用单独的DHCP服务 ...

  2. 送你了,思科设备基础配置命令大全(一),赶紧收藏......

    [欢迎关注微信公众号:厦门微思网络] xmws-IT 思科设备基础配置命令大全(一) 思科设备管理基础命令 enable   从用户模式进入特权模式 configure terminal   进入配置 ...

  3. cisco交换机常用配置命令

    cisco交换机常用配置命令 思科交换机的基本配置 一.基本配置 switch>enable //进入特权模式 switch#config terminal //进入全局配置模式 switch( ...

  4. 思科三层交换机配置步骤

    思科三层交换机配置图如下: 配置的过程如下: 首先,设置各个PC的ip地址,子网掩码,网关 设置完成之后,进行二层交换机的设置: 在三层交换机的配置实验中 二层交换机设置的主要是vlan的设置,vla ...

  5. 思科三层交换机配置步骤实例

    思科三层交换机配置步骤实例## 这篇文章适合新手看哟,文章有点长,细节有点细,嘻嘻,慢慢来,加油! 利用思科Packet Tracer 6.2组建如上图所示网络,并实现以下功能: 1.正确配置各设备端 ...

  6. Cisco PIX防火墙配置命令大全

    Cisco PIX防火墙配置命令大全 来源: 作者:XUEYAN 出处:巧巧读书 2007-04-26 进入讨论组 关 键 词:子网掩码   协议   路由器   服务器   访问控制    一.PI ...

  7. Cisco 3750 三层交换机配置

    Cisco 3750 三层交换机配置  分类: 系统运维 1.命名: (config)#hostname Cisco3750 2.密码: 控制台密码: (config)#line console 0 ...

  8. cisco设备基本配置命令

    cisco设备基本配置命令 基本配置 1.系统配置对话框:空配时才会出现. Continue with configuration dialog? [yes/no]: YES:进入到一个设置向导 √ ...

  9. 思科三层交换机配置DHCP中继

    三层交换机配置DHCP中继 实验目的: 通过本实验掌握如何给不同网段配置DHCP,掌握DHCP中继配置. 实验拓扑: 对交换机SW1进行预配置. Switch>en Switch#conf t ...

  10. 在思科三层交换机配置网关的两种方式

    随着交换技术的发展,三层交换机在网络汇聚层与核心层的应用越来越多.在内网中子网与子网之间的通讯越来越少依赖于路由(几乎见不到了),而是使用带有路由功能的三层交换机,这对于内网中子网之间的通信效率的提高 ...

最新文章

  1. Python学习之路-12 (递归)
  2. 通过重建Hosting系统理解HTTP请求在ASP.NET Core管道中的处理流程[上]:采用管道处理请求...
  3. 深入理解三次握手四次挥手以及使用scapy实现ddos雏形
  4. 编程之美-子数组的最大乘机方法整理
  5. 10年老电脑如何提速_告别求人!3个方法教你怎样让你的电脑快的嗖嗖的!
  6. B+树 -- MySQL数据库索引
  7. NLP预训练家族 | 自成一派的GPT!
  8. 4月1号鸿蒙系统上线,4月1日太关键,鸿蒙迎来正式发布前的最后大考,华为将从此起飞...
  9. python如何实时查询oracle_python针对Oracle常见查询操作实例分析
  10. 为什么Python没有属性赋值的“with”语句?
  11. css伪类选择器,:link、:visited、:focus、:hover、:active、:first-child
  12. irlr7843引脚图_IRLR7843PBF中文资料
  13. 计算机函数两个表格找相同,wps筛选出两个表格中的重复项(countif 函数简单使用)【已解决】...
  14. git lfs linux,Git LFS 操作指南
  15. DP转HDMI方案|DP转HDMI自带SPI|AG6311设计电路|AG6311MDQ设计参考原理图
  16. 笔试题-武汉珞珈德毅笔试题
  17. Springboot——mybatis配置
  18. 《Gans in Action》第一章 对抗神经网络介绍
  19. 豆瓣评分9.0+,这几部纪录片看一部少一部!
  20. Oracle-安装客户端和服务端

热门文章

  1. Skype国际版下载地址(非Tom版)
  2. VS2015+WDK10+Win10 Win7以上系统驱动发开环境搭建
  3. PLSQL注册码,亲测,可用
  4. Java精品项目第33期前台展示+后台管理结合的在线购书系统
  5. 第31讲 聊天室程序
  6. 易语言在线播放器源码php,易语言视频播放器源代码
  7. PostgreSQL extra_float_digits——控制浮点数精度
  8. 1992-2021合集 全国大学生数学建模竞赛(历年赛题题目+定位分析)
  9. mysql 客户端可以访问_Mysql客户端工具可以连接,但是代码访问就会报错
  10. 9年测试老鸟:Glenford J编写《软件测试的艺术》PDF,高清中文版