LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2009, 10:20 AM   #1
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
RTNETLINK answers: File exists - Error when doing ifup on alias (eth1:1) on RHEL5


Posting this as a solution since I didn't see the exact question when I Googled and a lot of what is written is fairly esoteric and not really germane:

I'd created an ifcfg-eth1:1 on a RHEL5.3 server. On running "ifup eth1:1" I got the following error.
"RTNETLINK answers: File exists"
A Google search mentioned this various times but nothing truly consistent and nothing directly related to what I was doing. Some mentioned routing which made me look at "netstat -rn" outuput. I saw it had added a new bogus route to the table. Also there was some discussion of the fact that message is somewhat bogus as it isn't a regular "file" that exists but rather a "file" in the broad sense that sockets, shared memory segment, et al are considered "files".

One link mentioned /usr/share/doc/initscripts<version> directory.
Reviewing documents there led me to the realization that starting any alias for an interface will attempt to also invoke the routing created for that interface. (We have a route-eth1 file for this due to the fact that default gateway is on eth0 which is the external facing NIC.)
Further read indicated there is an option for alias files to start the alias interface at same time as primary or not. The default is to start at same time.

All this along with the bogus route led me to the conclusion the "file" that "exists" is the route added at start of eth1.

Resolution was simply to "ifdown eth1:1; ifdown eth1; ifup eth1". The ifup eth1 at end starts both the primary and the alias AND only sets the route once so I didn't see the error starting this way.

Last edited by MensaWater; 03-11-2009 at 02:35 PM.
 
Old 10-26-2010, 04:10 AM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Thanks for taking the time to write this up & post it. Let's hope it does indeed help someone else.
 
Old 02-04-2011, 01:57 PM   #3
7rx
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Talking Thanks

Thanks, this was exactly what I was looking for. Now if only all my questions were pre-answered like this!
 
Old 05-11-2011, 10:19 PM   #4
hermanchen
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: 0
helped me also

thanks!
 
Old 05-28-2011, 10:51 AM   #5
mark.
LQ Newbie
 
Registered: Apr 2009
Distribution: Centos,Fed,Ubuntu,Linpus
Posts: 3

Rep: Reputation: 1
Very useful, your post pointed me at the right thing straight away.
For my setup eth1 is a secondary interface on the local LAN, 10.0.0.4, given that eth0 is the external interface the default gateway set in /etc/sysconfig/network points out that way..
I had added a line into route-eth1 defining a static route for the same LAN as eth1 is already in as I am getting the odd issue with a vpn session in not getting traffic back, despite getting assigned an IP in the same range. But after adding the route i was getting the "RTNETLINK answers: File exists". No route had been added showing the gateway 10.1.0.254 so i removed the line/route and hey presto, no error message.

Thanks again.
mark
 
Old 05-29-2011, 08:53 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Thanks to those who took the time to give rep for the post. Too bad the 1st post in a thread is presumed to be a question & can't be marked "Helpful".
 
Old 05-30-2011, 07:31 AM   #7
mark.
LQ Newbie
 
Registered: Apr 2009
Distribution: Centos,Fed,Ubuntu,Linpus
Posts: 3

Rep: Reputation: 1
Quote:
Originally Posted by archtoad6 View Post
Thanks to those who took the time to give rep for the post. Too bad the 1st post in a thread is presumed to be a question & can't be marked "Helpful".
You can always click the little scales under MensaWater's name to give him Rep for the post ;-)
 
Old 06-01-2011, 10:03 AM   #8
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Indeed, at least 3 people did just that. My point is that each could have given a well deserved extra point through the "helpful" system if it were available.
 
Old 08-25-2011, 03:59 PM   #9
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 534
Blog Entries: 3

Rep: Reputation: 118Reputation: 118
Thumbs up

Quote:
Originally Posted by mark. View Post
You can always click the little scales under MensaWater's name to give him Rep for the post ;-)
Well you learn something every day! That's what I did, and thanks for that tip too

