The present invention provides a not know the IP address of the network device, method for searching network equipment and network equipment, the method includes: the ARP protocol data packets in the ARP packet transformation; additional network equipment search request after the transformation, on the network to send ARP packets; received after judgment whether after the transformation of the data packet, if ARP data after the transformation of the package, if the search request is with network equipment, the use of ARP data transformation package, transmits the response information; if the data packet received after the transformation, with the response information, analyzing the response information. By using the method and the network equipment provided by the invention, the network device can be conveniently found and the information of the network equipment can be obtained without knowing the network equipment IP address.
【技术实现步骤摘要】
利用ARP数据包进行网络设备查找的方法及网络设备
本专利技术涉及网络通信
,尤其涉及利用ARP数据包进行网络设备查找的方法及网络设备。
技术介绍
TCP(TransmissionControlProtocol,传输控制协议)/IP(InternetProtocol,网络互连协议)协议,是互联网最基本的协议、国际互联网络的基础。通常网络设备的控制与访问,都是利用网络层IP协议及以上的传输控制层协议TCP/UDP(UserDatagramProtocol)来控制与访问的。ARP(AddressResolutionProtocol,地址解析协议)协议是一个位于TCP/IP协议栈中的数据链路层协议,位于IP协议的下方,基本功能是将网络层IP地址解析为数据连接层的MAC(MediaAccessControl,媒体访问控制)地址,以保证通信的进行。ARP的工作过程如下所示:1、当网络设备需要解析一个IP地址对应的MAC地址时,会广播发送ARP请求报文。2、该IP地址对应的其它网络设备接收到ARP请求报文后,会返回ARP应答报文。ARP数据包格式:表1
技术实现思路
为了在不知道网络设备IP地址的情况下,提供一种查找网络设备的方法及相应的网络设备,本专利技术提供以下方法步骤:表1的ARP数据包,在通常情况下,填充数据设为全0。在应用ARP数据包查找网络设备时,将填充数据设置为可识别的特定数据。在实际应用中,填充数据的长度,不受18个字节的限制。只要不超过一个以太网最长数据包长1500字节即可。查询方将ARP数据包的ARP字段的操作码设为0x1,代表这是一个查询包。将填 ...
【技术保护点】
一种网络设备查找方法,其特征在于,在不知道网络设备IP地址的情况下,利用ARP数据包进行网络设备的查询及应答,包括:对ARP数据包进行改造,使其既能满足ARP协议原有的功能,又能附加所需要的信息。对于所有接收到的ARP数据包进行判断,如果不是所能识别的经过改造的ARP数据包,则按ARP协议原有功能进行处理;如果接收到的数据包是可识别的经过改造的ARP数据包,则解析此ARP数据包的附加信息。
【技术特征摘要】
1.一种网络设备查找方法,其特征在于,在不知道网络设备IP地址的情况下,利用ARP数据包进行网络设备的查询及应答,包括:对ARP数据包进行改造,使其既能满足ARP协议原有的功能,又能附加所需要的信息。对于所有接收到的ARP数据包进行判断,如果不是所能识别的经过改造的ARP数据包,则按ARP协议原有功能进行处理;如果接收到的数据包是可识别的经过改造的ARP数据包,则解析此ARP数据包的附加信息。2.利用权利要求1所述方法,其特征在于:请求发送方所构造的ARP请求数据包,使用广播方式在网络中发送,同时请求的IP地址为本机...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。