Virtual Box Bridged network failed to get IP (DHCP) No DHCPOFFERS received












1















I am newbie in networking and virtual box configuration, I have spent several days dealing with this problem. My goal is to get Bridged network working.

When I try to UP interface in my Virtual Box VM, it tries some DHCPDISCOVER messages, but eventually I get No DHCPOFFERS received.

I find where is the problem.

On my host machine I have following network interface configuration (interface I want to have bridge with).



HWADDR=5c:9a:d8:68:45:ff
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
DEVICE=enp3s0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=195.XX.YY.ZZ
NETMASK=255.255.255.0
NETWORK=195.XX.YY.0
GATEWAY=195.XX.YY.GGG
BROADCAST=195.XX.YY.255
DNS1=195.XX.YY.DDD
DNS2=8.8.8.8
DOMAIN=some.domain.com


So configuration is static.

If use BridgedAdapter on interface that in turn uses dhcp to get access to the Internet everything works great. as expected.

I guess that I have missed something or configuration should be done in another way, to be honest, I don't really understand how bridged network works internally.

Maybe problem can easily solved, but have not enough knowledge know to fix it by myself, so I am asking here.

Please help to solve this problem. Thanks everyone in advance for any help










share|improve this question























  • Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

    – MariusMatutiae
    May 26 '15 at 17:15











  • There is no dhcp in my public network, how can I configure bridge with this configuration ?

    – CROSP
    May 27 '15 at 1:40
















1















I am newbie in networking and virtual box configuration, I have spent several days dealing with this problem. My goal is to get Bridged network working.

When I try to UP interface in my Virtual Box VM, it tries some DHCPDISCOVER messages, but eventually I get No DHCPOFFERS received.

I find where is the problem.

On my host machine I have following network interface configuration (interface I want to have bridge with).



HWADDR=5c:9a:d8:68:45:ff
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
DEVICE=enp3s0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=195.XX.YY.ZZ
NETMASK=255.255.255.0
NETWORK=195.XX.YY.0
GATEWAY=195.XX.YY.GGG
BROADCAST=195.XX.YY.255
DNS1=195.XX.YY.DDD
DNS2=8.8.8.8
DOMAIN=some.domain.com


So configuration is static.

If use BridgedAdapter on interface that in turn uses dhcp to get access to the Internet everything works great. as expected.

I guess that I have missed something or configuration should be done in another way, to be honest, I don't really understand how bridged network works internally.

Maybe problem can easily solved, but have not enough knowledge know to fix it by myself, so I am asking here.

Please help to solve this problem. Thanks everyone in advance for any help










share|improve this question























  • Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

    – MariusMatutiae
    May 26 '15 at 17:15











  • There is no dhcp in my public network, how can I configure bridge with this configuration ?

    – CROSP
    May 27 '15 at 1:40














1












1








1








I am newbie in networking and virtual box configuration, I have spent several days dealing with this problem. My goal is to get Bridged network working.

When I try to UP interface in my Virtual Box VM, it tries some DHCPDISCOVER messages, but eventually I get No DHCPOFFERS received.

I find where is the problem.

On my host machine I have following network interface configuration (interface I want to have bridge with).



HWADDR=5c:9a:d8:68:45:ff
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
DEVICE=enp3s0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=195.XX.YY.ZZ
NETMASK=255.255.255.0
NETWORK=195.XX.YY.0
GATEWAY=195.XX.YY.GGG
BROADCAST=195.XX.YY.255
DNS1=195.XX.YY.DDD
DNS2=8.8.8.8
DOMAIN=some.domain.com


So configuration is static.

If use BridgedAdapter on interface that in turn uses dhcp to get access to the Internet everything works great. as expected.

I guess that I have missed something or configuration should be done in another way, to be honest, I don't really understand how bridged network works internally.

Maybe problem can easily solved, but have not enough knowledge know to fix it by myself, so I am asking here.

Please help to solve this problem. Thanks everyone in advance for any help










share|improve this question














I am newbie in networking and virtual box configuration, I have spent several days dealing with this problem. My goal is to get Bridged network working.

When I try to UP interface in my Virtual Box VM, it tries some DHCPDISCOVER messages, but eventually I get No DHCPOFFERS received.

I find where is the problem.

On my host machine I have following network interface configuration (interface I want to have bridge with).



HWADDR=5c:9a:d8:68:45:ff
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
DEVICE=enp3s0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=195.XX.YY.ZZ
NETMASK=255.255.255.0
NETWORK=195.XX.YY.0
GATEWAY=195.XX.YY.GGG
BROADCAST=195.XX.YY.255
DNS1=195.XX.YY.DDD
DNS2=8.8.8.8
DOMAIN=some.domain.com


So configuration is static.

If use BridgedAdapter on interface that in turn uses dhcp to get access to the Internet everything works great. as expected.

I guess that I have missed something or configuration should be done in another way, to be honest, I don't really understand how bridged network works internally.

Maybe problem can easily solved, but have not enough knowledge know to fix it by myself, so I am asking here.

Please help to solve this problem. Thanks everyone in advance for any help







networking virtualbox virtual-machine dhcp bridge






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 26 '15 at 16:40









CROSPCROSP

18129




18129













  • Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

    – MariusMatutiae
    May 26 '15 at 17:15











  • There is no dhcp in my public network, how can I configure bridge with this configuration ?

    – CROSP
    May 27 '15 at 1:40



















  • Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

    – MariusMatutiae
    May 26 '15 at 17:15











  • There is no dhcp in my public network, how can I configure bridge with this configuration ?

    – CROSP
    May 27 '15 at 1:40

















Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

– MariusMatutiae
May 26 '15 at 17:15





Your interface enp3s0 (Fedora or Arch?) has a public IP, and your gateway and network all belong to the public domain. It is quite possible that there is no dhcp server. Have you tried to get an IP address from dhcp on enp3s0, outside VirtualBox?

– MariusMatutiae
May 26 '15 at 17:15













There is no dhcp in my public network, how can I configure bridge with this configuration ?

– CROSP
May 27 '15 at 1:40





There is no dhcp in my public network, how can I configure bridge with this configuration ?

– CROSP
May 27 '15 at 1:40










1 Answer
1






active

oldest

votes


















1














Configuring bridge in your situation is not trivial, because there is no dhcp and because the IP address you wish to have for your VM is a public address, not a private one. I strongly suggest you use NAT instead, because in this case I am sure there are no legal implications.



If you insist in using a public IP address for your guest (and, I, repeat, you are doing this against my advice), you may use the same technique one uses when it is legal to do so, i.e. for instance when you are trying to occupy a private address.



You will have to find an IP which is not already occupied. Let us suppose that you have determined that X is a free IP address within your range. Then all you have to do is to set up the guest for a static IP.



Edit the guest's /etc/network/interfaces file, and make it look as follows:



 auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address X
netmask 255.255.255.0
gateway TheIP.Of.Your.Gateway
dns-nameservers 8.8.8.8 8.8.4.4


The above assumes that eth0 is the name of the ethernet card of the guest, if it is not use the appropriate one (enp3s0?). Now reboot your VM guest, and you should be good to go.



How do you find out the address X? First of all you will have to sniff traffic on your regular (enp3s0) interface. Use wireshark for this, you may google to find out how to use it. Then you have two options.




  1. use a free X ip address, i.e. one that you have never seen used. It is possible your provider has countermeasures to block this, after all your traffic has to go through his gateway and, if he does not want you to steal a public IP address, I could not possibly blame him.


  2. use an occupied IP address. Take note of both IP address and MAC address of a pc in your IP range, then spoof it. In other words, in VirtualBox's networking panel, insert the spoofed MAC address for the MAC address of the guest' NIC, and use the IP address as your X address above. This contraption will work fine when the original machine is idle, but will surely cause problems in the other situations because of the conflict inherent in having two machines with the same MAC and IP addresses.



Let me also add that there techniques to trace back the use of a spoofed IP address to you.



For these reasons, and for legal reasons, I strongly urge you to use NAT instead.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fsuperuser.com%2fquestions%2f919768%2fvirtual-box-bridged-network-failed-to-get-ip-dhcp-no-dhcpoffers-received%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









    1














    Configuring bridge in your situation is not trivial, because there is no dhcp and because the IP address you wish to have for your VM is a public address, not a private one. I strongly suggest you use NAT instead, because in this case I am sure there are no legal implications.



    If you insist in using a public IP address for your guest (and, I, repeat, you are doing this against my advice), you may use the same technique one uses when it is legal to do so, i.e. for instance when you are trying to occupy a private address.



    You will have to find an IP which is not already occupied. Let us suppose that you have determined that X is a free IP address within your range. Then all you have to do is to set up the guest for a static IP.



    Edit the guest's /etc/network/interfaces file, and make it look as follows:



     auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address X
    netmask 255.255.255.0
    gateway TheIP.Of.Your.Gateway
    dns-nameservers 8.8.8.8 8.8.4.4


    The above assumes that eth0 is the name of the ethernet card of the guest, if it is not use the appropriate one (enp3s0?). Now reboot your VM guest, and you should be good to go.



    How do you find out the address X? First of all you will have to sniff traffic on your regular (enp3s0) interface. Use wireshark for this, you may google to find out how to use it. Then you have two options.




    1. use a free X ip address, i.e. one that you have never seen used. It is possible your provider has countermeasures to block this, after all your traffic has to go through his gateway and, if he does not want you to steal a public IP address, I could not possibly blame him.


    2. use an occupied IP address. Take note of both IP address and MAC address of a pc in your IP range, then spoof it. In other words, in VirtualBox's networking panel, insert the spoofed MAC address for the MAC address of the guest' NIC, and use the IP address as your X address above. This contraption will work fine when the original machine is idle, but will surely cause problems in the other situations because of the conflict inherent in having two machines with the same MAC and IP addresses.



    Let me also add that there techniques to trace back the use of a spoofed IP address to you.



    For these reasons, and for legal reasons, I strongly urge you to use NAT instead.






    share|improve this answer




























      1














      Configuring bridge in your situation is not trivial, because there is no dhcp and because the IP address you wish to have for your VM is a public address, not a private one. I strongly suggest you use NAT instead, because in this case I am sure there are no legal implications.



      If you insist in using a public IP address for your guest (and, I, repeat, you are doing this against my advice), you may use the same technique one uses when it is legal to do so, i.e. for instance when you are trying to occupy a private address.



      You will have to find an IP which is not already occupied. Let us suppose that you have determined that X is a free IP address within your range. Then all you have to do is to set up the guest for a static IP.



      Edit the guest's /etc/network/interfaces file, and make it look as follows:



       auto lo
      iface lo inet loopback

      auto eth0
      iface eth0 inet static
      address X
      netmask 255.255.255.0
      gateway TheIP.Of.Your.Gateway
      dns-nameservers 8.8.8.8 8.8.4.4


      The above assumes that eth0 is the name of the ethernet card of the guest, if it is not use the appropriate one (enp3s0?). Now reboot your VM guest, and you should be good to go.



      How do you find out the address X? First of all you will have to sniff traffic on your regular (enp3s0) interface. Use wireshark for this, you may google to find out how to use it. Then you have two options.




      1. use a free X ip address, i.e. one that you have never seen used. It is possible your provider has countermeasures to block this, after all your traffic has to go through his gateway and, if he does not want you to steal a public IP address, I could not possibly blame him.


      2. use an occupied IP address. Take note of both IP address and MAC address of a pc in your IP range, then spoof it. In other words, in VirtualBox's networking panel, insert the spoofed MAC address for the MAC address of the guest' NIC, and use the IP address as your X address above. This contraption will work fine when the original machine is idle, but will surely cause problems in the other situations because of the conflict inherent in having two machines with the same MAC and IP addresses.



      Let me also add that there techniques to trace back the use of a spoofed IP address to you.



      For these reasons, and for legal reasons, I strongly urge you to use NAT instead.






      share|improve this answer


























        1












        1








        1







        Configuring bridge in your situation is not trivial, because there is no dhcp and because the IP address you wish to have for your VM is a public address, not a private one. I strongly suggest you use NAT instead, because in this case I am sure there are no legal implications.



        If you insist in using a public IP address for your guest (and, I, repeat, you are doing this against my advice), you may use the same technique one uses when it is legal to do so, i.e. for instance when you are trying to occupy a private address.



        You will have to find an IP which is not already occupied. Let us suppose that you have determined that X is a free IP address within your range. Then all you have to do is to set up the guest for a static IP.



        Edit the guest's /etc/network/interfaces file, and make it look as follows:



         auto lo
        iface lo inet loopback

        auto eth0
        iface eth0 inet static
        address X
        netmask 255.255.255.0
        gateway TheIP.Of.Your.Gateway
        dns-nameservers 8.8.8.8 8.8.4.4


        The above assumes that eth0 is the name of the ethernet card of the guest, if it is not use the appropriate one (enp3s0?). Now reboot your VM guest, and you should be good to go.



        How do you find out the address X? First of all you will have to sniff traffic on your regular (enp3s0) interface. Use wireshark for this, you may google to find out how to use it. Then you have two options.




        1. use a free X ip address, i.e. one that you have never seen used. It is possible your provider has countermeasures to block this, after all your traffic has to go through his gateway and, if he does not want you to steal a public IP address, I could not possibly blame him.


        2. use an occupied IP address. Take note of both IP address and MAC address of a pc in your IP range, then spoof it. In other words, in VirtualBox's networking panel, insert the spoofed MAC address for the MAC address of the guest' NIC, and use the IP address as your X address above. This contraption will work fine when the original machine is idle, but will surely cause problems in the other situations because of the conflict inherent in having two machines with the same MAC and IP addresses.



        Let me also add that there techniques to trace back the use of a spoofed IP address to you.



        For these reasons, and for legal reasons, I strongly urge you to use NAT instead.






        share|improve this answer













        Configuring bridge in your situation is not trivial, because there is no dhcp and because the IP address you wish to have for your VM is a public address, not a private one. I strongly suggest you use NAT instead, because in this case I am sure there are no legal implications.



        If you insist in using a public IP address for your guest (and, I, repeat, you are doing this against my advice), you may use the same technique one uses when it is legal to do so, i.e. for instance when you are trying to occupy a private address.



        You will have to find an IP which is not already occupied. Let us suppose that you have determined that X is a free IP address within your range. Then all you have to do is to set up the guest for a static IP.



        Edit the guest's /etc/network/interfaces file, and make it look as follows:



         auto lo
        iface lo inet loopback

        auto eth0
        iface eth0 inet static
        address X
        netmask 255.255.255.0
        gateway TheIP.Of.Your.Gateway
        dns-nameservers 8.8.8.8 8.8.4.4


        The above assumes that eth0 is the name of the ethernet card of the guest, if it is not use the appropriate one (enp3s0?). Now reboot your VM guest, and you should be good to go.



        How do you find out the address X? First of all you will have to sniff traffic on your regular (enp3s0) interface. Use wireshark for this, you may google to find out how to use it. Then you have two options.




        1. use a free X ip address, i.e. one that you have never seen used. It is possible your provider has countermeasures to block this, after all your traffic has to go through his gateway and, if he does not want you to steal a public IP address, I could not possibly blame him.


        2. use an occupied IP address. Take note of both IP address and MAC address of a pc in your IP range, then spoof it. In other words, in VirtualBox's networking panel, insert the spoofed MAC address for the MAC address of the guest' NIC, and use the IP address as your X address above. This contraption will work fine when the original machine is idle, but will surely cause problems in the other situations because of the conflict inherent in having two machines with the same MAC and IP addresses.



        Let me also add that there techniques to trace back the use of a spoofed IP address to you.



        For these reasons, and for legal reasons, I strongly urge you to use NAT instead.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 27 '15 at 3:08









        MariusMatutiaeMariusMatutiae

        38.2k95196




        38.2k95196






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f919768%2fvirtual-box-bridged-network-failed-to-get-ip-dhcp-no-dhcpoffers-received%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

            Сан-Квентин

            Алькесар

            Josef Freinademetz