文档库 最新最全的文档下载
当前位置:文档库 › 思科交换机路由器常用命令

思科交换机路由器常用命令

思科交换机路由器常用命令
思科交换机路由器常用命令

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

序号/类别基于ios的交换机命令基于CLI的交换机命令

1.设置主机名/系统名 switch(config)# hostname "hostname" switch(enable) set system name name-string

2.设置登录口令 switch(config)# enable password level 1 password switch(enable) set password

switch(enable) set enalbepass

3.设置远程访问 switch(config)# inte***ce vlan 1

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

switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0

ip-address netmask broadcast-address

switch(enable) set inte***ce sc0 vlan

switch(enable) set ip route default gateway

4.启用和浏览CDP信息 switch(config-if)# cdp enable

switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module/port 5.查看Cisco邻接设备的CDP通告 switch# show cdp inte***ce [type modle/port]

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

6.端口描述 switch(config-if)#description escription-string switch(enable)set port name module/number description-string

7.设置端口速度 switch(config-if)# speed{10|100|auto} switch(enable) set port speed moudle/number {10|100|auto}

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

8.设置以太网的链路模式 switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half

9.配置静态VLAN switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)#inte***ce inte***ce module/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

10.配置VLAN中继线 switch(config)# inte***ce inte***ce 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 switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate]

Vlan-range [isl|dotlq|dotl0|lane|negotiate]

11.配置VTP管理域 switch# vlan database

switch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name] 12.配置VTP 模式 switch# vlan database

switch(vlan)# vtp domain domain-name

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

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

13.配置VTP版本 switch# vlan database

switch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable

14.启动VTP剪裁 switch# vlan database

switch(vlan)# vtp pruning switch(enable) set vtp pruning enable

15.配置以太信道 switch(config-if)# port group group-number [distribution

{source|destination}] switch(enable) set port channel moudle/port-range

mode{on|off|desirable|auto}

16.调整根路径成本 switch(config-if)#spanning-tree [vlan vlan-list] cost cost switch(enable)set spantree portcost moudle/port cost

switch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list]

17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priority

port-priority switch(enable)set spantree portpri {mldule/port}priority

switch(enable)set spantree portvlanpri {module/port}priority [vlans]

18.修改STP时钟 switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)#spanning-tree [vlan vlan-list] forward-time seconds

switch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

19.启用或禁用Port Fast 特征 switch(config-if)#spanning-tree portfast

switch(enable)set spantree portfast {module/port}{enable|disable}

20.启用或禁用UplinkFast 特征 switch(config)#spanning-tree uplinkfast

[max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast

{enable|disable}[rate update-rate] [all-protocols off|on]

20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]

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

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

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

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

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

28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# inte***ce atm number.subint multioint

ATM(config-subif)# lane serber-bus ethernet elan-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)# inte***ce atm number

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

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

31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)# inte***ce atm number.subint multipoint

ATM(config)# lane client ethernet vlan-num elan-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)# inte***ce 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)# inte***ce

module/port.subinte***ce

router(config-ig)# encapsulation[isl|dotlq] vlan-number

router(config-if)# ip address ip-address subnet-mask

39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/port router(config-if)# no ip address

router(config-if)# atm pvc 1 0 5 qsaal

router(config-if)# atm pvc 2 0 16 ilni

router(config-if)# inte***ce atm module/port.subinte***ce multipoint

router(config-if)# ip address ip-address subnet-mask

router(config-if)# lane client ethernet elan-num

router(config-if)# inte***ce atm module/port.subinte***ce multipoint

router(config-if)# ip address ip-address subnet-name

router(config-if)# lane client ethernet elan-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)#

inte***ce inte***ce number

router(config-if)# mls rp vlan-id vlan-id-num

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

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

inte***ce inte***ce number

router(config-if)# mls rp vtp-domain domain-name

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

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

router(config-if)#mls rp management-inte***ce

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

48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number

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

50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl

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

52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime

53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_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 ip ip-address

58. 为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下:router(config-if)# standy group-number preempt

59. 访问时间和保持时间参数是可配置的: router(config-if)# standy group-number timers hellotime holdtime

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

inte***ce-priority

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

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

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

64. 启动接口上的PIM: dalllasr1>(config-if)# ip pim

{dense-mode|sparse-mode|sparse-dense-mode}

65. 启动稀疏-稠密模式下的PIM:router# ip multicast-routing

router# inte***ce type number

router# ip pim sparse-dense-mode

66. 核实PIM的配置: dallasr1># show ip pim inte***ce[type number] [count]

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

68. 为了配置RP的地址,命令如下: dallasr1># ip pim rp-address ip-address

[group-access-list-number][override]

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

通告RP和它所服务的组范围:dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number

为管理范围组通告RP的地址:dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1

dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255

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

核实组到RP的映像: dallasr1># show ip pim rp mapping

dallasr1># show ip pim rp [group-name|group-address] [mapping]

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

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

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

72. 显示组播通信路由表中的各条记录: dallasr1>show ip mroute

[group-name|group-address][scoure][summary][count][active kbps]

73. 要记录一个路由器接受和发送的全部IP组播包:dallasr1> #debug ip mpacket [detail] [access-list][group]

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

75.配置一个组播路由器,使之加入某一个特定的组播组: dallasr1>(config-if)# ip igmp join-group group-address

76. 关闭 CGMP: dallasr1>(config-if)# no ip cgmp

77. 启动交换机上的CGMP: dallasr1>(enable) set cgmp enable

78. 核实Catalyst交换机上CGMP的配置情况: catalystla1>(enable) show config

set prompt catalystla1>

set inte***ce sc0 192.168.1.1 255.255.255.0

set cgmp enable

79. CGMP离开的设置: Dallas_SW(enable) set cgmp leave

80. 在Cisco设备上修改控制端口密码:R1(config)# line console 0

R1(config-line)# login

R1(config-line)# password Lisbon

R1(config)# enable password Lilbao

R1(config)# login local

R1(config)# username student password cisco

81. 在Cisco设备上设置控制台及vty端口的会话超时: R1(config)# line console 0

R1(config-line)# exec-timeout 5 10

R1(config)# line vty 0 4

R1(config-line)# exec-timeout 5 2

82. 在Cisco设备上设定特权级: R1(config)# privilege configure level 3 username R1(config)# privilege configure level 3 copy run start

R1(config)# privilege configure level 3 ping

R1(config)# privilege configure level 3 show run

R1(config)# enable secret level 3 cisco

83. 使用命令privilege 可定义在该特权级下使用的命令: router(config)# privilege mode level level command

84. 设定用户特权级: router(config)# enable secret level 3 dallas

router(config)# enable secret san-fran

router(config)# username student password cisco

85. 标志设置与显示:R1(config)# banner motd ‘unauthorized access will be prosecuted!

86. 设置vty访问: R1(config)# access-list 1 permit 192.168.2.5

R1(config)# line vty 0 4

R1(config)# access-class 1 in

87. 配置HTTP访问: Router3(config)# access-list 1 permit 192.168.10.7

Router3(config)# ip http sever

Router3(config)# ip http access-class 1

Router3(config)# ip http authentication local

Router3(config)# username student password cisco

88. 要启用HTTP访问,请键入以下命令: switch(config)# ip http sever

89. 在基于set命令的交换机上用setCL1启动和核实端口安全: switch(enable) set port security mod_num/port_num...enable mac address

switch(enable) show port mod_num/port_num

在基于CiscoIOS命令的交换机上启动和核实端口安全: switch(config-if)# port secure [mac-mac-count maximum-MAC-count]

switch# show mac-address-table security [type module/port]

90. 用命令access-list在标准通信量过滤表中创建一条记录:

Router(config)# access-list access-list-number {permit|deny} source-address [source-address]

91. 用命令access-list在扩展通信量过滤表中创建一条记录:

Router(config)#access-list access-list-number

{permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log]

92. 对于带内路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name in [type number]

93. 对于带外路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name out [inte***ce-name] routing-process| autonomous-system-number

94. set snmp命令选项: set snmp community

{read-only|ready-write|read-write-all}[community_string]

95. set snmp trap 命令格式如下:

set snmp trap {enable|disable} [all|moudle|classis|bridge|repeater|

auth|vtp|ippermit|vmps|config|entity|stpx]

set snmp trap rvcr_addr rcvr_community

96. 启用SNMP chassis 陷阱: Console>(enable) set snmp trap enable chassis

97. 启用所有SNMP chassis 陷阱: Console>(enable) set snmp trap enable

98. 禁用SNMP chassis 陷阱: Console>(enable) set snmp trap disable chassis

99. 给SNMP陷阱接收表加一条记录: Console>(enable) set snmp trap 192.122.173.42 public

100. show snmp 输出结果。

101. 命令set snmp rmon enable 的输出结果。

102. 显示SPAN信息:Consile> show span

思科路由器交换机的命令大全(1)

2007-05-11 18:29

思科交换机-常用命令及配置

思科交换机-常用命令及配置 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名hostname name 以cisco001 为例 switch> enable switch#c onfigure terminal switch(conf)#hostname cisco001 cisco001(conf)# 4:配置使能口令(未加密)enable password cisco 以cisco 为例switch> enable switch#configure terminal cisco001(conf)# enable password cisco 5:配置使能密码(加密)enable secret ciscolab 以cicsolab 为例switch> enable switch#configure terminal switch(conf)# enable secret ciscolab

6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)# interface vlan 1 switch(conf)# ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 switch (conf-if)#no shut 激活端口 switch (conf-if)#exit switch (conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17 端口为例 switch> enable switch#configure terminal switch(conf)# interface fastehernet 0/17 switch(conf-if)# 8:查看命令show switch> enable switch# show version 察看系统中的所有版本信息 show interface vlan 1 查看交换机有关ip 协议的配置信息 show running-configure 查看交换机当前起作用的配置信息 show interface fastethernet 0/1 察看交换机1 接口具体配置和统计信息 show mac-address-table 查看mac 地址表

华三华为交换机路由器配置常用命令汇总定稿版

华三华为交换机路由器 配置常用命令汇总 HUA system office room 【HUA16H-TTMS2A-HUAS8Q8-HUAH1688】

H3C交换机配置命令大全1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、 language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、 port link-type Access|Trunk|Hybrid 设置端口访问模式 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口

9、 quit 退出当前视图模式 10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全华为交换机常用配置实例 H3C交换机路由器telnet和console口登录配置 2009年11月09日星期一 10:00

级别说明 Level 名称 命令 参观 ping、tracert、telnet 1 监控 display、debugging 2 配置 所有配置命令(管理级的命令除外)

思科交换机命令大全

思科交换机常用命令大全 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

华为,CISCO交换机基本命令配置

华为交换机命令 2007-12-14 14:59 计算机命令 ~~~~~~~~~~ PCA login: root ;使用root用户 password: linux ;口令是linux # shutdown -h now ;关机 # init ;关机 # logout ;用户注销# login ;用户登录# ifconfig ;显示IP地址# ifconfig eth0 netmask ;设置IP地址 # ifconfig eht0 netmask down ;禁用IP地址 # route add 0.0.0.0 gw ;设置网关 # route del 0.0.0.0 gw ;删除网关 # route add default gw ;设置网关 # route del default gw ;删除网关 # route ;显示网关

