Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create 2 vlan with one port connected to both.

Status
Not open for further replies.

bartibog

MIS
Feb 17, 2003
84
0
0
CA
Hi,



my setup is default vlan with all ports untagged. I need to create a second vlan (vlan2) and add 6 ports to it. but i need 1 port that can access both vlans.


default vlan 10.0.1.0/24
switch is 5406zl 10.0.1.10

Do i need to enable ip routing?

I have the vlan2 setup with 1 port tagged.

any help is much appreciated!

Sbishop

..
 
You will have to give more details.

A switchport can carry as many VLANs as you desire (well, there are limits) - it will have one VLAN "untagged", and you add as many more as you need as "tagged".

If you need devices on one VLAN to communicate with device that are on another VLAN, you will need a router (or layer3 switch, eg your 5406) to do it.

If you have a host that has virtual interfaces in two subnets, then you configure its physical interface to use 802.1q with both VLANs configured on it, then patch that into a switchport that is also configured for those two VLANs.

As I said, more details on what you're trying to do.

 
In simple terms, using the untag command in your config will cause those ports to be dedicated to that VLAN. Using the tag command will cause that VLAN to flow down that port.

So for example, when you show config:

vlan 1
untagged A1-A24
no untagged B1-B24
vlan 2
untagged B1-B24
tagged C1


So ports A1-A2 are in one VLAN, while ports B1-B24 are in another VLAN. The two VLAN are operating at layer 2, so think of each group of ports are two logically different switches. When you put an IP address assignment to them:

vlan 1
untagged A1-A24
no untagged B1-B24
ip address 10.0.1.10 255.255.255.0
vlan 2
untagged B1-B24
ip address 10.0.2.10 255.255.255.0
tagged C1

It now becomes a layer 3 interface. When you add the command
ip routing
your VLANs will now "talk" (route) to each other (they won't otherwise).

The C1 port used in this example is connecting to another VLAN aware switch. The VLANs being pushed down this wire will be the default VLAN 1 (it's the default VLAN on all switches, so that's why you don't see a tagged command under that interface) and VLAN 2. If you had another VLAN defined, say VLAN 3...as long as I tag C1 under the VLAN 3 interface, then that VLAN will also get pushed down the wire. If you are connecting another switch to the C1 port on the 5400, then you will basically do the same type of config on the other switch, making sure you define the same VLANs and tagging the port used for uplink back to the 5400. Once done, you can divy out ports on that other switch to VLAN 1 or VLAN 2, etc... by untagging them under the VLAN's interface.

Hope that helps.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top