华为交换机和中兴交换机查看snmp配置情况和端口镜像配置情况的命令分别是啥

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为交换机和中兴交换机查看snmp配置情况和端口镜像配置情况的命令分别是啥相关的知识,希望对你有一定的参考价值。

是查看配置情况的,不是配置的

参考技术A 华为2100系列交换机,配置SNMP

1、 snmp-agent community read abcd

\\设置团体名为abcd,属性为只读。

2、 snmp-agent target-host trap address udp-domain 192.168.100.80 params securityname abcd

\\设置管理机的IP地址为192.168.100.80,而且“securityname”(即团体名)要与上面的设置一致。

3、 snmp-agent sys-info version v1 | v2c | v3 * | all

\\启用不同版本的snmp,这里可以选alls

4、 snmp trap enable

\\启动snmp的trap功能。追问

我的意思是别人已经配置好了snmp,我只想查看他的配置信息情况

怎么给交换机端口配置固定IP的,具体的命令是啥?

我很想知道中兴交换机怎么配置固定IP的,进入超级管理员模式后怎么操作?具体的命令是什么?

参考技术A 简单就是 sw(config)#interface vlan1
#ip address ip地址 子网掩码
# no shutdown
这就行了 。没别的!
参考技术B 不明白中兴的
cisco的配置是
sw(config)#interface vlan1
sw(vlan)#ip address ip地址 子网掩码
sw(vlan)# no shutdown
参考技术C <Sysname>display interface GigabitEthernet1/1
GigabitEthernet1/1 current state : UP
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 000f-e214-aa69
Description: to_GGSN3-S1-P1(Gi)
The Maximum Transmit Unit is 1500
Media type is optical fiber, loopback not set
Port hardware type is 1000_BASE_SX_MMF
1000Mbps-speed mode, full-duplex mode
Link speed type is force link, link duplex type is force link
Flow-control is not supported
The Maximum Frame Length is 1536
Allow jumbo frame to pass
PVID: 30
Port link-type: access
Tagged VLAN ID : none
Untagged VLAN ID : 30
Last 5 minutes output: 1037 packets/sec 477064 bytes/sec
Last 5 minutes input: 916 packets/sec 372706 bytes/sec
input: 2143716912 packets, 812336171573 bytes
931 broadcasts, 0 multicasts
input: 0 input errors, 0 runts, 0 giants, 0 throttles, 0 CRC
0 frame, - overruns, - aborts, - ignored, - parity errors
Output: 2360109251 packets, 1094809872937 bytes
4561 broadcasts, 42144 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
- aborts, 0 deferred, 0 collisions, 0 late collisions
- lost carrier, - no carrier
参考技术D 利用交换机的Port-Security功能实现
  以下是一个配置实例:

  switch#config t

  switch(config)#int f0/1

  switch(config-if)#switchport mode access

  //设置交换机的端口模式为access模式,注意缺省是dynamic

  //dynam ic模式下是不能使用Port-security功能

  switch(config-if)#switchport port-security

  //打开port-security功能

  switch(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx

  //xxxx.xxxx.xxxx就是你要关联的mac地址

  switch(config-if)#switchport port-security maximum 1

  //其实缺省就是1

  switch(config-if)#switchport port-security violation shutdown

  //如果违反规则,就shutdown端口

  //这个时候你show int f0/1的时候就会看到接口是err-disable的

  附:

  switchport port-security命令语法

  Switch(config-if)#switchport port-security ?

  aging Port-security aging commands

  mac-address Secure mac address

  //设置安全MAC地址

  maximum Max secure addresses

  //设置最大的安全MAC地址的数量,缺省是1

  violation Security violation mode

  //设置违反端口安全规则后的工作,缺省是shutdown

以上是关于华为交换机和中兴交换机查看snmp配置情况和端口镜像配置情况的命令分别是啥的主要内容,如果未能解决你的问题,请参考以下文章

snmp配置

cacti华为交换机不显示端口该怎么解决

4、华为交换机snmp相关配置

华为交换机端口镜像配置

华为的snmp软件可以管控到博达的交换机吗

为啥snmp采集到的华为端口速率不准确