no snmp-server [CR] command

Discussion in 'Cisco' started by MBilgrav, Feb 4, 2011.

  1. MBilgrav

    MBilgrav Guest

    Hi,

    I am trying to streamline SNMP configs on my Wireless and switched
    setup.
    As there are many different settings in the devices, i would think
    that it is a good idea to start from the same point - i.e. scratch -
    and then input the commands as I want them to be.

    Only issue is that, When I issue "no snmp-server" and hit enter all
    SNMP cfg are gone, but as soon as I type in just one , any given snmp-
    server command - no matter what - ALL THE OLD CFG IS BACK in running-
    config!

    Any way other ways to scratch the SNMP cfg and start over ?

    My AP are C1242 and 1231, but same behavoir gomes for a C2960 switch
    I run 12.2.52 IOS on the switch and 12.3.8 on the AP's
    MBilgrav, Feb 4, 2011
    #1
    1. Advertising

  2. MBilgrav

    bod43 Guest

    On Feb 4, 1:31 pm, MBilgrav <> wrote:
    > Hi,
    >
    > I am trying to streamline SNMP configs on my Wireless and switched
    > setup.
    > As there are many different settings in the devices, i would think
    > that it is a good idea to start from the same point - i.e. scratch -
    > and then input the commands as I want them to be.
    >
    > Only issue is that, When I issue "no snmp-server" and hit enter all
    > SNMP cfg are gone, but as soon as I type in just one , any given snmp-
    > server command - no matter what - ALL THE OLD CFG IS BACK in running-
    > config!
    >
    > Any way other ways to scratch the SNMP cfg and start over ?
    >
    > My AP are C1242 and 1231, but same behavoir gomes for a C2960 switch
    > I run 12.2.52 IOS on the switch and 12.3.8 on the AP's


    I am not sure however - I would guess that:-

    no snmp-server
    wr
    reload !<-- Of course this reboots the device which will
    !<-- put it out of service for several minutes.

    would do the job.

    Otherwise, to avoid the reload, I would think that you would have to
    clear the
    individual lines.
    bod43, Feb 4, 2011
    #2
    1. Advertising

  3. MBilgrav

    MBilgrav Guest


    >   no snmp-server
    >   wr
    >   reload   !<-- Of course this reboots the device which will
    >               !<-- put it out of service for several minutes.
    >
    > would do the job.
    >
    > Otherwise, to avoid the reload,  I would think that you would have to
    > clear the
    > individual lines.


    Hi,

    Thx for your reply
    That is correct, that a "no snmp-server" wr mem, reload do the trick,
    but that is really not an option, as I will have to do this on several
    hundres of AP's
    Also "no-ing" each line is not an option as I can not tell what lines
    are in the device. I will not be doing this by hand, but via a central
    configuration system / NMS.
    So I need to define a template that then will be deployed.
    MBilgrav, Feb 7, 2011
    #3
  4. MBilgrav

    alexd Guest

    Meanwhile, at the comp.dcom.sys.cisco Job Justification Hearings, MBilgrav
    chose the tried and tested strategy of:

    > Also "no-ing" each line is not an option as I can not tell what lines
    > are in the device.


    Why is no-ing a line that isn't there a problem? It will generate an error
    message, but it's not fatal.

    > I will not be doing this by hand, but via a central
    > configuration system / NMS.
    > So I need to define a template that then will be deployed.


    I use RANCID to monitor Cisco configs. RANCID has a variety of backends for
    different kit, eg for Cisco it's 'clogin'. RANCID has a config file called
    router.db that defines each bit of kit to be monitored, with a field for IP
    address, device type and whether it's down or up, each separated with ':',
    for example:

    1.2.3.4:cisco:up
    edge-r-1:cisco:up
    5.5.5.5:cisco:down
    10.11.12.13:cisco:up

    So bulk config changes go something like this, as the RANCID user:

    $ for i in `cat router.db | grep up$ | awk -F: '{ print $1 }'`;
    do clogin $i;
    done;

    This would log into 1.2.3.4, edge-r-1 and 10.11.12.13 in order. I would then
    have a snippet of config on the clipboard ready and waiting, something like

    conf t
    snmp-server contact Support Team - 01234 567 890
    end
    copy run start
    logo

    and as soon as I see the enable prompt it gets pasted in. Takes about 20
    seconds per router, and far less tedious and error prone than doing it
    manually.

    The pasting aspect can be eliminated and the process automated entirely by
    putting the snippet of config into a file called, say, config.txt, and
    replacing

    do clogin $i;

    with

    do clogin -x config.txt $i;

    The reason I don't is that a) I'm only usually doing this on tens of routers
    at a time, not 500, and b) I'm a pussy and don't want to destroy loads of
    routers at once. With something simple like SNMP config changes the risk
    should be minimal to non-existent.

    --
    <http://ale.cx/> (AIM:troffasky) ()
    20:16:16 up 2 days, 11:04, 6 users, load average: 0.06, 0.06, 0.02
    "I am utterly appalled at how I have been treated like a criminal"
    -- Andrew Crossley, ACS:Law, 13 August 2010
    alexd, Feb 8, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.easynews.com

    SNMP - Cisco - SNMP

    news.easynews.com, Mar 4, 2004, in forum: Cisco
    Replies:
    0
    Views:
    788
    news.easynews.com
    Mar 4, 2004
  2. Louis
    Replies:
    1
    Views:
    820
  3. Louis
    Replies:
    0
    Views:
    630
    Louis
    Jul 21, 2004
  4. mbilgrav
    Replies:
    0
    Views:
    547
    mbilgrav
    Feb 4, 2011
  5. bod43
    Replies:
    0
    Views:
    506
    bod43
    Feb 8, 2011
Loading...

Share This Page