wrt the error, I got the error on a CentOS box where I bonded a couple of NICs. The error was on bond0 when I did a:

Code:
# service network restart
What got me is that I've done this dozens of times and this was the only time I received the error - everything looked fine (ifconfig) and everything worked.

So then, I restarted the network again and no error. All was well in syslog too, so I still don't know what caused the error, but at least I know why it might occur if it happens again, and what I might do to alleviate the error.

Kindest regards,
 
Old 08-14-2013, 01:19 PM   #10
Predatorian
Member
 
Registered: Mar 2008
Location: currently, where ever the army takes me
Distribution: Debian Lenny/Ubuntu or Arch Linux
Posts: 145

Rep: Reputation: 28
This didn't exactly work for me, but what I had to do was

Code:
ifconfig eth0:1 192.168.2.1
instead of using a 192.168.1.1 address which was not being used. When ifup eth0:1 didn't work, I used ifconfig, and it gave me a different result.

Code:
SIOCSIFADDR: File exists
SIOCSIFFLAGS: Cannot assign requested address
So that's when I assigned it a odd IP address, and it worked for me.
 
Old 08-22-2013, 08:18 AM   #11
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831

Original Poster
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The problem with what you did Predatorian is that is not persistent. That is to say while it set the IP for your current session it will go away next time you restart networking (e.g. when you reboot).

The reason I did the methodology originally written was to insure it was persistent.
 
Old 08-23-2013, 08:26 AM   #12
Predatorian
Member
 
Registered: Mar 2008
Location: currently, where ever the army takes me
Distribution: Debian Lenny/Ubuntu or Arch Linux
Posts: 145

Rep: Reputation: 28
Yea, I should have specified what I was using it for. I was trying to make an HA Cluster with Zabbix using FreeHA. I wanted it to be able to come up with my HA program, and if the system stopped, or restarted, then my cluster would pick up the VIP, and run normally.
 
Old 05-19-2014, 12:01 PM   #13
bobdrad
LQ Newbie
 
Registered: May 2014
Posts: 1

Rep: Reputation: Disabled
The above solution didn't help me. It turns out that "RTNETLINK answers: File exists" can mask a number of different root causes. If you run "ifup <INTERFACE>" you should get a better error message.

In my case, the root cause of this message was another host on my network that had the same IP address. Easy to rectify, once I know what the heck was actually going on. That's a terrible error message.
 
Old 07-06-2014, 12:12 AM   #14
gessejomez
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Red Hat's workaround worked for me - https://access.redhat.com/solutions/26543
 
Old 07-07-2014, 07:35 AM   #15
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831

Original Poster
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by gessejomez View Post
Red Hat's workaround worked for me - https://access.redhat.com/solutions/26543
1.) That post didn't exist 5 years ago when I first posted here.

2.) That post requires a login to the RedHat site to see the full detail. If you were seeing the message on CentOS, Scientific Linux or another RHEL derivative you probably don't have an account with RedHat.

3.) That post doesn't actually include a "workaround". It just explains the error can occur due to DHCP config (which I don't use in my environment by the way so wouldn't have explained the one I saw) and says the error can safely be ignored. My original post tells you how you can get rid of the error rather than saying it should be ignored.
 
1 members found this post helpful.
  


Reply

Tags
alias, ip, network, virtual



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RTNETLINK answers: File exists Winanjaya Linux - Networking 5 06-24-2014 05:22 AM
fc9 booting Bringing up interface eth0: RTNETLINK answers: File exists pankajd Linux - Software 0 11-27-2008 08:33 AM
RTNETLINK and ifup alephgamma Linux - Networking 0 10-19-2007 06:00 PM
server ifup: RTNETLINK answers: Network is unreachable problem evasion81 Linux - Networking 5 07-07-2005 08:44 AM
eth0 and eth1 RTNETLINK answers: File existslike RT trouble....need some helpHello pierrot Linux - Networking 0 08-09-2003 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration