Sharing IP block between two computers?

1

1

I'm not too knowledgeable in this matter so I wanted to double check here.

Say I have a server hosted in a datacenter with a CIDR IP block 104.x.y.z/28, which makes a total of 13 usable IPs, not counting subnet/gateway/broadcast addresses.

Would it be possible to share those IPs on two different boxes, for example box1 would have 6 IPs and box2 would have 7 IPs? I guess that would mean both computers would have the same subnet/gateway/broadcast addresses right? Is it doable? If not, why?

Thanks!

Yannick

Posted 2015-07-22T11:58:47.253

Reputation: 113

This type of question is best directed towards your datacenter. If you own those 13 addresses, you could have 13 servers, its all the same really. – Ramhound – 2015-07-22T12:07:39.630

Answers

1

Yes and no.

No in the sense that you cannot directly link one of these ip addresses to that server as local ip address.

But yes, you can use these ip addresses for those servers by simply using a router and port forwarding rules.

How it works

Your server has one or more network cards. Each network card will receive an ip address from the DHCP server, or a static ip address is set which resides in the local network. Your server can use any of these internal ip addresses for whatever you need.

Your external network (the public ip addresses) are given by the ISP (internet service provider) which you can receive through the wan ports of the routers. By the use of portforwarding (you can actually forward everything and not even use the router part (bridging) you can forward traffic from the public ip to the internal ip address.

So if you have multiple RDP servers on your server, you would make each server listen to a different port, say: 3389, 3390, 3391, etc.

Now you can use port forwarding to make ip: 104.z.y.20, port 3389 forward to your server 3389, then ip: 104.z.y.21, port 3389 forward to your server 3390, etc. From the outside, you can use these ip addresses with their default port, and internally they would be redirected to any accessible port.

This is best practice, and how its done everywhere.

LPChip

Posted 2015-07-22T11:58:47.253

Reputation: 42 190