Using ip addr instead of ifconfig reports “RTNETLINK answers: File exists” on Debian

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
50
down vote

favorite
25












I have a Debian system working as a wireless router with eth0 and wlan0. Now I added an additional network manually on eth1 with ifconfig:




alix:~# ifconfig eth1 192.168.0.2 netmask 255.255.255.0
alix:~# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
alix:~# ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_req=1 ttl=64 time=0.537 ms
64 bytes from 192.168.0.254: icmp_req=2 ttl=64 time=0.199 ms
64 bytes from 192.168.0.254: icmp_req=3 ttl=64 time=0.188 ms
^C
--- 192.168.0.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 0.188/0.308/0.537/0.161 ms


Everything works fine as you can see.



Now I would like to make the configuration permanent. Therefor I added the following section to /etc/network/interfaces:




alix:~# sed -n '/iface eth1/,/^$/p' /etc/network/interfaces
iface eth1 inet static
address 192.168.0.2
netmask 255.255.255.0


But when I try to start the network I get the following error:




alix:~# ifconfig eth1 down
alix:~# ifup -v eth1
Configuring interface eth1=eth1 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/hostapd
ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
RTNETLINK answers: File exists
Failed to bring up eth1.


When I run the ip command manually I get the same error:




alix:~# ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
RTNETLINK answers: File exists


What is wrong with the command? And how can I tell Debian to do the right thing?










