Tags:
create new tag
, view all tags

DRAGON uses a mixture of standard Q-Bridge MIB and private VLAN MIB to operate Cisco Catalyst ports and VLANs via SNMP

When setting up a circuit, we need either or both following procedures.

NEW: Under QoS mode, we now use CLI commands to replace some SNMP reads and all SNMP writes. Refer to the last section on this page.

  • Moving Untagged port into VLAN
    1. Check whether the port is in trunking mode
      Read on OID ".1.3.6.1.4.1.9.9.46.1.6.1.1.14.port"
    2. Turn trunking mode off if so and turn staticAccess mode on
       Write OID ".1.3.6.1.4.1.9.9.46.1.6.1.1.13.port" to "2"
       Write OID ".1.3.6.1.4.1.9.9.46.1.6.1.1.3.port" to "5"
    3. Move untagged port to VLAN
       Write OID ".1.3.6.1.4.1.9.9.68.1.2.2.1.2.port" to VLAN-ID

  • Moving Tagged port into VLAN
    1. Check whether the port is in switchport mode
      Read on OID ".1.3.6.1.4.1.9.9.151.1.1.1.1.1.port"
    2. Turn switchport mode on if not
      Write OID ".1.3.6.1.4.1.9.9.151.1.1.1.1.1.port" to "2"
    3. Check whether the port is in trunking mode
    4. Turn trunking mode on if not
       Write OID ".1.3.6.1.4.1.9.9.46.1.6.1.1.3.port" to "4"
       Write OID ".1.3.6.1.4.1.9.9.46.1.6.1.1.13.port" to "5"
       Write the four OIDs ".1.3.6.1.4.1.9.9.46.1.6.1.1.4.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.17.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.18.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.19.port" with hex string "0" 
    5. Move tagged port to VLAN
       Generate bitmasks for VLANs 1-4096 in four 1024bit strings based on the synced switch data from previous SNMP read
       Update the VLAN bitmasks with the newly moved port
       Write strings to four respective  OIDs ".1.3.6.1.4.1.9.9.46.1.6.1.1.4.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.17.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.18.port", ".1.3.6.1.4.1.9.9.46.1.6.1.1.19.port"

When tearing down a circuit, we need this procedure.

  • Removing port from VLAN
    1. If the port is untagged, change VLAN ID to 1 and turn switchport mode off
       Write OID ".1.3.6.1.4.1.9.9.68.1.2.2.1.2.port" to "1"
       Write OID ".1.3.6.1.4.1.9.9.151.1.1.1.1.1.port" to "1"
    2. If the port is tagged, do the reverse of the above "Moving Tagged port into VLAN" procedure

The Cisco Catalyst VLAN creation and removal

  • Create a VLAN
    1. Set lock in vtpVlanEditTable
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1" to "2"
    2. Prepare creation of VLAN
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.2.1.11.1.vlan" to "4"
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.2.1.3.1.vlan" to "1"
    3. Apply the VLAN creation
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1.vlan" to "3"
    4. Release lock in vtpVlanEditTable
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1" to "4"

  • Delete a VLAN
    1. Set lock in vtpVlanEditTable
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1" to "2"
    2. Prepare removal of VLAN
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.2.1.11.1.vlan" to "6"
    3. Apply the VLAN creation
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1.vlan" to "3"
    4. Release lock in vtpVlanEditTable
       Write OID ".1.3.6.1.4.1.9.9.46.1.4.1.1.1.1" to "4"

DRAGON uses CLI to make QoS configurations for per-VLAN bandwidth policing

CLI connection is created when PATH message is received. The CLI commands are issued following successful SNMP procedure.

Suppose we are provisioning VLAN 3000 with two interfaces gi1/9 and gi1/10.

  • Setup QoS policies
    1. Configure global qos
      configure
      mls qos 
    2. define policy map using default class
      configure
      policy-map policy-map-vlan3000
      class class-default
      police 1000000000 500000 500000 conform-action transmit exceed-action drop
      violate-action drop
      exit
      exit
      end 
    3. Configure port interface qos
      configure
      interface gi1/9
      mls qos vlan-based
      mtu 9216
      exit 
      interface gi1/10
      mls qos vlan-based
      mtu 9216
      exit 
    4. Configure vlan interface qos
      interface vlan 3000
      mtu 9216
      no shutdown
      service-policy input policy-map-vlan3000
      service-policy output policy-map-vlan3000
      exit 

  • Removing QoS policies
    1. Configure global qos
      configure
      no policy-map policy-map-vlan3000 

CLI commands for port and VLAN operations

Under QoS mode, the following commands replace some SNMP reads and all SNMP writes used by the non-QoS mode. We believe they will make the code run more stable.

  • Setup VLAN circuit
    1. Check whether the target VLAN is empty
      show vlan id 3000
    2. Create VLAN
      configure
      vlan 3000
      end
    3. Move tagged port into VLAN
      configure
      interface gi1/9
      switchport trunk allowed vlan add 3000
      end
    4. Move untagged port into VLAN
      configure
      interface gi1/10
      switchport access allowed vlan 3000
      end

  • Teardown VLAN circuit
    1. Remove tagged port from VLAN
      configure
      interface gi1/9
      switchport trunk allowed vlan delete 3000
      end
    2. Remove untagged port into VLAN
      configure
      interface gi1/10
      switchport access allowed vlan 1
      no switchport
      end
    3. Check whether the target VLAN is empty
      show vlan id 3000
    4. Delete VLAN
      configure
      no vlan 3000
      end
Topic revision: r3 - 2010-06-21 - XiYang
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback