OVH vRACK - Cloud images comparability

Terminatrix

New Member
Aug 23, 2021
18
1
3
30
The problem I am facing with OVH vRACK IP blocks and Generic Cloud images is each IP block has it's own gateway IP and may have a different netmask (depending on block sizes).

Example block 51.xx8.1xx.64/28

Code:
Network IP              : 51.xx8.1xx.64
Gateway IP              : 51.xx8.1xx.78 (not usable)
Broadcast IP:          : 51.xx8.1xx.79

Then use the sub-netmask 255.255.255.240.

for CentOS 7 I would need to configure the virtual machine as follows

/etc/sysconfig/network-scripts/ifcfg-eth0

Code:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.240
IPADDR=51.xx8.1xx.72
ARP=yes

/etc/sysconfig/network-scripts/route-eth0
Code:
51.xx8.1xx.64/28 dev eth1 table vrack
default via 51.xx8.1xx.78 dev eth1 table vrack

How could I do this? I guess I could run a script after cloud-init to read the gateway and paste it into /etc/sysconfig/network-scripts/route-eth0 but I can't think of how I would get the correct netmask.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!