[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IP address woes



Chris Johns wrote:

> Angelo Fraietta wrote:
>
>> Shouldn't this be automaitically added to the cache in RTEMS when I 
>> receive the brodcast address? RTMES is able to determine the IP 
>> address when it receives teh bradcast message (I know because I can 
>> see it on the console). Shouldn't it be added to the cache in the IP 
>> layer?
>
>
> I assume you are referring to the ARP cache. This is the IP layer to 
> Datalink layer mapping protocol. I do not know of other cached info in 
> the IP layer.
>
> I do not think the ARP cache is updated on incoming IP packets. I have 
> a number of Windows machines that do SMB broadcasts and my API cache 
> (Linux) does not show these machines.

You are right in that it is not in the arp cache - I tested with arp - a 
, and the RTEMS machine was definately not there on the list - even 
though it responded back directly. Is there a way to set it  to load it 
to the cache when it receives a message?

Also, when the RTEMS is unable to respond to the broadcast from the mac, 
it is able to respond to a broadcast from the Windows machine. Why is 
that the case? When this occurs, I unplug and replug my mac back in, and 
RTEMS can now find it - but the mac still can't find the RTEMS. 

How does a ping work? The machine pinging does not yet have the ethernet 
address before the ping?

>
> Broadcasting an IP packet from MacOS will not require an ARP request 
> as the MacOS will know to use the Ethernet MAC broadcast address 
> (ff:ff:ff:ff:ff:ff). The RTEMS machine will respond and send a 
> directed packet to the MacOS's IP address. This will require an ARP 
> request from the RTEMS box and the MacOS machine to respond. The MacOS 
> machine may also update its ARP cache with the RTEMS box's data when 
> responding [1]. Both ends will have each other in their ARP cache. You 
> should now check each end and make sure they are both valid.

OK - I understand

>
> Goggle gave me this link for commands you can use to debug your problem:
>
>  http://www.cromwell-intl.com/tcpip/commands.html
>
> Look for the ARP cache commands. RTEMS has a function you can call 
> that will dump the ARP cache.
>
> This may not be your problem, but an incorrectly byte swapped IP 
> address in application code could cause this sort of problem. The 
> Windows machine is a certain byte order while the MacOS code is the 
> opposite and the code breaks.

I don't think that this is the case.

>
> [1] TCP/IP Illustrated Vol 1 W.R. Stevens, Sec 4.5 p59.
>

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)