文档视界 最新最全的文档下载
当前位置:文档视界 › 交换机命令详解

交换机命令详解

交换机命令详解
交换机命令详解

交换机命令详解

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

补充:

3层交换机多出啲就是路由能力,体现在vlande互相通信功能和端口de路由能力,下面介绍:

开启路由功能:ip routing

进入vlan 配置网段网关与路由配置接口相同

interface vlan 1

ip 192.168.1.1 255.255.255.0

路由配置与路由器配置相同只是把接口换为VLAN+VLAN号,开启接口路由功能,进入接口配置:no swichport

思科交换机命令大全

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

H3C交换机配置命令

H3C交换机配置命令 创建汇聚组link-aggregation group mode{manual / static} 加入端口Port link-aggregation group 汇聚接口配置interface Bridge-Aggregation 1 description ==TO-IDF-1== port link-type trunk undo port trunk permit vlan 1 port trunk permit vlan 21 100 (1)采用手工聚合方式 # 创建汇聚组1。 [H3C] link-aggregation group 1 mode manual # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3

[H3C-Ethernet2/1/3] port link-aggregation group 1 # 当聚合组端口序号连续时,可以直接把多个端口聚成一组,组号由系统自行分 配。 [H3C] link-aggregation ethernet2/1/1 to ethernet2/1/3 both (2)采用静态LACP聚合方式 # 创建静态汇聚组1。 [H3C] link-aggregation group 1 mode static # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] port link-aggregation group 1 (3)采用动态LACP聚合方式 # 开启以太网端口Ethernet2/1/1至Ethernet2/1/3的LACP协议。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] lacp enable [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] lacp enable [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] lacp enable 设置以太网端口的速率speed { 10 | 100 | 1000 | 10000 | auto } 设置以太网端口连接的网线的类型mdi { across | auto | normal }

H3C 交换机常用配置命令

H3C 交换机常用配置命令 1、配置主机名 [H3C]systemname H3C 2、配置console口密码 #进入系统视图。 system-view #进入AUX用户界面视图。 [H3C] user-interface aux 0 #设置通过Console口登录交换机的用户进行Password认证。 [H3C-ui-aux0] authentication-mode password #设置用户的认证口令为加密方式,口令为123456。 [H3C-ui-aux0] set authentication password cipher 123456 #设置从AUX用户界面登录后可以访问的命令级别为2级。 [H3C-ui-aux0] user privilege level 2 3、配置Telnet #进入系统视图。 system-view #进入VTY0用户界面视图。 [H3C] user-interface vty 0 #设置通过VTY0口登录交换机的用户进行Password认证。 [H3C-ui-vty0] authentication-mode password #设置用户的认证口令为密码方式,口令为123456。 [H3C-ui-vty0] set authentication password cipher 123456 #设置从VTY0用户界面登录后可以访问的命令级别为2级。 [H3C-ui-vty0] user privilege level 2 #设置VTY0用户界面支持Telnet协议。 [H3C-ui-vty0] protocol inbound telnet 4、配置交换机VLAN 1管理地址 system-view [H3C] interface vlan-interface 1 [H3C-VLAN-interface1] ip address 192.168.0.129 255.255.255.0 5、配置交换机网关地址 [H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 6、配置HTTP服务 [H3C] local-user admin #创建http用户 [H3C-luser-admin] service-type telnet [H3C-luser-admin] authorization-attribute level 3

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}

H3C 3100简单配置命令

H3C交换机简单配置命令 1、配置主机名 [H3C]systemname H3C 2、配置console口密码 # 进入系统视图。 system-view # 进入AUX用户界面视图。 [H3C] user-interface aux 0 # 设置通过Console口登录交换机的用户进行Password认证。[H3C-ui-aux0] authentication-mode password # 设置用户的认证口令为加密方式,口令为123456。 [H3C-ui-aux0] set authentication password cipher 123456 # 设置从AUX用户界面登录后可以访问的命令级别为2级。[H3C-ui-aux0] user privilege level 2 3、配置Telnet # 进入系统视图。 system-view # 进入VTY0用户界面视图。 [H3C] user-interface vty 0

