Mistery with DHCP of VirtualBox and CentOS 7

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have the latest VirtualBox installed on Windows 7 Pro. I created NatNetwork with 10.10.10.0/27 and DHCP enabled and Host-only network with 172.17.24.0/27 and DHCP enabled too.



Created Virtual Machine as Red Hat Linux and installed CentOS 7 on it.



After multiple issues for whatever reason I have a wrong IP given by DHCP server to enp0s8 interface.



This is client side:



[root@smu1 ~]# ifconfig enp0s8
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.6 netmask 255.255.255.224 broadcast 10.0.2.31
inet6 fe80::a00:27ff:fe41:58ae prefixlen 64 scopeid 0x20<link>
ether 08:00:27:41:58:ae txqueuelen 1000 (Ethernet)
RX packets 13 bytes 3430 (3.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 207 bytes 23996 (23.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

[root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT=no
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="enp0s8"
UUID="77e14c77-358e-48c3-be0c-e18d75cecc5a"
DEVICE="enp0s8"
ONBOOT="yes"
PEERDNS=no
PEERROUTES=yes


This is host side:



C:Program FilesOracleVirtualBox>VBoxManage.exe list natnetworks
NetworkName: NatNetwork
IP: 10.10.10.1
Network: 10.10.10.0/27
IPv6 Enabled: No
IPv6 Prefix: fd17:625c:f037:2::/64
DHCP Enabled: Yes
Enabled: Yes
loopback mappings (ipv4)
127.0.0.1=2
C:Program FilesOracleVirtualBox>VBoxManage.exe list dhcpservers
NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP: 172.17.24.4
NetworkMask: 255.255.255.224
lowerIPAddress: 172.17.24.5
upperIPAddress: 172.17.24.30
Enabled: Yes

NetworkName: NatNetwork
IP: 10.10.10.4
NetworkMask: 255.255.255.224
lowerIPAddress: 10.10.10.5
upperIPAddress: 10.10.10.30
Enabled: Yes


Exactly the same settings for host-only network work great! No issues at all.



[root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=b012704e-cc06-4ece-b4ea-7a12bed03f27
DEVICE=enp0s3
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
[root@smu1 ~]# ifconfig enp0s3
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.24.6 netmask 255.255.255.224 broadcast 172.17.24.31
inet6 fe80::a00:27ff:fe46:c2b prefixlen 64 scopeid 0x20<link>
ether 08:00:27:46:0c:2b txqueuelen 1000 (Ethernet)
RX packets 292 bytes 29717 (29.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 238 bytes 46906 (45.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


I tried reboots of both host and guest, delete and re-create natnetwork and dhcp server from command line (did it once again after disabled completely UAC in Windows).










share|improve this question



























    up vote
    1
    down vote

    favorite












    I have the latest VirtualBox installed on Windows 7 Pro. I created NatNetwork with 10.10.10.0/27 and DHCP enabled and Host-only network with 172.17.24.0/27 and DHCP enabled too.



    Created Virtual Machine as Red Hat Linux and installed CentOS 7 on it.



    After multiple issues for whatever reason I have a wrong IP given by DHCP server to enp0s8 interface.



    This is client side:



    [root@smu1 ~]# ifconfig enp0s8
    enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 10.0.2.6 netmask 255.255.255.224 broadcast 10.0.2.31
    inet6 fe80::a00:27ff:fe41:58ae prefixlen 64 scopeid 0x20<link>
    ether 08:00:27:41:58:ae txqueuelen 1000 (Ethernet)
    RX packets 13 bytes 3430 (3.3 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 207 bytes 23996 (23.4 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
    TYPE="Ethernet"
    BOOTPROTO="dhcp"
    DEFROUTE="yes"
    IPV4_FAILURE_FATAL="no"
    IPV6INIT=no
    IPV6_AUTOCONF="yes"
    IPV6_DEFROUTE="yes"
    IPV6_PEERDNS="yes"
    IPV6_PEERROUTES="yes"
    IPV6_FAILURE_FATAL="no"
    IPV6_ADDR_GEN_MODE="stable-privacy"
    NAME="enp0s8"
    UUID="77e14c77-358e-48c3-be0c-e18d75cecc5a"
    DEVICE="enp0s8"
    ONBOOT="yes"
    PEERDNS=no
    PEERROUTES=yes


    This is host side:



    C:Program FilesOracleVirtualBox>VBoxManage.exe list natnetworks
    NetworkName: NatNetwork
    IP: 10.10.10.1
    Network: 10.10.10.0/27
    IPv6 Enabled: No
    IPv6 Prefix: fd17:625c:f037:2::/64
    DHCP Enabled: Yes
    Enabled: Yes
    loopback mappings (ipv4)
    127.0.0.1=2
    C:Program FilesOracleVirtualBox>VBoxManage.exe list dhcpservers
    NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
    IP: 172.17.24.4
    NetworkMask: 255.255.255.224
    lowerIPAddress: 172.17.24.5
    upperIPAddress: 172.17.24.30
    Enabled: Yes

    NetworkName: NatNetwork
    IP: 10.10.10.4
    NetworkMask: 255.255.255.224
    lowerIPAddress: 10.10.10.5
    upperIPAddress: 10.10.10.30
    Enabled: Yes


    Exactly the same settings for host-only network work great! No issues at all.



    [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
    TYPE=Ethernet
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_PEERDNS=yes
    IPV6_PEERROUTES=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp0s3
    UUID=b012704e-cc06-4ece-b4ea-7a12bed03f27
    DEVICE=enp0s3
    ONBOOT=yes
    PEERDNS=no
    PEERROUTES=no
    [root@smu1 ~]# ifconfig enp0s3
    enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 172.17.24.6 netmask 255.255.255.224 broadcast 172.17.24.31
    inet6 fe80::a00:27ff:fe46:c2b prefixlen 64 scopeid 0x20<link>
    ether 08:00:27:46:0c:2b txqueuelen 1000 (Ethernet)
    RX packets 292 bytes 29717 (29.0 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 238 bytes 46906 (45.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


    I tried reboots of both host and guest, delete and re-create natnetwork and dhcp server from command line (did it once again after disabled completely UAC in Windows).










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have the latest VirtualBox installed on Windows 7 Pro. I created NatNetwork with 10.10.10.0/27 and DHCP enabled and Host-only network with 172.17.24.0/27 and DHCP enabled too.



      Created Virtual Machine as Red Hat Linux and installed CentOS 7 on it.



      After multiple issues for whatever reason I have a wrong IP given by DHCP server to enp0s8 interface.



      This is client side:



      [root@smu1 ~]# ifconfig enp0s8
      enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.2.6 netmask 255.255.255.224 broadcast 10.0.2.31
      inet6 fe80::a00:27ff:fe41:58ae prefixlen 64 scopeid 0x20<link>
      ether 08:00:27:41:58:ae txqueuelen 1000 (Ethernet)
      RX packets 13 bytes 3430 (3.3 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 207 bytes 23996 (23.4 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
      TYPE="Ethernet"
      BOOTPROTO="dhcp"
      DEFROUTE="yes"
      IPV4_FAILURE_FATAL="no"
      IPV6INIT=no
      IPV6_AUTOCONF="yes"
      IPV6_DEFROUTE="yes"
      IPV6_PEERDNS="yes"
      IPV6_PEERROUTES="yes"
      IPV6_FAILURE_FATAL="no"
      IPV6_ADDR_GEN_MODE="stable-privacy"
      NAME="enp0s8"
      UUID="77e14c77-358e-48c3-be0c-e18d75cecc5a"
      DEVICE="enp0s8"
      ONBOOT="yes"
      PEERDNS=no
      PEERROUTES=yes


      This is host side:



      C:Program FilesOracleVirtualBox>VBoxManage.exe list natnetworks
      NetworkName: NatNetwork
      IP: 10.10.10.1
      Network: 10.10.10.0/27
      IPv6 Enabled: No
      IPv6 Prefix: fd17:625c:f037:2::/64
      DHCP Enabled: Yes
      Enabled: Yes
      loopback mappings (ipv4)
      127.0.0.1=2
      C:Program FilesOracleVirtualBox>VBoxManage.exe list dhcpservers
      NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
      IP: 172.17.24.4
      NetworkMask: 255.255.255.224
      lowerIPAddress: 172.17.24.5
      upperIPAddress: 172.17.24.30
      Enabled: Yes

      NetworkName: NatNetwork
      IP: 10.10.10.4
      NetworkMask: 255.255.255.224
      lowerIPAddress: 10.10.10.5
      upperIPAddress: 10.10.10.30
      Enabled: Yes


      Exactly the same settings for host-only network work great! No issues at all.



      [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
      TYPE=Ethernet
      BOOTPROTO=dhcp
      DEFROUTE=yes
      IPV4_FAILURE_FATAL=no
      IPV6INIT=no
      IPV6_AUTOCONF=yes
      IPV6_DEFROUTE=yes
      IPV6_PEERDNS=yes
      IPV6_PEERROUTES=yes
      IPV6_FAILURE_FATAL=no
      IPV6_ADDR_GEN_MODE=stable-privacy
      NAME=enp0s3
      UUID=b012704e-cc06-4ece-b4ea-7a12bed03f27
      DEVICE=enp0s3
      ONBOOT=yes
      PEERDNS=no
      PEERROUTES=no
      [root@smu1 ~]# ifconfig enp0s3
      enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 172.17.24.6 netmask 255.255.255.224 broadcast 172.17.24.31
      inet6 fe80::a00:27ff:fe46:c2b prefixlen 64 scopeid 0x20<link>
      ether 08:00:27:46:0c:2b txqueuelen 1000 (Ethernet)
      RX packets 292 bytes 29717 (29.0 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 238 bytes 46906 (45.8 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


      I tried reboots of both host and guest, delete and re-create natnetwork and dhcp server from command line (did it once again after disabled completely UAC in Windows).










      share|improve this question















      I have the latest VirtualBox installed on Windows 7 Pro. I created NatNetwork with 10.10.10.0/27 and DHCP enabled and Host-only network with 172.17.24.0/27 and DHCP enabled too.



      Created Virtual Machine as Red Hat Linux and installed CentOS 7 on it.



      After multiple issues for whatever reason I have a wrong IP given by DHCP server to enp0s8 interface.



      This is client side:



      [root@smu1 ~]# ifconfig enp0s8
      enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 10.0.2.6 netmask 255.255.255.224 broadcast 10.0.2.31
      inet6 fe80::a00:27ff:fe41:58ae prefixlen 64 scopeid 0x20<link>
      ether 08:00:27:41:58:ae txqueuelen 1000 (Ethernet)
      RX packets 13 bytes 3430 (3.3 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 207 bytes 23996 (23.4 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
      TYPE="Ethernet"
      BOOTPROTO="dhcp"
      DEFROUTE="yes"
      IPV4_FAILURE_FATAL="no"
      IPV6INIT=no
      IPV6_AUTOCONF="yes"
      IPV6_DEFROUTE="yes"
      IPV6_PEERDNS="yes"
      IPV6_PEERROUTES="yes"
      IPV6_FAILURE_FATAL="no"
      IPV6_ADDR_GEN_MODE="stable-privacy"
      NAME="enp0s8"
      UUID="77e14c77-358e-48c3-be0c-e18d75cecc5a"
      DEVICE="enp0s8"
      ONBOOT="yes"
      PEERDNS=no
      PEERROUTES=yes


      This is host side:



      C:Program FilesOracleVirtualBox>VBoxManage.exe list natnetworks
      NetworkName: NatNetwork
      IP: 10.10.10.1
      Network: 10.10.10.0/27
      IPv6 Enabled: No
      IPv6 Prefix: fd17:625c:f037:2::/64
      DHCP Enabled: Yes
      Enabled: Yes
      loopback mappings (ipv4)
      127.0.0.1=2
      C:Program FilesOracleVirtualBox>VBoxManage.exe list dhcpservers
      NetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
      IP: 172.17.24.4
      NetworkMask: 255.255.255.224
      lowerIPAddress: 172.17.24.5
      upperIPAddress: 172.17.24.30
      Enabled: Yes

      NetworkName: NatNetwork
      IP: 10.10.10.4
      NetworkMask: 255.255.255.224
      lowerIPAddress: 10.10.10.5
      upperIPAddress: 10.10.10.30
      Enabled: Yes


      Exactly the same settings for host-only network work great! No issues at all.



      [root@smu1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
      TYPE=Ethernet
      BOOTPROTO=dhcp
      DEFROUTE=yes
      IPV4_FAILURE_FATAL=no
      IPV6INIT=no
      IPV6_AUTOCONF=yes
      IPV6_DEFROUTE=yes
      IPV6_PEERDNS=yes
      IPV6_PEERROUTES=yes
      IPV6_FAILURE_FATAL=no
      IPV6_ADDR_GEN_MODE=stable-privacy
      NAME=enp0s3
      UUID=b012704e-cc06-4ece-b4ea-7a12bed03f27
      DEVICE=enp0s3
      ONBOOT=yes
      PEERDNS=no
      PEERROUTES=no
      [root@smu1 ~]# ifconfig enp0s3
      enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 172.17.24.6 netmask 255.255.255.224 broadcast 172.17.24.31
      inet6 fe80::a00:27ff:fe46:c2b prefixlen 64 scopeid 0x20<link>
      ether 08:00:27:46:0c:2b txqueuelen 1000 (Ethernet)
      RX packets 292 bytes 29717 (29.0 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 238 bytes 46906 (45.8 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


      I tried reboots of both host and guest, delete and re-create natnetwork and dhcp server from command line (did it once again after disabled completely UAC in Windows).







      centos virtualbox dhcp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 18 at 9:32









      Rui F Ribeiro

      38.2k1475123




      38.2k1475123










      asked Jan 28 '17 at 6:39









      Angel_Kitsa

      163




      163




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Not sure what was wrong, perhaps because I manually assigned 10.10.10.4 as DHCP server IP and VirtualBox doesn't like it...
          I created natnet1 from GUI for another network, deleted 10.10.10.0/27 from CMD, tested that DHCP is now giving proper IP from network natnet1, created natnet10 with network I originally needed and deleted natnet1.
          Now the IP is assigned as expected.
          DHCP server IP is 10.10.10.3 and not .4 as I manually assigned in failure scenario.
          Perhaps some internal limitations from VirtualBox on which IP can be DHCP server in NatNetwork...
          If anyone want to test this theory fill free.



          Problem solved.






          share|improve this answer




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f340722%2fmistery-with-dhcp-of-virtualbox-and-centos-7%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            Not sure what was wrong, perhaps because I manually assigned 10.10.10.4 as DHCP server IP and VirtualBox doesn't like it...
            I created natnet1 from GUI for another network, deleted 10.10.10.0/27 from CMD, tested that DHCP is now giving proper IP from network natnet1, created natnet10 with network I originally needed and deleted natnet1.
            Now the IP is assigned as expected.
            DHCP server IP is 10.10.10.3 and not .4 as I manually assigned in failure scenario.
            Perhaps some internal limitations from VirtualBox on which IP can be DHCP server in NatNetwork...
            If anyone want to test this theory fill free.



            Problem solved.






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              Not sure what was wrong, perhaps because I manually assigned 10.10.10.4 as DHCP server IP and VirtualBox doesn't like it...
              I created natnet1 from GUI for another network, deleted 10.10.10.0/27 from CMD, tested that DHCP is now giving proper IP from network natnet1, created natnet10 with network I originally needed and deleted natnet1.
              Now the IP is assigned as expected.
              DHCP server IP is 10.10.10.3 and not .4 as I manually assigned in failure scenario.
              Perhaps some internal limitations from VirtualBox on which IP can be DHCP server in NatNetwork...
              If anyone want to test this theory fill free.



              Problem solved.






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Not sure what was wrong, perhaps because I manually assigned 10.10.10.4 as DHCP server IP and VirtualBox doesn't like it...
                I created natnet1 from GUI for another network, deleted 10.10.10.0/27 from CMD, tested that DHCP is now giving proper IP from network natnet1, created natnet10 with network I originally needed and deleted natnet1.
                Now the IP is assigned as expected.
                DHCP server IP is 10.10.10.3 and not .4 as I manually assigned in failure scenario.
                Perhaps some internal limitations from VirtualBox on which IP can be DHCP server in NatNetwork...
                If anyone want to test this theory fill free.



                Problem solved.






                share|improve this answer












                Not sure what was wrong, perhaps because I manually assigned 10.10.10.4 as DHCP server IP and VirtualBox doesn't like it...
                I created natnet1 from GUI for another network, deleted 10.10.10.0/27 from CMD, tested that DHCP is now giving proper IP from network natnet1, created natnet10 with network I originally needed and deleted natnet1.
                Now the IP is assigned as expected.
                DHCP server IP is 10.10.10.3 and not .4 as I manually assigned in failure scenario.
                Perhaps some internal limitations from VirtualBox on which IP can be DHCP server in NatNetwork...
                If anyone want to test this theory fill free.



                Problem solved.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 28 '17 at 22:39









                Angel_Kitsa

                163




                163



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f340722%2fmistery-with-dhcp-of-virtualbox-and-centos-7%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?