0

I have primary IP address aa.bb.53.34 on my Ubuntu Server 16.04 on eno1 interface. I want to add additional IP address from another network xx.yy.95.4 to the same machine and make this machine accessible by both IPs. I did following command:

ip addr add xx.yy.95.4/32 dev eno1

But server is still not pinged via secondary IP. What should I also do to make server be accessible by secondary IP?

Output:

#ip addr

inet aa.bb.53.34/32 scope global eno1
   valid_lft forever preferred_lft forever
inet xx.yy.95.4/32 scope global eno1
   valid_lft forever preferred_lft forever

file /etc/network/interfaces does not exist

#route -vn

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         aa.bb.53.1      0.0.0.0         UG    0      0        0 eno1
xx.yy.95.1      0.0.0.0         255.255.255.255 UH    0      0        0 eno1

Provider says IP address xx.yy.95.4 uses xx.yy.95.1 gateway and netmask is 255.255.255.224

user128048
  • 101
  • 1
  • 2
    If you use /32 address, it is only known from the server itself. – Dom Mar 24 '19 at 09:00
  • @Dom I tried to use `xx.yy.95.4/27` too (netmask is 255.255.255.224) with no effect. Also `aa.bb.53.34` is printed as /32 and this IP is accessible from outside – user128048 Mar 24 '19 at 09:20
  • Are you sure that the entity that gave you the IP address has set up routing properly for the IP address? – Tero Kilkanen Mar 24 '19 at 09:52
  • @TeroKilkanen do you mean that adding secondary IP by `ip addr` is enough for accessing server from outside by secondary IP? – user128048 Mar 24 '19 at 10:46
  • No, I mean that the provider has to set up proper routing for the secondary IP address so that traffic can reach your server with that IP address. – Tero Kilkanen Mar 24 '19 at 14:41
  • Provider told they did all set ups. I just want to know what should I do to see my server by additional IP from outside – user128048 Mar 24 '19 at 17:13

0 Answers0