Changes between Version 12 and Version 13 of Internal/OpenFlow/CLISetup


Ignore:
Timestamp:
Aug 13, 2009, 9:56:50 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/CLISetup

    v12 v13  
    215215}}}
    216216
     217=== SNMP (8/13) ===
     218For a explanation of SNMP: http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol [[BR]]
     219In the IP8800 guide: http://www.nec.co.jp/ip88n/s36_sw/html/cfguide2/index.html [[BR]]
     220MIB references: http://www.alvestrand.no/objectid/
     221==== Configuring the IP8800 ====
     222Use of SNMP (Simple Network Management Protocol) is not set by default; you must create access lists with IP addresses allowed to request information as a manager device. In this case, an ACL is created for all the interfaces of SB9, eth1:
     223{{{
     224!sw-sb09(config)# access-list 1 permit 10.19.0.10 0.0.0.0
     225!sw-sb09(config)# access-list 1 permit 192.168.100.28 0.0.0.0
     226!sw-sb09(config)# access-list 1 permit 192.168.1.28 0.0.0.0
     227!sw-sb09(config)# access-list 1 permit 172.16.100.1 0.0.0.0
     228!sw-sb09(config)# sh access-list
     229access-list 1 10 permit host 10.19.0.10
     230access-list 1 20 permit host 192.168.100.28
     231access-list 1 30 permit host 192.168.1.28
     232access-list 1 40 permit host 172.16.100.1
     233}}}
     234
     235to include it in the snmp access list, use the following command:
     236{{{
     237sw-sb09(config)# snmp-server community "NET" ro 1
     238}}}
     239where "NET" is the group name, "ro" is read-only, and "1" is the access list allowed.
     240
     241==== Accessing MIBs on the IP8800 ====
     242accessing it through the switch itsself is easy enough:
     243{{{
     244sw-sb09# snmp walk 1.3.6.1.2.1.1           
     245
     246Name: sysDescr.0
     247Value: ALAXALA AX3640S AX-3640-48T2XW-L [AX3640S-48T2XW] Switching software Ver.
     24810.7 [OS-L3L]
     249
     250Name: sysObjectID.0
     251Value: ax3640s
     252
     253Name: sysUpTime.0
     254Value: 25724205
     255
     256Name: sysContact.0
     257Value:
     258
     259Name: sysName.0
     260Value: sw-sb09
     261
     262Name: sysLocation.0
     263Value:
     264
     265Name: sysServices.0
     266Value: 78
     267}}}
     268
     269==== From a manager device - snmpwalk ====
     270with snmpwalk from SB9:
     271{{{
     272root@sb9:~# snmpwalk -v 2c -c NET 172.16.100.10 1.3.6.1.2.1.1
     273}}}
     274{{{
     275SNMPv2-MIB::sysDescr.0 = STRING: ALAXALA AX3640S AX-3640-48T2XW-L [AX3640S-48T2XW] Switching software Ver. 10.7 [OS-L3L]
     276SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.21839.1.2.11
     277DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (26201570) 3 days, 0:46:55.70
     278SNMPv2-MIB::sysContact.0 = STRING:
     279SNMPv2-MIB::sysName.0 = STRING: sw-sb09
     280SNMPv2-MIB::sysLocation.0 = STRING:
     281SNMPv2-MIB::sysServices.0 = INTEGER: 78
     282}}}
     283==== Using Ruby scripts ====
     284libsnmp reference: http://snmplib.rubyforge.org/doc/index.html
     285
     286Ruby has libsnmp-ruby, a library for SNMP, available. SB9 didn't come with it, so it was installed:
     287{{{
     288apt-get install libsnmp-ruby
     289}}}
     290A messy irb test of the library:
     291{{{
     292irb(main):002:0> require 'snmp'
     293irb(main):004:0> agent_hostname = "172.16.100.10"
     294=> "172.16.100.10"
     295irb(main):005:0> agent_comm = "NET"
     296=> "NET"
     297irb(main):007:0> s = SNMP::Manager.new(:Host => agent_hostname, :Community =>agent_comm, :Port => 161)
     298=> #<SNMP::Manager:0xb79d5d98 @snmp_version=:SNMPv2c, @port=161, @transport=#<SNMP::UDPTransport:0xb79d5d5c @socket=#<UDPSocket:0xb79d5d34>>, @write_community="NET", @host="172.16.100.10", @retries=5, @community="NET", @mib=#<SNMP ... #this goes on for a while
     299irb(main):009:0> response = s.get(["1.3.6.1.2.1.1.1.0"])
     300=> #<SNMP::Response:0xb79c2d10 @error_index=0, @error_status=0, @request_id=856260869, @varbind_list=[#<SNMP::VarBind:0xb79c2900 @value="ALAXALA AX3640S AX-3640-48T2XW-L [AX3640S-48T2XW] Switching software Ver. 10.7 [OS-L3L]", @name=[1.3.6.1.2.1.1.1.0]>]>
     301irb(main):035:0> rstring = "#{response.varbind_list.to_s}"
     302=> "[name=1.3.6.1.2.1.1.1.0, value=ALAXALA AX3640S AX-3640-48T2XW-L [AX3640S-48T2XW] Switching software Ver. 10.7 [OS-L3L] (OCTET STRING)]"
     303}}}
     304
    217305[[BR]]
    218306[[BR]]