通过SNMP获取Switch的信息
我目前正在研究一个项目,我正在寻找网络中有关所有主机的信息(IP,Mac,Leaf's Port,Vlan,VRF,L2VNI,L3VNI)。该网络是一个具有70叶和5000个主机的SDN。
我拥有主机的所有Mac和IP地址,并且主机已连接到叶子的IP地址。
为了做到这一点,我正在与每片叶子建立一个SSH连接,并为叶子的每个主机启动这些CLI命令:
sh Mac地址台地址{主机的mac_address}
= =&gt ;要检索Leaf的端口和VLANSH BGP L2VPN EVPN {主机的IP_ADDRESS}
=>检索L2VNI和L3VNISH VRF详细信息| i {l3vni}
=>要检索VRF的
问题是,我需要一个多小时才能检索我们有5000个主机的所有信息。
您是否可以使用SNMP知道是否有一种方法可以获取这些相同的信息? 我知道,使用SNMP检索特定信息以获取正确的OID代码,但是我不知道这些信息是否可以使用SNMP获得?
我计划将PYSNMP与Python一起使用。
有人可以帮我吗?
谢谢
I am currently working on a project and I'm looking to retrieve the information about all the hosts in a network (ip, mac, leaf's port, vlan, vrf, l2vni, l3vni). The network is a SDN with 70 leafs and 5000 hosts.
I have in my possession all the mac and ip addresses of the hosts, and the ip address of the leaf the host is connected to.
In order to do this, I'm building a SSH connection with each leaf and I launch these CLI commands for each host of the leaf:
sh mac address-table address {mac_address of the host}
=> to retrieve the leaf's port and the VLANsh bgp l2vpn evpn {ip_address of the host}
=> to retrieve l2vni and l3vnish vrf detail | i {l3vni}
=> to retrieve the VRF
The problem is that it takes me more than one hour to retrieve all the info beacause we have 5000 hosts.
Do you please know if there is a way to get these same info using SNMP please?
I know that retrieving a specific information with SNMP require to get the right OID code but I don't know if these informations are getable with SNMP?
I plan to use pysnmp with python.
Can someone help me please?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论