• Sometimes it’s useful to create a virtual network interface on your Solaris box, so that you can associate multiple IP addresses with the same host and not have to go through all the trouble of buying another NIC.

    Here’s a quick HOWTO. Let’s assume our network card is eri0, and we want to create a virtual interface called eri0:1

    Create the virtual interface:
    # ifconfig eri0:1 plumb

    Configure the virtual interface:
    # ifconfig eri0:1 179.164.83.161 netmask 255.255.255.0 broadcast 179.164.83.255

    Check to make sure it worked:

    # ifconfig -a

    lo0: flags=1000849 mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000
    eri0: flags=1000843
    mtu 1500 index 2
    inet 179.164.83.160 netmask ffffff00 broadcast 179.164.83.255
    ether 0:3:ba:9:63:9b
    eri0:1: flags=1000842 mtu 1500 index 2
    inet 179.164.83.161 netmask ffffff00 broadcast 179.164.83.255

    Finally bring up your new virtual interface:
    # ifconfig eri0:1 up

    To make it come up on start:

    create /etc/hostname.eri0:1 with hostname in it
    make sure the hostname is in /etc/hosts

    NOTE: The IP addresses in this story have been changed to protect the innocent.

    This entry was posted on Tuesday, November 22nd, 2005 at 10:12 am and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 4 Comments

    Take a look at some of the responses we have had to this article.

    1. Ongam, the Barbarian
      Jan 9th
      Reply

      Simple and useful. Very good.

    2. kanibalv
      Apr 12th
      Reply

      thank’s, this is more useful than sun documents, works very well!!

    3. Kumar
      Apr 26th
      Reply

      Excellent document. Helped me a lot

    4. Jul 20th
      Reply

      This is simple and straight forward. It helped me a lot. Thank you

  • Leave a Reply

    Let us know what you thought.

  • Name(required):

    Email(required):

    Website:

    Message: