title: pysnmp how to get all oids of network device using snmpwalk
body: <p>I want to know how to get all the oids of a certain network device in pysnmp.<br>
  This is my code:  </p>
  
  <pre><code>        errorIndication, errorStatus, errorIndex, varBind = cmdGen.nextCmd(
                      cmdgen.CommunityData('public'),
                      cmdgen.UdpTransportTarget((ip, 161)),
                      cmdgen.MibVariable('IF-MIB', '').loadMibs(), #get all oids
                      lexicographicMode=True, maxRows=10000,
                      ignoreNonIncreasingOid=True
                  )
  
          for varBindTableRow in varBind:
              for name, val in varBindTableRow:
                  print name, val
          print(len(varBind)) #prints number of oids
  </code></pre>
  
  <p>The problem is that I never get all the oids of the device(not even close actually).<br>
  Using this code i usually get around 90 but when i use snmpWalk.exe(downloaded from the internet) I usually get 700 each time.<br>
  I tried rewriting my code in many ways but nothing works.<br>
  Can someone please tell me how i can get all oids of a network device using pysnmp?</p>