KVM Guest: Network dies not work
robert
robert at redcor.ch
Thu Oct 16 10:23:25 UTC 2014
Hi there,
I would like to set up an ubuntu KMV guest in an ubuntu host.
Unfortunately within the guest the network is not accesible. I can only
ping localhost successfully.
The ip of the host is:176.9.142.21
The ip of the guest is: 176.9.163.129
One funy thing is: When I try to log int the guest from the host using
the ip 176.9.163.129, I in fact log into the host.
Thanks for any help
robert
This is what I have done:
in the host I defined
<network>
<name>Hetzner</name>
<forward dev='eth0' mode='route'/>
<bridge name='virbr2' stp='off' forwardDelay='0' />
<ip address='176.9.163.129' netmask='255.255.255.224'/>
</network>
and activated it in virsh.
in the host: the setting in network/interfaces
-----------------------------------------------------------
### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback
# device: eth0
auto eth0
iface eth0 inet static
address 176.9.142.21
broadcast 176.9.142.31
netmask 255.255.255.255
gateway 176.9.142.1
pointopoint 176.9.142.1
# default route to access subnet
up route add -net 176.9.142.0 netmask 255.255.255.224 gw 176.9.142.1 eth0
auto virbr2
iface virbr2 inet static
address 176.9.142.21
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
pre-up brctl addbr virbr2
up ip route add 176.9.163.129/32 dev virbr2
down ip route del 176.9.163.129/32 dev virbr2
in the quest
----------------
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 176.9.163.129
broadcast 176.9.163.135
netmask 255.255.255.255
pointopoint 176.9.142.21
gateway 176.9.142.21
dns-nameservers 213.133.98.98 213.133.99.99
ifconfig on the host:
--------------------------
root at alice2 ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 54:04:a6:b2:0c:ff
inet addr:176.9.142.21 Bcast:176.9.142.31 Mask:255.255.255.224
inet6 addr: fe80::5604:a6ff:feb2:cff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2439457 errors:0 dropped:0 overruns:0 frame:0
TX packets:1675965 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1593344733 (1.5 GB) TX bytes:1110458719 (1.1 GB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4393864 errors:0 dropped:0 overruns:0 frame:0
TX packets:4393864 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2003671511 (2.0 GB) TX bytes:2003671511 (2.0 GB)
virbr0 Link encap:Ethernet HWaddr 86:d1:ec:4b:9d:ce
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
virbr2 Link encap:Ethernet HWaddr 52:54:00:cc:fb:8b
inet addr:176.9.163.129 Bcast:176.9.163.159 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:536 errors:0 dropped:0 overruns:0 frame:0
TX packets:45919 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19232 (19.2 KB) TX bytes:1928598 (1.9 MB)
vnet0 Link encap:Ethernet HWaddr fe:54:00:81:ae:41
inet6 addr: fe80::fc54:ff:fe81:ae41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:3294 (3.2 KB) TX bytes:34506 (34.5 KB)
More information about the ubuntu-users
mailing list