1. 17 Jun, 2002 1 commit
    • Robert Ricci's avatar
      Made some functions that previously took only a single port or VLAN · 13381879
      Robert Ricci authored
      take more than one. This can increase efficiency, since, for example,
      we now only have to lock the VLAN edit buffer once when tearing down
      an experiment, instead of once per VLAN. There are still other
      functions (setVlanOnTrunks comes to mind) that could benefit from this
      treatment.
      
      These optimization have been made only for Ciscos - minimal changes
      necessary to keep Intel support working were made, but they will still
      have the same old slow behavior.
      13381879
  2. 20 Feb, 2002 1 commit
    • Robert Ricci's avatar
      Code for picking which VLANs are allowed to go across which trunks. · 11e0ea5f
      Robert Ricci authored
      As much of it as possible switch-independant, and put in snmpit_lib.
      Should work for arbitrarily complicated switch toplogies, as long as
      there are not multiple trunks between two switches. (Multiple ports
      combined into one trunk are fine, however.)
      
      As a result of this, VLAN creations and deletions now need to operate
      on all switches, not just on the ones that have ports in the VLAN.
      This is because the traffic may have to traverse switches that have no
      ports in the VLAN to reach other switches that do.
      
      Not called yet. I've done simple testing, but need to do more, as this
      could get us into major trouble if it has bugs.
      11e0ea5f
  3. 30 Jan, 2002 1 commit
  4. 23 Jan, 2002 2 commits
    • Robert Ricci's avatar
      New option: -c . Clears all VLANs are re-creates them from the · cee6ab9c
      Robert Ricci authored
      database.  Intended to be used to recover switch state after a
      crash or power outage.
      
      This option is farily dangerous, as it temporarily disrupts all
      experimental traffic, and will remove all hand-created VLANs.
      So, it interactively asks for confirmation that the user (who
      must be an admin, of course) really wants to do this.
      cee6ab9c
    • Robert Ricci's avatar
      Some minor API changes to increase effieciency for Intels. · 9bd1dded
      Robert Ricci authored
      First, the stack-level createVlan() function no longer takes as an
      argument a list of devices the VLAN exists on, since it looks like
      this will never be needed.
      
      In it's place, createVlan() now takes a list of ports, so that it can
      (if so desired) put the ports in the VLAN without a seperate lock and
      unlock.
      
      The snmpit_intel module now uses its 'nested locking' feature to avoid
      additional locking in these cases. Note though, that the way that this
      is done is not safe for multiple switches in a stack. If we ever have
      to support multiple Intels (looks doubtful), this will have to be
      removed, or locking will need to be moved a level up to
      snmpit_intel_stack . Yuck.
      
      For Intels, the removeVlan() function calls removePortsFromVlan()
      itself, again to save locking overhead. The Cisco behavior, however,
      is unchanged, as locking is not expensive, and this would be too
      messy.
      9bd1dded
  5. 22 Jan, 2002 2 commits
    • Robert Ricci's avatar
      Semi-major reworking of the main body of snmpit, in order to support · 82fc120d
      Robert Ricci authored
      multiple operations. For example, you can now remove multiple VLANs with
      one command, like:
      snmpit -o foo -o bar
      
      You can now give more than one -i option, so that you can give a list of
      more than one switch to operate on, like:
      snmpit -i cisco3 -i cisco4 -l
      
      Converted from using Getopt::Std to Getopt::Long, which is more flexible and
      better documented.
      
      All the 'worker' ( do*() ) functions now take a list of stacks as the first
      argument, rather than using a global @stacks variable.
      
      Fixed up the usage message, which was out of date in some cases, and
      innacurate in others.
      82fc120d
    • Robert Ricci's avatar
      Minor cosmetic fix - the column headings for VLAN lists had gotten · 85d82128
      Robert Ricci authored
      out of alignment with the columns.
      85d82128
  6. 17 Jan, 2002 1 commit
  7. 14 Jan, 2002 1 commit
  8. 07 Jan, 2002 1 commit
  9. 28 Dec, 2001 1 commit
  10. 28 Nov, 2001 2 commits
  11. 15 Nov, 2001 1 commit
    • Robert Ricci's avatar
      Two fixes: · 947f73f4
      Robert Ricci authored
      Make sure experiments actually exist, for morons like me that enter 'eid pid'
      instead of 'pid eid'
      
      When using '-t', don't try to create VLANs if they already exist, just
      put ports in it (this can be used, for example, to repair damage to switch
      state or fix up after manually monkeying with VLANs)
      947f73f4
  12. 14 Nov, 2001 1 commit
  13. 02 Nov, 2001 2 commits
  14. 01 Nov, 2001 1 commit
  15. 31 Oct, 2001 1 commit
    • Robert Ricci's avatar
      Major overhaul of snmpit. Highlights, in no particular order: · 7e53c10a
      Robert Ricci authored
      Now supports multiple switches and multiple stacks. To do this, the existing
      snmpit_cisco module had to be modified to behave as a true object, and its
      interface changed.
      
      A new layer of abstraction has been added: the stack. This is to hide the
      details of how things such as VLAN creation occur across multiple devices. For
      example, in Cisco stacks, you always contact the stack leader (VTP server) to
      create/delete VLANs. Other switches may have different semantics, such as
      having to contact every switch to create the VLAN.
      
      Now uses libdb for database access and permissions checks.
      
      Hardware details are hidden as much as possible in the user interface. For
      example, the creation and deletion commands now take VLAN identifiers, and
      snmpit transparently turns these into device-specific VLAN numbers.
      
      snmpit.in has been re-written from scratch. The new version uses three basic
      steps:
      1) Process command line options and determine operation to run
      2) Determine which devices, ports, and VLANs will be involved and make
         the appropriate objects
      3) Actually perform the operation
         when TESTMODE is set, does only steps 1 and 2
      
      Some command-line options have changed. This is because we now use getopt,
      rather than a home-grown parser, to parse the command line. As a result of the
      large number of options, and an attempt to mimic old options as much as
      possible, the options are no longer very mnemonic.
      
      Uses a new table called switch_stacks to figure out which switches belong to
      which stacks. A stack is defined as a set of switches that share VLANs.
      
      All snmpit scripts and modules now run with 'use strict' to help catch certain
      programming errors.
      
      VLAN listing now prints out the pid/eid and vname for VLANs, if possible.
      
      A few things have bitrotted due to these changes:
      * snmpit_intel will need to be re-tooled to use the new interface, and to
        behave as a proper object
      * vlansync, vlandiff, and resetvlans depend on the output of snmpit, and will
        need to be updated to understand its new output format
      7e53c10a
  16. 03 Oct, 2001 1 commit
    • Robert Ricci's avatar
      snmpit now discovers which switch to operate on based on the members of the · 645197be
      Robert Ricci authored
      VLANs it is to operate on. This is only a temporary multi-switch solution, as
      it only picks one switch to operate on.
      
      Also, added a sanity check in snmpit_cisco.pm. Now checks every port that
      it controls, to make sure it's on the right switch. If this sanity check
      fails, dies to prevent any damage to existing switch configuration.
      645197be
  17. 24 Aug, 2001 3 commits
  18. 14 Aug, 2001 1 commit
  19. 23 Jul, 2001 1 commit
  20. 19 Jul, 2001 1 commit
  21. 05 Jun, 2001 1 commit
  22. 04 Jun, 2001 2 commits
  23. 01 Jun, 2001 1 commit
  24. 26 May, 2001 1 commit
  25. 25 May, 2001 1 commit
  26. 24 May, 2001 1 commit
  27. 21 May, 2001 1 commit
  28. 18 May, 2001 2 commits
  29. 17 May, 2001 1 commit
  30. 11 May, 2001 1 commit
    • Mac Newbold's avatar
      Small set of changes to make snmpit work correctly for the control router. I... · 070d4a56
      Mac Newbold authored
      Small set of changes to make snmpit work correctly for the control router. I also added entries in the database for ports that are in vlans (other than the default #1) that aren't connected to a node in the database. So, from now on, when an empty port is in a vlan, we need to put an entry in the wires table that says its connected to node 'empty' on some unused port number.
      070d4a56
  31. 20 Mar, 2001 1 commit
  32. 15 Mar, 2001 1 commit