CISCO常用配置命令及参数(1)
2011-10-27 10:30 佚名 NET130 字号: |
CISCO的产品类型非常多,也是企业常常会选择的一个品牌。所以,作为运维人员,维护企业的网络,对于Cisco的产品的配置也要有所了解。
AD:
启动接口,分配IP地址:
1.router>
2.router> enable
3.router#
4.router# configure terminal
5.router(config)#
6.router(config)# interface Type Port
7.router(config-if)# no shutdown
8.router(config-if)# ip address IP-Address Subnet-Mask
9.router(config-if)# ^z
配置RIP路由协议:30秒更新一次
1.router(config)# router rip
2.router(config-if)# network Network-Number <--通告标准A,B,C类网-->
3.router(config-if)# ^z
配置IGRP路由协议:90秒更新一次
1.router(config)# router igrp AS-Number <-- AS-Number范围1~65535-->
2.router(config-if)# network Network-Number <--通告标准A,B,C类网-->
3.router(config-if)# ^z
配置Novell IPX路由协议:
1.Novell RIP 60秒更新一次
2.router(config)# ipx routing [node address]
3.router(config)# ipx maximum-paths Paths <--设置负载平衡,范围1~512-->
4.router(config)# interface Type Port
5.router(config-if)# ipx network Network-Number [encapsulation encapsu
lation-type] [secondary] <--通告标准A,B,C类网-->
6.router(config-if)# ^z
配置DDR:
1.router(config)# dialer-list Group-Number protocol Protocol-Type perm
it [list ACL-Number]
2.router(config)# interface bri 0
3.router(config-if)# dialer-group Group-Number
4.router(config-if)# dialer map Protocol-Type Next-Hop-Address name Ho
stname Telphone-Number
5.router(config-if)# ^z
配置ISDN:
1.router(config)# isdn swith-type Swith-Type <--配置ISDN交换机类型,中国使
用basic-net3-->
2.router(config-if)# ^z
配置Frame Relay:
1.router(config-if)# encapsulation frame-relay [cisco | ietf ]
2.router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ]
3.router(config-if)# bandwidth kilobits
4.router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]
5.<--配置静态Invers ARP表:
6.router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadca
st ] [ ietf | cisco ] [ payload-compress | packet-by-packet ]
7.-->
8.<--设置Keepalive间隔:
9.router(config-if)# keepalive Number
10.-->
11.<--为本地接口指定DLCI:
12.router(config-if)# frame-lelay local-dlci Number
13.-->
14.<--子接口配置:
15.router(config-if)# interface Type Port.Subininterface-Number [ multi
point | point-to-point ]
16.router(config-subif)# ip unnumbered Interface
17.router(config-subif)# frame-lelay local-dlci Number
18.-->
19.router(config-if)# ^z
配置标准ACL:
1.router(config)# access-list Access-List-Number [ permit | deny ] sou
rce [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199
扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;
600~699Apple Talk ACL-->
2.router(config)# interface Type Port
3.router(config-if)# ip access-group Access-List-Number [ in | out ]
4.router(config-if)# ^z
5.
配置扩展ACL:
1.router(config)# access-list Access-List-Number [ permit | deny ] [ P
rotocol | Protocol-Number ] source source-wildcard [ Source-Port ] des tination destination-wildcard [ Destination-Port ] [ established ]
2.router(config)# interface Type Port
3.router(config-if)# ip access-group Access-List-Number [ in | out ]
4.router(config-if)# ^z
5.
配置命名ACL:
1.router(config)# ip access-list [ standard | extended ] ACL-Name
2.router(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-L
ist-Test-Conditions ]
3.router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Acces
s-List-Test-Conditions ]
4.router(config [ std- | ext- ] nacl)# ^z
5.router(config)# interface Type Port
6.router(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]
7.router(config-if)# ^z
配置DCE时钟:
1.router# show controllers Type Port <--确定DCE接口-->
2.router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率-->
3.router(config-if)# ^z
配置PPP协议:
1.router(config)# username Name password Set-Password-Here <--验证方建立
数据库-->
2.router(config)# interface Type Port
3.router(config-if)# encapsulation ppp <--启动PPP协议-->
4.router(config-if)# ppp outhentication [ chap | chap pap | pap chap |
pap ] <--选择PPP认证-->
5.router(config-if)# ppp pap sent-username Name password Password <--
发送验证信息-->
6.router(config-if)# ^z
PAP单向认证配置实例:
验证方:
1.router-server(config)# username Client password 12345 <--验证方建立数
据库-->
2.router-server(config)# interface serial 0
3.router-server(config-if)# encapsulation ppp
4.router-server(config-if)# ppp authentication pap <--选择使用PAP实现
PPP认证-->
5.router-server(config-if)# ^z
被验证方:
1.router-client(config-if)# encapsulation ppp
2.router-client(config-if)# ppp pap sent-username Client password 1234
5 <--发送验证信息-->
3.router-client(config-if)# ^z
PAP双向认证配置实例:
路由器 A:
1.routerA(config)# username B password 12345
2.routerA(config)# interface serial 0
3.routerA(config-if)# encapsulation ppp
4.routerA(config-if)# ppp authentication pap
5.routerA(config-if)# ppp pap sent-username A password 54321
6.routerA(config-if)# ^z
路由器 B:
1.routerB(config)# username A password 54321
2.routerB(config)# interface serial 1
3.routerB(config-if)# encapsulation ppp
4.routerB(config-if)# ppp authentication pap
5.routerB(config-if)# ppp pap sent-username B password 12345
6.routerB(config-if)# ^z
CHAP单向认证配置实例:
验证方:
1.router-server(config)# username router-client password 12345
2.router-server(config)# interface serial 0
3.router-server(config-if)# encapsulation ppp
4.router-server(config-if)# ppp authentication chap
5.router-server(config-if)# ^z
被验证方:
1.router-client(config-if)# encapsulation ppp
2.router-client(config-if)# ppp authentication chap
3.router-client(config-if)# ppp chap hostname router-client
4.router-client(config-if)# ppp chap password 12345
5.router-client(config-if)# ^z
CHAP双向认证配置实例:
路由器 A:
1.routerA(config)# username routerB password 12345
2.routerA(config)# interface serial 0
3.routerA(config-if)# encapsulation ppp
4.routerA(config-if)# ppp authentication chap
5.routerA(config-if)# ppp chap hostname routerA
6.routerA(config-if)# ppp chap password 54321
7.routerA(config-if)# ^z
路由器 B:
1.routerB(config)# username routerA password 54321
2.routerB(config)# interface serial 1
3.routerB(config-if)# encapsulation ppp
4.routerB(config-if)# ppp authentication chap
5.routerB(config-if)# ppp chap hostname routerB
6.routerB(config-if)# ppp chap password 12345
7.routerB(config-if)# ^z
Telnet使用:
1.routerA# terminal monitor <--可以传回在远端主机执行Debug命令的结果-->
2.routerA# telnet IP-Address [ Router-Name ] <--Telnet到指定的地址或名字
的主机-->
3.routerB# [ exit | logout ] <--退出Telnet-->
4.routerB# ++<6>再按<--挂起Telnet-->
5.routerA# show sessions <--显示当前所有Telnet的信息,包括
Connect-Number -->
6.routerA# Connect-Number <--返回指定的Telnet连接-->
7.routerA# disconnect IP-Address [ Router-Name ] <--断开指定地址或名字的主
机的连接-->
8.routerA# show user <--显示Telnet到本机的连接信息-->
9.routerA# clear line [ 0 | 1 | 2 | 3 | 4 ] <--断开指定Telnet到本机的连接
-->
禁止任何Telnet到本机:
1.router(config)# line vty 0 4
2.router(config-line)# access-class ACL-Number
3.router(config)# ^z
设置主机名:
1.router(config)# hostname Set-Hostname
2.router(config)# ^z
3.router(config)# ^z
设置用户模式密码:
1.router(config)# line console 0
2.router(config-line)# login
3.router(config-line)# password Set-Password
4.router(config-line)# ^z
设置Telnet密码:
1.router(config)# line vty 0 4
2.router(config-line)# login
3.router(config-line)# password Set-Password
4.router(config-line)# ^z
设置特权模式密码:
1.router(config)# enable password Set-Password <--不加密的密码,明码-->
2.router(config)# enable secret Set-Password <--经过加密的密码-->
3.router(config)# ^z
给所有密码加密:
1.router(config)# service password-ancryption Set-Password-Here
2.router(config)# no service password-ancryption <--取消加密-->
3.router(config)# ^z
设置登录Banner:
1.router(config)# banner motd 分隔符 Set-Banner-Information-Here 分隔
符<--前后分隔符一定要一致-->
设置接口的描述信息:
1.router(config-if)# description Set-Port-Information-Here
2.router(config)# ^z
CDP的控制:
1.router(config-if)# cdp enable <--在指定端口启用CDP,缺省-->
2.router(config-if)# no cdp enable <--在指定端口关闭CDP-->
3.router(config)# cdp run <--使所有端口启用CDP-->
4.router(config)# no cdp run <--使所有端口关闭CDP-->
Ping的使用:
1.router# ping IP-Address
2.router# ping <--扩展Ping命令-->
3.Protocol [ip]:[ Protocol-Type ] <--选择协议类型-->
4.Target IP address:IP-Address <--输入测试地址-->
5.Repeat count [5]:<--选择发送的ICMP包数量-->
6.Datagram size [100]:<--选择每个包的大小-->
7.Timeout in seconds [2]:<--设置每个包的超时时间-->
8.Extended commands [n]:y <--使用扩展Ping命令-->
9.Sweep range of sizes [n]:
Tracke的使用:
1.router# trace IP-Address [ Host-Name
为Cisco 4000路由器指定媒体类型:
1.router(config-if)# media-type 10baset <--使AUI(默认)失效,改为使用
RJ-45-->
2.router(config-if)# ^z
更改路由器启动顺序:
1.router(config)# boot system flash IOS-FileName
2.router(config)# boot system tftp IOS-FileName TFTP-IP-Address
3.router(config)# boot system rom
4.router(config)# ^z
修改寄存器数值:
1.router(config)# config-register Value <--Cisco出厂默认Value=0x2102,
Value范围:0x2100(进入ROM监视器),0x2101(使系统从ROM启动),0x2102~0x210F (使系统从NVRAM启动)。0x1=0x2101,从最小位开始改变-->
在ROM监视器中更改寄存器数值:
1.> o/r Value
路由器密码的恢复:
冷关机,然后再开机并在60秒内按< Ctrl>+ 进入ROM监视器模式
1.> o/r 0x2142 <--25xx型路由器-->或> confreg 0x2142 <--16xx型路由器
-->
2.router> I
3.router> n
4.router> enable
5.router# copy startup-config running-config
6.router# configure terminal
7.router(config)# enable secret New-Password
8.router(config)# config-register 0x2102
9.router(config)# ^z
10.router# copy running-config startup-config
11.router# reload
配置名称-主机入口:
1.router(config)# ip host Set-Name [ TCP-Port-Number ] IP-Address [ IP
-Address 2 ]...
2.router(config)# ^z
定义DNS主机:
1.router(config)# ip name-server Server-Address [ Server-Address 2 ].
..
2.router(config)# ^z
禁用DNS:
1.router(config)# no ip domain-lookup
2.router(config)# ^z
配置水平分割:
1.router(config-if)# ip split-horizon
2.router(config-if)# no ip split-horizon
3.router(config-if)# ^z
配置静态路由:
1.router(config)# ip route IP-Address Subnet-Mask [ Next-Hop-Address |
Local-Out-Port ] [Distace ]
2.<--Distance范围:1~255,相当于优先权,越小越好。RIP=120;DSPF=110;IGRP=100;
EIGRP=90-->
3.router(config)# ^z
配置缺省路由:
1.router(config)# ip defoult-network IP-Address <--动态缺省路由-->
2.router(config)# ip route 0.0.0.0 0.0.0.0 [ Next-Hop-Address | Local-
Out-Port ] [Distace ] <--静态缺省路由-->
3.router(config)# ^z
网络互连设备 1、交换机基本配置命令 (1)用户模式Switch> (2)特权模式Switch>enable Switch# (3)特权模式退回到用户模式:disable (4)下一级模式退回到上一级:exit (5)某个模式直接退回到特权模式:end (6)配置交换机名称命令hostname <交换机> (7)进入交换机端口模式命令 模式:switch(config)# 命令:interface <端口类型> <端口号> 交换机常见的端口类型:ethernet、fastethernet、gigabitethernet以及VLAN 接口等。端口号一般采用插槽号/端口号,如0/1。 (8)进入交换机的某个端口模式switch(config-if)# 显示交换机端口状态命令switch# show interface <端口类型> <端口号> (9)进入控制台线路模式模式:switch(config)# 命令:line console <编号> 参数:编号是配置口的编号,从0开始编号。结果:进入控制台模式 switch(config-line)#。 (10)配置控制台口令模式:switch(config-line)# 命令:password <密码> 参数:密码支持字母和数字。 启用密码认证模式:switch(config-line)# 命令:login (11)配置进入特权模式口令模式:switch(config)# 命令:enable password|secret <密码> 参数:password表示密码以明文形式存放,secret表示密码以密文形式存放。密码支持字母和数字。 (12)为之前设置的口令加密模式:switch(config)# 命令:service password-encryption 结果:将之前设置的所有口令加密。 (13)配置交换机的登录标语模式:switch(config)# 命令:banner motd %<标语>%参数:标语应该是警示性的文字,不识别中文。结果:下次进入某个需要输入密码的模式时将会显示该提示。 (14)禁止干扰信息模式:控制台模式命令:logging synchronous 结果:下次弹出日志信息时会强制回车。 2、交换机系统帮助命令 (1)显示系统信息命令Switch> show version (2)显示交换机当前配置命令show running-config (3)显示交换机已保存的配置命令show startup-config (4)保存现有配置命令copy running-configu startup-config (5)清除已保存的配置erase startup-config (6)了解在某模式下有哪些命令时,可以输入“?” (7)某个命令只记得一部分时,可以在记得的部分后输入“?”(无空格)(8)清楚某单词后可输入的命令时,可在此单词后输入“? ”(中间有空格)。(9)将命令补充完整。输入能唯一识别某个命令关键字的一部分后,可以按键盘上的TAB键可以将该关键字补充完整。
933a LMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。 # fram-relay intf-typ ABC ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。# frame_relay interface_dlci 110 br 配置DLCI(数据链路连接标识符)。 # frame-relay map ip ABCD XXXX broadcast 建立帧中继映射。ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。 # no shutdown 激活本端口. # exit ---- 5 .帧中继子接口的配置: # conf t # int s0.1 point-to-point
对应S0的子接口1,点对点方式。 # ip addr ABCD XXXX ABCD为子口1的IP地址,XXXX为子网掩码。# frame-relay intreface-dlci 100 br 6.配置拨号备份 (1).配置备份主口 # conf t # int s0 S0为主口. # backup int asy 1 A1口为备份口. # backup delay 0 1 延时1秒. (2).配置虚拟接口 # conf t # ip addr ABCD XXXX
ABCD为虚拟接口IP地址,XXXX为子网掩码。 # encap ppp 封装ppp协议. # dialer in-band 激活随叫随拨功能. # dialer idle-timeout 7200 # dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.ABCD为对方拨号口的ip地址,6225481为对应的电话号码。 # dialer_group 1 定义拨号组成员. (3).配置防火墙 # dialer_list 1 pro ip permit 允许ip协议通过。 (4).配置连接口令 # user name ABCD pass XXXX ABCD为对方主机名,XXXX为连接口令. (5).配置拨号字符串
一、交换机基本配置 1、交换机命名: 在项目实施的时候,建议为处于不同位置的交换机命名,便于记忆,可提高后期管理效率。 switch(config)#hostname ruijie //ruijie为该交换机的名字 2、交换机配置管理密码: 配置密码可以提高交换机的安全性,另外,telnet登录交换机的时候,必须要求有telnet管理密码。 switch (config)#enable secret level 1 0 rg //配置telnet管理密码为rg,其中1表示telnet密码,0表示密码不加密 switch (config)#enable secret level 15 0 rg //配置特权模式下的管理密码rg,其中15表示为特权密码3、交换机配置管理IP switch (config)#interface vlan 1 //假设管理VLAN为VLAN 1 switch (config-if)#ip address 192.168.1.1 255.255.255.0 //给管理VLAN配置管理IP地址 switch (config-if)#no shutdown //激活管理IP,养成习惯,无论配置什么设备,都使用一下这个命令 4、交换机配置网关: switch(config)#ip default-gateway 192.168.1.254 //假设网关地址为192.168.1.254,此命令用户二层设备。通过以上几个命令的配置,设备便可以实现远程管理,在项目实施时(尤其是设备位置比较分散)特别能提高效率。 二、接口介质类型配置 锐捷为了降低SME客户的总体拥有成本,推出灵活选择的端口形式:电口和光口复用接口,方便用户根据网络环境选择对应的介质类型。 但光口和电口同时只能用其一,如图1,如使用了光口1F,则电口1不能使用。 1、接口介质类型的转换: Switch(config)#interface gigabitethernet 0/25-28
交换机配置命令 Prepared on 24 November 2020
配置命令 交换机之间用交叉线 1进入特权模式:Switch>enable 2配置模式 Switch#config 3配置主机名:Switch(config)#hostname S1 4.设置访问口令S1#configure terminal S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit 5.将使能加密口令设置为 class。 S1(config)#enable secret class S1(config)#配置默认网关 6.在虚拟接口vlan99设置交换机ip地址 S1(config)#interface vlan99 S1(config-if)# S1(config-if)#no shutdown S1(config-if)#exit 7.交换机 VLAN 分配端口 S1(config)#interface fa0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit 8.给vlan命名 S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff .本征vlan即分配端口连接s1 使用中继vlan S1中继vlan S1(config)#interface FastEthernet 0/1 S1(config-if)#switchport mode trunk S1(config-if)#switchport trunk native vlan 99 9..设置交换机默认网关
思科交换机基本配置实例讲解
目录 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
华为交换机基本配置命令 一、单交换机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模块来实现(打开配置后的确认信息显示)
1. 交换机支持的命令: 交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令 switch(config)#enable password xxa ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令 交换机VLAN设置: switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线 switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继 switch(config)#vtp domain;设置发vtp域名 switch(config)#vtp password;设置发vtp密码 switch(config)#vtp mode server ;设置发vtp模式 switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address;设置IP地址 switch(config)#ip default-gateway;设置默认网关 switch#dir flash: ;查看闪存 交换机显示命令: switch#write ;保存配置信息 switch#show vtp ;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#show vlan ;查看vlan配置信息 switch#show interface ;查看端口信息 switch#show int f0/0 ;查看指定端口信息 2. 路由器支持的命令:
3、常用配置命令 3.1 把端口加入到vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter f 0/1 /*进入端口*/ Switch (config-if)#switchport access vlan X /*把端口加入到vlan X*/ Switch (config-if)#end Switch #wr /*保存*/ Building configuration... [OK] Switch # 3.2 添加新vlan(在核心交换机上写) Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#Vlan X /*添加新Vlan*/ Switch (config-vlan)#inter vlan X /*进入Vlan*/ Switch (config-if)#ip address x.x.x.x 255.255.255.0/*设置vlan ip地址*/ Switch (config-if)#no shut 3.3 配置trunk,透传vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter fast 0/x /*进入级联端口*/ Switch (config-if)#switchport mode trunk /*修改端口模式*/ Switch (config-if)# switchport trunk allowed vlan all /*设置允许通过的vlan*/ 保存 删除命令:所有的命令前面加no。
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路由器配置命令大全 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R1 3、display ip routing-table 显示当前路由表 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图 6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口
中兴交换机配置命令 ZTE交换机配置常用命令汇总(摘自网络) 个人心得:命令的使用要注意各种用户模式。 配成普通交换机:把2-24端口归到VLAN1下,2-24端口如果互相隔离,可以用PVLAN删除隔离端口即可。 2852s和2826s配置: 创建VLAN命令如下: set vlan 10 enable ///创建vlan set vlan 10 add port 1-24 untag ///在创建的vlan内添加用户端口 set vlan 10 add port 25 tag ///把级联端口添加到vlan10中,需打tag标签,即为trunk端口。 set port 1-24 pvid 10 ///把添加到vlan10的用户端口,pvid至vlan10中。交换机用户端口必须在所添加的vlan中做 此项命令。(默认的pvid为vlan10) 删除vlan命令如下: set vlan 10 delete port 1-24 ///删除用户端口 set vlan 10 delete port 25 ///删除级联端口 set vlan 10 disable ///删除vlan set port 1-24 pvid 1 ///恢复默认设置,该项命令必须添加,不然还会在show running-config信息中显示 set port 1-24 pvid 10的信息,会导致vlan用户使用不正常。 ENABLE密码配置: zte>enable //进入全局配置模式 password:***** //输入进入全局配置模式的密码,缺省没有密码 zte(cfg)#adminpass zxr10 //配置进入全局配置模式的密码为zxr10 TELNET 用户名密码配置(为了便于对设备的维护,有时需要修改登录用户名或密码,配置如下:) zte(cfg)#create user zxr10 //创建名为zxr10的用户 zte(cfg)#loginpass zxr10 //设置登录密码为zxr10 zte(cfg)#show user //显示telnet登录用户信息和当前用户名 配置三层管理或业务地址: config router ///进入config router模式 set ipport 0 ipaddress 10.20.20.1 255.255.255.0 ///设置三层接口ip地址及掩码 set ipport 0 vlan 10 ///三层端口绑定vlan set ipport 0 enable ///启用三层端口 iproute 0.0.0.0 0.0.0.0 10.20.20.1 ///设置默认路由指向网关 T40G和5228交换机配置: 批量创建vlan方式: zxr10#vlan database zxr10(vlan)#vlan 10-20
思科交换机配置命令大全 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
常用命令等 1、连接交换机并设置软件连接交换机/路由器等: 如果设备管理器里边没有端口选项则说明USB-COM驱动未安装好;到这里记录下COM口的端口号,我这里是COM4。 打开securecrt软件:打开crt解压到的目录点软件启动
在弹出的窗口中点击下图中的按钮 按照下图中选择选项:
选择完成后点击确定按钮后敲击回车,如窗口中显示XXXXX>则说明设备连接成功。 2、配置5750交换机步骤 A、第一步删除5750交换机现有配置,复制下边命令并粘贴到crt命令行内: en ruijie delete config.text y reload y B、重新配置5750交换机: en
conf t hos btjx-zhl-25750-2 vlan 101 exit int vlan 101 ip add 192.168.101.252 255.255.255.0 exit ip route 0.0.0.0 0.0.0.0 192.168.101.254 enable sec ruijie lin vty 0 4 pass ruijie exit rldp enable int r g0/1 – 22 sw mo acc sw acc vlan 101 rldp port loo shutdown-port exit int r g0/23 – 24 me fi sw mo tr int g0/24
des btjx-zhl-25750-1 exit err re int 1800 end wr wr 此配置是11日没有拆下来的交换机的配置: 此配置是11日拆除下来的5750交换机的配置(需要增加部分配置) 上边配置的5750交换机23口24口都是级联口5750-1-24口接86,5750-1-23连接5750-2-24口 3、2952交换机配置,修改级联口部分: en ruijie conf t int g0/49 sw mo tr int g0/51 sw mo tr
3COM SWITCH 4005 调试步骤 1.1连接 1.用一条console线将3COM SWITCH 4005 与终端连接,在windows 窗口中,单击开始选择程序-附件-通讯-超级终端,单击超级终端打开超级终端程序,选择连接端口(COM1,COM2)单击确定 在下面窗口选择还原为默认值按钮然后单击确定
进入超级终端窗口,Login:admin Password:(没有) 回车
2.1.创建VLAN 在Select menu option:输入bridge回车 在Select menu option (bridge):输入vlan回车 在Select menu option (bridge/vlan): 输入create回车 在Select VLAN ID (2-2047)[2]: 输入2 在Enter VLAN name [VLAN 2]: 输入tech(可根据需要起名字)] 重复以上步骤可创建多个VLAN 2.2.查看VLAN信息 在Select menu option (bridge/vlan): 输入summary 回车 在Select VLAN ID (1,2,all)[all]: 输入ALL回车 可以看到VLAN的摘要信息 2. 3在VLAN中添加端口 在Select menu option (bridge/vlan): 输入modify回车 在Select menu option (bridge/vlan/modify): 输入addport回车 在Select VLAN ID (1,2)[1]: 输入2回车 在Select slot (1-5): 输入1回车 在Select bridge port (1-8,all) [all]: 输入1回车 在Enter tag type (untagged,tagged): 输入untagged回车 注:如果此端口用于连接交换机或同属于两个以上的VLAN选择tagged,如此端口用于连接服务器及工作站且只属于一个VLAN(服务
思科路由器基本配置与常用配置命令(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 ]
H3C交换机常用配置命令 一、用户配置
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 ;查看端口信息
华为的交换机基本配置命令很多,在此,yjbys小编为大家带来的是最新交换机的配置命令,希望对同学们考试有帮助! 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} 配置端口平接扭接 [Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式 [Quidway-Ethernet1/0/1]undo shutdown 激活端口 [Quidway-Ethernet1/0/2]quit 退出系统视图 5、链路聚合配置