Proxmox VE4 KVM FreeBSD no network

Pnchbllz

New Member
Oct 22, 2015
4
0
1
Hi,

I have a FreeBSD 10.2 VM on proxmox VE4 on a VOH dedicated server and there i don't have network.

I configured a vmbr0 and it works on a debian 7 container without any issues but it didn't on my FreeBS VM

I also installed virtio drivers on my BSD and launched them at start but without success.

I have a public ip but it's not on the same range that my gateway

Someone have a solution or a possible way ?
 
How have you configured your addresses and routing? You need to add static routes to the gateway as described in their guides. Eg. when you use a virtio interface showing up as vtnet0 and have the gateway 1.2.3.254 you add this to /etc/rc.conf:
Code:
static_routes="ovhgw"
route_ovhgw="1.2.3.254 -interface vtnet0"
defaultrouter="1.2.3.254"
 
I have a vmbr0 on the host with this configuration:
Code:
auto vmbr0
iface vmbr0 inet static
      address 1.2.3.4
      netmask 255.255.255.0
      network 1.2.3.0
      broadcast 1.2.3.255
      gateway 1.2.3.254
      bridge_ports eth0
      bridge_stp off
      bridge_fd 0
and it works fine on my debian 7 ctn with
Code:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 188.165.169.82
netmask 255.255.255.255
broadcast 188.165.169.82
post-up route add 1.2.3.254 dev eth0
post-up route add default gw 1.2.3.254
pre-down route del 1.2.3.254 dev eth0
pre-down route del default gw 1.2.3.254

I have also configured my nic on BSD using bsdconfig and added this in rc.conf:
Code:
ifconfig_vtnet0="inet 188.165.169.83  netmask 255.255.255.255"
defaultrouter="1.2.3.254"

And when I try to add a route:
Code:
# route add default 1.2.3.254
route: writing to routing socket: Network is unreachable
add net default: gateway 1.2.3.254 fib 0: Network Unreachable
 
I added these line on rc.conf, now it tells me that a route is on a table, but i can't ping the gateway.

I think i'm on the right way, i'll check the FreeBSD doc about routing and see what i have to do.

thanks for your help