# ping ;发ECHO包 # telnet ;远程登录 ---------------------------------------- 交换机命令 ~~~~~~~~~~ [Quidway]dis cur ;显示当前配置 [Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息 [Quidway]display vlan all ;显示路由信息 [Quidway]display version ;显示版本信息 [Quidway]super password ;修改特权用户密码 [Quidway]sysname ;交换机命名 [Quidway]interface ethernet 0/1 ;进入接口视图 [Quidway]interface vlan x ;进入接口视图 [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关 [Quidway]rip ;三层交换支持

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)#

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

思科交换机路由器命令 大全 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地址: 交换机显示命令:

路由器配置常用命令汇总

Access-enable允许路由器在动态访问列表中创建临时访问列表入口 Access-group把访问控制列表(ACL)应用到接口上 Access-list定义一个标准的IP ACL Access-template在连接的路由器上手动替换临时访问列表入口 Appn向APPN子系统发送命令 Atmsig执行ATM信令命令 B 手动引导操作系统 Bandwidth 设置接口的带宽 Banner motd 指定日期信息标语 Bfe 设置突发事件手册模式 Boot system 指定路由器启动时加载的系统映像 Calendar 设置硬件日历 Cd 更改路径 Cdp enable 允许接口运行CDP协议 Clear 复位功能 Clear counters 清除接口计数器 Clear interface 重新启动接口上的件逻辑 Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI连接管理功能 Config-register 修改配置寄存器设置 Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息 Configure memory 从NVRAM加载配置信息 Configure terminal 从终端进行手动配置 Connect 打开一个终端连接

Copy 复制配置或映像数据 Copy flash tftp 备份系统映像文件到TFTP服务器 Copy running-config startup-config 将RAM中的当前配置存储到NVRAM Copy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上 Copy tftp flash 从TFTP服务器上下载新映像到Flash Copy tftp running-config 从TFTP服务器上下载配置文件 Debug 使用调试功能 Debug dialer 显示接口在拨什么号及诸如此类的信息 Debug ip rip 显示RIP路由选择更新数据 Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息 Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息 Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程 Debug ppp 显示在实施PPP中发生的业务和交换信息 Delete 删除文件 Deny 为一个已命名的IP ACL设置条件 Dialer idle-timeout 规定线路断开前的空闲时间的长度 Dialer map 设置一个串行接口来呼叫一个或多个地点 Dialer wait-for-carrier-time 规定花多长时间等待一个载体 Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制 Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号 Dir 显示给定设备上的文件 Disable 关闭特许模式 Disconnect 断开已建立的连接

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 //进入线路模式

路由器常用命令

cisco路由器常用命令 1:三大模式 router> 用户模式 router > enable 进入特权模式 router # router > enable 进入全局配置模式 router #configure terminal router (conf)# 2:其它模式 Router(config)#interface f1/0 进入接口配置模式Router(config-if)# Router(config)#interface f1/0.1 进入子接口配置模式Router(config-subif)# Router(config)#line console 0 进入line模式Router(config-line)# Router(config)#router rip 进入路由模式Router(config-router)# 3:路由器命名 hostname routera,以routerA为例 router > enable router #configure terminal router(conf)#hostname routerA routera (conf)# 4:配置各类密码 配置特权模式密码(使能口令) enable password cisco,以cisco为例 router > enable router #configure terminal router(conf)#hostname routerA routerA (conf)# enable password cisco 设置VTY(虚拟终端接口)密码 Router(config)#line vty 0 1

思科交换机型号解释

思科交换机型号解释 1. CISCO开头的产品都是路由器; 2. RSP开头的都是CISCO7500系列产品的引擎; 3. VIP开头的产品都是CISCO 7500系列产品的多功能接口处理器模块 4. PA开头的产品都是CISCO 7500/7200系列产品的模块. 5. NPE开头的都是CISCO7200系列产品的引擎; 6. NM开头的都是CISCO低端路由器模块; 7. WIC开头的都是CISCO低端路由器的广域网接口模块; 8. VWIC开头的都是CISCO低端路由器的语音接口模块; 9. WS-C开头的产品都是交换机; 10. WS-X开头的产品是交换机的引擎或模块; 11. WS-G开头的产品是交换机的千兆光纤模块. 12.NN 是交换机的系列号, XX 对于固定配置的交换机来说是端口数,对于模块化交换机来说是插槽数,有 -C 标志表明带光纤接口, -M 表示模块化, - WS-C2960-24TT-L ,WS 表示什么? 解: W代表支持IPSEC 40位加密 S代表Switchboard 交换机 WS就是代表支持支持IPSEC 40位加密的Switchboard 交换机型号 WS-C是有两种一个是C一个是X,C代表固化交换机或者机箱,X代表的是模块。 A 和 -EN 分别是指交换机软件是标准板或企业版。 eg:WS-C3750G-48TS-S C3750表明这款产品属于3750这个系列,也就是产品的型号。 G----表明其所有接口都是支持千兆或以上,如果没有这个就表明其主要端口都是10/100M 的或者100M的 48----表明其拥有主要的端口数量为48个 T----表明其主要端口是电口(也就是所谓的Twirst Pair的端口 P----表明其主要端口是电口,同时支持PoE以太网供电 S----表明其带的扩展的接口为SFP类型的接口 最后部分的S表明交换机带的软件是SMI标准影像的 E----表明是EMI影像的 二、型号后面的字母解释,如:WS-C3750G-48TS-S 中的G的位置 ?空-表示其主要端口都是10/100M的或100M的 ?G----全千兆及以上,2950G除外,他的G表示GBIC上行

思科交换机命令大全 + Cisco IOS 基本命令

思科交换机命令大全 (一) 序号/类别基于ios的交换机命令基于CLI的交换机命令 1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) set system name name-string 2.设置登录口令switch(config)# enable password level 1 password switch(enable) set password switch(enable) set enalbepass 3.设置远程访问switch(config)# inte***ce vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-address switch(enable) set inte***ce sc0 vlan switch(enable) set ip route default gateway 4.启用和浏览CDP信息switch(config-if)# cdp enable switch(config-if)# no cdp enable switch(enable) set cdp {enable|disable} module/port 5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string 7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half 9.配置静态VLAN switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)#inte***ce inte***ce module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end switch(enable) set vlan vlan-num [name name] switch(enable) set vlan vlan-num mod-num/port-list 10.配置VLAN中继线switch(config)# inte***ce inte***ce 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 switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 11.配置VTP管理域switch# vlan database

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 ;查看端口信息

思科交换机配置命令大全分析解析

思科交换机配置命令大全 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> 特权视图 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 接口名 /启动本路由器的那个接口为被动接口

思科交换机基本配置(非常详细)

