Lets assume that we have a subnet behind a switch/router. Is it possible to have more than one set of hosts in this subnet who do not have public IPs in common?

Assume: LAN segment has 20 members. We don't subnet it further. Let S1 = {a1,b1,c1....}, S2 = {a2,b2,c2...} be two disjoint sets.

I want to understand, what is the possibility or under what circumstances, these two sets have two different public IPs.

If it is possible, how is it done? What kind of hardwares or softwares are required? Also, please help with some of main configurations items required.

  • What you are asking is unclear, and likely does not belong here. It is certainly possible to have multiple IP address ranges in a network segment, however unless each system is multihomed or has a complex routing table traffic between the 2 networks would bounce through the router. – davidgo Jun 3 at 9:44
  • @davidgo I am asking this question here as I see the tags for networking are present. If this is not right place, which stackxxxx site would you suggest to be more appropriate? – ultimate cause Jun 3 at 10:22
  • What do you mean by "more then 1 set of hosts" and "public IPS in common"? What has any of this got to do with the VPN tag? What do you mean in the title when you say " more then public IPs"? Do you realise that its entirely practical to have a network without nat? Your post uses appropriate words but almost implies a lack of understanding of the TCP/IP networking model. – davidgo Jun 3 at 18:46
  • @davidgo "more than one set" means "if the network can be divided into at least two sets of computers", "public IPs in common" is used to imply that, the two sets of computers as described may have two different public IPs, "VPN Tag" is important because in the case of VPNs it is possible that two different LAN segments which are connected using a VPN have same public IP. "NAT" is not required if each of the computers is assigned a separate public IP and then they can talk to anyone else. Therefore I have put a precondition, that all the network member are behind a single switch. – ultimate cause Jun 3 at 19:19
  • 1
    I am neither impatient nor angry - and I gave only average professional networking skills , and I apologise if I came across this way. I confess to being frustrated that your post is so difficult to understand - and I am certain it does not belong in a site for system administrators of business environments, as it shows a lack of understanding of the networking model. It may be more appropriate in Superuser.com, but really, it seems to me the mental model of networking you have needs to be rebuilt or greatly fleshed out. – davidgo Jun 3 at 19:36

As your post mentions 192.168, the public IP addresses associated with machines in the network are entirely governed by the router.

It is entirely possible for different private IPs in the router to be associated with different public IPs. This is a characteristic associated with carrier grade NAT.

The problem is, however, significantly more nuanced as there are a plethora of different configurations/combinations - including handling of inbound vs outbound connections, whether multiple providers are involved, how systems are grouped.

With respect if asking what hardware/software is required - this is off-topic - there are lots of different options. While most Soho routers don't provide this functionality in the GUI, even Soho Ethernet routers that can be flashed with dd-wrt or similar can be co-opted into doing this as they run on Linux, and this is more-or-less built into the Linux IP stack, and just requires appropriate tools to manipulate it - probably at the command line. QoS bits/marks, Iptables policy based routing are all likely components of a Linux based solution.

There is no point waxing on the "how" unless the problem is more specifically fleshed out, and no way to do this until a properly specced problem is presented. It also seems likely that what you are trying is a bad idea, as you appear to be addressing issues designed to be solved using subnets while ignoring this standardized model.

| improve this answer | |
  • Despite the self a deprecating tone, Most old timers learnt Linux networking from documents by Rusty Russell. If you don't want to pay for a Udemi or Linux Acadmeny course, welcome to my world circa 1993 - the fundamentals are all at people.netfilter.org/rusty/unreliable-guides – davidgo Jun 3 at 20:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.