07-28-2011 11:16 AM - edited 03-07-2019 01:27 AM
I am trying to determine if the following scenario can be accomplished and am quite new to the concept of VLANs. We currently have a small LAN that we would like to split multiple VLANs. We have 2 Catalyst 2950-48-SI switches that would offer plenty of ports for the desired VLANs. There are 60 machines connected to these switches.
And then comes the question:
The machines connected to the switch ports collectively make up a traninig system that run some proprietary software - typically an instructor machine and several student machines. The goal is to create multiple VLANs that would allow us to run separate training sessions simultaneously. We would like to be able to modify the configuration of the switch to enable 1, 2, or 3 separate training systems. The desired effect would be as follows:
VLAN1 - all 60 machines,
VLAN2 and VLAN3 - 30 on VLAN2 and 30 on VLAN3,
VLAN4, VLAN5, and VLAN6 - 20 on VLAN4, 20 on VLAN5, and 20 on VLAN6
Would it be possible to create a vlan.dat that would include the desired VLANS above and simply activate or deativate the desired VLANs based on the desired configuration of machines?
So if the instructor wants to enable a configuration that contains one large training system he would enable VLAN1 and disable VLAN2,3,4,5,and 6. If the instructor wanted a lab that was split into 2 training systems he would enable VLAN2 and VLAN3 and disable VLAN1,4,5,and 6. And lastly if he wanted 3 separate systems (VLANs) he would simply enable VLAN4,5, and 6 and disable VLAN1,2, and 3.
Any insight to accomplishing this would be extremely helpful.
07-28-2011 11:24 AM
You don't need to enable/disable Vlans to meet this requirement. A Vlan can be created in the vlan database and stored on vlan.dat but it provides no service until it is associated to a physical port.
What you need to do is scripting port association/membership.
You can have a script in notepad associating 20 ports to Vlan 2, 20 to Vlan 3 and run your session.
Then have another script that associates Vlan4, Vlan 5 and so on.
BTW, the command to associate a Vlan to a physical port is: switchport access vlan x
07-28-2011 11:34 AM
Thanks for the quick reply!
How would I execute the script? Can it be done automatically without user intervention? Ideally we would like to fire off the script via software based on a GUI selection.
07-28-2011 11:40 AM
The basic execution would be by logging into the router and from the command interface copy and paste the content you've saved from the text file.
A more complex execution would be using a Network Management System to run these changes for you. How this process is done will depend on the NMS you've chosen.
Regards,
Edison
07-28-2011 11:28 AM
Randy
Simplest solution is to create all your vlans in the vlan database. Make one switch a VTP server and one a VTP client.
Then simply allocate ports into the correct vlan depending on your requirements. Bear in mind that you can use the interface range command to allocate ports into vlans so it would be very easy to do this in a couple of minutes eg.
switch(config) interface range fa0/1 - 10
switch(config-if-range)# switchport access vlan
etc.
Jon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide