Pages: [1]   Go Down
Author Topic: Arp and Ping  (Read 598 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone, sorry for my english, I have the following problem, I have to, send the command arp (to know the IP) and ping (to start the test) (the purpose is to test the connection to a given ip and release a report type sent 4 received 4 (failure ok)), but going from serial to Ethernet port (see:  http://www.robot-italy.com/it/arduino-ethernet-w-o-poe-module.html ) . Someone has already tried his hand?
« Last Edit: April 19, 2013, 10:01:53 am by robyf1 » Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you have to do the ARP yourself? The WizNet5100 onboard the Arduino Ethernet does that itself and BTW, the ARP is used to get the MAC address of the machine with a known IP address and not the other way around.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Arp or Netstat in cmd windows, I return the ip of the devices. I have to use Arduino as a client. But to know (different each time) the ip of the device (Sever). I need to give these commands:
« Last Edit: April 19, 2013, 02:14:34 am by robyf1 » Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ARP (Address resolution protocol) is used to get the MAC address (Ethernet address) for a given IP address by using broadcasts, the other way around does not work with this protocol. Usually you don't know the MAC address of a server but it's host name. To get the IP for a given hostname, DNS (Domain Name System) is used.

Ping (or better a Echo Request and Echo Reply ICMP messages) are used to check the routing path between two IP endpoints.

Quote
But to know (different each time) the ip of the device (Sever). I need to give these commands:

I cannot see the commands. Did you forget them to post?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The arp command you would use to find out who is connected. Then I program the Arduino to do the ping on the only ip found.

In the meantime I did some tests (also in windows) is not until I discovered that the server is pinged, Arp does not show its ip
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The arp command you would use to find out who is connected.

Wrong. It shows the ARP cache of this host. If there wasn't a reason to resolve the IP to a MAC address the table will not show an entry although the device might be connected.

Quote
In the meantime I did some tests (also in windows) is not until I discovered that the server is pinged, Arp does not show its ip

The reason for this is found in the above answer.

What do you have from the server if you don't know the IP address? Is only the IP changing or is the MAC address changing too? The former case can be fixed by setting a fixed IP for the MAC address in the router's DHCP configuration.
Logged

Pages: [1]   Go Up
Jump to: