来自 Cisco SNMP 的访问列表信息

网络工程 思科 snmp acl
2022-02-12 12:32:41

我在 Cisco 路由器上配置访问列表,并且 SNMP 不显示此信息。

第 1 步:配置访问列表和 [显示访问列表]!
在此处输入图像描述

第 2 步:我使用 CISCO-ACL-MIB 和“iReasoning MIB 浏览器”我已连接到设备,但没有从访问列表中获取输出。
在此处输入图像描述

*我使用 GNS3 和我的配置:

R1#show running-config  
Building configuration...  

Current configuration : 1684 bytes  
!  
version 12.4  
service timestamps debug datetime msec  
service timestamps log datetime msec  
no service password-encryption  
!  
hostname R1  
!  
boot-start-marker  
boot-end-marker  
!  
!  
no aaa new-model  
memory-size iomem 5  
no ip icmp rate-limit unreachable  
!  
ip cef  
no ip domain lookup  
!  
!  
ip tcp synwait-time 5  
!  
interface FastEthernet0/0  
!  
interface FastEthernet0/1  
!  
 serial restart-delay 0  
!  
interface Vlan1  
 ip address 172.16.98.63 255.255.255.0  
!  
router ospf 1  
 log-adjacency-changes  
 network 10.0.0.0 0.255.255.255 area 1  
!  
no ip http server  
no ip http secure-server  
!
access-list 10 deny   10.0.0.0 0.255.255.255  
access-list 122 deny   icmp 10.0.0.0 0.255.255.255 host 1.1.1.24 echo-reply  
snmp-server community public RW  
no cdp log mismatch duplex  
!  
control-plane  
! 
line con 0  
 exec-timeout 0 0  
 privilege level 15  
 logging synchronous  
line aux 0  
 exec-timeout 0 0  
 privilege level 15  
 logging synchronous  
line vty 0 4  
 login  
!  
!  
end  
1个回答

很多时候,当您遇到 MIB 未填充时,这仅仅是因为 MIB 包与正在运行的 IOS 版本不兼容。

如果您查看此 Cisco 工具http://tools.cisco.com/ITDIT/MIBS/MainServlet,您可以看到哪些 MIB 与您的 IOS 版本兼容。

例如,如果您搜索运行 ADVSECURITYK9-M,版本 12.4(3) 的 C3725,您不会看到“CISCO-ACL-MIB”,因此当我加载该 MIB 时,我无法从路由器获取任何信息。

IOS信息

R3#sh ver
Cisco IOS Software, 3700 Software (C3725-ADVSECURITYK9-M), Version 12.4(3), RELEASE SOFTWARE (fc2)


ROM: ROMMON Emulation Microcode
ROM: 3700 Software (C3725-ADVSECURITYK9-M), Version 12.4(3), RELEASE SOFTWARE (fc2)

R3 uptime is 19 minutes
System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0, BOOT_COUNT 0, BOOTDATA 19

----snip-----

Cisco 3725 (R7000) processor (revision 0.1) with 124928K/6144K bytes of memory.
Processor board ID FTX0945W0MY
R7000 CPU at 240MHz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache
4 FastEthernet interfaces
DRAM configuration is 64 bits wide with parity enabled.
55K bytes of NVRAM.
1024K bytes of ATA System CompactFlash (Read/Write)

Configuration register is 0x2102

SNMP/访问列表配置

ip access-list extended TestName
 permit ip any any
!
access-list 90 permit any
snmp-server community test RO 90

iReasoning MIB 浏览器

在此处输入图像描述