当前位置:文档之家› 思科命令大全

思科命令大全

思科命令大全
思科命令大全

1.设置主机名/系统名

IOS:switch(config)# hostname "hostname"

CLI:switch(enable) set system name name-string

2.设置登录口令

IOS:switch(config)# enable password level 1 password CLI:switch(enable) set password

switch(enable) set enalbepass

3.设置远程访问

IOS:switch(config)# interface vlan 1

switch(config-if)#ip address ip-address netmask

switch(config-if)#ip default-gateway ip-address

CLI:switch(enable) set interface sc0 ip-address netmask broadcast-address

switch(enable) set interface sc0 vlan

switch(enable) set ip route default gateway

4.启用和浏览CDP信息

IOS:switch(config-if)#cdp enable

switch(config-if)# no cdp enable

CLI:switch(enable) set cdp {enable|disable} module/port

5.查看Cisco邻接设备的CDP通告

IOS:switch# showcdp interface [type modle/port]

switch# showcdp neighbors [type module/port] [detail]

CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]

6.端口描述IOS:switch(config-if)#description escription-string CLI:switch(enable)set port name module/number description-string 7.设置端口速度

IOS:switch(config-if)# speed{10|100|auto}

CLI:switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto}

8.设置以太网的链路模式

IOS:switch(config-if)# duplex {auto|full|half}

CLI:switch(enable) set port duplex module/number {full|half}

9.配置静态VLAN

IOS:switch# vlan database

switch(vlan)# vlanvlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)#interface interface module/number switch(config-if)#switchport mode access

switch(config-if)#switchport access vlanvlan-num switch(config-if)# end

CLI:switch(enable) set vlanvlan-num [name name] switch(enable) set vlanvlan-num mod-num/port-list 10.配置VLAN中继线

IOS:switch(config)# interface interface mod/port

switch(config-if)#switchport mode trunk

switch(config-if)#switchport trunk encapsulation {isl|dotlq}

switch(config-if)#switchport trunk allowed vlan remove vlan-list

switch(config-if)#switchport trunk allowed vlan add vlan-list

CLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]

11.配置VTP管理域

IOS:switch# vlan database

switch(vlan)# vtp domain domain-name

CLI:switch(enable) set vtp [domain domain-name]

12.配置VTP 模式

IOS:switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp {sever|cilent|transparent}

switch(vlan)# vtp password password

CLI:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

13.配置VTP版本

IOS:switch# vlan database

switch(vlan)# vtp v2-mode

CLI:switch(enable) set vtp v2 enable

14.启动VTP剪裁

IOS:switch# vlan database

switch(vlan)# vtp pruning

CLI:switch(enable) set vtp pruning enable

15.配置以太信道

IOS:switch(config-if)# port group group-number [distribution {source|destination}] CLI:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 16.调整根路径成本

IOS:switch(config-if)#spanning-tree [vlanvlan-list] cost cost

CLI:switch(enable)set spantreeportcostmoudle/port cost

switch(enable)set spantreeportvlancostmoudle/port [cost cost][vlan-list]

17.调整端口ID

IOS:switch(config-if)#spanning-tree[vlanvlan-list]port-priority port-priority

CLI:switch(enable)set spantreeportpri {mldule/port}priority

switch(enable)set spantreeportvlanpri {module/port}priority [vlans] 18.修改STP时钟

IOS:switch(config)# spanning-tree [vlanvlan-list] hello-time seconds switch(config)#spanning-tree [vlanvlan-list] forward-time seconds switch(config)#spanning-tree [vlanvlan-list] max-age seconds

CLI:switch(enable) set spantree hello interval[vlan]

switch(enable) set spantreefwddelay delay [vlan]

switch(enable) set spantreemaxageagingtiame[vlan]

19.启用或禁用Port Fast 特征

IOS:switch(config-if)#spanning-tree portfast

CLI:switch(enable)set spantreeportfast {module/port}{enable|disable}

20.启用或禁用UplinkFast 特征

IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]

CLI:switch(enable)set spantreeuplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:

switch(config)# cluster enable cluster-name

21. 为了从一条中继链路上删除VLAN,可使用下列命令:

switch(enable) clear trunk module/port vlan-range

22. 用show vtp domain 显示管理域的VTP参数.

23. 用show vtp statistics显示管理域的VTP参数.

24. 在Catalyst交换机上定义TrBRF的命令如下:

switch(enable) set vlanvlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]

25. 在Catalyst交换机上定义TrCRF的命令如下:

switch (enable) set vlanvlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num

26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:

switch(enable) set vlanvlan-num mod-num/port-num

27. 命令show spantree显示一个交换机端口的STP状态.

28. 配置一个ELAN的LES和BUS,可以使用下列命令:

ATM (config)# interface atmnumber.subintmultioint

ATM(config-subif)# lane serber-bus ethernetelan-name

29. 配置LECS:

ATM(config)# lane database database-name

ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address

ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address

ATM(lane-config-databade)# name ...

30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm number

ATM(config-if)# lane config database database-name

ATM(config-if)# lane config auto-config-atm-address

31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:

ATM(config)# interface atmnumber.subint multipoint ATM(config)# lane client ethernetvlan-numelan-num

32. 用show lane server 显示LES的状态.

33. 用show lane bus显示bus的状态.

34. 用show lane database显示LECS数据库可内容.

35. 用show lane client显示LEC的状态.

36. 用show module显示已安装的模块列表.

37. 用物理接口建立与VLAN的连接:

router# configure terminal

router(config)# interface media module/port

router(config-if)# description description-string

router(config-if)#ip address ip-addr subnet-mask router(config-if)# no shutdown

38. 用中继链路来建立与VLAN的连接:

router(config)# interface module/port.subinterface router(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)#ip address ip-address subnet-mask 39. 用LANE 来建立与VLAN的连接:

router(config)# interface atm module/port

router(config-if)# no ip address

router(config-if)#atmpvc 1 0 5 qsaal

router(config-if)#atmpvc 2 0 16 ilni

router(config-if)# interface atm module/port.subinterface multipoint router(config-if)#ip address ip-address subnet-mask

router(config-if)# lane client ethernetelan-num

router(config-if)# interface atm module/port.subinterface multipoint router(config-if)#ip address ip-address subnet-name

router(config-if)# lane client ethernetelan-name

router(config-if)# ...

40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routing

router(config)# router ip-routing-protocol

router(config-router)# network ip-network-number

router(config-router)# network ip-network-number

41. 配置默认路由: switch(enable) set ip route default gateway

42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:

router(config)# interface interface number

router(config-if)#mlsrpvlan-id vlan-id-num

43. 在路由处理器启用MLSP: router(config)# mlsrpip

44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:

router(config)# interface interface number

router(config-if)#mlsrpvtp-domain domain-name

45. 查看指定的VTP域的信息: router# show mlsrpvtp-domain vtp domain name

46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:

router(config-if)#mlsrp management-interface

47. 要检验MLS-RP的配置情况:router# show mlsrp

48. 检验特定接口上的MLS配置:router# show mlsrp interface interface number

49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]

50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:

router(config)# mlsrpip input-acl

51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable

52. 若想改变老化时间的值,可在特权模式下输入以下命令:

switch(enable) set mlsagingtimeagingtime

53. 设置快速老化:switch(enable) set mlsagingtime fast fastagingtimepkt_threshold

54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include

55. 显示MLS高速缓存记录:switch(enable) show mls entry

56. 用命令show in arp显示ARP高速缓存区的内容。

57. 要把路由器配置为HSRP备份组的成员,可以在接口配置模式下使用下面的命令:router(config-if)# standby group-number ipip-address

58. 为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下:

router(config-if)#standy group-number preempt

59. 访问时间和保持时间参数是可配置的:

router(config-if)#standy group-number timers hellotimeholdtime

60. 配置HSRP跟踪:router(config-if)#standy group-number track type-number interface-priority

61. 要显示HSRP路由器的状态:router# show standby type-number group brief

62. 用命令show ipigmp确定当选的查询器。

63. 启动IP组播路由选择:router(config)# ipmuticast-routing

64. 启动接口上的PIM:dalllasr1>(config-if)#ippim {dense-mode|sparse-mode|sparse-dense-mode}

65. 启动稀疏-稠密模式下的PIM:

router# ip multicast-routing

router# interface type number

router# ippim sparse-dense-mode

66. 核实PIM的配置:dallasr1># show ippiminterface[type number] [count]

67. 显示PIM邻居:dallasr1># show ip neighbor type number

68. 为了配置RP的地址,命令如下:

dallasr1># ippimrp-address ip-address [group-access-list-number][override]

69. 选择一个默认的RP:dallasr1># ippimrp-address

通告RP和它所服务的组范围:

dallasr1># ippim send-rp-announce type number scope ttl group-list access-list-number 为管理范围组通告RP的地址:

dallasr1># ippim send-rp-announce ethernet0 scope 16 group-list1

dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255

设定一个RP映像代理:dallasr1># ippim send-rp-discovery scope ttl

核实组到RP的映像:

dallasr1># show ippimrp mapping

dallasr1># show ippimrp [group-name|group-address] [mapping]

70. 在路由器接口上用命令ip multicast ttl-threshold ttl-value设定TTL阀值:

dallasr1>(config-if)#ip multicast ttl-threshold ttl-value

71. 用show ippim neighbor显示PIM邻居表。

72. 显示组播通信路由表中的各条记录:

dallasr1>show ipmroute [group-name|group-address][scoure][summary][count][active kbps]

73. 要记录一个路由器接受和发送的全部IP组播包:

dallasr1> #debug ipmpacket [detail] [access-list][group]

74. 要在CISCO路由器上配置CGMP:dallasr1>(config-if)#ipcgmp

思科交换机命令大全

思科交换机命令大全集团文件发布号:(9816-UATWW-MWUB-WUNN-INNUL-DQQTY-

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询: 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr

查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal 主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号) root primary 例如: Switch(config)#spanning-tree vlan 1 root primary

Cisco设备的基本配置命令

switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

cisco交换机配置口令大全

cisco交换机配置口令大全 1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half}

Cisco IOS 基本命令

Cisco IOS 基本命令一、基本路由器的检验命令 show version show processes show protocols show mem show ip route show startup-config show running-config show flash show interfaces 二、基本路由配置命令 进入:config terminal/memory/network 配置网络时常采用的命令:copy和load 1.标识:hostname 标识名 2.启动标识:banner 启动标识 3.接口:interface 端口号 4.密码:line 0 6 login passwd 口令 enable password/secret 口令 5.接口:

1)配置端口 interface 端口号 clock rate 时钟速率(64000)/* 在串口中配置*/ bandwidth 带宽(缺省56)/* 在串口中配置*/ media-type 介质类型/* 在以太网口上*/ early-token release /* 在令牌环网口上*/ ring-speed 16 /* 在令牌环网口上*/ no shutdown write memory 2)检验端口 show interfaces show controllers 6.配置环境 1)引导方式 boot system flash IOS-filename boot system tftp IOS-filename tftp-address boot system rom 2)配置Register值 config-register 0x2102 7.查看邻居路由 show cdp interface show cdp neighbors [detail]

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

1-cisco路由器基本配置及远程登录

实训目的: (1)学习和掌握科路由器的配置方式和要求。 (2)学习和掌握科路由器的工作模式分类、提示符、进入方式。1、路由器的配置方式 ①超级终端方式。该方式主要用于路由器的初始配置,路由器不需要IP地址。基本方法是:计算机通过COM1/COM2口和路由器的Console口连接,在计算机上启用“超级终端”程序,设置“波特率:9600 ,数据位:8,停止位:1,奇偶校验: 无,校验:无”即可。常用 ②Telnet方式。该方式配置要求路由器必须配置了IP地址。基本方法是:计算机通过网卡和路由器的以太网接口相连,计算机的网卡和路由器的以太网接口的IP地址必须在同一网段。常用 ③其他方式:AUX口接MODEM,通过电话线与远方运行终端仿真软件的微机;通过Ethernet上的TFTP服务器;通过Ethernet上的SNMP网管工作站。 2、路由器的工作模式 在命令行状态下,主要有以下几种工作模式: ①一般用户模式。主要用于查看路由器的基本信息,只能执行少数命令,不能对路由 器进行配置。提示符为:Router>;进入方式为:Telnet或Console ②使能(特权)模式。主要用于查看、测试、检查路由器或网络,不能对接口、路由 协议进行配置。提示符为:Router#;进入方式为:Router>enable。 ③全局配置模式。主要用于配置路由器的全局性参数。提示符为:Router(config)#; 进入方式为:Router#config ter。 ④全局模式下的子模式。包括:接口、路由协议、线路等。其进入方式和提示符如下: Router(config)#ineterface e0 //进入接口模式 Router(config-if)#//接口模式提示符 Router(config)#rip //进入路由协议模式 Router(config-router)# //路由协议模式 Router(config)#line con 0 //进入线路模式

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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 ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:

switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(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地址: 交换机显示命令:

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2

思科交换机配置维护手册

思科交换机配置维护手册

目录

一、端口配置 1.1 配置一组端口 当使用interface range命令时有如下的规则: ?有效的组范围: o vlan从1 到4094 o fastethernet槽位/{first port} - {last port}, 槽位为0 o gigabitethernet槽位/{first port} - {last port},槽位为0 o port-channel port-channel-number - port-channel-number, port-channel号从1到64 ?端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的. ?interface range命令只能配置已经存在的interface vlan ?所有在同一组的端口必须是相同类别的。

见以下例子: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 5 Switch(config-if-range)# no shutdown 以下的例子显示使用句号来配置不同类型端口的组: Switch# configure terminal Switch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2 Switch(config-if-range)# no shutdown 1.2 配置二层端口 1.2.1 配置端口速率及双工模式

思科路由器命令大全详解

一 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)# 8:查看命令show switch> enable

思科路由器基本配置与常用配置命令

