5 Replies Latest reply on Nov 15, 2013 12:37 PM by Stuart Howard

    How to change addrobj name/label of network interface in Solaris 11?

    Stuart Howard

      Hi,

       

      Solaris 10 admin here taking my first steps towards Solaris 11.  The first hurdle I've come across is that I want to assign meaningful addrobj names to my network interfaces so that I can keep track of them when they (later) become part of an IPMP configuration.  I can create a new IP configuration, including assigning an addrobj name as follows:

       

      ipadm create-addr -T static -a 10.201.17.46/24 net0/lan

       

      However, the original network interface was configured by the installer and has been assigned the addrobj:  net0/v4

       

      # ipadm

      NAME              CLASS/TYPE STATE        UNDER      ADDR

      lo0               loopback   ok           --         --

         lo0/v4         static     ok           --         127.0.0.1/8

         lo0/v6         static     ok           --         ::1/128

      net0              ip         ok           --         --

         net0/v4        static     ok           --         10.201.17.46/24

         net0/v6        addrconf   ok           --         fe80::221:28ff:fe6b:ecd8/10

      net4              ip         ok           --         --

         net4/lan       static     ok           --         10.201.17.26/24

       

      I would like to rename this to: net0/lan but I can find no way to accomplish this.   Can anyone advise please?

       

      Thank you

        • 1. Re: How to change addrobj name/label of network interface in Solaris 11?

          Among your many Google searches, did you happen to trip over the following Oracle blog post from May 2011 on the subject of ipadm ?

           

          https://blogs.oracle.com/observatory/entry/ipadm

           

          I found it after glancing at your post and it was the first search result on "addrobj".

          • 2. Re: How to change addrobj name/label of network interface in Solaris 11?
            Stuart Howard

            Yes, I found that.  It tells me how to assign an addrobj name when first setting up the interface, i.e.:

             

            bleonard@solaris:~$ sudo ipadm create-addr -T static -a 10.0.2.15/24 e1000g0/v4static

             

            ...which is what I did to create my second interface and assign it the name net4/lan, but it doesn't tell me how to rename an existing addrobj label.  According to that same blog post "The ipadm subcommands that work with an an addrobj all have "addr" in their name", so this must mean it is one of the following subcommands:

             

            # ipadm help

            The following subcommands are supported:

            Address                 : create-addr    delete-addr     disable-addr

                                      down-addr      enable-addr     refresh-addr

                                      reset-addrprop set-addrprop    show-addr

                                      show-addrprop  up-addr

             

            I thought perhaps it must be set-addrprop, but according to the ipadm show-addrprop command, the addrobj name (v4) is not listed as a property:

             

            # ipadm show-addrprop net0

            ADDROBJ           PROPERTY   PERM CURRENT         PERSISTENT      DEFAULT         POSSIBLE

            net0/v4           broadcast  r-   10.201.17.255   --              10.255.255.255  --

            net0/v4           deprecated rw   off             --              off             on,off

            net0/v4           prefixlen  rw   24              24              8               1-30,32

            net0/v4           private    rw   off             --              off             on,off

            net0/v4           reqhost    r-   --              --              --              --

            net0/v4           transmit  rw   on              --              on              on,off

            net0/v4           zone      rw   global          --              global          --

            • 3. Re: How to change addrobj name/label of network interface in Solaris 11?

              I've never had occasion to work with IPMP nor with Solaris 11.

              Work and/or hobby exposure have had to take a far back seat in recent years.

              My skills would be limited to the same novice steps as you are currently experiencing.

               

              I'll now pass and let others respond if they choose to.

              I'll be glancing occasionally just because the topic is interesting.

              • 4. Re: How to change addrobj name/label of network interface in Solaris 11?
                alan.pae

                Have you tried to rename it with the dladm command instead?

                 

                If that doesn't work then you should be able to just delete the interface and recreate it with the addrobj that you wish to use.

                 

                alan

                1 person found this helpful
                • 5. Re: How to change addrobj name/label of network interface in Solaris 11?
                  Stuart Howard

                  Thanks.  I wasn't able to use the dladm command to rename the addrobj (though it can be used to rename the interface name (i.e. net0)).  However, I was able to achieve my objective simply enough by deleting the existing  address and re-creating it with the desired addrobj name:

                   

                  ipadm delete-addr net0/v4

                  ipadm create-addr -T static -a 10.201.17.46/24 net0/lan

                   

                  Now it all looks good.