Hi List,

Hetzner has like other dedicated hosting providers an "crazy" looking
network setup for ipv4. Here point to point for the default gw in a
different network segment.

So it's important also to keep that in mind.

Maybe this document helps a bit, need to adapt to Openbsd.

https://wiki.hetzner.de/index.php/KVM_mit_Nutzung_aller_IPs_aus_Subnetz/en

Cheers
Karsten

Am 20.07.2017 6:29 vorm. schrieb "Mike Larkin" <mlar...@azathoth.net>:

On Thu, Jul 20, 2017 at 04:23:40AM +0200, Leo Unglaub wrote:
> Hey friends,
> i am trying out vmd and I have a little problem getting networking going
> inside the guest machine. I am not sure if this is a problem in vmd or
> simply my misconfiguration.
>
> From my datacenter i got the following data:
>
> Main Server (OpenBSD GENERIC.MP#99 amd64)
> #########################################
> IP: 144.76.102.204
> Netmask: 255.255.255.224
> Gateway: 144.76.102.193
>
>
> Virtual Machine (OpenBSD GENERIC.MP#99 amd64)
> #############################################
> I got an entire subnet from the datacenter. 136.243.186.160/29 So i
decided
> to use the following IP in it.
>
> IP: 136.243.186.161
> Netmask: 255.255.255.248
> Gateway: 144.76.102.204
>
>
> According to there documentation they always route all subnets on the main
> IP. In my case 144.76.102.204.
>
>
> On my host I configured the em0 interface according to the datacenter data
> and it works fine. The host who runs vmd is connected correctly. In my
> /etc/vm.conf i created a switch called "uplink" and added em0 to it. When
i
> check the current config via ifconfig i get the following.
>
> > em0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST>
mtu 1500
> >         lladdr 90:1b:0e:8b:0f:34
> >         description: hetzner-uplink
> >         index 1 priority 0 llprio 3
> >         groups: egress
> >         media: Ethernet autoselect (1000baseT
full-duplex,rxpause,txpause)
> >         status: active
> >         inet 144.76.102.204 netmask 0xffffffe0 broadcast 144.76.102.223
> >
> >
> > tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu
1500
> >         lladdr fe:e1:ba:d0:7e:0a
> >         description: vm1-if0-foobar
> >         index 5 priority 0 llprio 3
> >         groups: tap
> >         status: active
> >
> > bridge0: flags=41<UP,RUNNING>
> >         description: switch1-uplink
> >         index 7 llprio 3
> >         groups: bridge
> >         priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6
proto rstp
> >         em0 flags=3<LEARNING,DISCOVER>
> >                 port 1 ifpriority 0 ifcost 0
> >         tap0 flags=3<LEARNING,DISCOVER>
> >                 port 5 ifpriority 0 ifcost 0
> >         Addresses (max cache: 100, timeout: 240):
> >                 0c:86:10:ed:35:58 em0 1 flags=0<>
>
> My /etc/vm.conf looks like this:
>
> > switch "uplink" {
> >     add em0
> > }
> >
> > vm "foobar" {
> >     memory 2G
> >     disk "/tmp/1.vdi"
> >     interface {
> >             switch "uplink"
> >     }
> > }
>
> When i start the vm with my current /bsd.rd i start the installer and
insert
> the following:
>
> > Available network interfaces are: vio0 vlan0.
> > Which network interface do you wish to configure? (or 'done') [vio0]
> > IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] 136.243.186.161
> > Netmask for vio0? [255.255.255.248] IPv6 address for vio0? (or
> > 'autoconf' or 'none') [none] Available network interfaces are: vio0
> > vlan0.
> > Which network interface do you wish to configure? (or 'done') [done]
> > Default IPv4 route? (IPv4 address or none) 144.76.102.204
> > add net default: gateway 144.76.102.204: Network is unreachable
>
> Can you people see something that i might missed?
> Big thanks in advance and greetings
> Leo
>
>

sysctl net.inet.ip.forwarding=1 ?

I'm not a networking expert but I think your VM's subnet mask is wrong for
the gateway you are trying to use.

-ml

Reply via email to