Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a KVM-Host (on Debian) with

root@kvm-host:/# cat /etc/network/interfaces

auto  eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
  address 176.x.y.133
  netmask 255.255.255.224
  gateway 176.x.y.129 # Provider's GW IP
  bridge_ports eth0
  bridge_stp off
  bridge_fd 0


root@kvm-host:/# route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
176.x.y.128     0.0.0.0         255.255.255.224 U     0      0        0 vmbr0
0.0.0.0         176.x.y.129     0.0.0.0         UG    0      0        0 vmbr0


root@kvm-host:/# arp -an

? (176.x.y.155) at <incomplete> on vmbr0
? (176.x.y.129) at xx:yy:zz:11:22:33 [ether] on vmbr0


root@kvm-host:/# ifconfig

1: lo: ...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether AA:BB:CC:DD:EE:FF brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a60:6eff:feDD:EEFF/64 scope link 
       valid_lft forever preferred_lft forever
3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether AA:BB:CC:DD:EE:FF brd ff:ff:ff:ff:ff:ff
    inet 176.x.y.133/27 brd 176.x.y.159 scope global vmbr0
    inet6 fe80::a60:6eff:feDD:EEFF/64 scope link 
       valid_lft forever preferred_lft forever
4: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/void 
    inet6 fe80::1/128 scope link 
       valid_lft forever preferred_lft forever

I have public IPs: 176.x.y.133 (KVM-Host), 176.x.y.151, 176.x.y.155.

Now I'm trying to get the network on each VM:

user@VM:/$ cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 176.x.y.155
  netmask 255.255.255.255
  pointtopoint 176.x.y.133
  gateway 176.x.y.133

I uninstalled the network-manager.

Next steps:

user@VM:/$ sudo ifup eth0
RTNETLINK answers: File exists
Failed to bring up eth0


user@VM:/$ ping 176.x.y.133
connect: Network is unreachable

root@VM:/# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

(i.e. empty, no even default gateway)

user@VM:/$ sudo add default via 176.x.y.133
RTNETLINK answers: no such process

user@VM:/$ sudo arp -a
(i.e. empty)

user@VM:/$ sudo arp -s 176.x.y.133 AA:BB:CC:DD:EE:FF
SIOCSARP Network is unreachable

I can't even set static routes (MAC-addr./IP-addr.).

What could be the problem to set a network on the VM? (I hope I provided all the needed information to be specific)

share|improve this question
    
You have Hetzner or OVH? Contact the provider; they have strange network setups that require some weird setup. –  Michael Hampton Jul 16 '13 at 18:42
    
Hetzner :) Already written them, but they mean "virtualization is not supproted as a service". :( –  static Jul 16 '13 at 23:59
    
Actually supported, but you need to buy additional ip for each VM and allocate unique mac address in web panel. I'm using ESXi 5.1 with 5 public ip without any problem –  ALex_hha Jul 21 '13 at 22:00
    
it doesn't work for me: I need the Routed variant, not a bridged one (that's why you need to allocate unique mac address in robot-pannel) –  static Jul 21 '13 at 22:02
2  
With Hetzner you'll either need to use proxy ARP on the host or manually set the MAC address to the one generated in their Robot. –  James O'Gorman Jul 25 '13 at 12:07
show 1 more comment

2 Answers 2

Check that the MAC address is not randomly generated; many ISPs will only allocate IPs to MAC addresses that are issued by valid providers. I was able to get an IP on a machine by taking a known-good one, incrementing the last octet by one.

Edit: make sure "brctl show vmbr0" shows something sensible. Something like

xen-br0         8000.90b11c316da4       no              eth0
share|improve this answer
    
yep: bridge name bridge id STP enabled interfaces vmbr0 8000.xxxxxxxxxx no eth0 tap100i0 tap101i0 –  static Jul 25 '13 at 17:51
add comment

On HW node (host), /etc/network/interface could look like:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# Which interface are to be started at boot
auto lo vmbr0

# The loopback network interface
iface lo inet loopback

# The bridge for VM    
iface vmbr0 inet static
        address 176.x.y.133
        netmask 255.255.255.224
        network 176.x.y.128
        broadcast 176.x.y.159
        gateway 176.x.y.129 # Provider's GW IP
        bridge_ports eth0
        bridge_maxwait 2
        up /sbin/ifconfig eth0 inet 0.0.0.0 promisc
        up /sbin/sysctl -w net.ipv4.conf.br0.proxy_arp=1
        up /sbin/sysctl -w net.ipv4.conf.default.forwarding=1
        up /sbin/sysctl -w net.ipv4.ip_forward=1

Of course, you may prefer to create a vm-routing file in /etc/sysctl.d/ to store sysctl config.

On the VM Host, you must be able to use same network configuration:

iface eth0 inet static
        address 176.x.y.155
        netmask 255.255.255.224
        network 176.x.y.128
        broadcast 176.x.y.159
        gateway 176.x.y.129 # Provider's GW IP
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.