I am trying to better understand the network setup in my machine.
Host Machine Setup
- I have a wireless interface (wlan0) on my host machine which has
the IP address as
192.168.1.9
. - The default gateway of this host is the router which goes to the
outside world through my ISP, whose IP address is
192.168.1.1
. The route -n command in my host machine returns me the output as,
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 192.168.1.160 0.0.0.0 255.255.255.224 U 0 0 0 virbr2
Guest Machine Setup
Now, I setup a guest OS in KVM as below.
- The KVM is in a sub-network which has the details as
192.168.1.160/27
. - The DHCP start is
192.168.1.176
and the DHCP end is192.168.1.190
. I also did the below command for my KVM configuration to work.
arp -i wlan0 -Ds 192.168.1.9 wlan0 pub
From the guest OS, I see that my IP address is 192.168.1.179
. My route -n
command in the guest machine returns me the output as,
kernel IP routing table
Destination Gateway Genmask
0.0.0.0 192.168.1.161 0.0.0.0
192.168.1.160 0.0.0.0 255.255.255.224
How can I make the guest OS to interact with the outside world?
EDIT
This is the output of virsh net-list --all
.
ramesh@ramesh-pc:~$ virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
arpbr0 inactive yes yes
default active yes yes
proxyArp active yes yes
net.ipv4.ip_forward = 1
./etc/sysctl.conf
file to change the status of ipv4.ip_forward to 1.