How come you can use 1 switch for 2 network segments

I have three different boxes on each of them there are six virtual computers, three on ip and three on Inside each host box there are two virtual switches and they are attached to the same physical NIC card of the server
Machines on segment need to see the other virtual computers in the same ip segment but located on the other two boxes and the same with the computers on the ip segment They do not need to exchange date between ip segments.
 Now I have only one switch, a cisco 3750, and three network cables, each server host have only one NIC. So I have the switch with three connections
How come you can use 1 switch for 2 network segments? Can the two IP segments travel on the same port at the same time?  can the IP see its own traffic only and the can see its own ip traffic only as well?
Now, I tried to use VLAN on the switch and divide the ports but I couldn’t because it assumes that I use two physical network cables and I do not have but only one network cable per host server.
Any help will be appreciate
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The switch port itself doesn't care what the IP addresses are.  It would be the same thing as if you daisy chained another switch to one port.  You can have multiple IP addresses going through a single switch port.  After all, a single switch can have an arp cache that can hold thousands (or tens of thousands) of MAC addresses.

A port can be configured as a VLAN trunk port to handle multiple VLAN segments.

You would need a route configured for the two segments to communicate.  Either layer 3 routing on the switch, or an actual router added to the configuration.
vmwarun - ArunCommented:
From a VMware perspective, you can make use of port groups and tag VMs so that they can exchange data between them alone.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Are you using VMware vSphere which can support 802.1Q vlan tags?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Jorge-123Author Commented:
 I do not know it. I know that we use the VMware vSphere client  at the workstation to communicate with the virtual computers. How I will now if this VMware vSphere software  can support 802.1Q vlan tags?
Jorge-123Author Commented:
  If I understood this correctly, with no Vlans created, except  the default vlan1, I can connect the three network drops to three ports and  then the switch should be able to carry the network traffic and with this I mean computers should be able to communicate with other computers on the same segment and the should be able to do the same  and the two segments should not be able to see the traffic  of each other. Did I understand it correctly?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
if you are using the vSphere Client, you are using VMware vSphere which supports vlans.

You can create a network trunk, to carry all the data in three vlans, down the same network ports to the ESX servers, and the VMs connected to different vlans tagged the traffic.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jorge-123Author Commented:
Also, if I want the segments to exchange date among them, means can see and talk to, then I should configure different vlans like vlan1 and vlan2 and add the command IP ROUTE but in this case I will need to assign somw switch ports to the vlans and have two network drops from each server to connect the two vlans, right?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
To Route between VLANs your switch needs to perform VLAN routing.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
you do not need to have multiple network cards for VLANs, VLANs the benefit and advantage is the reduction of physical network ports when using vlans.
Jorge-123Author Commented:
Let me see if I got this right:
1. - I create “a trunk port” on the switch
2. - VMs should be connected to a “virtual switch” that is tagged vlanx
Am I getting this right or I am misunderstanding it
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
That is correct.

the trunk port carries all the VLANs.
A multiple VLANs are not required to run multiple subnets.  You only need to route between them.  VLANs are recommended most of the time to increase security, and to isolate broadcast networks, but if your network is small enough, you don't have to have them.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
see screenshot, ignore the fact, I've not added a NIC yet....

but as you can see

VLAN 10 - 172.x.x Network

VLAN 20 - 192.168.x.x Network

VLAN 30 - 10.10.x.x Network

Any VM can be on any network, selected from the VM Properties next to Network Interface.
Jorge-123Author Commented:
Thank you all, for your answers and for your help
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
no problems, glad to be of assistance.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.