1 2 Previous Next 16 Replies Latest reply: Jul 28, 2014 8:35 AM by Lars Tunkrans RSS

    Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.

    2631790

      Can anyone please guide me how to configure two subnetmasks in Solaris 10 Update11 and their routing.

      Please let me know what are the commands need to run configure new subnetmasks and routing to them.
      What are all the daemons need to be restarted.

      What configuration files need to be changed.

        • 1. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
          alan.pae

          man ifconfig

           

          or use http://docs.oracle.com

          to find the manuals for Solaris 10.

           

          alan

          • 2. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
            Lars Tunkrans

              Dear Sir !

             

                 It is difficult to understand your question.   You would need to rephrase the question to get a good answer.

             

               Each TCP/IP/v4   interface  have  only one  netmask.   It can not have two netmask's.

             

                Regards

             

                 //Lars

            • 3. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
              2631790

              ********************************************************************************************************************************************************************

              Below is all the data of existing IP configuration.

              *********************************************************************************************************************************************************************

              au-syddirpp02:>uname -a

              SunOS au-sydfdfpp02 5.10 Generic_142909-17 sun4v sparc SUNW,SPARC-Enterprise-T5120

               

              au-syddirpp02:>cat /etc/release

                                 Oracle Solaris 10 9/10 s10s_u9wos_14a SPARC

                   Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.

                                          Assembled 11 August 2010

               

              au-syddirpp02:>dladm show-dev

              e1000g0         link: up        speed: 1000  Mbps       duplex: full

              e1000g1         link: up        speed: 1000  Mbps       duplex: full

              e1000g2         link: unknown   speed: 1000  Mbps       duplex: full

              e1000g3         link: up        speed: 100   Mbps       duplex: half

               

              au-syddirpp02:>ifconfig -a

              lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

                      inet 127.0.0.1 netmask ff000000

              e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                      inet 10.140.24.182 netmask fffffff0 broadcast 10.140.24.191

                      ether 0:21:28:a4:35:7e

              e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                      inet 10.140.24.188 netmask fffffff0 broadcast 10.140.24.191

              e1000g0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                      inet 10.140.24.190 netmask fffffff0 broadcast 10.140.24.191

              e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

                      inet 10.140.24.184 netmask fffffff0 broadcast 10.140.24.191

                      ether 0:21:28:a4:35:7f

               

              au-syddirpp02:>cat /etc/netmasks

              #

              # The netmasks file associates Internet Protocol (IP) address

              # masks with IP network numbers.

              #

              #       network-number  netmask

              10.140.24.176   255.255.255.240

               

              au-syddirpp02:>cat /etc/defaultrouter

              10.140.24.177

               

              au-syddirpp02:>netstat -rnv

              IRE Table: IPv4

                Destination             Mask           Gateway          Device Mxfrg Rtt   Ref Flg  Out  In/Fwd

              -------------------- --------------- -------------------- ------ ----- ----- --- --- ----- ------

              default              0.0.0.0         10.140.24.177                1500*    0   1 UG  328139      0

              10.140.24.176        255.255.255.240 10.140.24.182        e1000g0  1500*    0   1 U     1186      0

              10.140.24.176        255.255.255.240 10.140.24.188        e1000g0:1  1500*    0   1 U        0      0

              10.140.24.176        255.255.255.240 10.140.24.190        e1000g0:2  1500*    0   1 U        0      0

              10.140.24.176        255.255.255.240 10.140.24.184        e1000g1  1500*    0   1 U        0      0

              10.140.108.160       255.255.255.224 10.140.26.71                 1500*    0   1 UG       0      0

              224.0.0.0            240.0.0.0       10.140.24.182        e1000g0  1500*    0   1 U        0      0

              127.0.0.1            255.255.255.255 127.0.0.1            lo0     8232*    0   5 UH  176443      0

               

              ********************************************************************************************************************************************************************

              When we are trying to add the below New IP's in different subnetmask to the existing above IP's and  existing IP's are not working which are in different subnet mask.

              Even tried with adding static route to the new IP's, still above existing IP's were not working.

              Can anyone help to help to configure thing properly so all the IP's will will work

              *********************************************************************************************************************************************************************
              10.140.26.71 au-syddirpm12.aap.pwcinternal.com

              10.140.26.72 au-syddirpp12.aap.pwcinternal.com

              10.140.26.73 au-syddirpk12.aap.pwcinternal.com

               

               

              Subnet mask: 255.255.255.224

              Gateway: 10.140.26.65

              • 4. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                2631790

                The 3 new above mentioned IP's we are trying to create on e1000g2         as below

                e1000g2        

                e1000g2:1

                e1000g2:2                 

                • 5. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                  DuqU

                  could you explain what you meant two different sub-NETMASKS?

                   

                  you mean e1000g2:1 with one netmask value, and e1000g2:2 with a different netmask.

                  if so:

                   

                  ifconfig e1000g2:1 your.needed.ip.here netmaks your.new.first.netmask

                  then the others.

                   

                  just be aware, a physical NIC (aggregate) usually has one default gateway (unless your network people doing some fancy routing/switching).

                   

                  Oh, BTW, no daemon/service restart needed. Just simple "ifconfig"

                  • 6. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                    2631790

                    1. am trying to config. below IP's on one SUBNETMASK (255.255.255.240) with GATEWAY /etc/defaultrouter: 10.140.24.177:

                    e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                            inet 10.140.24.182 netmask fffffff0 broadcast 10.140.24.191

                            ether 0:21:28:a4:35:7e

                    e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                            inet 10.140.24.188 netmask fffffff0 broadcast 10.140.24.191

                    e1000g0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

                            inet 10.140.24.190 netmask fffffff0 broadcast 10.140.24.191

                    e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

                            inet 10.140.24.184 netmask fffffff0 broadcast 10.140.24.191

                            ether 0:21:28:a4:35:7f

                     

                    2. trying to configure below IP's on on other SUBNETMASK (255.255.255.224) with GATEWAY: 10.140.26.65 (using Static Route: route add ....etc)

                    e1000g2        -      10.140.26.71

                    e1000g2:1    -       10.140.26.72

                    e1000g2:2      -       10.140.26.73 

                     

                    Can anyone, please suggest the solution at the earliest.

                     

                    • 7. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                      Lars Tunkrans

                      Hi ,

                       

                        the first part about the netmask  is easy .

                       

                        enter  into the file  /etc/netmasks

                       

                         10.140.26.64     255.255.255.224

                       

                      the  second part about the routing :    As you already have a default gateway  you need to set up 

                      static individual routes  to the networks you want to reach  through  10.140.26.65 :

                       

                      route add net  x.x.x.x  10.140.26.65 1

                       

                      for each network .

                      to do this  permanently in Solaris 10 these routing statements  can be placed in an

                      appropriately  formatted   startup  script  in /etc/rc3.d  

                       

                      Regards

                      //Lars

                      • 8. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                        DuqU

                        if you still need the commands:

                         

                        it seemed you have those interfaces up already(if not, do ifconfig e1000g2 plumb; e1000g2:1 plumb...)

                        ifconfig e1000g2 10.140.26.71 netmask 255.255.255.224

                        ifconfig e1000g2:1 10.140.26.72 netmask 255.255.255.224

                        ifconfig e1000g2:2 10.140.26.73 netmask 255.255.255.224

                         

                        make sure your NIC (e1000g2) is connected to the right port:

                         

                        route add 10.140.26.64 10.140.26.65 1

                        • 9. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                          2631790

                          I did the same but only one gateway IP's are working at a time.

                           

                          Can anyone please lemme know any other configurartions / service restarts/enabling is required.

                          also , please lemme know if you have any alternate plans for the same.

                          • 10. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                            2631790

                            I mean only IP's under one SubNetmask/Gateway are working and other IP's faling under other SubNetmask/Gateway are failing.

                            • 11. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                              Lars Tunkrans

                              Mmm  well you cant have  multiple default gateways.

                               

                                 You can have  one default gateway   and multiple  static routes  in one  Solaris  instance.

                               

                              You can not do this:

                              -------

                              route add net  default  10.140.24.177 1

                              route add net  default  10.140.26.65 1

                              -------

                               

                              you need  to have  only one  default route  in one  solaris  installation .

                               

                              You can do  this;  provided of course  that you network looks  that way .

                              ---------

                              route add net  default  10.140.24.177 1

                              route add net  10.140.30.0  10.140.26.65 1

                                route add net  10.140.31.0  10.140.26.65 1

                              route add net  10.140.32.0  10.140.26.65 1

                              A.S.O

                              --------

                               

                               

                              Alternatives  to this  is to  set up routing protocols  like  RIP or OSPF.

                               

                              Another  alternative  is to put  the  second  set of ip adresses  in a  Solaris ZONE .

                              you would need to install the application  again into the Solaris zone.

                              the SOlaris zone can own the  e1000g2  interface.

                              A Solaris zone has its own  TCP/IP stack  and its own Routing table.

                              A Solaris zone  needs to have its own default route configured.

                               

                              Regards

                               

                                //Lars

                              • 12. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                                2631790

                                Hello Lars, Thanks for your time.

                                 

                                The thing I dont understand is my New IP's are in 10.140.26.x

                                 

                                Why we are adding below Bold ones as part of route add (10.140.30.0, 10.140.31.0, 10.140.32.0)

                                and why we are not adding 10.140.26.0 in static routes.

                                 

                                You can do  this;  provided of course  that you network looks  that way .

                                ---------

                                route add net  default  10.140.24.177 1       (is this step mandatory, am asking as it is mentioned in /etc/defaultrouter & its default gateway for all)

                                route add net  10.140.30.0  10.140.26.65 1

                                  route add net  10.140.31.0  10.140.26.65 1

                                route add net  10.140.32.0  10.140.26.65 1

                                 

                                 

                                 

                                Also I tried adding each New IP to Static route as mentioned below (correct me if am wrong)

                                -------------------------------------------------------------------------------------------------------------------------------------

                                # route add 10.140.26.71 -netmask 255.255.255.224 10.140.26.65

                                # route add 10.140.26.72 -netmask 255.255.255.224 10.140.26.65

                                # route add 10.140.26.73 -netmask 255.255.255.224 10.140.26.65



                                But still din't work.


                                • 13. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                                  Lars Tunkrans

                                  Hi ,

                                   

                                     I do not know how you network is  designed.  i  used   10.140.30.0  ranges  as an example.

                                   

                                    you need to understand   your  own  network topology.    If you have    the  network   10.140.26.0/26     and the   adresses  you set up

                                  in the   10.140.26.64/26    network  need to access  them ,  yes  you would need  a routing statement  like:

                                   

                                       route add net  10.140.26.0  10.140.26.65 1  .

                                   

                                  this will work provided you have  set up the netmask  in /etc/netmasks   as we discussed above.

                                   

                                     10.140.26.0     255.255.255.240

                                    10.140.26.64 . 255.255.255.240

                                   

                                  10.140.26.128 255.255.255.240

                                   

                                   

                                  And your  Physical  ROUTER  ( cisco ?  HP ?  )   would need  to be programmed to Route  between the  networks .

                                   

                                   

                                   

                                  This  thing  you   tried  is just wrong,   it wont work .

                                   

                                  >># route add 10.140.26.71 -netmask 255.255.255.224 10.140.26.65

                                  >># route add 10.140.26.72 -netmask 255.255.255.224 10.140.26.65

                                  >># route add 10.140.26.73 -netmask 255.255.255.224 10.140.26.65


                                  //Lars

                                      


                                  • 14. Re: Configuring two subnetmasks in Solaris 10 Update11....urgently need of this info.
                                    2631790

                                    Thank you so much...your recent info. makes sense to me...hope it works well.!

                                    1 2 Previous Next