Netdisco - MIB Repository
Max Baker

---------------------------------------------------------------------------
UPGRADING MIB REPOSITORY
---------------------------------------------------------------------------
This document is to guide the process I go through to make a new version
of this repository.

---------------------------------------------------------------------------
RFC
---------------------------------------------------------------------------
Do the RFC mibs first so you can then remove the older versions 
that come with cisco's mibs, making sure you have the newest versions.

(From instructions inside of net-snmp)

1. wget http://easynews.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.4.1.tar.gz
    (change 5.4.1 with newest version) 
   tar xvfz net-snmp*
   cd net-snmp*/mibs

2. Edit Makefile.mib
    Change PREFIX to .
    Change ALLDIR to rfc.orig
    Change INSTDIR to rfc

2.5. Update rfclist / ianalist
    See http://www.mail-archive.com/net-snmp-coders@lists.sourceforge.net/msg11519.html
    for background.

     i. Check for updates
        https://sourceforge.net/p/net-snmp/code/ci/master/tree/mibs/rfclist
        https://sourceforge.net/p/net-snmp/code/ci/master/tree/mibs/ianalist
    ii. Copy rfclist/ianalist from this package over if newer or use the above
    
3.  Download all IANA and RFC mibs into rfc/ dir

    make -f Makefile.mib rfc

4.  IEEE

    i. Download newest versions from
       http://www.ieee802.org/1/files/public/MIBs/
    ii. Strip date portion from names
    iii. Copy new versions over old versions

5.  Check what's new.  sanity check, look at the output...
    
    diff_dir netdisco_mibs/rfc net-snmp*/mibs/rfc

6.  Copy new versions over old versions
    diff_dir netdisco_mibs/rfc net-snmp*/mibs/rfc 1

7.  Patch
    patch rfc < rfc1.diff

8.  Check
    ./chk_mibs rfc
    
    Fix and create new patches as necessary.

---------------------------------------------------------------------------
Cisco
---------------------------------------------------------------------------
1.  It seems that the general .tar.gz files are horribly out of date. So we
have to get the nightly tarballs from the individual files.
    wget ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
    wget ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz

2. Move the old dir out of the way
    mv cisco /tmp/cisco_old 

3. Make a new dir and unarchive
    mkdir cisco
    cd cisco
    tar xvfz ../v2.tar.gz
    tar xvfz ../v1.tar.gz

4. Remove Cruft
    rm -f *CAPABILITY.my
    rm -f *V1SMI.my
    rm -f CISCO-GENERAL-TRAPS.my

5. Remove duplicates
    Use cisco_remove as a good starting point
        for f in `cat cisco_remove`; do rm -f $f; done

    cd ..
    mkindex
    ./chk_dups > dups.txt    

    Review that file and make sure the newest file ends up in the right directory.
    Do not put non-cisco mibs in the cisco directory.

    Some cisco RFC's are updated and can be used, check to see which dups are left


All other duplicates in cisco/ are either out of date, modified
or exactly the same and should be removed.

    Remove the dups that don't diff
        ./mkindex
        ./rm_cisco_dups
        ./mkindex
        ./chk_dups

6. Move the original (CVS) directory back and then copy the new versions over.
    mv cisco cisco.new
    mv /tmp/cisco.old cisco
    cp -f cisco.new/* cisco
    rm -f cisco.new

7. Patch
    cd cisco
    patch < ../cisco1.diff
    patch < ../cisco2.diff
    rm -f *.rej *.orig
    cd ..

8. Check
    ./chk_mibs cisco

---------------------------------------------------------------------------
net-snmp:
---------------------------------------------------------------------------
    cp -f net-snmp*/mibs/*.txt net-snmp
    ./mk_index
    ./rm_cisco_dups mib_index.txt net-snmp
    ./chk_mibs net-snmp

---------------------------------------------------------------------------
HP
---------------------------------------------------------------------------
1. Get new MIBs from HP
    From: http://www.hp.com/rnd/software/MIBs.htm
          ftp://ftp.hp.com/pub/networking/software

2. Unarchive them into a new directory.  Set the old one aside for now.
    mv hp /tmp/hp.old
    mkdir hp.new
    cd hp.new && tar xvfZ ../mibs-*.tar.Z
    rm *.txt *.htm* cisco-* 
    chmod -x *

3. fix Case
    Some brain child decided to change the file names by capitalizing
    some letters along the way.  change to older all lower-case.

    cd hp.new
    ../to_locase *.mib
    
4. Check for the newest versions
    cd ..
    ./mkindex
    ./chk_dups

5. Remove older versions
    ./rm_cisco_dups mib_index.txt hp.new 
    ./mkindex
    ./chk_dups
     
6. Patch
    cd hp.new && patch < ../hp1.diff
    rm -f *.orig
    rm -f *.rej

7. Syntax check
    cd ..
    ./chk_mibs hp.new 
    Fix
    Create new patch

8. Copy over
    cp -f hp.new/* /tmp/hp.old
    rm -rf hp.new
    mv /tmp/hp.old hp

note: hp-sn-root-mib was missing in sept-07 update of mibs, probably needs an
update.

---------------------------------------------------------------------------
Package and Ship
---------------------------------------------------------------------------
1. Run one final set of checks
    ./mkindex
    ./chk_dups
    ./chk_mibs_all 2>&1 > check.txt

2. Update the VERSION code in README

3. CVS check in

4. cd .. & make mib-dist 

5. scp netdisco-mibs-VERSION.tar.gz user@frs.sourceforge.net:uploads

---------------------------------------------------------------------------
OTHER VENDORS NOTES
---------------------------------------------------------------------------
allied:
    I painstakingly merged AThub-mib and Allied 4.1 MIB together to form one
    ATI-MIB

aruba:
    ArubaOS 7.2.0.0 and AP80-PRIVATE-MIB

asante:

enterasys/cableron:
    From: http://http://www.enterasys.com/support/mibs/ extract enterasys and
    cabletron directories.

extreme:
    v762b3 (01/09/06)
    From http://www.extremenetworks.com/products/mibs.aspx
    Run split-extreme to seperate into individual mib files.

nortel:
    Releases platform specific MIBs updated as required for specific software.
    The MIBs included are based on the following:
    
        VSP 9000 version 4.1.0.0 (12/2015)
        VOSS (8K/7K) 5.0.0.0 (12/2015)
        Ethernet Routing Switch 8800/8600 version v7.2.21.0 software (10/2015)
        Ethernet Routing Switch 4000 series version 5.9.2 software (12/2015)
        Ethernet Routing Switch 5000 series version 7.0.1 software (11/2015)        
        Application Switch 3408 28.1.5 software (03/2012)
        Ethernet Routing Switch 1600 version 1.1 software
        BayRS MIBs version 15.5 software
        Centillion version 5.1.1 software
        Nortel AP 2220 version 1.3 software

    RAPID-CITY is an unofficial merge of VSP9K 4.0.1.2, VOSS 5.0.0.0,
    8800 7.2.21.0, ERS 4K 5.9.2, and ERS 5K 7.0.1 variants as shipped MIBs
    for the various products contain partial portions of the full tree.  The
    merged file was checked with smilint at level 3 and the following
    command will dump the full tree for a diff:
    
    snmptranslate -m RC-TLS-MIB:RC-OPM-MIB:RC-LINK-OAM-MIB:RC-PIM-MIB:RC-OSPF-MIB -Tp RAPID-CITY::rapidCity

    rm RFC* rfc*
    rm other rfcs in other names

foundry:
    SPR08040 (01/2016) and foundry.mib (12/2015)
    Run split-foundry to separate into individual mib files.
    Diff individual files looking for additions.

juniper:
    From http://www.juniper.net/techpubs/software/index_mibs.html
    - Patch with juniper1.diff for issue with JUNIPER-LDP-MIB trying to
      import mplsLdpSesState from MPLS-LDP-MIB for a trap definition.
