4 Replies Latest reply: Dec 29, 2011 9:00 AM by CyberNinja RSS

    Quick Subnet question/advice please

    CyberNinja
      Hello,
      I'm in the process of changing the netmask on my servers from /24 to /23.
      I have been doing this on the Solaris 9 and the global zones on Solaris 10 servers.
      sudo vi /etc/netmasks
      sudo ifconfig <device> IP/23

      The question is this, should I do it this way in the zone or should I do it from the global zone using zonecfg?
      I'm trying to do this with the least impact.

      Thanks for your time
        • 1. Re: Quick Subnet question/advice please
          CyberNinja
          This what I have been doing.
          # zonecfg -z myzone
          zonecfg:myzone> remove net address=10.0.0.20
          zonecfg:myzone> add net
          zonecfg:myzone:net> set address=10.0.0.20/23
          zonecfg:myzone:net> set physical=bge0
          zonecfg:myzone:net> end
          zonecfg:myzone> verify
          zonecfg:myzone> commit
          zonecfg:myzone> exit
          #
          I need to reboot the zone for the change to take affect. I can't do that so I do this instead.
          # ifconfig <device> 10.0.0.20/23
          This changes the netmask until reboot and the zondcfg command will set it after the reboot.
          • 2. Re: Quick Subnet question/advice please
            Mgerdts-Oracle
            CyberNinja wrote:
            This what I have been doing.
            # zonecfg -z myzone
            zonecfg:myzone> remove net address=10.0.0.20
            zonecfg:myzone> add net
            zonecfg:myzone:net> set address=10.0.0.20/23
            zonecfg:myzone:net> set physical=bge0
            zonecfg:myzone:net> end
            zonecfg:myzone> verify
            zonecfg:myzone> commit
            zonecfg:myzone> exit
            #
            I need to reboot the zone for the change to take affect. I can't do that so I do this instead.
            # ifconfig <device> 10.0.0.20/23
            This changes the netmask until reboot and the zondcfg command will set it after the reboot.
            That is perfectly reasonable. However, if you have an /etc/netmasks entry in the zone for 10.0.0.0, you should update it as well. It shouldn't be used in normal routing decisions, but if you have software in the zone that parses it for some reason it would be best to not confuse that software.

            For others that may read this in the future, this answer assumes the zone is configured with ip-type=shared. If ip-type=exclusive, the configuration inside the zone is important.
            • 3. Re: Quick Subnet question/advice please
              CyberNinja
              Thanks for your reply.
              I will take your advice and change the /etc/netmasks file in the zone as well. And yes the ip-type=shared. Sorry about that.

              Edited by: CyberNinja on Dec 27, 2011 10:24 AM
              • 4. Re: Quick Subnet question/advice please
                CyberNinja
                This is the answer

                Do this for a zone
                # zonecfg -z myzone
                zonecfg:myzone> remove net address=10.0.0.20
                zonecfg:myzone> add net
                zonecfg:myzone:net> set address=10.0.0.20/23
                zonecfg:myzone:net> set physical=bge0
                zonecfg:myzone:net> end
                zonecfg:myzone> verify
                zonecfg:myzone> commit
                zonecfg:myzone> exit
                #
                I need to reboot the zone for the change to take affect. I can't do that so I do this instead.
                # ifconfig <device> 10.0.0.20/23
                This changes the netmask until reboot and the zondcfg command will set it after the reboot.

                Also vi /etc/netmasks