1 2 Previous Next 23 Replies Latest reply: Mar 19, 2014 8:08 AM by Dude! RSS

    How to start eth1 on boot.

    1769248

      I am new to OEL and have configured the network and I can access the server if I "ifup eth1", but if I reboot the machine I cannot access the machine until I run that command again.

       

      How do I set this to start on boot?

       

      Thanks,

      -NMR

        • 1. Re: How to start eth1 on boot.
          Dude!

          You probably missed the "connect at startup" checkbox in the network configuration GUI or need to enter "ONBOOT=yes" in your /etc/sysconfig/network-scripts/ifcfg-eth1 configuration file.

          • 2. Re: How to start eth1 on boot.
            user12611628

            Two options - 1) If you have Desktop(GUI) installed then you can run edit the network connection by right click on the Network icon on top right of the Desktop GUI and edit the interface settings. Select the "Connect automatically" option for your interface(eth1). 2) Or you can edit the ifcfg-<interface> configuration file and set ONBOOT="yes". In your case, the file should be /etc/sysconfig/network-scripts/ifcfg-eth1 if eth1 is your interface. Save the file after setting ONBOOT=yes and that should do the trick.

            • 3. Re: How to start eth1 on boot.
              1769248

              I did set it in ifcfg-eth1, after reboot it is not started. Any other ideas?

               

              I had to change it from eth0 to eth1, is there anything I could have missed?

               

              Thanks,

              -NMR

              • 4. Re: How to start eth1 on boot.
                EdStevens

                1769248 wrote:

                 

                I did set it in ifcfg-eth1, after reboot it is not started. Any other ideas?

                 

                I had to change it from eth0 to eth1, is there anything I could have missed?

                 

                Thanks,

                -NMR

                EXACTLY How did you "change it"? 

                • 5. Re: How to start eth1 on boot.
                  1769248

                  When I would try ifup eth0 I would get a message "Cannot find eth0". I read somewhere that it could be that the adapter is eth1, vmWare, so I changed the file name... mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1.

                   

                  Then I changed the "DEVICE".. the following contains dummy data.

                   

                  DEVICE=eth1

                  HWADDR= "dummy"

                  TYPE=Ethernet

                  NM_CONTROLLED=yes

                  BOOTPROTO=static

                  IPADDR="dummy"

                  NETMASK="dummy"

                  NETWORK="dummy"

                  GATEWAY="dummy"

                  DNS1="dummy"

                  DNS2="dummy"

                  IPV4_FAILURE_FATAL=yes

                  IPV6INIT=no

                  ONBOOT=yes

                  • 6. Re: How to start eth1 on boot.
                    Dude!

                    I suggest to check your  /etc/udev/rules.d/70-persistent-net.rules file. If you install a new Ethernet device or change the Mac Address of an existing device, udev will automatically update and add a new the device number. You can remove the entries in that file, restart the system and your Ethernet device should be eth0 again.

                    • 7. Re: How to start eth1 on boot.
                      1769248

                      I'm unsure how this helps the situation. I did delete this file in the beginning and it only has one row in it now "eth1". I have a ifcfg-eth1 file so why is it not starting automagically.

                       

                      -NMR

                      • 8. Re: How to start eth1 on boot.
                        Dude!

                        Are you using any kind of virtual machine?

                        • 9. Re: How to start eth1 on boot.
                          1769248

                          The server in question is a vm.

                          • 10. Re: How to start eth1 on boot.
                            Dude!

                            Can you be more specific? Anyway, that's what I thought. Perhaps you copied the vm or changed the virtual network adapter and the MAC address in the configuration files no longer match the hardware. That would explain why you have to use eth1 instead of eth0. You have different problems. The first to solve is to clean-up /etc/udev/rules.d/70-persistent-net.rules file and restart the server so that the system will rediscover and reassign the devices. Then compare the Mac addresses of your ifcfg-ethx configuration files with the mac address of the adapters, or leave out the HWADDR, which you don't need. if the MAC addresses don't match the device won't start, regardless.

                            • 11. Re: How to start eth1 on boot.
                              1769248

                              OK, here's what I just tried.

                               

                              I mv eth1 to eth0.

                               

                              Edited it to look like the following...

                              DEVICE=eth0

                              TYPE=Ethernet

                              NM_CONTROLLED=yes

                              BOOTPROTO=static

                              IPADDR="dummy"

                              NETMASK="dummy"

                              NETWORK="dummy"

                              GATEWAY="dummy"

                              DNS1="dummy"

                              DNS2="dummy"

                              IPV4_FAILURE_FATAL=yes

                              IPV6INIT=no

                              ONBOOT=yes


                              Deleted the 70--persistent-net.rules file and bounced the sever.


                              The file got recreated with the eth0, but it still didn't start automatically.


                              Thanks,

                              -NMR

                              • 12. Re: How to start eth1 on boot.
                                Dude!

                                Are you running a desktop system? Why do you have NM_CONTROLLED in there?


                                I guess you did not put "dummy" in there? Are you using correct values?


                                What is your output of ifconfig eth0?

                                 

                                • 13. Re: How to start eth1 on boot.
                                  1769248

                                  Ha, no i didnt put dummy in there everything works fine if I start it manually... ifup-eth0.

                                   

                                  eth0      Link encap:Ethernet  HWaddr dummy

                                            inet addr:dummy  Bcast:dummy  Mask:dummy

                                            inet6 addr: dummy/dummy Scope:Link

                                            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                                            RX packets:83066 errors:0 dropped:0 overruns:0 frame:0

                                            TX packets:110 errors:0 dropped:0 overruns:0 carrier:0

                                            collisions:0 txqueuelen:1000

                                            RX bytes:5855162 (5.5 MiB)  TX bytes:13368 (13.0 KiB)

                                  • 14. Re: How to start eth1 on boot.
                                    user12611628

                                    Do you see any errors/warnings/messages in /var/log/boot.log for eth0 or eth1?

                                    1 2 Previous Next