Hi,
netmask declare a subnet. In your first line, 255.255.255.248 means 8 addresses subnetwork, while 255.255.255.240 means 16 addresses network.
You can't use different netmask on your host. There are some reason for this and it very long to explain.
Briefly:
1) On every network, higher address is used for local broadcast. So you have 10.0.0.15 or 10.0.0.7 as broadcast address. Very confusion.
2) Any host in 8 addresses subnetwork send socket of its network to gateway, not directly to host
3) If your gateway is in 8 address network, can't accept outer 8 addresses.
Antonio Vigliotti