This week's book giveaway is in the Spring forum. We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line! See this thread for details.
I changed the /etc/network/interfaces file with policies for interface eth0 (dynamic followed by static)
Then interface was brought up using 'ifup eth0'. (I wanted the dynamic IP to be assigned and it worked)
The interface was brought down and up again. (Now I wanted the static IP to be assigned and it worked)
It worked fine for once, then I started getting the same error : 'interface eth0 not configured"
But during both attempts, when we tried bringing the inteface down using 'ifdown', we were getting the same error: 'interface eth0 not configured"
I don't really know at this point. The closest I can come is pretty wild. Check dmesg and the system logs. These days the hotplug mechanisms can rename the eth devices. You see this especially when working with VM host machines. When that happens, the normal configuration won't work because the device is "no longer there" - under its original name, anyway. But there should be a log message in that case.
Fixes may include statements in the /etc/modules config and/or udev, but don't ask for details. I get confused enough on my own systems!
Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.