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

Re: wheezy, cannot change the address of eth1



On 11/11/16 18:13, Gene Heskett wrote:
> Greetings folks;
>
> I just bought an ethernet switch, but it is a smart switch, so I needed 
> to bring up my eth1 interface at an address in the 192.168.0.xx range so 
> I can talk to it.  But despite the fact that it is so specified 
> in /etc/network/interfaces, no amount of stopping and restarting the 
> networking makes it take effect, its stuck at the old 192.168.1.3 
> address.
>
> The output on screen for an /etc/init.d/networking restart for eth1 is:
> Configuring interface eth1=eth1 (inet)
> run-parts --verbose /etc/network/if-pre-up.d
> run-parts: executing /etc/network/if-pre-up.d/wireless-tools
> run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
> ip addr add 192.168.0.25/255.255.255.0 broadcast 192.168.0.255 	 dev eth1 
> label eth1
> ip link set dev eth1   up
>  ip route add default via 192.168.0.1  dev eth1 
> RTNETLINK answers: File exists
> Failed to bring up eth1.
>
> I cannot change it with ifconfig either. And the manpage for ip may as 
> well be in swahili, lots of unexplained terminology.
>
> So, short of rebooting so the changed interfaces might take effect, but 
> will they, what is this "File exists" error?.

"File exists" is, I think, a generic translation of an error code. "ip"
is trying to create a default route and is told, by the kernel, "that
route already exists: EEXISTS". "ip" then passes "EEXISTS" to an error
code translation routing which spits out "File exists".

To cut a long story short, you can't add a default route if you already
have one (well, technically you can, but you'd need to provide more
information). You probably have a default route sending traffic over eth0.

>
> Does anyone have a clue what may be wrong?
>
> And 5 years after I had a big fight with RTNETLINK, whatever the heck 
> that is, it is still keeping the cause of the error secret.
>
> So, net experts, what do I do?
>
> Thanks.
>
> Cheers, Gene Heskett


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: