Questions tagged [arp]

ARP is a protocol for resolution of network layer addresses such as IP into link layer addresses (such as MAC addresses). "arp" is also a command in Linux and Windows to manipulate the ARP cache.

Address Resolution Protocol (ARP) is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks. ARP was defined by RFC826 in 1982.
It is also the name of the program for manipulating these addresses in most operating systems.

603 questions
5
votes
4 answers

Get a remote MAC address via IPv6

Is it possible to get the MAC from an another PC in the same Network via IPv6 (without WMI)? With IPv4 it is easy (ARP). IPv6 uses the "Neighbor Discovery Protocol" (NDP) to get the MAC address. Are there any methods in .Net for this?
Fabian
  • 53
  • 1
  • 3
5
votes
1 answer

Nmap - RTTVAR has grown to over 2.3 seconds, decreasing to 2.0

I have a script that I'm using to build a config for icinga2. The network is large, multiple /13's large. When I run the script I keep getting the RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 error. I've tried raising my gc_thresh and…
cflinspach
  • 290
  • 1
  • 4
  • 16
5
votes
2 answers

Make ARP request on python

I'm trying to make ARP request on python. My code: import socket from struct import pack from uuid import getnode as get_mac def main(): dest_ip = [10, 7, 31, 99] local_mac = [int(("%x" % get_mac())[i:i+2], 16) for i in range(0, 12, 2)] …
0x1337
  • 1,074
  • 1
  • 14
  • 33
5
votes
3 answers

C++ variable length arrays in struct

I am writing a program for creating, sending, receiving and interpreting ARP packets. I have a structure representing the ARP header like this: struct ArpHeader { unsigned short hardwareType; unsigned short protocolType; unsigned char…
PlanckMax
  • 53
  • 1
  • 4
5
votes
7 answers

Is there any better way to get mac address from arp table?

I want to get a mac address from arp table by using ip address. Currently I am using this command arp -a $ipAddress | awk '{print $4}' This command prints what I want. But I am not comfortable with it and I wonder if there is any built-in way or…
ibrahim
  • 3,254
  • 7
  • 42
  • 56
5
votes
3 answers

Why do we need sender MAC address in ARP request?

Here is a wireshark capture of an ARP request PNG image, I contains the sender MAC inside the ARP packet. The receiving station can derive the MAC from the Ethernet frame. It seems to be redundant. Is there any particular use of separately including…
Lunar Mushrooms
  • 8,358
  • 18
  • 66
  • 88
5
votes
2 answers

How can I dump only outgoing IP packets in tcpdump?

I'm dumping outgoing traffic. I only want TCP and UDP packets destined outside my LAN, nothing else. I just used the following filter with tcpdump: ip and (tcp or udp) and (not icmp) and src host myIPAddr and not dst net myNet/myNetBits and not ip…
Ricky Robinson
  • 21,798
  • 42
  • 129
  • 185
4
votes
2 answers

How to retrieve foreign host's MAC address in C++

Currently we're parsing arp request output from the command line. string cmd = "arp -n "; cmd.append(ipaddress); cmd.append(" | grep "); cmd.append(ipaddress); fgets( line, 130, fp); fgets( line, 130, fp); ret.append(line); ... It works, but is…
voteblake
  • 329
  • 1
  • 3
  • 11
4
votes
3 answers

ARP Spoofing/DNS Spoofing - difference

Is there a difference between ARP Spoofing and DNS Spoofing, or they are one and the same thing?
Lyubomir Velchev
  • 962
  • 2
  • 11
  • 30
4
votes
2 answers

Can I Use Winsock To Construct And Send ARP Packets, Or Receive ARP Packets? How?

I was try on WINDOWS XP(but this is not the point), while I thought I cannot send or receive ARP packets with Raw Winsock, but some paper from Internet says yes, if so, how to set the Winsock functions?
Eliot Ding
  • 41
  • 2
4
votes
1 answer

Man in the Middle attack in C with ping echo request

I'm implementing man in the middle attack in C. There are three docker containers: Host A (sender), Host B (receiver), and Host M (attacker). My objective is to ping from Host A to Host B but sniffing the echo request from A at M and then relay the…
3N4N
  • 570
  • 5
  • 21
4
votes
1 answer

Scapy ARP Poisoning

The Scapy documentation gives the following example of ARP Cache Poisoning: send(Ether(dst=clientMAC)/ARP(op="who-has", psrc=gateway, pdst=client)) Question 1: My understanding is that this is the broadcast of an ARP request from a client.…
User137481
  • 223
  • 1
  • 4
  • 14
4
votes
1 answer

C# raw socket ARP reply

I am a student trying to learn more about the ARP and sockets in C# To do this I am trying to send ARP requests and replies using a raw Socket in C#. I have manually reconstructed an ARP reply in an byte array and I am trying to send it using the…
Joas
  • 1,796
  • 1
  • 12
  • 25
4
votes
3 answers

Send an ARP request manually from Windows

I'm training myself on network scanning and i'm focusing on how to identify a sniffer on my net. Searching on the web, i find that a possible way is the ARP method: i must send an ARP request to a suspect no broadcast IP to check if it's in…
Luca Sepe
  • 733
  • 4
  • 19
  • 30
4
votes
0 answers

SendARP equivalent for Linux

The Windows API contains a very handy function called SendARP. You can give it some source IP and a destination IP and it gives you the MAC address of the client with that destination IP. Also, this function can be used by standard users on Windows,…
sigalor
  • 901
  • 11
  • 24
1 2
3
40 41