I am using Linux over Windows using VMware VirtualBox and set the network settings as Host-Only Network but when I am doing ifonfig in Linux I am getting IPV6 and not IPV4. I want IPV4 of eth0. I have also tried with the bridged network.

PS: I don't want to use NAT system as it will not allow me to ping from Windows to Linux (Host-to-Guest). I want it to be able to ping both sides.

Output of ifconfig:ipconfig_output

  • When I used NAT, I am not able to ping the IP from Host (Windows) – Prashant Kumar May 9 '18 at 7:07
  • under NAT you can use port-forwarding to make the specific apps work. But it's better to use bridging if you want the VM to have internet access – phuclv May 9 '18 at 7:43
  • @LưuVĩnhPhúc Technically a bridge is better. If automatic DHCP is not working outside the box, and the post shows the OP is not familiar with networking/IP theory, I advise NAT for first impressions and getting familiar with the technology. – Rui F Ribeiro May 9 '18 at 8:03
  • I just want my Linux box to have a IPv4 and not IPv6 also it should be reachable by my Windows (Host machine). Using NAT, I can't ping the IP of Linux, using Bridge, I am getting IPv6 as the output of ifconfig. – Prashant Kumar May 9 '18 at 8:39
  • Check your settings in host network manager. As for bridged mode only giving ipv6 there could be a number of reasons for that including ones related to your router. – jdwolf May 9 '18 at 9:56

Every network card has unique MAC address (08:00:27:66:ca:5e in your screenshot). IPv6 networking code in Linux automatically assigns special IPv6 address starting with fe80:: and made of network card's MAC address (fe80::a0027:fe66:ca5e in the same screenshot). This IPv6 address is used to find IPv6 network router and ask it for global IPv6 address (it is almost the same as to get IPv4 address via dynamic configuration protocol aka DHCP).

Simply speaking you do not have any real address assigned to your network card (nor IPv4 nor IPv6).

You need to configure your VMware or VirtualBox to provide DHCP service to automatically assign IP addresses to your virtual machines or you will have to assign IP addresses manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.