==== Question edited after the problem "solved", but the question remains clueless to me ====
Hosting provider's support staff solved the problem without giving explanation.
linux: how to set multiple (public) IP to one network interface? (For Ubuntu 22.04 / 14.04)
Adding IPs to netplan or /etc/network/interfaces make IP appear locally, but routing does not work.
What is the possible reason that routing failed?
What kind of network configuration (not the server) is needed for such kind of setup in linux to work?
How to troubleshoot such problems on linux?
Example with actual IP erased:
- Let default/primary IP subnet be 80.80.80.80/29.
- Let new IP subnet be 110.110.110.100/30. (1 usable - 110.110.110.102; 3 service addresses)
# primary IP config (14.04/interfaces; 22.04/netplan is similar and skipped)
auto eth1
iface eth1 inet static
address 80.80.80.82
netmask 255.255.255.248
gateway 80.80.80.81
auto eth1:0
iface eth1:0 inet static
address 80.80.80.83
netmask 255.255.255.248
...
# Not working until hosting support did something
# auto eth1:5
# iface eth1:5 inet static
# address 110.110.110.102
# netmask 255.255.255.252
# ip route show
default via 80.80.80.81 dev eth1
80.80.80.80/29 dev eth1 proto kernel scope link src 80.80.80.82
172.16.0.0/12 via 172.16.xx.yy dev eth0
# The only eth1 route entry is 1st line.
"ping -I 110.110.110.102 8.8.8.8" on the machine; or "ping 110.110.110.102" from other machine (in same data center) does not work, until hosting support does something. (support mentions vlan)
It seems that the hosting provider needs some setup but didn't do it.
The support staff did something (mentions setup a vlan), but does not bother full explanation, so I don't know what was wrong, or what is the correct way to troubleshoot or solve the problem.
Hopefully someone could explain how it is expected to work at linux and network.