搜档网
当前位置:搜档网 › 华为,CISCO交换机基本命令配置

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

华为,CISCO交换机基本命令配置
华为,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

;三层交换支持

[Quidway]local-user ftp

[Quidway]user-interface vty 0

4 ;进入虚拟终端

[S3026-ui-vty0-4]authentication-mode

password ;设置口令模式

[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令

[S3026-ui-vty0-4]user privilege level

3 ;用户级别

[Quidway]interface ethernet

0/1 ;进入端口模式

[Quidway]int

e0/1

;进入端口模式

[Quidway-Ethernet0/1]duplex

{half|full|auto} ;配置端口工作状态[Quidway-Ethernet0/1]speed

{10|100|auto} ;配置端口工作速率[Quidway-Ethernet0/1]flow-control

;配置端口流控

[Quidway-Ethernet0/1]mdi

{across|auto|normal} ;配置端口平接扭接

[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式

[Quidway-Ethernet0/1]port access vlan

3 ;当前端口加入到VLAN

[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN

[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID

[Quidway-Ethernet0/1]undo

shutdown ;激活端口[Quidway-Ethernet0/1]shutdown

;关闭端口

[Quidway-Ethernet0/1]quit

;返回

[Quidway]vlan

3

;创建VLAN

[Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口

[Quidway-vlan3]port

e0/1 ;简写方式

[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口

[Quidway-vlan3]port e0/1 to

e0/4 ;简写方式

[Quidway]monitor-port ;指定镜像端口

[Quidway]port mirror ;指定被镜像端口

[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像

[Quidway]description

string ;指定VLAN描述字符

[Quidway]description

;删除VLAN描述字符

[Quidway]display vlan

[vlan_id]

;查看VLAN设置

[Quidway]stp

{enable|disable}

;设置生成树,默认关闭

[Quidway]stp priority

4096 ;设置交换机的优先级

[Quidway]stp root

{primary|secondary} ;设置为根或根的备份

[Quidway-Ethernet0/1]stp cost

200 ;设置交换机端口的花费

[Quidway]link-aggregation e0/1 to e0/4

ingress|both ; 端口的聚合

[Quidway]undo link-aggregation

e0/1|all ; 始端口为通道号

[SwitchA-vlanx]isolate-user-vlan

enable ;设置主vlan

[SwitchA]isolate-user-vlan secondary ;设置主vlan包括的子vlan

[Quidway-Ethernet0/2]port hybrid pvid vlan ;设置vlan的pvid

[Quidway-Ethernet0/2]port hybrid

pvid ;删除vlan的pvid [Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan

如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.

----------------------------------------

路由器命令

~~~~~~~~~~

[Quidway]display

version

;显示版本信息

[Quidway]display

current-configuration ;显示当前配置[Quidway]display

interfaces ;显示接口信息

[Quidway]display ip

route ;显示路由信息

[Quidway]sysname

aabbcc

;更改主机名

[Quidway]super passwrod

123456 ;设置口令[Quidway]interface

serial0 ;进入接口

[Quidway-serial0]ip address ;配置端口IP地址

[Quidway-serial0]undo

shutdown ;激活端口[Quidway]link-protocol

hdlc ;绑定hdlc协议

[Quidway]user-interface vty 0 4

[Quidway-ui-vty0-4]authentication-mode password

[Quidway-ui-vty0-4]set authentication-mode password simple 222 [Quidway-ui-vty0-4]user privilege level 3

[Quidway-ui-vty0-4]quit

[Quidway]debugging hdlc all

serial0 ;显示所有信息[Quidway]debugging hdlc event

serial0 ;调试事件信息[Quidway]debugging hdlc packet

serial0 ;显示包的信息

静态路由:

[Quidway]ip route-static {interface

number|nexthop}[value][reject|blackhole]

例如:

[Quidway]ip route-static 129.1.0.0 16 10.0.0.2

[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2

[Quidway]ip route-static 129.1.0.0 16 Serial 2

[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

动态路由:

[Quidway]rip

;设置动态路由[Quidway]rip

work

;设置工作允许

[Quidway]rip

input

;设置入口允许

[Quidway]rip

output

;设置出口允许

[Quidway-rip]network

1.0.0.0 ;设置交换路由网络

[Quidway-rip]network

all

;设置与所有网络交换

[Quidway-rip]peer

ip-address

[Quidway-rip]summary

;路由聚合

[Quidway]rip version

1

;设置工作在版本1

[Quidway]rip version 2

multicast ;设版本2,多播方式

[Quidway-Ethernet0]rip

split-horizon ;水平分隔

[Quidway]router id

A.B.C.D

;配置路由器的ID

[Quidway]ospf

enable

;启动OSPF协议

[Quidway-ospf]import-route

direct ;引入直联路由

[Quidway-Serial0]ospf enable area

;配置OSPF区域

标准访问列表命令格式如下:

acl [match-order

config|auto] ;默认前者顺序匹配。rule [normal|special]{permit|deny} [source source-addr

source-wildcard|any]

例:

[Quidway]acl 10

[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255 [Quidway-acl-10]rule normal deny source any

扩展访问控制列表配置命令

配置TCP/UDP协议的扩展访问列表:

rule {normal|special}{permit|deny}{tcp|udp}source {

wild>|any}destination |any}

[operate]

配置ICMP协议的扩展访问列表:

rule {normal|special}{permit|deny}icmp source {

wild>|any]destination {|any]

[icmp-code] [logging]

扩展访问控制列表操作符的含义

equal

portnumber

;等于

greater-than

portnumber

;大于

less-than

portnumber

;小于

not-equal

portnumber

;不等

range portnumber1

portnumber2

;区间

扩展访问控制列表举例

[Quidway]acl 101

[Quidway-acl-101]rule deny souce any destination any

[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo

[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply

[Quidway]acl 102

[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0

[Quidway-acl-102]rule deny ip source any destination any

[Quidway]acl 103

[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftp

[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www

[Quidway]firewall enable

[Quidway]firewall default permit|deny

[Quidway]int e0

[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound

地址转换配置举例

[Quidway]firewall enable

[Quidway]firewall default permit

[Quidway]acl

101 ;内部指定主机可以进入e0

[Quidway-acl-101]rule deny ip source any destination any

[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any [Quidway-acl-101]quit

[Quidway]int e0

[Quidway-Ethernet0]firewall packet-filter 101 inbound

[Quidway]acl

102 ;外部特定主机和大于1024端口的数据包允许进入S0

[Quidway-acl-102]rule deny ip source any destination any

[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0

[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than

1024

[Quidway-acl-102]quit

[Quidway]int s0

[Quidway-Serial0]firewall packet-filter 102 inbound ;设202.38.160.1是路由器出口IP。

[Quidway-Serial0]nat outbound 101 interface ;是Easy ip,将acl 101允许的IP从本接口出时变换源地址。

内部服务器地址转换配置命令(静态nat):

nat server global [port] inside port

[protocol] ;global_port不写时使用inside_port

[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.1 ftp tcp

[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.2 telnet tcp

[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.3 www tcp

设有公网IP:202.38.160.101~202.38.160.103 可以使

用。 ;对外访问(原例题)

[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool1 ;建立地址池

[Quidway]acl 1

[Quidway-acl-1]rule permit source 10.110.10.0

0.0.0.255 ;指定允许的内部网络

[Quidway-acl-1]rule deny source any

[Quidway-acl-1]int serial 0

[Quidway-Serial0]nat outbound 1 address-group

pool1 ;在s0口从地址池取出IP对外访问

[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp

[Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp

[Quidway-Serial0]nat server global 202.38.160.102 8080 inside

10.110.10.3 www tcp

[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp

PPP设置:

[Quidway-s0]link-protocol

ppp

;默认的协议

PPP验证:

主验方:pap|chap

[Quidway]local-user q2 password {simple|cipher}

hello ;路由器1

[Quidway]interface serial 0

[Quidway-serial0]ppp authentication-mode {pap|chap}

[Quidway-serial0]ppp chap user

q1 ;pap时,没有此句

pap被验方:

[Quidway]interface serial

;路由器2

[Quidway-serial0]ppp pap local-user q2 password {simple|cipher} hello

chap被验方:

[Quidway]interface serial

;路由器2

[Quidway-serial0]ppp chap user

q2 ;自己路由器名

[Quidway-serial0]local-user q1 password {simple|cipher} hello ;对方路由器名

帧中继frame-relay (二分册6-61)

[q1]fr switching

[q1]int s1

[q1-Serial1]ip address 192.168.34.51 255.255.255.0

[q1-Serial1]link-protocol

fr

;封装帧中继协议

[q1-Serial1]fr interface-type dce

[q1-Serial1]fr dlci 100

[q1-Serial1]fr inarp

[q1-Serial1]fr map ip 192.168.34.52 dlci 100

[q2]int s1

[q2-Serial1]ip address 192.168.34.52 255.255.255.0

[q2-Serial1]link-protocol fr

[q2-Serial1]fr interface-type dte

[q2-Serial1]fr dlci 100

[q2-Serial1]fr inarp

[q2-Serial1]fr map ip 192.168.34.51 dlci 100

帧中继监测

[q1]display fr lmi-info[]interface type number]

[q1]display fr map

[q1]display fr pvc-info[serial interface-number][dlci dlci-number] [q1]display fr dlci-switch

[q1]display fr interface

[q1]reset fr inarp-info

[q1]debugging fr all[interface type number]

[q1]debugging fr arp[interface type number]

[q1]debugging fr event[interface type number]

[q1]debugging fr lmi[interface type number]

启动ftp服务:

[Quidway]local-user ftp password {simple|cipher} aaa service-type ftp [Quidway]ftp server enable

cisco交换机基本命令配置

1.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}

在基于CLI的交换机上设置以太网的链路模式:

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

8.在基于IOS的交换机上配置静态VLAN:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure terminal

switch(config)# interface interface module/number

switch(config-if)# switchport mode access

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

switch(config-if)# end

在基于CLI的交换机上配置静态VLAN:

switch(enable) set vlan vlan-num [name name]

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

9. 在基于IOS的交换机上配置VLAN中继线:

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的交换机上配置VLAN中继线:

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

10.在基于IOS的交换机上配置VTP管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基于CLI的交换机上配置VTP管理域:

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

11.在基于IOS的交换机上配置VTP 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

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

switch(vlan)# vtp password password

在基于CLI的交换机上配置VTP 模式:

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

12. 在基于IOS的交换机上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交换机上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基于IOS的交换机上启动VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基于CL I 的交换机上启动VTP剪裁:

switch(enable) set vtp pruning enable

14.在基于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}

15.在基于IOS的交换机上调整根路径成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基于CLI的交换机上调整根路径成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端口ID:

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

switch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改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

在基于CLI的交换机上修改STP时钟:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:

switch(config-if)#spanning-tree portfast

在基于CLI的交换机端口上启用或禁用Port Fast 特征:

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

19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:

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

在基于CLI的交换机端口上启用或禁用UplinkFast 特征:

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,可以使用下列命令:

A TM (config)# interface atm number.subint multioint

A TM(config-subif)# lane serber-bus ethernet elan-name

29. 配置LECS:

A TM(config)# lane database database-name

A TM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address A TM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address

A TM(lane-config-databade)# name …

30. 创建完数据库后,必须在主接口上启动LECS.命令如下:

A TM(config)# interface atm number

A TM(config-if)# lane config database database-name

A TM(config-if)# lane config auto-config-atm-address

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

A TM(config)# interface atm number.subint multipoint

A TM(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)# 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)# atm pvc 1 0 5 qsaal

router(config-if)# atm pvc 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 ethernet elan-num

router(config-if)# interface atm module/port.subinterface 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)# interface interface number

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

43. 在路由处理器启用MLSP:

router(config)# mls rp ip

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

router(config)# interface interface 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-interface

47. 要检验MLS-RP的配置情况:

router# show mls rp

48. 检验特定接口上的MLS配置:

router# show mls rp interface interface 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

思科交换机命令大全

思科交换机命令大全集团文件发布号:(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

华为交换机基本配置命令详细讲解

华为交换机基本配置命令详解 1、配置文件相关命令 [Quidway]display current-configuration 显示当前生效的配置 [Quidway]display saved-configuration 显示flash中配置文件,即下次上电启动时所用的配置文件 reset saved-configuration 檫除旧的配置文件reboot 交换机重启 display version 显示系统版本信息 2、基本配置 [Quidway]super password 修改特权用户密码 [Quidway]sysname 交换机命名 [Quidway]interface ethernet 1/0/1 进入接口视图 [Quidway]interface vlan 1 进入接口视图 [Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0 配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 静态路由=网关 3、telnet配置 [Quidway]user-interface vty 0 4 进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password 设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令 [S3026-ui-vty0-4]user privilege level 3 用户级别 4、端口配置 [Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态 [Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率 [Quidway-Ethernet1/0/1]flow-control 配置端口流控 [Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接

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}

思科交换机命令大全

思科交换机常用命令大全 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 ;三层交换支持

思科交换机配置维护手册

思科交换机配置维护手册

目录

一、端口配置 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 配置端口速率及双工模式

思科华为命令对照表

Cisco_H3C命令对照 思科Cisco 华为3COM 功能 enable system-view 进入特权模式configure terminal \ 进入配置状态 show display 显示 show running-config display current 显示目前的运行配置show version disp version 显示版本 show start disp saved 显示已保存的配置 show tech-support disp base-information 显示全面的信息no undo 取消(删除) hostname sysname 更改机器名 \ lang chinese 进入中文状态 user local-user 新建修改用户 end return 退回到系统视图 exit quit 返回上级视图 exit logout telnet退出 router rip rip rip动态路由 router ospf ospf ospf路由 router bgp bgp bgp路由 write save 保存配置 erase delete 删除配置 0 simple 明文 7 cipher 密文 access-list acl 控制访问列表 host ip host host和ip名字对应 logging info-center 日志信息 encap link-protocol 封闭链路层协议 no debug all ctrl+d 取消所有debug命令 vlan database vlan 进入vlan的配置 vtp trunk trunk 设置成为骨干端口 mode \ 模式 trunk 相同主干线 switchport port 接口控制 access 相同访问 ip dhcp dhcp 设置dhcp服务器功能 思科华为命令对照表 思科华为 show display show version disp version no undo

华为交换机配置命令

华为交换机配置命令

华为交换机配置指令 视图切换指令 system-view [Quidway]quit //用可以从任意视图直接回到用户视图 交换机命名 [Quidway]sysname devicename 配置文件的保存与删除 保存配置:save 擦除配置:reset saved-configuration reboot 交换机端口基本配置 进入相应端口的视图:[Quidway]interface interface-type interface-number

打开以太网端口:[Switch-ethernet port-id]undo shutdown 设置以太网端口描述字符串:[Switch-ethernet port-id]description text 设置以太网端口的双工模式:[Switch-ethernet port-id]duplex { auto| full| half } 设置以太网端口的速率:[Switch-ethernet port-id]speed { 10 | 100 | 1000 | auto } 设置以太网端口的MDI模式:[Switch-ethernet port-id]mdi {across| auto | normal } 开启以太网端口的流量控制功能:[Switch-ethernet port-id]flow-control display查看指令 查看版本信息:display version 查看当前配置:display current-configuration 查看保存配置:display saved-configuration

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

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

思科交换机配置命令大全

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

华为交换机基本配置命令29908

华为交换机基本配置命令 一、单交换机VLAN划分 命令命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan 20 sysname 交换机命名 disp vlan 显示vlan vlan 20 创建vlan(也可进入vlan 20) port e1/0/1toe1/0/5 把端口1-5放入VLAN 20 中 5700系列 单个端口放入VLAN [Huawei]intg0/0/1 [Huawei]port link-typeaccess(注:接口类型access,hybrid、trunk) [Huawei]port default vlan 10 批量端口放入VLAN [Huawei]port-group 1 [Huawei-port-group-1]group-member ethernet G0/0/1 to ethernet G0/0/20 [Huawei-port-group-1]port hybrid untagged vlan 3 删除group(组)vlan 200内的15端口 [Huawei]intg0/0/15 [Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200 通过group端口限速设置 [Huawei]Port-group 2 [Huawei]group-member g0/0/2 to g0/0/23 [Huawei]qos lr outbound cir 2000 cbs 20000 disp vlan 20 显示vlan里的端口20 int e1/0/24 进入端口24 undo port e1/0/10 表示删除当前VLAN端口10 disp curr 显示当前配置 return 返回 Save 保存 info-center source DS channel 0 log state off trap state off通过关闭日志信息命令改变DS模块来实现(关闭配置后的确认信息显示) info-center source DS channel 0 log state on trap state on 通过打开日志信息命令改变DS模块来实现(打开配置后的确认信息显示)

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

华为交换机配置命令手册及实验

华为交换机配置命令手 册及实验 Huawei 交换机配置命令手册: 1、开始 建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console 口连接。在 主机上运行终端仿真程序(如Windows 的超级终端等),设置终端通信参数为:波特 率为9600bit/s、8 位数据位、1 位停止位、无校验和无流控,并选择终端类型为 VT100。 以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如)。 键入命令,配置以太网交换机或查看以太网交换机运行状态。需要帮助可以随时键入"" 2、命令视图 (1)用户视图(查看交换机简单运行状态和统计信息):与交换机建立连接即进入 (2)系统视图(配置系统参数)[Quidway]:在用户视图下键入system-view (3)以太网端口视图(配置以太网端口参数)[Quidway-Ethernet0/1]:在系统视图下键入 interface ethernet 0/1 (4)VLAN 视图(配置VLAN 参数)[Quidway-Vlan1]:在系统视图下键入vlan 123 Hessen was revised in January 2021

(5)VLAN 接口视图(配置VLAN 和VLAN 汇聚对应的IP 接口参数)[Quidway-Vlan- interface1]:在系统视图下键入interface vlan-interface 123 (6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入 local- user user1 (7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface 3、其他命令 设置系统时间和时区clock time Beijing add 8 clock datetime 12:00:00 2005/01/23 设置交换机的名称[Quidway]sysname TRAIN-3026-1[TRAIN-3026-1]

华为交换机常用命令配置介绍

华为交换机配置命令 华为QuidWay交换机配置命令手册: 1、开始 建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console口连接。 在主机上运行终端仿真程序(如Windows的超级终端等),设置终端通信参数为:波特率为9600bit/s、8位数据位、1位停止位、无校验和无流控,并选择终端类型为VT100。 以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如)。 键入命令,配置以太网交换机或查看以太网交换机运行状态。需要帮助可以随时键入"?" 2、命令视图 (1)用户视图(查看交换机的简单运行状态和统计信息):与交换机建立连接即进入 (2)系统视图(配置系统参数)[Quidway]:在用户视图下键入system-view (3)以太网端口视图(配置以太网端口参数)[Quidway-Ethernet0/1]:在系统视图下键入interface ethernet 0/1 (4)VLAN视图(配置VLAN参数)[Quidway-Vlan1]:在系统视图下键入vlan 1 (5)VLAN接口视图(配置VLAN和VLAN汇聚对应的IP接口参数)[Quidway-Vlan-interface1]:在系统视图下键入interface vlan-interface 1 (6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入local-user user1 (7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface 3、其他命令 设置系统时间和时区clock time Beijing add 8 clock datetime 12:00:00 2005/01/23 设置交换机的名称[Quidway]sysname TRAIN-3026-1[TRAIN-3026-1] 配置用户登录[Quidway]user-interface vty 0 4 [Quidway-ui-vty0]authentication-mode scheme 创建本地用户[Quidway]local-user huawei [Quidway-luser-huawei]password simple huawei [Quidway-luser-huawei] service-type telnet level 3 4、VLAN配置方法 『配置环境参数』 SwitchA端口E0/1属于VLAN2,E0/2属于VLAN3 『组网需求』 把交换机端口E0/1加入到VLAN2 ,E0/2加入到VLAN3 数据配置步骤 『VLAN配置流程』 (1)缺省情况下所有端口都属于VLAN 1,并且端口是access端口,一个access端口只能属于一个vlan; (2)如果端口是access端口,则把端口加入到另外一个vlan的同时,系统自动把该端口从原来的vlan中删除掉; (3)除了VLAN1,如果VLAN XX不存在,在系统视图下键入VLAN XX,则创建VLAN XX并进入VLAN视图;如果VLAN XX已经存在,则进入VLAN视图。

思科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交换机基本配置 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三层交换机配置命令及解释 (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中 S> show interface [type slot_#/port_#] 查看所有或指定接口的信息 S> show ip 显示交换机的IP配置(只在1900系列上可用) S> show version 查看设备信息 S# show ip interface brief 验证IP配置 S(config-if)# speed 10|100|auto 设置接口速率 S(config-if)# duplex auto|full|half 设置接口双工模式 S> show mac-address-table 查看CAM表 S# clear mac-address-table 清除CAM表中的动态条目 1900(config)# mac-address-table permanent MAC_address type [slot_#/]port_# 在CAM 表中创建静态条目 2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# 在CAM表中创建静态条目 1900(config)# mac-address-table restricted static MAC_address source_port list_of_allowed_interface 设置静态端口安全措施 1900(config-if)# port secure 启用粘性学习 1900(config-if)# port secure max-mac-count value 设置粘性学习特性能够学到的地址数量(默认132,取值范围是1-132)

相关主题