Results 1 to 7 of 7

Thread: Cannot set network interfaces

  1. #1
    Join Date
    Oct 2007
    Beans
    21

    Cannot set network interfaces

    Hello,

    I have configured a list of eth aliases with static ips to /etc/network/interfaces like:
    Code:
    auto eth0
    iface eth0 inet static
    	address XXX.XXX.XXX.XXX
    	netmask XXX.XXX.XXX.XXX
    	gateway XXX.XXX.XXX.XXX
    
    auto eth0:2
    iface eth0:2 inet static
    	address XXX.XXX.XXX.XXX
    	netmask XXX.XXX.XXX.XXX
    
    auto eth0:4
    iface eth0:4 inet static
    	address XXX.XXX.XXX.XXX
    	netmask XXX.XXX.XXX.XXX
    Normally one edits the file and removes the interface from the config file (/etc/network/interfaces) restarting the network service with:
    Code:
    /etc/init.d/networking restart
    or
    Code:
    service networking restart
    ... and it should work but unexpectedly the removed interface (eth0:2) comes back after a while although it's not included in the config file /etc/network/interfaces .

    I also used the sync command to flush the file system buffers (I don't know if it's relevant).

    Note that it worked when I made a reboot or with this cmd:
    Code:
    id addr flush
    Normally this shouldn't happen.

    Any ideas? of why this is happening and a possible resolution except reboot or flush?

    System: Ubuntu 10.04.3 LTS

    Thanks

  2. #2
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,868
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Cannot set network interfaces

    Just a shot it the dark here...

    Do you have a trail in /etc/udev/rules.d/70-persistent-net.rules. If you do you may want to comment out or delete the entry and restart.

    Code:
    cat /etc/udev/rules.d/70-persistent-net.rules
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  3. #3
    Join Date
    Oct 2007
    Beans
    21

    Re: Cannot set network interfaces

    Thanks for your reply volkswagner.

    There is nothing relevant in /etc/udev/rules.d/70-persistent-net.rules file.

    Any more ideas?

  4. #4
    Join Date
    Dec 2008
    Location
    UK
    Beans
    434
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Cannot set network interfaces

    Hi,

    More shots in the dark

    Could it be the network-manager (if its installed), may be its remembering eth0:2 and doing something to bring it back?

    Does this still occur after a reboot?

    Is there anything in the logs regarding eth0:2?

  5. #5
    Join Date
    Oct 2007
    Beans
    21

    Re: Cannot set network interfaces

    Quote Originally Posted by Azdour View Post
    Could it be the network-manager (if its installed), may be its remembering eth0:2 and doing something to bring it back?

    Does this still occur after a reboot?

    Is there anything in the logs regarding eth0:2?
    Thanks for your reply Azdour,

    Network manager is not installed.
    I haven't see anything regarding this interface at the logs.

    After a reboot the interfaces keep up with the the config file /etc/network/interfaces

  6. #6
    Join Date
    Dec 2008
    Location
    UK
    Beans
    434
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Cannot set network interfaces

    Hi,

    I've run out of ideas. I was going to suggest avahi incase it is publishing the network eth0:2 and it comes back because avahi does something. But I'm not sure how it works or even if it can bring back network interfaces. If you able to reproduce the issue of eth0:2 reappearing does eth0:2 appear when you type:

    Code:
    avahi-browse -a

  7. #7
    Join Date
    Oct 2007
    Beans
    21

    Re: Cannot set network interfaces

    Unfortunately I cannot reproduce the problem.
    I was just wondering why this is happening.

    I will stick to this when I'm updating the /etc/network/interfaces configuration:
    Code:
    ip addr flush eth0 ; /etc/init.d/networking restart

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •