1
rated 0 times
[
1]
[
0]
/ answers: 1 / hits: 1849
/ 1 Year ago, sat, march 4, 2023, 2:04:13
- Host machine: Ubuntu 12.04 LTS
- Guest machine: Ubuntu 12.04 LTS
- Networking mode: NAT + Host Network only.
Settings of my VM:
cat /etc/network/interfaces:
Output:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.4
netmask 255.255.255.0
auto eth1
iface eth1 inet dhcp
When I run : ping 8.8.8.8
, I get: connect: network is unreachable.
Note: I run the necessary things such as: sudo /etc/init.d/networking restart
and sudo service network-interface restart INTERFACE=eth0/eth1
, and even sudo ifconfig eth0/eth1 down/up
.
I also edited the necessary files: /etc/hosts
where I added my ip (10.0.0.4) and I added my dns namserver (that i also definied for eth0 - I just do not want to post it here) to /etc/resolv.conf
.
When I run route -n
, I get this output:
ifconfig
gives me this:
How could I connect to internet using a static address of my choice ?
More From » 12.04