Automatically activate interface in Ubuntu/Debian without assigning IP

Sometimes you might have to activate some interfaces in your Ubuntu Server (or desktop for that matter) that you could use for your VMWare server, or to do a tcpdump for some promiscious traffic coming from a mirrored port…or hell’s bells, whatever…you just need it active without any IP assigned – and you need it to be up even if the box restarts.

If you want to do it, here’s how …

1. Open the /etc/network/interfaces file with your favourite editor – vim in my case (remember to make a backup first – always be safe)

sudo vim /etc/network/interfaces

2. Add the following lines (replace eth1 with your applicable interface)

auto eth1
iface eth1 inet manual
up ifconfig eth1 up

3. Write, quit and restart your networking

sudo /etc/init.d/networking restart

If all was done correctly, and assuming the interface was also named eth1, you should now have the extra interface available, without a DHCP or statically assigned IP Address.

You can use the following command to check, but if you got here I think you already know that

ifconfig

Leave a Reply to imgur Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Comments

  1. Enterprises having a large website with a lot of traffic influx will
    require the reseller hosting package. People, who are planning to use their own software, they must not choose this hosting service.
    There are thousands of web-hosting service providers and all of them claim to be the
    best.

    Reply