cisco交换机基本配置 1.Cisco IOS简介 Cisco Catalyst系列交换机所使用的操作系统是IOS(Internetwork Operating System,互联网际操作系统)或COS(Catalyst Operating System),其中以IOS使用最为广泛,该操作系统和路由器所使用的操作系统都基于相同的内核和shell。 IOS的优点在于命令体系比较易用。利用操作系统所提供的命令,可实现对交换机的配置和管理。Cisco IOS操作系统具有以下特点: (1)支持通过命令行(Command-Line Interface,简称CLI)或Web界面,来对交换机进行配置和管理。 (2)支持通过交换机的控制端口(Console)或Telnet会话来登录连接访问交换机。 (3)提供有用户模式(user level)和特权模式(privileged level)两种命令执行级别,并提供有全局配置、接口配置、子接口配置和vlan数据库配置等多种级别的配置模式,以允许用户对交换机的资源进行配置。 (4)在用户模式,仅能运行少数的命令,允许查看当前配置信息,但不能对交换机进行配置。特权模式允许运行提供的所有命令。 (5)IOS命令不区分大小写。 (6)在不引起混淆的情况下,支持命令简写。比如enable通常可简约表达为en。 (7)可随时使用?来获得命令行帮助,支持命令行编辑功能,并可将执行过的命令保存下来,供进行历史命令查询。 1.搭建交换机配置环境 在对交换机进行配置之前,首先应登录连接到交换机,这可通过交换机的控制端口(Console)连接或通过Telnet登录来实现。 (1)通过Console口连接交换机 对于首次配置交换机,必须采用该方式。对交换机设置管理IP地址后,就可采用Telnet登录方式来配置交换机。 对于可管理的交换机一般都提供有一个名为Console的控制台端口(或称配置口),该端口采用RJ-45接口,是一个符合EIA/TIA-232异步串行规范的配置口,通过该控制端口,可实现对交换机的本地配置。 交换机一般都随机配送了一根控制线,它的一端是RJ-45水晶头,用于连接交换机的控制台端口,另一端提供了DB-9(针)和DB-25(针)串行接口插头,用于连接PC机的COM1或COM2串行接口。Cisco的控制线两端均是RJ-45水晶头接口,但配送有RJ-45到DB-9和RJ-45到DB-25的转接头。 通过该控制线将交换机与PC机相连,并在PC上运行超级终端仿真程序,即可实现将PC机仿真成交换机的一个终端,从而实现对交换机的访问和配置。 Windows系统一般都默认安装了超级终端程序,对于Windows 2000 Server系统,该程序位于【开始】菜单下【程序】中【附件】的【通讯】群组下面,若没有,可利用控制面板中的【添加/删除程序】来安装。单击【通讯】群组下面的【超级终端】,即可启动超级终端。 首次启动超级终端时,会要求输入所在地区的电话区号,输入后将显示下图所示的连接创建对话框,在【名称】输入框中输入该连接的名称,并选择所使用的示意图标,然后单击确定按钮。 图9-2 超级终端连接创建对话框

路由器常用配置命令

Cisco常用配置命令Cisco常用配置命令 一.交换机的基本配置 C2950# config terminal 进入全局配置模式 show interface fastethernet0/1 查看端口0/1的配置结果 show interface fastethernet0/1 status 查看端口0/1的状态 show mac-address-table 查看整个MAC地址表 clear mac-address-table restricted static 清除限定性地址 C2950(config)# hostname 2950A / 设置主机名为2950A interface f0/23 / 进入端口23的配置模式 enable password cisco / 设置enable password为cisco enable secret cisco1 / 设置enable secret为cisco1 ip address 192.168.1.1 255.255.255.0 / 设置交换机IP 地址 ip default-gateway 192.168.1.254 / 设置默认网关 ip domain-name https://www.wendangku.net/doc/6d10257988.html, / 设置域名 ip name-server 200.0.0.1 / 设置域名服务器 配置查看MAC地址表 mac-address-table ? mac-address-table aging-time 100 / 设置超时是时间为100s mac-address-table permanent https://www.wendangku.net/doc/6d10257988.html, /f0/3 加入永久地址mac-address-table restricted static 0000.0c02.bbcc / f0/6 f0/7 加入静态地址 end show mac-address-table /查看整个Mac地址表 clear mac-address-table restricted static C2950(config-if)# interface fastethernet0/1 /进入接口F0/1子配置模式 interface Ethernet0 /进入以太网口0子配置模式 no shutdown /激活接口 speed ? /查看speed命令的子命令 speed 100 /设置该端口速率为100Mb/s dulplex full/half/auto /设置该端口为全双工 description TO_PC1 /设置该端口描述为TO_PC1 show interface fastethernet 0/1 /查看端口0/1的配置结果 show interface fastethernet 0/1 status /查看端口0/1的状态 配置VTP和STP 一. 配置VTP 2950A #vlan database /进入VLAN配置子模式 show vtp status /查看VTP设置信息 show vlan /查看VLAN配置信息 copy running-config startup-config /保存配置文件 2950A(vlan)#vtp server/client /设置本交换机为server/client模式

相关文档
相关文档 最新文档