KVM guest no Internet-Access

rethus

Active Member
Feb 13, 2010
49
0
26
I use Proxmox 3.4.

This is the /etc/network/interfaces of my Proxmox-Host:
Code:
auto eth0
iface eth0 inet static
        address  18.140.37.134
        netmask  255.255.255.192
        gateway  18.140.37.129
    pointopoint 18.140.37.129
    post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

auto vmbr0
iface vmbr0 inet static
    address  18.140.37.134
    netmask  255.255.255.192

    bridge_ports none
    bridge_hello 2
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 5

    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    up ip route add 18.140.37.185/32 dev vmbr0

This is the routing-Table on the Host:
Code:
static.185.37.1 *               255.255.255.255 UH    0      0        0 vmbr0
static.129.37.1 *               255.255.255.255 UH    0      0        0 eth0
mail.server.co *               255.255.255.255 UH    0      0        0 venet0
18.140.37.128   *               255.255.255.192 U     0      0        0 vmbr0
default         static.129.37.1 0.0.0.0         UG    0      0        0 eth0
(seems the first column is cutted in the view)

On the Client (KVM [Debian] ), I have this network-configuration (/etc/network/interfaces):
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 18.140.37.185
  netmask 255.255.255.192
  pointopoint 18.140.37.134
  gateway 18.140.37.134

If I do a ping from my host to the client, it work.
If I ping from client to host-IP, it also work.
If I run a ping 8.8.8.8 on my client, and run
Code:
tcpdump -n -l -i vmbr0
on my host, tcpdump output:

Code:
tcpdump -n -l -i vmbr0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vmbr0, link-type EN10MB (Ethernet), capture size 65535 bytes
19:46:16.694253 ARP, Request who-has 18.140.37.144 tell 18.140.37.134, length 28
19:46:16.694269 ARP, Request who-has 18.140.37.183 tell 18.140.37.134, length 28
19:46:16.800251 ARP, Request who-has 18.140.37.136 tell 18.140.37.134, length 28
19:46:17.303787 ARP, Request who-has 18.140.37.134 tell 18.140.37.185, length 46
19:46:17.303806 ARP, Reply 18.140.37.134 is-at 1a:ee:f6:0b:18:4b, length 28
19:46:17.304002 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 1, length 64
19:46:17.694251 ARP, Request who-has 18.140.37.144 tell 18.140.37.134, length 28
19:46:17.694267 ARP, Request who-has 18.140.37.183 tell 18.140.37.134, length 28
19:46:17.800277 ARP, Request who-has 18.140.37.136 tell 18.140.37.134, length 28
19:46:18.303407 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 2, length 64
19:46:18.694252 ARP, Request who-has 18.140.37.144 tell 18.140.37.134, length 28
19:46:18.694268 ARP, Request who-has 18.140.37.183 tell 18.140.37.134, length 28
19:46:18.800237 ARP, Request who-has 18.140.37.136 tell 18.140.37.134, length 28
19:46:19.303302 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 3, length 64
19:46:20.303309 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 4, length 64
19:46:21.303377 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 5, length 64
19:46:22.035258 IP 0.0.0.0 > 224.0.0.1: igmp query v2
19:46:22.035265 IP6 fe80::a012:21ff:fe88:bddf > ff02::1: HBH ICMP6, multicast listener querymax resp delay: 1000 addr: ::, length 24
19:46:22.216293 IP6 fe80::a012:21ff:fe88:bddf > ff02::202: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::202, length 24
19:46:22.303317 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 6, length 64
19:46:22.602262 IP6 fe80::a012:21ff:fe88:bddf > ff02::1:ff88:bddf: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:ff88:bddf, length 24
19:46:23.303413 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 7, length 64
19:46:24.303307 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 8, length 64
19:46:25.303334 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 9, length 64
19:46:26.303305 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 10, length 64
19:46:27.442257 IP 18.140.37.185 > 8.8.8.8: ICMP echo request, id 1050, seq 11, length 64


But the ping to 8.8.8.8 gives no result at the client.
What is wrong with my configuration?
 
Solved it:

Now I have tried this Setup on Hetzner-Wiki-Page: https://wiki.hetzner.de/index.php/Proxmox_VE#Netzwerkkonfiguration_Hostsystem_KVM.2FRouted

Bridged Setup.
On Host:
Code:
# /etc/network/interfaces
### Hetzner Online GmbH - installimage
# Loopback device:
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
  address <Haupt-IP>
  netmask 255.255.255.255
  pointopoint <Gateway-IP>
  gateway <Gateway-IP>
  bridge_ports eth0
  bridge_stp off
  bridge_fd 1
  bridge_hello 2
  bridge_maxage 12

On Node:
Code:
# /etc/network/interfaces
# Loopback device:
auto lo
iface lo inet loopback
# device: eth0
auto eth0
iface eth0 inet static
  address <Zusatz-IP>
  netmask 255.255.255.255
  pointopoint <Gateway der Zusatz-IP>
  gateway <Gateway der Zusatz-IP>


With this, ping 8.8.8.8 from guest work, but ping google.de give "unknown host"
What's missing now?

On /etc/resove.conf I have add "nameserver 8.8.8.8", than this also work.