从IP地址生成MAC地址 [英] Generating MAC Address From IP Address

查看:319
本文介绍了从IP地址生成MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要从IP地址生成MACID.目前,我是通过使用ARP来完成的.但是问题在于,当它尝试生成设备的MACID时,该设备不是我的工作PC的IP范围.这失败了.我不明白为什么会失败.请为我提供解决方案.

谢谢,
Satheesh

Hi,

I need to generate MACID from IP Address. Currently i done it by using ARP. But the problem is that When it tries to generate MACID of a device Which is other than the IP range of My working PC. This fails. I can''t understand why it fails. Please provide a solution for me.

Thanks,
Satheesh

推荐答案

http://compnetworking. about.com/od/tcpip/f/convertmacipadd.htm [ ^ ]

通常,一个人不可能仅从其IP地址获得计算机的MAC地址.这两个地址来自不同的来源.简而言之,一台计算机自己的硬件配置确定其MAC地址,而与之相连的网络配置则确定其IP地址.

但是,连接到同一TCP/IP本地网络的计算机可以确定彼此的MAC地址. TCP/IP附带的称为ARP的技术-地址解析协议使之成为可能.每台计算机都使用ARP维护其最近与之通信的每台设备的IP地址和MAC地址列表.

大多数计算机都允许您查看ARP在此处收集的IP和MAC地址列表.在Windows,Linux和其他操作系统中,命令行实用程序"arp"显示此信息.实际上,使用"arp",您可以从某些计算机的IP地址确定其MAC地址.但是,ARP只能在局域网(LAN)上的一小组计算机中使用,而不能在Internet上使用. ARP是供系统管理员使用的,通常不能用作跟踪Internet上计算机和人员的方式.
http://compnetworking.about.com/od/tcpip/f/convertmacipadd.htm[^]

It is usually not possible for a person to get the MAC address of a computer from its IP address alone. These two addresses originate from different sources. Simply stated, a computer''s own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address.

However, computers connected to the same TCP/IP local network can determine each other''s MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. Using ARP, each computer maintains a list of both IP and MAC addresses for each device it has recently communicated with.

Most computers allow you to see the list of IP and MAC addresses that ARP has collected there. In Windows, Linux and other operating systems, the command line utility "arp" shows this information. Using "arp," you can in fact determine the MAC address of some computers from their IP address. ARP works only within the small group of computers on a local area network (LAN), though, not across the Internet. ARP is intended for use by system administrators and is not generally useful as a way to track down computers and people on the Internet.


这篇关于从IP地址生成MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