share|improve this question

























    up vote
    50
    down vote

    favorite
    25












    I have a Debian system working as a wireless router with eth0 and wlan0. Now I added an additional network manually on eth1 with ifconfig:




    alix:~# ifconfig eth1 192.168.0.2 netmask 255.255.255.0
    alix:~# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
    alix:~# ping 192.168.0.254
    PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
    64 bytes from 192.168.0.254: icmp_req=1 ttl=64 time=0.537 ms
    64 bytes from 192.168.0.254: icmp_req=2 ttl=64 time=0.199 ms
    64 bytes from 192.168.0.254: icmp_req=3 ttl=64 time=0.188 ms
    ^C
    --- 192.168.0.254 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2005ms
    rtt min/avg/max/mdev = 0.188/0.308/0.537/0.161 ms


    Everything works fine as you can see.



    Now I would like to make the configuration permanent. Therefor I added the following section to /etc/network/interfaces:




    alix:~# sed -n '/iface eth1/,/^$/p' /etc/network/interfaces
    iface eth1 inet static
    address 192.168.0.2
    netmask 255.255.255.0


    But when I try to start the network I get the following error:




    alix:~# ifconfig eth1 down
    alix:~# ifup -v eth1
    Configuring interface eth1=eth1 (inet)
    run-parts --verbose /etc/network/if-pre-up.d
    run-parts: executing /etc/network/if-pre-up.d/hostapd
    ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
    RTNETLINK answers: File exists
    Failed to bring up eth1.


    When I run the ip command manually I get the same error:




    alix:~# ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
    RTNETLINK answers: File exists


    What is wrong with the command? And how can I tell Debian to do the right thing?










    share|improve this question























      up vote
      50
      down vote

      favorite
      25









      up vote
      50
      down vote

      favorite
      25






      25





      I have a Debian system working as a wireless router with eth0 and wlan0. Now I added an additional network manually on eth1 with ifconfig:




      alix:~# ifconfig eth1 192.168.0.2 netmask 255.255.255.0
      alix:~# netstat -rn
      Kernel IP routing table
      Destination Gateway Genmask Flags MSS Window irtt Iface
      0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
      192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
      192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
      192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
      alix:~# ping 192.168.0.254
      PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
      64 bytes from 192.168.0.254: icmp_req=1 ttl=64 time=0.537 ms
      64 bytes from 192.168.0.254: icmp_req=2 ttl=64 time=0.199 ms
      64 bytes from 192.168.0.254: icmp_req=3 ttl=64 time=0.188 ms
      ^C
      --- 192.168.0.254 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2005ms
      rtt min/avg/max/mdev = 0.188/0.308/0.537/0.161 ms


      Everything works fine as you can see.



      Now I would like to make the configuration permanent. Therefor I added the following section to /etc/network/interfaces:




      alix:~# sed -n '/iface eth1/,/^$/p' /etc/network/interfaces
      iface eth1 inet static
      address 192.168.0.2
      netmask 255.255.255.0


      But when I try to start the network I get the following error:




      alix:~# ifconfig eth1 down
      alix:~# ifup -v eth1
      Configuring interface eth1=eth1 (inet)
      run-parts --verbose /etc/network/if-pre-up.d
      run-parts: executing /etc/network/if-pre-up.d/hostapd
      ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
      RTNETLINK answers: File exists
      Failed to bring up eth1.


      When I run the ip command manually I get the same error:




      alix:~# ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
      RTNETLINK answers: File exists


      What is wrong with the command? And how can I tell Debian to do the right thing?










      share|improve this question













      I have a Debian system working as a wireless router with eth0 and wlan0. Now I added an additional network manually on eth1 with ifconfig:




      alix:~# ifconfig eth1 192.168.0.2 netmask 255.255.255.0
      alix:~# netstat -rn
      Kernel IP routing table
      Destination Gateway Genmask Flags MSS Window irtt Iface
      0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
      192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
      192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
      192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
      alix:~# ping 192.168.0.254
      PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
      64 bytes from 192.168.0.254: icmp_req=1 ttl=64 time=0.537 ms
      64 bytes from 192.168.0.254: icmp_req=2 ttl=64 time=0.199 ms
      64 bytes from 192.168.0.254: icmp_req=3 ttl=64 time=0.188 ms
      ^C
      --- 192.168.0.254 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2005ms
      rtt min/avg/max/mdev = 0.188/0.308/0.537/0.161 ms


      Everything works fine as you can see.



      Now I would like to make the configuration permanent. Therefor I added the following section to /etc/network/interfaces:




      alix:~# sed -n '/iface eth1/,/^$/p' /etc/network/interfaces
      iface eth1 inet static
      address 192.168.0.2
      netmask 255.255.255.0


      But when I try to start the network I get the following error:




      alix:~# ifconfig eth1 down
      alix:~# ifup -v eth1
      Configuring interface eth1=eth1 (inet)
      run-parts --verbose /etc/network/if-pre-up.d
      run-parts: executing /etc/network/if-pre-up.d/hostapd
      ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
      RTNETLINK answers: File exists
      Failed to bring up eth1.


      When I run the ip command manually I get the same error:




      alix:~# ip addr add 192.168.0.2/255.255.255.0 broadcast 192.168.0.255 dev eth1 label eth1
      RTNETLINK answers: File exists


      What is wrong with the command? And how can I tell Debian to do the right thing?







      debian networking ip






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 '13 at 18:45









      ceving

      1,70421321




      1,70421321




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          82
          down vote



          accepted










          Sorry but I got it myself. I had to flush the device before bringing it up:




          alix:~# ip addr flush dev eth1


          Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.






          share|improve this answer






















          • I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
            – harperville
            Sep 10 '15 at 14:11










          • yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
            – Drew
            Feb 21 '17 at 5:50






          • 7




            Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
            – humanityANDpeace
            May 17 '17 at 7:19










          • @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
            – realtebo
            Aug 14 at 7:58










          • @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
            – ceving
            Aug 14 at 8:43










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f100588%2fusing-ip-addr-instead-of-ifconfig-reports-rtnetlink-answers-file-exists-on-de%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          82
          down vote



          accepted










          Sorry but I got it myself. I had to flush the device before bringing it up:




          alix:~# ip addr flush dev eth1


          Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.






          share|improve this answer






















          • I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
            – harperville
            Sep 10 '15 at 14:11










          • yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
            – Drew
            Feb 21 '17 at 5:50






          • 7




            Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
            – humanityANDpeace
            May 17 '17 at 7:19










          • @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
            – realtebo
            Aug 14 at 7:58










          • @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
            – ceving
            Aug 14 at 8:43














          up vote
          82
          down vote



          accepted










          Sorry but I got it myself. I had to flush the device before bringing it up:




          alix:~# ip addr flush dev eth1


          Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.






          share|improve this answer






















          • I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
            – harperville
            Sep 10 '15 at 14:11










          • yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
            – Drew
            Feb 21 '17 at 5:50






          • 7




            Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
            – humanityANDpeace
            May 17 '17 at 7:19










          • @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
            – realtebo
            Aug 14 at 7:58










          • @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
            – ceving
            Aug 14 at 8:43












          up vote
          82
          down vote



          accepted







          up vote
          82
          down vote



          accepted






          Sorry but I got it myself. I had to flush the device before bringing it up:




          alix:~# ip addr flush dev eth1


          Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.






          share|improve this answer














          Sorry but I got it myself. I had to flush the device before bringing it up:




          alix:~# ip addr flush dev eth1


          Clearing manually set interface configuration information like this is mentioned in the Ubuntu Server Guide.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 24 at 6:37









          JdeBP

          31.3k466144




          31.3k466144










          answered Nov 9 '13 at 19:01









          ceving

          1,70421321




          1,70421321











          • I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
            – harperville
            Sep 10 '15 at 14:11










          • yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
            – Drew
            Feb 21 '17 at 5:50






          • 7




            Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
            – humanityANDpeace
            May 17 '17 at 7:19










          • @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
            – realtebo
            Aug 14 at 7:58










          • @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
            – ceving
            Aug 14 at 8:43
















          • I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
            – harperville
            Sep 10 '15 at 14:11










          • yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
            – Drew
            Feb 21 '17 at 5:50






          • 7




            Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
            – humanityANDpeace
            May 17 '17 at 7:19










          • @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
            – realtebo
            Aug 14 at 7:58










          • @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
            – ceving
            Aug 14 at 8:43















          I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
          – harperville
          Sep 10 '15 at 14:11




          I still receive a (slightly different) error RTNETLINK answers: No such process Failed to bring up eth1 BUT my Eth1 is correctly assigned now AND is UP/UP.
          – harperville
          Sep 10 '15 at 14:11












          yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
          – Drew
          Feb 21 '17 at 5:50




          yeah, same problem here: RTNETLINK answers: No such process Failed to bring up eth1
          – Drew
          Feb 21 '17 at 5:50




          7




          7




          Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
          – humanityANDpeace
          May 17 '17 at 7:19




          Even if your answers solves the problem. It would be great if you could tell what it actually does. What is this RTNETLINK file that exists?
          – humanityANDpeace
          May 17 '17 at 7:19












          @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
          – realtebo
          Aug 14 at 7:58




          @ceving: please can you explain twhat is RTNETLINK answers file? Also, after flushing, my network card is not taking a new ip automatically, how to ask dhcp a new ip?
          – realtebo
          Aug 14 at 7:58












          @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
          – ceving
          Aug 14 at 8:43




          @realtebo @humanityANDpeace Inspect the kernel manual about netlink and rtnetlink. But I doubt you really want to know. This is an error message the ip tool gets from the kernel. And instead of translating the message into something useful for end users, ip passes it just through. But if you really want to know the internals, use the Ask Question instead of the Add Comment button.
          – ceving
          Aug 14 at 8:43

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f100588%2fusing-ip-addr-instead-of-ifconfig-reports-rtnetlink-answers-file-exists-on-de%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay