中兴交换机基本配置命令

数通

zte

基本配置命令

网络管理
snmp配置 con t 进入配置模式
snmp-server access-list {ipv4|ipv6} 应用已配置的ACL来控制通过SNMP协议访问系统的主机地址
no snmp-server access-list {ipv4|ipv6} 取消控制ACL的控制
snmp-server community 设置SNMP报文团体串
no snmp-sever community 删除SNMP报文团体串
snmp-server enable inform [] 打开代理发送通知的开关并设置代理能发送的通知类型,类型可以是BGP、OSPF、RMON、SNMP、STALARM、VPN、FTP-TFTP、CONFIG等其中之一
no snmp-server enable inform [] 关闭代理发送通知的开关
snmp-server enable trap [] 打开代理发送Trap的开关并设置代理能发送的Trap类型,类型可以是BGP、OSPF、RMON、SNMP、STALARM、VPN、FTP-TFTP、CONFIG等其中之一
no snmp-server enable trap [] 关闭代理发送Trap的开关
snmp-server host [ vrf ]{|}{{trap|inform}} version {1|2c|3 }[{[udp-port], 设置接收SNMP通知的目的地,snmp-server host命令需要与snmp-server enable 命令协同使用
no snmp-server host [ vrf ]{|}{{[trap | inform]} 删除接收SNMP通知的主机
snmp-server version {v1 | v2c | v3} enable 开启SNMPv1、SNMPv2c、SNMPv3版本功能,默认情况下三个版本都是disable
no snmp version {v1 | v2c | v3} 关闭指定SNMP版本功能
exit 退出配置模式
show snmp config 查看snmp配置
syslog con t
syslog level 在全局配置模式下设置告警上报给SYSLOG Server的级别,取值范围1~8,默认值是NOTIFICATIONS
syslog-server source [ipv4 | ipv6]|[interface] 配置上报SYSLOG报文的源地址或端口,支持IPv4和IPv6
syslog-server host [|vrf][fport ][lport lport>]{[alarmlog],[cmdlog],[debugmsg],[servicelog],[braslog],[natlog]} 设置SYSLOG的参数,包括SYSLOG Server的IP地址、端口号、客户端的端口号,默认端口号514
no syslog-server host 删除host ip
exit 退出配置模式
show logging configuration 查看syslog配置
端口镜像 con t
no span session 添加一个端口镜像会话条目
span session 删除一个端口镜像会话条目,会删除源和目的端口
default destination interface 向会话条目添加默认目的端口
no default destination interface 删除默认目的端口
exit
span apply session source interface [direction {both|rx|tx|cpu-both |cpu-rx|cpu-tx }] 将指定会话绑定到源接口,可以配置多个源端口
no span apply session source interface [direction {both|rx|tx|cpu-both |cpu-rx|cpu-tx 删除会话源端口
exit 退出配置模式
show span session 查看端口镜像配置
时钟和时钟同步 con t 进入配置模式
ntp enable |disable 启用或关闭NTP功能
ntp source ipv4 |ipv6 |interface 配置NTP协议发出报文的源IP地址或端口
show ntp status 查看NTP的状态属性,synchronized状态为同步状态
mac配置 con t 进入配置模式
mac 进入mac配置
add permanent interface < interface-name>{ all-owner-vlan | vlan< vlan-id>} 添加永久MAC地址
delete {[mac ], [interface ],[vlan <1-4094>]} 删除MAC地址
aging-time 设置MAC的老化时间,使用no aging-time 恢复为默认
limit-maximum [interface 配置MAC地址学习数目限制,使用no limit-maximum 恢复为默认
limit-policy {drop{vlan| interface}| forward {vlan| interface}|shutdown} 配置MAC超限后的策略
to-permanent <interface-name> enable |disable 将动态的ARP条目转化为永久类型的条目。转化后的永久ARP条目可以写盘重启,配置不消失。disable则是取消配置
auto-write enable interval <time> 配置允许写入文件和时间间隔后,每到时间间隔都将当前的topermanent MAC条目写入文件。设备重启后,会将这些MAC条目从文件中恢复。定时保存时间不宜设置太短,以防反复在写文件。注意线卡拔掉后,如果在线卡插上前,写入时间到来,会把topermanent MAC文件中这块线卡的MAC删除,在这种场景下也不建议保存时间设置太短,线卡重新插上重新学习后,如果接口使能了topermanent功能,仍然可以将重新学习的MAC转换为永久。
filter { source| both| destination} vlan< vlan-id> 设置MAC地址过滤
exit 退出mac配置
show mac table 查看mac地址表
show running-config mac 查看mac相关配置
con t
以太网端口配置 interface < interface-name> 进入端口配置模式
negotiation {auto|auto disable} 进入端口配置模式
speed {10| 100 | 1000|10000} 设置以太网端口速率
jumbo-frame enable 开启端口巨帧功能
exit
con t
ACL配置 ipv4-access-list 配置ACL列表
no ipv4-access-list 删除ACL列表
rule []{permit | deny}}{ source []| any}][ time-range ]
rule []{permit | deny} tcp|udp { source []| any }[oper]{ destination []| any }[oper ][establish][fin][psh][ack][rst][syn][urg][{tos | precedence | dscp }][fragments][ time-range ] 配置基于协议的acl规则
no rule {| all } 删除ACL规则/所有规则
exit 退出acl-list配置
ipv4-access-group {interface }{ingress | egress} 全局配置模式下,在接口上绑定ACL
no ipv4-access-group {ingress | egress} 全局配置模式下,在接口上删除已绑定的ACL
show running-config ipv4-access-lists 查看acl配置
show ipv4-access-groups 查看acl绑定关系
con t 进入配置模式
radius配置 radius authentication-group
nas-ip-address 设置RADIUS服务器的NAS-IP,对应协议包的NAS-IP字段和协议包的源IP地址
no nas-ip-address 删除nas-ip
server 设置RADIUS服务器及其参数,包括服务器编号、服务器IP地址
no server 删除server
exit
show running-config radius 查看radius配置
con t
AAA aaa-authentication-template 选择认证模板,并进入认证模式下,number范围为:1~2128
aaa-authentication-type {none|local|radius|local-radius|radius-local|radius-none|local-tacacs|tacacs|tacacs-local|tacac-none| diameter| radius-tacacs| tacacs-radius} 在认证模式下,配置认证模板下的认证方式
authentication-radius-group 在认证模式下,配置RADIUS认证组,前提RADIUS组已配置,Group name范围为:1~31 characters
authentication-tacacs-group 在认证模式下,配置TACACS认证组,前提TACACS组已配置
exit
aaa-authorization-template 选择授权模板,进入授权模式。number范围为1~2128
aaa-authorization-type {none|local|radius|local-radius|radius-local|local-tacacs|tacacs|tacacs-local|radius-tacacs|tacacs-radius} 授权模式,配置授权模板下的授权方式;其中tacacs和radius为命令授权方式的授权
authentication-radius-group 在授权模式下,配置RADIUS授权组,前提RADIUS组已配置,Group name范围为:1~31 characters
authorization-tacacs-group 授权模式,配置TACACS授权组,前提TACACS组已存在
exit
exit 退出配置模式
show running-config aaa 查看 AAA配置
TACACS con t
tacacs enable |disable 默认关闭的
tacacs-server timeout 在全局配置模式下配置TACACS+全局超时时长,即配置TACACS+客户端和服务器连接的超时时长,单位:秒,有效值1~1000,默认5秒
tacacs-server deadtime 全局模式下配置,TACACS+服务器的deadtime时长,即服务器timeout后进入dead状态的保持时长;单位分钟,范围0~65535,默认值5
tacacs-server packet 配置TACACS+协议最大报文长度,范围1024~4096,单位:字节,默认1024字节
tacacs-client 在全局配置模式下配置TACACS+客户端IP地址
tacacs-server host >] 在全局配置模式下配置一个或多个IPv4服务器
tacplus group-server 在全局配置模式下配置一个服务器组
server [vrf ][port] 向组中添加IPv4服务器
exit 退出tacplus group-server配置
exit
show running-config tacplus all 查看当前TACACS配置
用户管理配置 con t
system-user 进入用户管理配置模块
authentication-template <1-128> 配置用户管理模块认证模板,进入该模板的配置模式
bind aaa-authentication-template <2001-2128> 在用户管理模块认证模板配置模式下,绑定AAA的认证模板
exit
authorization-template <1-128> 配置用户管理模块授权模板,进入该模板的配置模式
bind aaa-authorization-template <2001-2128> 在用户管理模块授权模板配置模式下,绑定AAA的授权模板
exit
user-default 缺省用户名密码配置,非本地认证时需要配置
bind authentication-template <1-128>
bind authorization-template <1-128>
exit
user-name
bind authentication-template <1-128> 绑定adm_mgr认证模板
bind authorization-template <1-128> 绑定adm_mgr授权模板
password {| encrypted } 配置密码
exit 退出用户名配置
no user-name 删除某个用户
exit 退出system-user配置
show running-config system-user 查看system-user用户管理模块配置
dot1x show running-config dot1x 查看dot1x配置
con t
dot1x 进入DOT1X配置模式
domain 进入DOT1X-DOMAIN配置模式,domain-id取值1~512,no 命令删除domain
mode { dot1x | dot1x-relay }{ enable | disable} 在DOT1X-DOMAIN配置模式下打开/关闭DOT1X认证或中继
aaa-authentic-template <1-2128> 在DOT1X-DOMAIN配置模式下绑定AAA认证模板,用no 命令删除绑定
aaa-accounting-template <1-2128> 在DOT1X-DOMAIN配置模式下绑定AAA计费模板,用no 命令删除绑定
exit 退出domain配置
interface
bind {vlan domain| domain< domain-id >} 在DOT1X接口配置模式下绑定domain或vlan和domain,domain-id取值1~512
no bind vlan 0 删除端口dot1x绑定
exit 退出端口认证配置
exit 退出配置模式
show dot1x 查看DOT1X参数信息
show dot1x domain 查看DOT1X模块DOMAIN配置信息
show dot1x interface 查看DOT1X模块端口绑定信息
端口环回检测 loop-detect interface enable |disable 开启或关闭一个端口的环回检测功能
loop-detect portstate { block | normal | protect}< port_name> 设置环回端口状态,如果不设置,默认为normal
loop-detect interface < port_name> vlan { enable | disable} 配置端口所属VLAN的环回检测
loop-detect reopen-time < 1~16777216> 默认10分钟
vlan配置 show running-config switchvlan 查看交换机vlan配置信息
con t
switchvlan-configuration 进入交换机VLAN配置模式
vlan 创建vlan
switchport pvid 该命令在指定的VLAN上配置端口,可以批量配置。 pvid配置对于所有端口有效,tag端口配置对于trunk/hybrid模式的端口有效,untag端口配置对于hybrid端口有效,模式不正确的情况提示用户相应出错信息。
no switchport pvid 批量删除vlan配置信息
exit
interface 进入交换机VLAN端口配置模式
switchport mode {access|hybrid|trunk} 设置端口的VLAN链路模式。缺省模式为access
switchport access vlan 将access端口加入到VLAN中
switchport trunk native vlan 配置trunk端口的native VLAN
switchport trunk vlan 将trunk端口加入到VLAN中
switchport hybrid native vlan 配置hybrid端口的native VLAN
no switchport hybrid native vlan 删除native VLAN
no switchport trunk vlan 删除 VLAN
exit 退出端口vlan配置
exit 退出switchvlan-configuration
exit
lacp配置 con t
interface 创建聚合口
exit
show running-config lacp
lacp 进入lacp配置模式
lacp minimum-member < member_number> 配置全局的SmartGroup协议UP阈值。使用no 命令恢复成默认配置,缺省配置是1
interface
lacp mode {802.3ad | on} 设置链路聚合组的聚合模式。使用no 命令恢复成默认配置,缺省配置是静态trunk模式(on模式)。
lacp fast respond 配置LACP协商快速应答模式。使用no命令恢复成普通模式
lacp timeout {long | short} 配置LACP的成员端口长短超时。使用no命令恢复为长超时。
interface
smartgroup mode {passive | active | on} 添加接口到链路聚合组,并设置接口的链路聚合模式。使用no 命令把相应接口从链路聚合组删除。
exit
show lacp internal 查看lacp状态信息
静态路由配置 show running-config static 查看静态路由配置
con t
ip route a.b.c.d x.x.x.x interface 配置带下一条出接口的静态路由
ospf配置 con t
router ospf
area
network
no network
exit
router-id 配置ospf id,no router-id删除
maximum-paths 配置等价路由
redistribute 路由重分布,no命令删除
interface
network {broadcast|non-broadcast|point-to-point|point-to-multipoint [non-broadcast]} 设置接口网络类型。
no network 删除端口网络类型恢复到默认模式
exit
exit
show ip ospf 查看OSPF协议的概要信息以及各个OSPF区域的概要信息
show ip ospf neighbor
show ip forwarding route ospf 查看OSPF邻居的信息
dhcp con t
ip pool 配置IP地址池,DHCP服务器将其中的地址分配给客户主机
range 置IP地址池中的地址范围
exclude [] 配置IP地址池中的不参与自动分配的地址
assign-policy {forward | backward} 命令用于配置地址分配策略,默认forward
exit
ip dhcp pool
ip-pool
dns-server
default-router
exit
ip dhcp policy < policy-name>< priority> 绑定指定的DHCP Pool到DHCP Policy
dhcp-pool
exit
ip dhcp relay server group 配置接口的外部DHCP Server所在的组,dhcp中继模式需要配置
server
dhcp 进入dhcp配置模块
enable 启用内置的DHCP进程
ramble 打开DHCP漫游开关
interface
mode [client | proxy | relay | server ] 启用接口的DHCP工作模式,选择关键词Server来配置设备成为DHCP Server
relay agent 中继relay模式
relay server group 中继relay组
policy server模式关联的policy
show ip dhcp configuration 查看dhcp配置信息
show ip local pool 查看配置的本地地址池信息
show ip dhcp server user [interface[ total-count]]|[ total-count] 查看DHCP Server的当前在线用户信息
show ip dhcp relay user [interface[ total-count]]|[ total-count]
show running-config-interface 查看配置了DHCP Server/Relay的接口的配置信息
show ip dhcp pool 查看DHCP Pool信息
show ip dhcp policy 查看DHCP Policy信息
show running-config dhcp 查看dhcp配置信息
stp con t
spantree 从全局配置模式下进入STP配置模式
enable |disable 全局开启/关闭STP功能
mode {sstp | rstp | mstp} 配置生成树协议的当前模式
interface 进入到STP接口配置模式下
bpdu-guard {enable | disable} 配置端口BPDU保护
guard {loop | root} instance {} 配置端口的STP保护类型,环回保护 或根端口保护
edged-port {enable | disable} 配置STP协议端口为边缘端口
exit 退出端口stp配置
exit
show spantree instance 0 查看stp状态
show spantree statistics <interface-name> 查看一个端口的stp信息

一般巡检检查命令

操作项目 操作命令
显示系统软件版本 show version
显示系统热补丁状况 show patch
显示系统boot版本 show bootrom
显示当前配置文件 show running-config
显示CPU利用率 show processor
路由信息记录 show ip forwarding route
显示路由条目类型数量 show ip protocol routing summary
端口流量统计 show interface
三层接口信息 show ip interface brief
MAC转发表信息 show mac table
ARP表信息 show arp
告警信息记录 show logging alarm
显示flash使用状态 dir
OSPF邻居状态 show ip ospf neighbor
显示MPLS转发表 show mpls forwarding-table
显示系统时间 show clock
显示系统温度 show temperature
显示堆叠配置 Show vsc config
显示堆叠状态 Show vsc information
本文链接:https://www.orcy.net.cn/4283.html,转载请附上原文出处链接

暂无评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注