0

Question: is it possible for a router to connect to one switch both from one of its LAN ports and from its WAN port, and for a device connected to the switch get both public and private (provided by the router) IP addresses?

enter image description here

Context: Each room in my house has one ethernet port. All the ports are connected to a switch in the smart box, where it connects to the WAN port. I have four devices that need wired connection in three rooms. Two of those need public IP addresses, and three of those must be in the same private network.

  • Room 1: TV (public), printer (private)
  • Room 2: PC (private)
  • Room 3: server (both public and private)

Below is the network map illustrating the configuration:

enter image description here

I have one router and one switch for now, and am thinking of buying two more switches if they are necessary.

P.S. I'm not a native speaker of English, so feel free to edit this question if there are typos, grammatical errors, or any nonsenses.

1
  • It's possible to do, but why would you want to? What do you want the public addressing to do for your TV and server? Why couldn't existing NAT mechanisms help with that?
    – B Knight
    Jan 17, 2012 at 14:40

2 Answers 2

1

Yes it is possible, but you need switches and routers with support for VLAN tagging (802.1Q), otherwise all your devices will be in single broadcast domain (will see all traffic, both public and private).

Regular switches don't have this feature, you need managed ones. As for routers: alternative firmwares (like Tomato or DD-WRT) for SOHO routers support this.

1
  • You can do it in a single broadcast domain. By "private", he means unroutable, RFC1918 IP addresses, not that it needs to be firewalled. NAT on a stick works fine if you just want to make things work. Jan 1, 2012 at 16:17
2

It depends on how public addresses are provisioned, and whether your ISP will allow you multiple IP addresses. For example, with PPPoE/A (xDSL) the addresses are provisioned over Ethernet, therefore it is possible to run the client on nodes that require a public address. Each node with a public address will require its own firewall in order to block incoming connections.

If you are using protocols that have a different provisioning mechanism (e.g. DOCSIS) then the router will have to handle all the public addresses, putting each node into the DMZ with the appropriate address. Note that this requires a router that can handle provisioning multiple addresses.

And of course, if your ISP only allows you a single IP address then you're SOL regardless.

3
  • My ISP allows at least up to three IP addresses. As far as I know, addresses are provisioned via DHCP. Jan 1, 2012 at 13:27
  • Yeah, DHCP is bad, since you can only properly have one DHCP server per network segment. Normally the router separates the WAN segment from the LAN segment, but your diagram has no such segmentation. Jan 1, 2012 at 13:30
  • What happens if I turn off the DHCP server on the router and manually set private address (like 192.168.0.x) and gateway (to the router's public address) on PC in that configuration? Jan 1, 2012 at 13:36

Not the answer you're looking for? Browse other questions tagged .