I'm studying DNS Server. So I try this.

enter image description here

Here is the flow when I request abc.com webpage from My PC.

  1. My PC ( send DNS query to Router0. Router0 then forwarding to DNS Nameserver (
  2. DNS Nameserver return abc.com IP address to my PC through Router0.
  3. My PC send request to abc.com IP address to Router0. Router0 then forwarding to ABC Server ( - forgot to write in the pic)
  4. ABC Server return HTTP page for my PC.

Thing works fine. But I want to create more webpage, i.e: def.com, igh.com, so I need to create more server. The problem is Router0 has only 3 ports (interface).

On my understanding, Switch component is use for connecting many device in a same subnet, i.e: ABC Server has many Server component so I can connect all of them to a Switch, then connect that Switch to Router0. So it can't be used to solve my problem, which is connect different subnet.

I have try to search Google: How to connect a router to multiple router/subnet but don't get the result.

I think maybe I haven't had enough Computer Network knowledge yet to think of solutions using other component than just Switch, Router.

Any suggestion?

  • 1
    You can use a switch with VLANs and trunk between the router and switch, using subinterfaces on the router. This is a large topic, but it is basic to configuring networks.
    – Ron Maupin
    Jan 19, 2022 at 16:27
  • 1
    Are you sure you need a separate subnet for each server?
    – Ron Trunk
    Jan 19, 2022 at 16:52
  • @RonTrunk For learning purpose ... :)
    – Tan Nguyen
    Jan 19, 2022 at 17:02
  • @RonMaupin You kinda DDoS my brain... XoX
    – Tan Nguyen
    Jan 19, 2022 at 17:04
  • 1
    See if this question and answer helps you.
    – Ron Trunk
    Jan 19, 2022 at 17:20

1 Answer 1


Thing works fine. But I want to create more webpage, i.e: def.com, igh.com, so I need to create more server. The problem is Router0 has only 3 ports (interface).

You can either host all those web domains on one server or connect multiple servers using switches. A switch allows a router port to attach to a whole network of hosts and to provide gateway services to them.

A simple (unmanaged) switch connects all ports to a common L2 segment = broadcast domain = IP subnet. That way, all hosts can directly talk to each other which may not be desired in some scenarios.

Using a managed switch, you can group your hosts into VLANs that are separate on layer 2 (for enhanced security for instance). For them to communicate they need to use a router which is where you can control their traffic. If you use VLANs on the switch you can trunk them to the router and use VLAN subinterfaces to attach to each VLAN.

Alternatively, you could use a layer-3 switch and route all the VLANs together independently from the router. This is more efficient when there's a lot of inter-host traffic.

  • Can you draw a picture to illustrate? I'm kinda newbie zZz. Thanks a lot.
    – Tan Nguyen
    Jan 19, 2022 at 18:04
  • Hey, I found something that seems the same to your idea, can you check this out? Thanks. practicalnetworking.net/stand-alone/routing-between-vlans
    – Tan Nguyen
    Jan 20, 2022 at 7:42
  • Sorry, we can't go through that amount of detail here. This site is intended to answer rather concise questions, see the tour. It is not intended for general how-to. The link you posted is the latter and seems useful.
    – Zac67
    Jan 20, 2022 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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