华为S5700交换配置命令
Sava 配置完交换机后保存当前配置命令
System-view 进入系统视图命令
Display current-configuration 查询当前配置

Console口进入用户界面
User-interface console 0 进入第0个console用户界面
Authentication-mode passwd 配置从console口登入交换机模式为密码模式
Set authentication password cipher admin@123 配置从console口登入交换机的密码

user-interface console 0  由系统视图进入到控制台视图
idle-timeout 30 0 设置空间时间为30分钟
idle-timeout命令后面可以跟两个参数,第一个表示分钟数(minutes),第二个表示秒数(seconds)。其中分钟数,设备默认值为10minutes(分钟),秒数,设备默认值为0。

Vlan 10 创建一个vlan
Interface meth 0/0/1 进入交换机的第一个管理网口
ip address 192.168.1.10 255.255.255.0 设置网口ip及掩码

int gigabitethernet 0/0/1 进入第一个业务网口
port link-type access trunk hybrid 配置三个接口模式
port default vlan 10 把此接口加入vlan
port access trunk hybrid allow-pass vlan 10 20 30 设置此接口可以通过的vlan

clear configuration int gig 0/0/1
undo shutdown 清除某个接口的配置

reset saved-configuration   擦除存储设备中路由器配置文件
Y
Reboot   重启交换机
N
Y恢复出厂设置

Dhcp enable 开启dhcp服务
Ip pool hjl 定义地址池名称
Netword 192.168.1.0 mask 24 设置网段及掩码位数
Gateway-list 192.168.1.1 定义网关
Dns-list 202.106.0.20 定义dns地址
Lease day 1 hour 1 租约时间 默认不配置为1天

telnet server enable 开启telent服务
local-user hjl passwd cipher 123456 设置用户名 密码
local-user hjl privilege level 3 设置用户等级
password simple *** 设置密码为简单明文
service-type telnet 连接类型为telnet
quit
user-interface vty 0 4 定义最大用户接入数
authentication-mode aaa 认证模式为组合模式
quit

单臂路由配置
Int Gigabitethernet 0/0/0.1 进入子接口
ip address 192.168.20.254 24  配置网关地址
Dot1q termination vid vlan 20 封装vlan号
Arp broadcast enable 开启arp广播功能
Int Gigabitethernet 0/0/0.2 进入子接口
ip address 192.168.30.254 24  配置网关地址
Dot1q termination vid vlan 30 封装vlan号
Arp broadcast enable 开启arp广播功能
将交换机连接路由的接口设置为trunk模式
Port trunk allow-pass vlan 20 30 允许vlan20 30 通过

交换机GVRP配置 实现交换机之间互相学习
进入交换机 gvrp 开启功能
Int Gigabitethernet 0/0/0
Port link-type trunk 进入接口 连接交换机的接口都为trunk模式

华为交换机常用命令:
1、display current-configuration //显示当前配置
2、display interface GigabitEthernet 1/1/4 //显示接口信息
3、display packet-filter interface GigabitEthernet 1/1/4 //显示接口acl应用信息
4、display acl all //显示所有acl设置 3900系列交换机
5、display acl config all //显示所有acl设置 6500系列交换机
6、display arp 10.78.4.1 //显示该ip地址的mac地址,所接交换机的端口位置
7、display cpu //显示cpu信息
8、system-view //进入系统图(配置交换机),等于config t 命令
9、acl number 5000 //在system-view命令后使用,进入acl配置状态
10、rule 0 deny 0806 ffff 24 0a4e0401 ffffffff 40 //在上面的命令后使用,,acl 配置例子
11、rule 1 permit 0806 ffff 24 000fe218ded7 fffffffff 34 //在上面的命令后使用,acl配置例子
12、interface GigabitEthernet 1/0/9 //在system-view命令后使用,进入接口配置状态
13、[86ZX-S6503-GigabitEthernet1/0/9]qos //在上面的命令后使用,进入接口qos配置
14、[86ZX-S6503-qosb-GigabitEthernet1/0/9]packet-filter inbound user-group 5000 //在上面的命令后使用,在接口上应用进站的acl
15、[Build4-2_S3928TP-GigabitEthernet1/1/4]packet-filter outbound user-group 5001 //在接口上应用出站的acl
16、undo acl number 5000 //取消acl number 5000 的设置
17、ip route-static 0.0.0.0 0.0.0.0 10.78.1.1 preference 60 //设置路由
18、reset counters interface Ethernet 1/0/14 //重置接口信息

华为路由器常用命令
[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 <interface_type interface_num>  ;指定镜像端口
[Quidway]port mirror <interface_type interface_num>   ;指定被镜像端口
[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 <mask|mask_len>       ;配置端口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
配置路由时间
clock timezone Beijing add 8
clock datetime 22:20:00 2015-5-11

[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 <area_id> ;配置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 {|any}destination |any}
[operate]

配置ICMP协议的扩展访问列表:
rule {normal|special}{permit|deny}icmp source {|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 0 ;路由器2
[Quidway-serial0]ppp pap local-user q2 password {simple|cipher} hello

chap被验方:
[Quidway]interface serial 0 ;路由器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]sysname router_name 命名路由器(或交换机)
[Quidway]delete 删除Flash ROM中的配置
[Quidway]save 将配置写入Flash ROM
[Quidway]interface serial 0 进入接口配置模式
[Quidway]quit 退出接口模式到系统视图
[Quidway]shutdown/undo shutdown 关闭/重启接口
[Quidway]ip address ip_address subnet_mask 为接口配置IP地址和子网掩码
[Quidway]display version 显示VRP版本号
[Quidway]display current-configuration 显示系统运行配置信息
[Quidway]display interfaces 显示接口配置信息
[Quidway]display ip routing 显示路由表
[Quidway]ping ip_address 测试网络连通性
[Quidway]tracert ip_address 测试数据包从主机到目的地所经过的网关
[Quidway]debug all 打开所有调试信息
[Quidway]undo debug all 关闭所有调试信息
[Quidway]info-center enable 开启调试信息输出功能
[Quidway]info-center console dubugging 将调试信息输出到PC
[Quidway]info-center monitor dubugging 将调试信息输出到Telnet终端或哑终端

display 查看常用命令:
1. display this #查看当前配置过的命令
2. display current-configuration #查看所有配置 (简写 *dis cu* )
3. display ip interface brief #查看接口的ip
4. display interface brief #查看接口配置信息
5. display ip routing-table #查看路由表
6. display mac-address #查看MAC表
7. display arp #查看ARP表
8. display ospf peer brief #查看ospf邻居关系
9. display interface Eth-Trunk #查看链路聚合状态
10. display clock #查看系统当前时间
11. display saved-configuration #显示保存的配置文件
原文链接:https://blog.csdn.net/qq_42871944/article/details/88690159

华为交换基本配置命令--S5700为例相关推荐

  1. 【收藏】华为路由器交换机配置命令大全

    华为路由器交换机配置命令:计算机命令 PCAlogin:root;使用root用户 password:linux;口令是linux #shutdown-hnow;关机 #init0;关机 #logou ...

  2. 华为路由器交换机配置命令

    华为路由器交换机配置命令:计算机命令 PCAlogin:root:使用root用户 password:linux:口令是linux shutdown-hnow:关机 init0:关机 logout:用 ...

  3. 华为防火墙查看日志命令_华为路由器防火墙配置命令总结(上)

    华为路由器防火墙配置命令总结(上) 作者:IT168 2006-06-12 11:35 评论 分享 一.access-list 用于创建访问规则. (1)创建标准访问列表 access-list [ ...

  4. 华为设备Telnet配置命令及注释

    华为设备Telnet配置命令及注释 用户通过Telnet登录设备时,设备上必须配置验证方式,否则用户无法成功登录设备.设备支持不认证.密码认证和AAA认证三种用户界面的验证方式,而其中AAA认证的方式 ...

  5. 华为3COM交换机配置命令详解

    华为3COM交换机配置命令详解 1.配置文件相关命令 [Quidway]display current-configuration         ;显示当前生效的配置 [Quidway]displa ...

  6. 华为交换机linux版本号,Cisco和华为交换机常用配置命令总结

    Cisco和华为交换机常用配置命令总结 一.调试命令 思科: Switch#show  run  显示所有配置命令 Switch#show  ip  inter  brief  显示所有接口状态 Sw ...

  7. 华为修改优先级命令_(完整版)华为设备基本配置命令

    1 / 9 华为设备基本配置命令计算机命令 ~~~~~~~~~~ PCA login: root :使用 root 用户 password: linux :口令是 linux# shutdown -h ...

  8. 华为交换机基本配置命令

      华为交换机基本配置命令 一.单交换机VLAN划分 命令 命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan ...

  9. 华为设备IGMP配置命令

    华为设备IGMP配置命令:使能IP组播路由功能是配置一切组播功能的前提.配置组播协议之前,必须先使能IP组播路由功能 使能公网实例的IGMP命令 [Huawei]multicast routing-e ...

最新文章

  1. linux下gzip
  2. 书生阅读器打开gd文件出错_CAJ论文怎么打开?
  3. linux看网络电影,Linux中看电影、听音乐
  4. 学习笔记:CentOS7学习之二十二: 结构化命令case和for、while循环
  5. jboss ds derby
  6. 今天开始学习QT for sysbiam 1
  7. cookie分号后面没有值_Cookie的属性(cookie的设置、获取和删除)
  8. static关键字作用总结
  9. 王招治计算机财务管理,计算机财务管理——以Excel为分析工具
  10. AQM-8125空气质量监测系统
  11. 一道有关自然对数e的不等式问题
  12. error pulling image configuration: read tcp
  13. 各种标点符号的英文怎么说
  14. 认识DDR SDRAM
  15. Java解析OpenDrive,OpenDrive格式解析
  16. ucweb7.0 for WM/PPC/SP/S60V1/S60V2/S60V3/S60V5/ 平台安装包下载
  17. w7设置双显示器_win7系统设置双显示器的操作方法
  18. 《曼巴精神:科比自传》读书摘记
  19. 新西兰信报:移民规则变化 赴新中国学生人数减少
  20. 项目经理应具备的关键能力

热门文章

  1. 各种经典源码,应有尽有
  2. 学计算机专业的你后悔了吗? 我在BAT工作多年的心路历程
  3. 关于电子电路的一些硬件资料分享
  4. [Java Path Finder][JPF学习笔记][7]JPF输出详细程度设置
  5. 第三方SDK集成库(授权/分享/支付)
  6. STM32CuBeMX(HAL库)实现定时器中断(STM32F407ZGT6)
  7. r语言read_html函数,R语言之read.table函数(2)
  8. 【华为云技术分享】【一统江湖的大前端(8)】matter.js 经典物理
  9. huggingface transformers实战系列-05_文本生成
  10. 几款服务器压力测试软件