Virtulabox Linux guest network configuration
Platform – Oracle Virtualbox4.3.2
Guest OS – RHEL 5.5
This is short post on troubleshooting
some of the issues that were encountered during multiple network
interface configuration in Oracle Virtual box with RHEL 5.5.
VM setup → 1 Nat adapter, 1 Host-only
adapter.
Issues Faces →
- Nat adapter was not resolving DNS.
This was due to an issue with
automatically generated /etc/resolve.conf. By using below command to
force usage of host machine DNS in guest this issue was resolved.
VBoxManage modifyvm "<VM_NAME>" --natdnshostresolver1 on
- 2. DNS was ok but couldn't access the internet.
[root@localhost ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.56.1 0.0.0.0 UG 0 0 0 enp0s8
10.0.2.0 * 255.255.255.0 U 0 0 0 enp0s3
169.254.0.0 * 255.255.0.0 U 0 0 0 enp0s8
192.168.56.0 * 255.255.255.0 U 0 0 0 enp0s8
[root@localhost ~]# route add default gw 10.0.2.2 enp0s3
[root@localhost ~]# ip route del default via 192.168.56.1
[root@localhost ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.2.2 0.0.0.0 UG 0 0 0 enp0s3
10.0.2.0 * 255.255.255.0 U 0 0 0 enp0s3
169.254.0.0 * 255.255.0.0 U 0 0 0 enp0s8
192.168.56.0 * 255.255.255.0 U 0 0 0 enp0s8
[root@localhost ~]#
Comments
Post a Comment