Changes between Version 14 and Version 15 of Internal/OpenFlow/Notes


Ignore:
Timestamp:
Aug 23, 2009, 12:46:25 AM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/Notes

    v14 v15  
    245245Whether it is NOX or the !Openflow Regression Suite it is all in lots of C. Trying to make Ruby work with C seemed a bit too messy for our own good, so we sent an email to the NOX developer's mailing list in hopes of some elucidation of how to create a Ruby interface to !OpenFlow, instead of Python (which is what NOX does, as described [http://noxrepo.org/wp/?page_id=2 here])
    246246
    247 === Some giant lapse in time, with a pinch of SNMP (9/21) ===
     247=== Some giant lapse in time, with a pinch of SNMP (8/21) ===
    248248So far:
    249249 * have some Ruby code that interrogates and configures SNMP agents and retrieves OFP info.
     
    262262 * dot1q MIBs : http://en.community.dell.com/forums/p/19257012/19425860.aspx 
    263263
     264=== The battle continues (8/22) ===
     265The NEC MIB manual revealed that while traditionally read-write, dot1q family of OIDs are made non-writable for the IP8800.
     266 * NEC's big refrence guide of MIBs (in Japanese) : http://www.nec.co.jp/ip88n/s36_sw/html/mibref/index.html
     267  * 2.13.5 - qBridgeMIB (VLANs)
     268So instead, using Telnet to change values in a gorier way
     269 * Ruby Telnet : http://www.ruby-doc.org/stdlib/libdoc/net/telnet/rdoc/index.html
     270The following code bit creates a ruby telnet object, which essentially logs in and reconfigures port vlan assignments (I am particularily impressed/irked by the way I can now recall commands without even sitting in front of the CLI)
     271
     272{{{
     273def set_port_vlan(port, vlan)
     274        #sets port VLAN. For NEC switches whose port-vlans can't be set using dot1qPvid SNMP value.
     275                sw = Net::Telnet::new("Host" => "172.16.100.10","Timeout"=> 10,"Prompt" => /[$%#>] \z/n)
     276                sw.login("operator")
     277                sw.cmd("enable")
     278                sw.cmd("configure") { |c| print c }
     279                sw.cmd("interface gigabitethernet"+" "+"#{port}") { |c| print c }
     280                puts "changing port vlan value"
     281                sw.cmd("switchport access vlan"+" "+"#{vlan}") { |c| print c }
     282                #sleep(1)
     283                sw.cmd("save")
     284                sw.cmd("exit") {|c| print c}
     285                sw.cmd("exit")  {|c| print c}
     286                sw.cmd("exit")  {|c| print c}
     287end
     288}}}
     289
    264290[[BR]]
    265291[[BR]]