Help Adding Ips to RedHat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JulianSosa
    Confirmed User
    • Aug 2003
    • 3042

    #1

    Help Adding Ips to RedHat

    I have a box and I'm TRYING to add new ips to it. its redhat linux. I know in BSD I'd add the aliases in rc.conf, but in linux i'm stumped. can someone tell me what to do, and if possible not assume that I know ANYTHIGN about linux?
  • CognitiveDissonance
    Registered User
    • Nov 2003
    • 25

    #2
    man ifconfig

    Comment

    • JulianSosa
      Confirmed User
      • Aug 2003
      • 3042

      #3
      Originally posted by CognitiveDissonance
      man ifconfig
      I looked there I also tried useing netconfig -d eh0:1

      Nothing seems to work .

      Comment

      • fuzebox
        making it rain
        • Oct 2003
        • 22359

        #4
        What version of redhat?

        Check out /etc/sysconfig/networking ...

        Comment

        • JulianSosa
          Confirmed User
          • Aug 2003
          • 3042

          #5
          Red Hat Enterprise Linux ES release 3 (Taroon Update 1)

          Comment

          • JulianSosa
            Confirmed User
            • Aug 2003
            • 3042

            #6
            Anyone awake?

            Comment

            • NemesisEnforcer
              Confirmed User
              • Aug 2003
              • 2122

              #7
              Let's say you wanted to add the IP address is 66.218.71.198, you would enter:

              /sbin/ifconfig eth0:1 66.218.71.198

              Do this for all IPs you want to add. Don't forget to put them in your startup file so that when you reboot you don't have to rekey them.

              Originally posted by JulianSosa
              I have a box and I'm TRYING to add new ips to it. its redhat linux. I know in BSD I'd add the aliases in rc.conf, but in linux i'm stumped. can someone tell me what to do, and if possible not assume that I know ANYTHIGN about linux?
              The Only Time When Success Comes Before Work Is In A Dictionary.

              Did you ever notice: When you put the 2 words 'The' and 'IRS' together it spells 'Theirs.'

              Comment

              • JulianSosa
                Confirmed User
                • Aug 2003
                • 3042

                #8
                Originally posted by NemesisEnforcer
                Let's say you wanted to add the IP address is 66.218.71.198, you would enter:

                /sbin/ifconfig eth0:1 66.218.71.198

                Do this for all IPs you want to add. Don't forget to put them in your startup file so that when you reboot you don't have to rekey them.

                Thanks man Can you please tell me where the startup file is?

                Comment

                • NemesisEnforcer
                  Confirmed User
                  • Aug 2003
                  • 2122

                  #9
                  Use rc.local found at /etc/rc.d/rc.local

                  Originally posted by JulianSosa


                  Thanks man Can you please tell me where the startup file is?
                  The Only Time When Success Comes Before Work Is In A Dictionary.

                  Did you ever notice: When you put the 2 words 'The' and 'IRS' together it spells 'Theirs.'

                  Comment

                  • JulianSosa
                    Confirmed User
                    • Aug 2003
                    • 3042

                    #10
                    Originally posted by NemesisEnforcer
                    Use rc.local found at /etc/rc.d/rc.local

                    THANK YOU.
                    YOU made my day

                    Comment

                    • NemesisEnforcer
                      Confirmed User
                      • Aug 2003
                      • 2122

                      #11
                      I forgot to mention that if you're adding more than one IP address it would appear as follows:

                      /sbin/ifconfig eth0:1 66.218.71.198
                      /sbin/ifconfig eth0:2 66.218.71.199
                      /sbin/ifconfig eth0:3 66.218.71.200

                      Note the increment referencing your ethernet card for each IP.
                      The Only Time When Success Comes Before Work Is In A Dictionary.

                      Did you ever notice: When you put the 2 words 'The' and 'IRS' together it spells 'Theirs.'

                      Comment

                      • JulianSosa
                        Confirmed User
                        • Aug 2003
                        • 3042

                        #12
                        Originally posted by NemesisEnforcer
                        I forgot to mention that if you're adding more than one IP address it would appear as follows:

                        /sbin/ifconfig eth0:1 66.218.71.198
                        /sbin/ifconfig eth0:2 66.218.71.199
                        /sbin/ifconfig eth0:3 66.218.71.200

                        Note the increment referencing your ethernet card for each IP.

                        I worked that out thank.

                        Comment

                        • blazin
                          Confirmed User
                          • Aug 2002
                          • 2781

                          #13
                          look in /etc/sysconfig/network-sc r ipts/

                          you will see some files like : ifcfg-eth0

                          copy this to ifcfg-eth0:1

                          then edit it naming the device eth0:1
                          and change the ipaddress

                          then type:

                          ifup ifcfg-eth0:1
                          I don't endorse a god damn thing......

                          Comment

                          • jerseygirls
                            Confirmed User
                            • Mar 2003
                            • 219

                            #14
                            Blazin has it right for red hat.

                            YOu can also add a range of ip's with this config file:

                            Call the script (with 0 being a counter 0 thru whatever for each non sequential range you want to add): ifcfg-eth0-range0


                            and the contents of the file should be:
                            IPADDR_START=123.123.123.1
                            IPADDR_END=123.123.123.20
                            CLONENUM_START=0
                            BROADCAST=123.123.123.256
                            NETMASK=255.255.255.0
                            NETWORK=123.123.123.0
                            ONBOOT=yes

                            That would creat the ip's from 1 - 20

                            Obviously replace the network, broadcast, and netmask with your own info

                            Comment

                            • jerseygirls
                              Confirmed User
                              • Mar 2003
                              • 219

                              #15
                              i forgot once you edit the files, i restart the network so the changes take place with:

                              /etc/rc.d/init.d/network restart




                              and then you can test your work with:

                              ifconfig

                              Comment

                              Working...