Can wider subnetmask create problems in accessing some websites?

I have two Linux server working as gateways.

Both are connected to same LAN.

Server one:

address 14.139.114.115

netmask 255.255.0.0

Server two:

address 14.139.114.116

netmask 255.255.255.240

If gateway of my LAN node is server one, I can not access a website at 14.139.116.12

But, If gateway of my LAN node is server two, I can access a website at 14.139.116.12

Can someone explain me this behaviour. (Other websites like google/hostmail work fine)


Solution 1:

With netmask 255.255.0.0, the gateway thinks that your LAN spans the addresses 14.139.0.1 - 14.139.255.254, so it thinks that 14.139.116.12 is inside your LAN (which is probably not the case).

With netmask 255.255.255.240, the gateway thinks that your LAN spans addresses 14.139.114.113 - 14.139.114.126, so 14.139.116.12 is outside your LAN, and the gateway will correctly direct traffic to it.