有没有办法发现我连接到哪些不同类型的交换机?

发布于 2024-08-07 05:29:14 字数 244 浏览 4 评论 0原文

我想知道我们是否可以找出我们的机器直接连接到的交换机类型。

例如,如果我连接到 Cisco、Brocade、Foundry 和 Force10 交换机。

  1. 是否可以编写一个perl脚本来查找交换机的管理地址[无需登录]
  2. 是否可以编写一个perl脚本来查找交换机供应商和型号...

感谢您的建议。

编辑:想补充一点,我直接连接到交换机..我可以禁用我机器上的防火墙...

I wanted to know if we could find out what type of switch our machine is directly connected to ..

For instance if I am connected to a Cisco,Brocade,foundry and Force10 switch .

  1. Is it possible to write a perl script to find out the management address of the switch [without logging in]
  2. Is it possible to write a perl script to find out the switch vendor and model number ...

Thanks for your suggestions.

EDIT: Wanted to add that I am directly connected to the switch .. I can disable the firewall on my machine ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

っ〆星空下的拥抱 2024-08-14 05:29:14

nmap 就是你想要的。如果这还不行,答案可能是“不”。如果需要交换机的IP地址,请运行traceroute/tracert来查看下一跳是什么。

nmap is what you want. If that doesn't do it, the answer is probably "no". If you need the IP address of the switch, run traceroute/tracert to see what the next hop is.

咽泪装欢 2024-08-14 05:29:14

没有保证能够实现这一目标的方法。这在很大程度上取决于您的交换机的配置方式以及网络管理员的开放程度。

如果一切都完全开放,那么找出交换机类型的最佳方法是使用 snmp。 Perl 的 net-snmp 库(请参阅文档 这里)是一个很好的起点。
但这假设管理界面暴露在您的盒子上。

无法保证一定会如此。

如果是,那么 nmap (如其他人建议的那样)可能会起作用。至少它可能会告诉您管理接口是否可访问,此时您可以使用 snmp 告诉您其余的信息。
Traceroute可能会产生更多信息,但前提是用于其路由的地址与管理地址相同。 (并假设您的“交换机”确实是“路由器”。如果不是,则不会产生任何有用的信息。)

ping 可能会产生有关制造商的一些信息,但前提是它没有’ t 已配置为 proxy-arp。

There is no guaranteed way of being able to achieve this. It depends very much on how your switch has been configured and how open your network admins have made it.

If everything is completely open then the best way of finding out the type of switch is to use snmp. The net-snmp library for perl (see docs here) is a good place to start.
But that assumes that the management interface is exposed to your box.

There is no guarantee that it will be.

If it is then nmap (as suggested by others) may work. At least it might tell you if the management interface is accessible at which point you can use snmp to tell you the rest.
Traceroute might yield some more information, but only if the address used for it's routing is the same as the management address. (and assuming that your "switch" is really a "router". If not then this won't yield any useful information.)

ping might yield some information about the manufacturer, but only if it hasn't been configured to proxy-arp.

摇划花蜜的午后 2024-08-14 05:29:14

在 Cisco 交换机上,如果 CDP 已激活,您应该能够看到线路上的 CDP 流量,其中将指示交换机型号、名称和您所连接的交换机端口。

不知道其他品牌怎么样。

On Cisco switchs if CDP is activated you should be able to see CDP traffic on your wire which will indicate switch model, name and switch port you are connected to.

Don't know for other brands.

相守太难 2024-08-14 05:29:14

并不真地。在防火墙、数据包修改、NAT 子网的现代世界中,您实际上无法可靠地从客户端计算机检查网络。

也就是说,在路由器上尝试 nmap 可能会告诉你一些有趣的事情。或者也可能不会。结果完全取决于您的网络管理员。

Not really. In the modern world of firewalled, packet-modifying, NATed subnetworks, you really can't do anything reliably to inspect a network from a client machine.

That said, trying nmap on your router might tell you something interesting. Or it might not. The results are entirely up to the admins of your network.

忆沫 2024-08-14 05:29:14

跟随电线

follow the wire

把人绕傻吧 2024-08-14 05:29:14

您可以 ping 它以获取其以太网地址,然后在 供应商 代码 列表

You can ping it to get its Ethernet address, and then look it up in one of the vendor code lists.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文