Gateway of diffrent range is not working in KVM node
I have configure KVM node in dedicated server from Hetner, it has one default NIC eno1 as below with one public IP
eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 4c:72:b9:43:37:99 brd ff:ff:ff:ff:ff:ff
inet 5.9.XX.236 peer 5.9.100.225/32 brd 5.9.100.236 scope global eno1
valid_lft forever preferred_lft forever
inet 5.9.100.236/32 scope global eno1
valid_lft forever preferred_lft forever
inet6 2a01:4f8:162:32c4::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::4e72:b9ff:fe43:3799/64 scope link
valid_lft forever preferred_lft forever
The configuration of the eno1 is
DEVICE=eno1
ONBOOT=yes
BOOTPROTO=none
IPADDR=5.9.XX.236
PREFIX=32
SCOPE=“peer 5.9.XX.225”
DEFROUTE=yes
IPV6INIT=yes
IPV6ADDR=2a01:4f8:162:32c4::2/64
IPV6_DEFAULTGW=fe80::1
IPV6_DEFROUTE=yes
IPV6_DEFAULTDEV=eno1
and I have created one bridge connection as br0
br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether fe:00:94:fb:92:51 brd ff:ff:ff:ff:ff:ff
inet 148.251.XX.80/28 brd 148.251.146.95 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::fc00:94ff:fefb:9251/64 scope link
valid_lft forever preferred_lft forever
The configuration of the bridge connection is
DEVICE=“br0”
BOOTPROTO=static
ONBOOT=yes
TYPE=Bridge
IPADDR=148.251.146.80
NETMASK=255.255.255.240
GATEWAY=5.9.XX.236
BROADCAST=148.251.146.95
DNS1=8.8.8.8
DNS2=8.8.4.4
DELAY=0
Also created one Virtual network in bridge modein frontend as br0 and assign 16 public IP of 148.251.XX.80/28 subnet
Attributes
BRIDGE br0
BRIDGE_TYPE linux
DESCRIPTION VNETWORK-HOST
DNS 8.8.8.8
GATEWAY 5.9.XX.236
GUEST_MTU 1500
INBOUND_AVG_BW 1000
INBOUND_PEAK_BW 1000
INBOUND_PEAK_KB 1000
NETWORK_ADDRESS 148.251.XX.80
NETWORK_MASK 255.255.255.240
After that I am able to create a VM through this virtual network, and the VM is also getting the public IP but the state of the nic link is showing UNKNOW and also the public IP is not accessible. After login to VM through VNC I checked the route of the VM but the route was not there and the NIC configuration of that VM also doesnot have GATEWAY assign to it. Is this any kind of bug that I have not allow to assign the gateway of diffrent range IP as th gateway is the public IP of the KVM node 5.9.XX.236 and the bridge connection has the public IP of 148.251.XX.80 range ?? Or am I missing something in my configuration? Any help will be appriciated.
NIC of the VM in KVM node
one-33-0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc htb master br0 state UNKNOWN group default qlen 1000
link/ether fe:00:94:fb:92:51 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc00:94ff:fefb:9251/64 scope link
valid_lft forever preferred_lft forever
Route of the created VM
[root@localhost]# route -n
Destination Gateway GenMask Iface
148.251.XX.80 0.0.0.0 255.255.255.240 eth0
While adding the route to the VM manually I get below error as well
[root@localhost]# ip route add default via 5.9.100.236
RTNETLINK answers: Network is unreachable