1

This may be a very basic question, but I'm a networking newbie. So I have the following setup:

  1. Server with one NIC on IP 192.168.10.1/24 (Network A). It is not possible to change this IP.
  2. Computer A with two NICs: 192.168.10.11/24 (Network A) and 192.168.1.11/24 (Network B)

Now I want to add Computer B which must be able to talk to the Server on Network A but also must be available in Network B. Since the server in Network A has only one NIC, I can not just simply connect it via cable as I did with Computer A.

So my idea is:

  • Connect the Server and both Computers to a Layer 3 switch
  • Put Server and Computers on same VLAN and enable VLAN trunking

In my understanding of VLANs, it should now be possible for both computers to talk to the server but they should still be on Network B. This way, no routing would be needed because communication flows on OSI layer 2.

Is this possible or do I need a routing solution?

1

Routers route between networks/subnets. A layer-3 switch makes a fine router for this purpose.

In my understanding of VLANs, it should now be possible for both computers to talk to the server but they should still be on Network B. This way, no routing would be needed because communication flows on OSI layer 2.

Whether you use VLANs to actually separate the IP subnets on the data link layer or simply put both subnets on the same (default) VLAN is irrelevant. Nodes from different subnets require a router for communication in any case. The L3 switch you mention can easily be set up that way.

Alternatively, you can connect the server with a VLAN trunk - that requires appropriate configuration on the switch and on the server. That way, the server is directly connected to both VLANs and no router is required between clients and the local server interface since there's always a common subnet.

However, if you don't require VLAN separation you can simply bind the two IP addresses to the server NIC and be done with it.

| improve this answer | |
  • Thanks for your answer. Point 2 is what I'm interested in. What do you mean "there is always a common subnet"? If I do a VLAN trunking but i keep the computers on different IP subnets, will it still work? Since trunking is L2 and Subnets are L3. I'm confused about this. :) – Tobias von Falkenhayn Oct 27 at 9:44
  • If you connect the server with both VLANs (using a VLAN trunk or separate interfaces and appropriate IP config), it always shares a common subnet with any of your clients - so you don't require a router. Direct IP connectivity requires a shared VLAN and a shared IP subnet. – Zac67 Oct 27 at 10:20
1

As per your requirement you have two options .Again this two options have they own dependencies to fullfill requirements

Option 1 : Two connect all computers and serves within single subnet . But to make it possible you need to change ip address of network B or network A to make it same subnet .. so that computers and servers will talk to each other in layer2 . For this requirement only 1 layer 2 switch is required ..

Option 2 : if the case your are not able to change ip address of any network neither network A or network B then both are in different networks then routing is best and only possible option to ensure communication between two different networks . This requirement can implement with possible devices

1 ) Router

2) Layer2 switch

Or Even use layer3 switch for better routing by creating SVI and ensure routing between different networks

| improve this answer | |

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.