I have a Virtual Box machine with 2 net adapters, first is an "internal net" and the second a "bridge adapter". How could I config both for have an static ip for the internal network and a dynamic ip for bridge?
I tried modifying /etc/network/interfaces
:
#localhost
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search lcl
iface eth1 inet dhcp
But when I restart the machine I get:
lo Link encap:Bucle local
Direc. inet:127.0.0.1 Másc:255.0.0.0
Dirección inet6: ::1/128 Alcance:Anfitrión
ACTIVO BUCLE FUNCIONANDO MTU:16436 Métrica:1
Paquetes RX:124 errores:0 perdidos:0 overruns:0 frame:0
Paquetes TX:124 errores:0 perdidos:0 overruns:0 carrier:0
colisiones:0 long.colaTX:0
Bytes RX:10400 (10.4 KB) TX bytes:10400 (10.4 KB)