# 设置通过VTY0口登录交换机的用户进行Password认证。 [H3C-ui-vty0] authentication-mode password # 设置用户的认证口令为密码方式,口令为123456。 [H3C-ui-vty0] set authentication password cipher 123456 # 设置从VTY0用户界面登录后可以访问的命令级别为2级。 [H3C-ui-vty0] user privilege level 2 # 设置VTY0用户界面支持Telnet协议。 [H3C-ui-vty0] protocol inbound telnet 4、配置交换机VLAN 1 管理地址 system-view [H3C] interface vlan-interface 1 [H3C-VLAN-interface1] ip address 192.168.0.129 255.255.255.0 5、配置交换机网关地址 [H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 6、配置HTTP服务 [H3C] local-user admin #创建http 用户 [H3C-luser-admin] service-type telnet [H3C-luser-admin] authorization-attribute level 3

思科交换机命令大全

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

H3C交换机常用配置命令

H3C交换机常用配置命令 一、用户配置 system-view [H3C]super password H3C 设置用户分级密码 [H3C]undo super password 删除用户分级密码 [H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin [H3C]undo localuser bigheap 删除Web网管用户 [H3C]user-interface aux 0 只支持0 [H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-interface vty 0 只支持0和1 [H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-vty]undo idle-timeout 恢复默认值 [H3C-vty]set authentication password 123456 设置telnet密码,必须设置 [H3C-vty]undo set authentication password 取消密码 [H3C]display users 显示用户 [H3C]display user-interface 显示用户界面状态 二、系统IP设置 [H3C]vlan 20 [H3C]management-vlan 20 [H3C]interface vlan-interface 20 创建并进入管理VLAN [H3C]undo interface vlan-interface 20 删除管理VLAN接口 [H3C-Vlan-interface20]ip address 配置管理VLAN接口静态IP地址(缺省为

配置H3C交换机常用命令

H3C交换机常用步骤和命令 1.进入命令行sys 2.给交换机命名: sysname fuwuqi2 3.创建所属vlan: vlan 114 4.描述vlan 114 及分配情况: description fuwuqi2 5.把24个口划分到vlan114中: port e 1/0/1 to e 1/0/24 6.退出: quit 7.进入vlan 114: vlan 114 8.查看千兆口信息: dis int g 9.把25,26两个千兆口加到vlan 114中: port g 1/0/25 to g 1/0/26 10.退出: quit 11.进入vlan114 : int vlan 114 12.查看本接口信息dis this 13.退出quit 14.进入vlan 114虚接口下(可以配置管理地址):interface vlan-interface 114 15.配置管理地址ip address 111.115.76.98 27 16.查看信息dis this 17.退出quit 18.配置默认路由ip route-static 0.0.0.0 0.0.0.0 111.115.76.97(分别是目 的地址子网掩码网关) 19.建立一个登陆交换机的用户名local-user fuwuqi2 20.设置登陆密码password cipher fuwuqi2_2918 21.设置用户管理等级0-3,3是超级管理员authorization-attribute level 3 22.设置用“telnet”方式登陆service-type telnet 23.退出quit 24.打开telnet服务telnet server enable 25.设置0-5共6个用户可同时远程登陆user-interface vty 0 5 26.设置用户登陆方式,scheme是用户名+密码authentication-mode scheme 27.查看当前配置信息dis this 28.查看当前所有配置dis cur 29.保存配置信息save 30.查看交换机上有哪些VLAN dis vlan 31.查看各交换机端口状态及vlan情况: dis brief int 32.将某个端口加入到某个vlan中:sys Vlan 111 Port eth 1/0/1 33.查看当前各端口流量情况: dis int 34.查看交换机上mac地址:dis mac-address 物理地址 35.查看CPU占用:dis cup 36.静态IP与MAC地址绑定(不与端口绑定): sys arp static 192.168.11.204 0005-5d02-f2b3 查询:dis arp 192.168.11.204 取消:undo arp 192.168.11.204

(完整版)华为交换机常用命令大全

华为交换机常用配置大全 2010-02-27

目录 一、基础配置举例 (3) 1.1配置文件处理 (3) 1.2配置交换机远程管理 (3) 二、以太网配置举例 (5) 2.1配置端口属性 (5) 2.2配置链路聚合 (7) 2.3配置VLAN (8) 9.配置MSTP (15) 三、可靠性 (22) 3.1配置基于主备份VRRP (22) 3.2配置基于负载分担VRRP (23) 四、IP路由 (25) 4.1配置静态路由 (25) 4.2配置动态路由 (26) 五、IP业务 (28) 5.1配置虚接口IP地址 (28) 5.2DHCP设置 (29) 5.3 ACL 举例 (32) 六、IGMP (33)

七、QOS (34) 八、安全性 (35) 8.1接口安全 (35) 九、网络管理 (36) 9.1简单网络管理协议配置 (36) 十、设备管理 (38) 10.1测试命令 (38) 一、基础配置举例 1.1配置文件处理 导入配置文件 tftp x.x.x.x get vrpcfg.zip vrpcfg.zip 导出配置文件 tftp x.x.x.x put vrpcfg.zip vrpcfg.zip 1.2配置交换机远程管理 aaa 方式 system-view aaa local-user huawei password simple huawei local-user huawei service-type telnet

local-user huawei priority level 3 quit user-interface vty 0 4 authentication-mode aaa quit 没有密码和使用密码认证同上

华三交换机命令大全

一、 交换机命令 system 进入使能模式 password: ~~~~~~~~~~ [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 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关 [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-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} 配置端口MDI/MDIX状态平接或扭接 [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式 [Quidway-Ethernet0/1]shutdown 关闭/重起接口 [Quidway-Ethernet0/2]quit 退出系统视图 [Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式 [Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口 [Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN

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

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

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

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

(完整版)锐捷交换机命令大全

【第一部分】交换机支持的命令: 1.交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 2.交换机口令设置: 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 ;返回命令 3.交换机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模式

思科交换机配置维护手册

思科交换机配置维护手册

目录

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

H3C交换机常用命令

H3C交换机配置命令大全 ##################################################################### 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 打开以太网端口

思科路由器命令大全详解

一 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

H3C交换机配置命令手册

目录 (2)配置静态路由.............................................................. H3C交换机配置命令手册: 交换机端口链路类型介绍: 1. Access类型的端口只能属于1个VLAN, —般用于连接计算机的端口; 2. Trunk类型的端口可以属于多个VLAN,可以接收和发送多个VLAN的报文,一般用于交换机之间连接的端口; 3. Hybrid类型的端口可以属于多个VLAN,可以接收和发送多个VLAN的报文,可以用于交换机 之间连接,也可以用于连接用户的计算机。 认证方式为Scheme时Telnet登录方式的配置 telnet server enable

# local-user guest service-type telnet level 3 password simple 123456 # Vlan 的创建及描述 # system-view #进入配置选项命令行 [SwitchA] vlan 100 #创建当前VLAN [SwitchA-vlan100] description Dept1 #当前VLAN 的描述 [SwitchA-vlan100] port GigabitEthernet 1 /0/1 #将当前端口加入到对就的VLAN 下面 将端口配置为Trunk 端口,并允许VLAN10 和VLAN20 通过[SwitchA]interface GigabitEthernet 1 /1 #进入当前端口 [SwitchA-GigabitEthernet1 /1]port link-type trunk #将当前端口设为中继 [SwitchA-GigabitEthernet1 /1]port trunk permit vlan all #允许所有VLAN 通过 [SwitchA-vlan100] quit #退出 DHCP典型配制举例: # [SwitchA] dhcp server ip-pool 0 #建立DHCP组 #地址池范围 [SwitchA-dhcp-pool-0] domain-name #WINS 服务器地址 #DNS服务器地址 [SwitchA-dhcp-pool-O] #从DNS 的配制#不参与的地址分配的地址(保留地址)[SwitchA] dhcp server detect # 配置伪服务器检测功能。 [SwitchA-dhcp-pool-0] quit #退出配置服务选项 [SwitchA] dhcp enable #启用 DHCP服务 DHCP 中继代理 #使能DHCP服务。 [SwitchB] dhcp enable #配置DHCP服务器的地址

华三交换机命令大全

华三交换机命令大全 交换机命令 system 进入使能模式 password: [Quidway]super password 修改特权用户密码 [Quidway]sys name 交换机命名 [Quidway]i nteface ether net 0/1 进入接口视图[Quidway]i nteface via n x 进入接口视图

[Quidway-Via n-in terface x]ip address 10.65.1.1 255.255.0.0 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关 [Quidway]user- in terface vty 0 4 [S3026-ui-vty0-4]authe nticatio n-m ode password [S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3 [Quidway-EthernetO/1]duplex {half|full|auto} 配置端口双工工作状态[Quidway-EthernetO/1]speed {10|100|auto} 配置端口工作速率 [Quidway-EthernetO/1]flow-co ntrol 配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口 MDI/MDIX状态平接 或扭接 [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式 [Quidway-Ethernet0/1]shutdow n 关闭/重起接口 [Quidway-Ethernet0/2]quit

思科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 ;返回命令

相关文档