Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1598  / 2 Years ago, fri, june 24, 2022, 12:35:07

I have an Ubuntu 14.04 virtual machine. I set the NAT networking option to it.
Without any further changes, I can access to internet from my VM. When I run: cat /etc/network/interfaces I get this:



ubuntu14@ubuntu14:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback


How come I get internet connection without any interface defined for my NAT ?


More From » internet

 Answers
6

Interfaces are started automatically during the boot process. This is for for example eth0 for the first ethernet



The entries for lo (loopback) are generally required and may also when using the Network Manager can not be removed or other graphical configuration tool.



Generally, /etc/network/interfaces contains network interface configuration
information for the ifup and ifdown commands. This is where you configure how your system is connected to the network.



Unless you manually configured /etc/network/interfaces with



iface <Interface> <Protocoll> <Method>



Your interface gets DHCP and connects you to the network.



These two entries:



auto lo
iface lo inet loopback


are fundamental components of Linux. If these entry's are gone, interfaces can no longer communicate with each other.



Read More about network interface configuration.



Finally, I guess your VM gets a bridge interface from your host. You can list all your interfaces running ifconfig -a and you can see which interface connecting you to the internet.


[#24094] Saturday, June 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oneeme

Total Points: 340
Total Questions: 110
Total Answers: 133

Location: Ghana
Member since Fri, Oct 21, 2022
2 Years ago
;