Page 1 of 1

SAMA5d3 Xplained ip address issue

Posted: Thu May 09, 2019 5:12 pm
by EmbedLinux
Hi,

I am using sama5d3 Xplained evaluation board for study purpose. I have downloaded the demo package for nand flash and successfully flashed.

I am facing an issue on Ethernet IP address . When I am connecting the Ethernet cable and turning ON the board, ifconfig successfully gives an IP address. Now when I have the IP address and remove the Ethernet cable still ifconfig shows the same IP adress for inet4.

From my understanding, when the Ethernet cable is removed, ifconfig should not display any inet4 address . Am I missing any configurations for making the Ethernet work properly?

Re: SAMA5d3 Xplained ip address issue

Posted: Fri May 10, 2019 9:29 pm
by blue_z
EmbedLinux wrote: From my understanding, when the Ethernet cable is removed, ifconfig should not display any inet4 address .
What is the basis of your "understanding"?
The man page for ifconfig does not mention any such command response.

Your "understanding" tries to make a questionable correlation with the display of the IP address and the link state.
Apparently the ifconfig command is not consistent in this regard for all situations.
A static IP address can be assigned to an interface (and get displayed) that is not even active (aka up).
Using an alleged secondary effect to determine the link status is IMO moronic, considering that the actual link condition is apparently reported by the display or absence of the "RUNNING" status word in the command response.

Recent versions of the man page for ifconfig include the note: "This program is obsolete! For replacement check ip addr and ip link."
The ip addr and ip link commands are even more explicit than ifconfig when the "Ethernet cable is removed": the command response includes the status "NO-CARRIER".

EmbedLinux wrote: Am I missing any configurations for making the Ethernet work properly?
Your concern that Ethernet is not working properly is probably misplaced.
Use reliable methods that report the actual status rather than looking for side effects.

Regards