Solved Using additional /32 allocated ip addresses on jails with VNET

I have a host with a provider, that has a base ipv4 address and gateway. This obviously works fine.
Lets say,

51.16.20.1 as router
51.16.20.111/24 as host ip

and the additional ip 195.155.48.128/32 yet I'm suppose to use the same 51.16.20.1
I cant set my default router to this ip address.

the error I get when jail has default router address set and vnet=on
add net default: gateway 51.16.20.1 fib 0: Invalid argument

When vnet=off it works, but it doesn't give me the isolation for the jail I want. Is there a way to make this work?

Any hints, links to guides etc are welcome as my google foo seems to fail me on this.
 
I've opened up a ticket if I cannot get another ip address (within same subnet as primary ip of the bare metal).

I did ponder creating an internal bridge with some 10.0.0.0/24 range and creating static routes on host and jail. Or just NAT it all to the jail. But that's not what I want, yet I cant think of anything else to make it work.
 
Take what I say with a grain of salt since I am not an expert, but is it possible that a route is needed from the jail network(195.155.48.128/32) to the gateway(51.16.20.1)?
I don't think that two different subnets can communicate without it.
 
I saw this post, and initially I did think it was, (maybe still is and im doing something wrong), but as far as I can see the difference is I want to use an additional ip address which is a /32 in a vnet enabled jail. Just adding the ip /32 to the main interface of the host works fine, or using it without vnet on the jail too, because the gateway is in the same ip range as the primary ip address/interface of the box.

I'll be trying some more later again

-- trying again helped, pebkac issue it was, maybe I typo on first attempt or something.
that worked perfectly.
 
Back
Top