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!

VLAN Port configuration script

Status
Not open for further replies.

rcs2749

Technical User
Jul 18, 2001
24
0
0
US
I was curious if anyone can provide some info on scripting port vlan membership changes.

What I have is multiple training rooms. These rooms are used to train several different projects. Each project has a different Vlan assigned to it. I need to find a SIMPLE way to change VLAN membership on the ports when needed, a script file or something that the TRAINERS can use.

Any ideas?
 
You will let your trainers make changes in your switches? I wouldn’t let anyone from our training department heat my lunch, much less touch my switch.
 
LOL good point.....they would only have access to these switches. I would like to run some type of script that would make the changes for them.

For example.....

Classroom A needs to be on Vlan 4 on Wednesday.

Trainer comes in and runs a script labeled ClassroomA_Vlan4 or something along these lines.
 
Couldn't you just create a text file in notepad with the configuration that you'll need for each project designation and just tftp the config or cut and paste it in.

List of Files:

Class-Vlan4.txt
Class-Vlan5.txt
Class-Vlan6.txt

etc...

 
Yes I have create the config txt files for each Switch/Vlan. The problem is getting them to apply it. I can't figure out how to make it run automatically using telnet although all you really have to do is copy/paste into the console. Remember these are not IT people so I am trying to figure out a real simple way to do it so all they really have to do is double click a bat file or something.
 
To manage my switches I use the Reflection suite from WRQ. This suite enables you to record macro's in telnet sessions. I have recorded several macro's to perform repetetive tasks. For instance I made a macro to enter a switch and go to Enable mode with one keystroke.
In the Reflection suite one can make a Connection Definition File which can start a macro. In this way I made a macro to login to my favorite switch, read some interesting data (in your case modify VLAN) log off my switch and end the connection. In the connection definition I can log the output to a file (in your case monitor which changes were made by the trainer, and when !!)
All I have to do is double click my Connection definition file (shortcut on the desktop) and automagically the results are shown on my Management Server.
(And by starting this shortcut at 07:25 I have my information when I start my working day)
 
Hmmmmm I have reflections install on 2 of the projects but not the 3rd. Might be a possibilty though.
 
I was also trying to see if there was a way to use Hyperterminal but I can't seem to find any info on how to automatically send the script/txt file.
 
You could try using SNMP to push the config over to the switches too. I can't remember the syntax but I've used that before. I'll try to send you the information later when I get back to my office.
 
Not good to let other people change network settings. Doing so means: comm strings, passwords could be known to other people. People who have some knowledge could easily change the vlan and have access to the rest of the network as well.

Option might be to prepare the network the day before. If that is not possible and you want to try to be as secure as possible you could do the following (if people have space on a server)

Make a batch file wich creates a file that tells wich course the trainer is going to give.

Put that file on the trainers server space

check on the server every 5 minutes during a certain part of day wich file there is.

Based on that file decide what the vlan assignments should be and use SNMP or a telnet script wich only you have access to to change the switch settings.

Just an idea.......

InDenial

 
Well these switches would have special logins for trainers that are not used in on the rest of the network switches. In fact these switches are sorta isolated from the others in relation to the logins...etc. Does anyone know how to use a telnet script?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top