思科路由器基本配置与常用配置命令(simple for CCNA) 启动接口,分配IP地址: router> router> enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# ^z 配置RIP路由协议:30秒更新一次 router(config)# router rip router(config-if)# network Network-Number router(config-if)# ^z 配置IGRP路由协议:90秒更新一次 router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z配置Novell IPX路由协议:Novell RIP 60秒更新一次 router(config)# ipx routing [node address] router(config)# ipx maximum-paths Paths router(config)# interface Type Port router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] router(config-if)# ^z配置DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if)# ^z配置ISDN: router(config)# isdn swith-type Swith-Type router(config-if)# ^z 配置Frame Relay: router(config-if)# encapsulation frame-relay [cisco | ietf ] router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ] router(config-if)# ^z配置标准ACL: router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number [ in | out ] router(config-if)# ^z配置扩展ACL: router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]

思科交换机配置常用命令(精编文档).doc

【最新整理,下载后即可编辑】 Cisco三层交换机配置命令及解释 (2011-07-11 08:54:50) 分类:IT资讯 标签: cisco 杂谈 基本配置 S> enable 进入特权模式 S# configure terminal 进入全局配置模式 S(config)# hostname name 改变交换机名称 S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15) S(config)# line console 0 进入控制台接口 S(config-line)# password console_password 接上一条命令,设置控制台口令 S(config)# line vty 0 15 进入虚拟终端 S(config-line)# password telnet_password 接上一条命令,设置Telnet口令 S(config-line)# login 允许Telnet登录 S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密) S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式 S(config-if)# [no] shutdown 关闭或启用该接口(默认启用) S(config)# ip address IP_address sunbet_mask 指定IP地址 S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关 S# show running-config 查看当前的配置 S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM中

CISCO 常用命令解释

视图模式介绍: 普通视图 router> 特权视图 router# /在普通模式下输入enable 全局视图 router(config)# /在特权模式下输入config t 接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口 在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由 (2)动态路由 rip协议 router(config)#router rip /启动rip协议 router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段 router(config-router)#version 2 转换为rip 2版本 router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口

思科2960交换机配置命令

思科2960交换机配置命令 交换机的端口工作模式一般可以分为三种:Access(普通模式),Multi(多vlan模式),Trunk(中继模式)。1、允许多个vlan的是multi模式,而不是trunk 模式。2、两个都设为trunk模式:一:如果在同一交换机上,则决不会在同一vlan;二:如果是两个交换机上,且两端口物理连接的话,共享vlan信息。但是这两个端口已经被使用,所以只能说,使用与这两个端口相同vlan的端口的计算机是同一虚拟局域网。3、access和multi模式下,端口用于计算机;trunk 模式下,端口用于交换机间连接。所以access和trunk没有可比性。 交换机基本状态: switch ;ROM状态,路由器是rommon hostname ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switchenable ;进入特权模式 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 ;返回命令

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

CISCO基本命令

端口速度:设置端口速度为:100Mbps/s 半双工模式 Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 - 2 Switch(config-if-range)# speed 100 Switch(config-if)# duplex half 定义端口聚合并存储到NVRAM:定义名称为enet_list的端口组。 Switch# configure terminal Switch(config)# define interface-range enet_list gigabitethernet0/1 - 2 Switch(config)# end Switch# show running-config | include define Switch# define interface-range enet_list gigabitethernet0/1 – 2 Switch# configure terminal Switch(config)# no define interface-range enet_list Switch(config)# end Switch# show run | include define Switch# 设置端口类型: Switch(config-if)media-type auto-select | rj45 | sfp Switch#show interfaces interface-id transceiver properties

思科交换机配置命令大全

思科交换机配置命令大全 switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#configure terminal

Cisco常用命令

路由器实验: router> enable 从用户模式进入特权模式 router# disable or exit 从特权模式退出到用户模式 router# show sessions 查看本机上的TELNET会话router# disconnect 关闭所有的TELNET会话 router# show users 查看本机上的用户 router# erase startupconfig 删除NVRAM中的配置 router# reload 重启路由器 router# config terminal 从用户模式进入特权模式 router(config)# hostname rl 配置用户名为rl router(config)# #banner welcome# 配置开机话语

router# show controllers serial0 查看串口0的物理层信息(主要是查看DTE/DCE)router# show ip interface 查看端口的IP配置信息 router# show hosts 查看主机表 end or ctrl+z 从各种配置模式退到特权模式 rl(config)# no ipdomainlookup 关闭动态域名解析 rl(config)# ipdomainlookup 打开动态域名解析 rl(config)# ipnameserver 202.106.0.20 打开动态域名解析之后便可以指定DNS服务rl(config)# interface serial 0 进入serial 0的接口配置模式 rl(configif)# no shutdown 路由器出厂默认所有端口关闭,使用此命令使它们打开rl(configif)# encapsulation ppp 封装ppp rl(configif)# clockrate 64000 如果是DCE使需要设置时钟速率,如果是DTE使不必设置

相关主题
文本预览
相关文档 最新文档