I got it that I had to flush the device before bringing it up:
# ip addr flush dev eth1
Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.
ip addr flush will work, but it will also clear any and all addresses set on that interface – possibly including the one that you are using, if you’re logged in to a remote machine. This may lock you out of your device.
RNETLINK answers: File exists happens when you’re trying to
add a rule that conflicts with an existing rule. I would guess that OP was encountering this because they had already set the address with
ifconfig. This error can usually be resolved by converting the
add command to a similarly structured
It’s much safer to use
ip addr change or
ip addr replace instead.
I had a similar problem that by the time I had played the 10,000 moneys scene was exactly this, and I had been trying to add the missing stuff to /e/n/i.d/etho
But studying the man page for interfaces, I noted that ALL of the set of examples had only 2 lines of real data, the ipv4 address/24, and a gateway line specifying the address of my router. So I stripped my eth0 file down to that, and rebooted, and worked perfectly.