You really would benefit -- if only in explaining it to others -- if
you understood the basics better then.
I will help you if you wish to learn....
I understand the basics extremely well. I think you need to pick up a Cisco
book and re-read if your understanding is different. Here's a very basic
tutorial (for anyone who cares to know) on how VLANs work:
First, let's all agree to use the standard, which is now 802.1q. Old Cisco
ISL VLANS are history. Newer Cisco switches don't even support ISL anymore.
Some cheapo switches also support local "port-based" VLANs, but those do not
use tagging, nor are they trunkable to other switches. The following
explains "port-centric" 802.1q VLANs, by far the most widely used
application. Also let's pre-define "traffic", "communication", etc as TCP/IP
on an ethernet network.
1. A switch is configured with one vlan or many vlans. Ports are added to
those VLANs as either "tagged" or "untagged" (this is RFC language. Cisco
uses their own terminology "Access port" = untagged and "trunk port" =
tagged - they always have to be different). Yes, there are variations, but
this will stick to the very basics.
2. An "untagged" port accepts only ethernet frames that do not already carry
a VLAN tag. When frames enter untagged ports, they are given a tag with the
VLAN ID of that port's membership.
3. A "tagged" port accepts only frames that already have a tag. A tagged
port can be configured to be a member of 1 or more vlans, and are typically
used for inter-switch VLAN "trunking", where traffic from multiple VLANS can
travel across a single uplink (This is how my traffic from many clients is
carried.across a single metro-ring infrastructure. It is also how multiple
T1, Voice and other telecom traffic travels across a single pair of fiber
optic cables. Telephone terminology is different, but the concept is exactly
the same).
4. When a frame is to be delivered, it may only exit the switch (egress) on
a port that is a member of the VLAN that it is tagged with. If that port is
an "untagged" port, then the VLAN tag is stripped from the frame on egress -
this is normally for delivery to an end user station. If that port is a
"tagged" port, the VLAN tag stays with the frame to it's next destination -
usually another switch, and once again will only be accepted by another
tagged port with membership in that vlan.
5. All types of ethernet frames are tagged, including broadcast frames. That
is how broadcasts are contained within a single VLAN infrastructure. All
hosts on the VLAN hear broadcasts on that VLAN. Hosts on other VLANS do not.
6. Since frames do not propogate onto ports that are members of other VLANs,
communication is impossible between hosts on different VLANS, regardless of
the logical network (ip subnet) they are configured for.
7. If traffic is to be exchanged between VLANs, a router is required, and
different logical subnets must be defined for each VLAN because that is what
routers do - they route between subnets. (actually my devices are
multi-layer Foundry Networks BI-4000s, so they handle the routing as well).
Here are a couple of examples:
192.168.1.1 192.168.1.2
Computer A Computer B
| |
VL1 VL1
---------------------------
| SWITCH |
---------------------------
VL2 VL2
| |
Computer C Computer D
192.168.1.3 192.168.1.4
Better diagram here :
http://65.243.151.82/a.html
In the example above, computer C can ping computer D and Computer A can ping
computer B (and vice versa of course). But computers A and B cannot ping
computers B or C even though they are in the same IP subnet (all have /24
netmask), because they are on different VLANS.
-----------------------------------------------------------------
192.168.1.1 192.168.1.2
Computer A Computer B
| |
VL1 VL1
---------------------------
| SWITCH |
---------------------------
VL2 uplink VL2
| tag VL 1 & 2 |
| | |
Computer C | Computer D
192.168.1.3 | 192.168.1.4
|
192.168.1.5 | 192.168.1.6
Computer E | Computer F
| | |
| tag VL1 & 2 |
VL1 | VL1
---------------------------
| SWITCH |
---------------------------
VL2 VL2
| |
Computer G Computer H
192.168.1.7 192.168.1.8
Better diagram here :
http://65.243.151.82/b.html
Going a little further (2 switches) in the above example, in addition to the
connectivity (or lack thereof) in the first example, Computers G and H can
communicate with computers C & D, but not A, B, E or F. Computers E and F
can communicate with A and B, but not C, D, E or F. This is all true, even
though all computers are on the same IP (logical) subnet.
-----------------------------------------------------------------
192.168.1.1 192.168.1.2
Computer A Computer B
| |
---------------------------
| Dumb switch no Vlans |
---------------------------
| |
Computer C Computer D
192.168.2.1 192.168.2.2
Better diagram here :
http://65.243.151.82/c.html
Here Computers A and B can ping each other, but not C or D, because even
though they are connected to the same switch (broadcast domain), they are in
different IP subnets.
-----------------------------------------------------------------
192.168.1.1 192.168.1.2 G/W 1.10
Computer A Computer B
| |
--------------------------- ---------------
| |--|-192.168.1.10 |
| Dumb switch no Vlans | | Router |
| |--|-192.168.2.10 |
--------------------------- ----------------
| |
Computer C Computer D
192.168.2.1 192.168.2.2 G/W 2.10
Better diagram here :
http://65.243.151.82/e.html
Now, with the gateways pointed at the router which has an IP interface on
each subnet, all computers can contact each other. Here computers A and B
will communicate directly and Computer A will, for instance, communicate
with C through the router. But if you changed computer C's IP address to
192.168.1.3, it would no longer have to communicate with A via the router.
You could take the router away and A-C would still communicate in the same
manner as A-B.
-----------------------------------------------------------------
192.168.1.1 192.168.1.2 G/W 1.10
Computer A Computer B
| |
VL1 VL1
--------------------------- ---------------
| |--|-192.168.1.10 |
| SWITCH | | Router |
| |--|-192.168.2.10 |
--------------------------- ----------------
VL2 VL2
| |
Computer C Computer D
192.168.2.1 192.168.2.2 G/W 2.10
Better diagram here :
http://65.243.151.82/d.html
And lastly, as with the previous example with the gateways set to a router
the has an IP interface on each subnet, all computers can contact each
other. Here computers A and B will communicate directly and Computer A will,
for instance, communicate with C through the router. The difference is that
if you changed computer C's IP address to 192.168.1.3, you could block
communication with VLAN 1 at the router with an access-list. And, if you
took the router away A-C communication is no longer possible.
Believe me, I know what I'm talking about here. I've spent the last 5 years
building this exact type of infrastructure from the ground up, albeit a tad
more complex. But the fundamentals are the same. If you think I'm wrong, set
it up and give it a try. I have - hundreds of times.
Here are some links to some vlan info and basic layer-2 stuff.
http://www.inetdaemon.com/tutorials/lan/vlan/index.shtml
http://www.wi-fiplanet.com/tutorials/article.php/3577261
http://www.enterasys.com/support/manuals/hardware/2599_03.pdf#search="802.1q vlan tutorial"
I liked this onethe best
http://www.networkworld.com/news/tech/2001/0305tech.html
...kurt