Sponsored Content
Top Forums Shell Programming and Scripting using if to identify proper mib for use with a cisco switch Post 302262580 by mitch on Friday 28th of November 2008 04:12:55 AM
Old 11-28-2008
Chris,
Thanks for the suggestion of a one liner for sed, I'll change that but what I need the if to do is...

snmpwalk -v 3 -u user -l AuthNoPriv -A password "$ip" "$3550mib", if the output from this command has (STRING) in it then I know this is the proper mib. If the output returns (No such oid supported) then I want if to test this
snmpwalk -v 3 -u user -l AuthNoPriv -A password "$ip" "$3560mib"

To make it easier, since there is only 2 options for an mib I'm thinking

if [condition] then
echo "correct mib"
else [condition]
echo "condition 2 correct"
fi

but I don't understand how to write this.

Last edited by mitch; 11-28-2008 at 05:21 AM.. Reason: elaborating
 

6 More Discussions You Might Find Interesting

1. Ubuntu

how to connect to Cisco switch from Ubnutu

Hi, I installed Ubnutu on my old laptop which does have COMM port, I want to connect to Cisco switch, I have Cisco cable connected to laptop. On Windows, I usually bring up "Hyper Terminal" how do I do it here? Please advice. Thanks. (7 Replies)
Discussion started by: samnyc
7 Replies

2. Shell Programming and Scripting

perl Net::SNMP version getting info from cisco switch

I am having trouble working with SNMP module with perl. I am trying to get SNMP version of target system. I use following code to get it however it resturns error as "Argument "v6.0.1" isn't numeric in numeric lt (<) at ./chk_env_upd.pl line 447." Get load table my $resultat =... (1 Reply)
Discussion started by: dynamax
1 Replies

3. IP Networking

cisco switch + firewall configuration upgrade

Hi experts, I need to cope configuration from one switch/firewall to another switch/firewall. I have copied running configs. The question is do I have to clear the existing configuration on the dest. devices Or can I copy it(replace) directly without clearing previous config ? If... (2 Replies)
Discussion started by: hernand
2 Replies

4. Infrastructure Monitoring

Nagios 3.3.1 SNMP with Cisco Switch Fails

Hello all! I am running Nagios 3.3.1 and I am trying to get it to monitor the ports on my Cisco Catalyst 3524-XL-PWR Managed Switch. But I keep getting "(Return code of 127 is out of bounds - plugin may be missing)" I have installed and compiled the plugins and the snmp services on the Ubuntu... (0 Replies)
Discussion started by: RossIV
0 Replies

5. IP Networking

Free Cisco Catalyst Switch Lab

I've setup my Linux system, running Scientific Linux and ser2net, as a terminal server for my Cisco switches. Logon and have fun!! telnet 72.205.54.70 49001 telnet 72.205.54.70 49002 telnet 72.205.54.70 49003 For topology and updates go to http://labswitch.blogspot.com. Thanks! (3 Replies)
Discussion started by: yoda9999
3 Replies

6. IP Networking

Cisco 3750 Switch ASA VPN Routing

Hi,I want connect my ASA 5510 firewall to a 3750 switch with RIP routing. Unfortunately,I am having issues passing the VPN subnet through rip to the 3750.I don't understand how the routing table is populated on the ASA. Any suggestions? (0 Replies)
Discussion started by: Ayaerlee
0 Replies
Net::CLI::Interact::Manual::Phrasebook(3pm)		User Contributed Perl Documentation	       Net::CLI::Interact::Manual::Phrasebook(3pm)

NAME
Net::CLI::Interact::Manual::Phrasebook - List of Supported CLIs INTRODUCTION
The bundled phrasebook includes support for a variety of network device CLIs. Many were contributed by users of the module. If you set up a new CLI dictionary, please consider contributing it back! The phrasebook specification is given in Net::CLI::Interact::Phrasebook. For each supported CLI, there is a name which must be passed in the "personality" option to Net::CLI::Interact's "new()" method. After that, you can call the included Macros, and the module will use the included Prompt to match the current state of the CLI. More information is available in the Tutorial and Cookbook. Below is a list of all current bundled CLI dictionaries. Each lists its name, the available Prompts, Macros and Continuations, and from which other CLI dictionaries it inherits. IOS # Cisco IOS CatOS # for older, pre-IOS Cisco devices PIXOS # for PIX OS-based devices PIXOS7 # Slightly different commands from other PIXOS versions FWSM # currently the same as 'PIXOS' FWSM3 # for FWSM Release 3.x devices (slightly different to FWSM 2.x) JunOS # Juniper JUNOS support HP # HP support Nortel # Nortel support ExtremeOS # Extreme Networks support Foundry # Foundry/Brocade device support PERSONALITIES
Cisco This personality goes by the name of "cisco" and provides a basis for many other CLI dictionaries. Prompts are "basic", "privileged", "configure", "user", and "pass". Macros are "begin_privileged", "end_privileged", "begin_configure", "end_configure", and "disconnect". CatOS This personality goes by the name of "catos" and inherits from the "cisco" dictionary. Additionally it provides the "privileged" Prompt. Additionally it also provides the "paging" Macro to set the terminal page size. ExtremeOS This personality goes by the name of "extremeos" and inherits from the "cisco" dictionary. Additional Prompts are "basic", "privileged", "configure", "user", and "pass". Additional Macros are "begin_privileged", "end_privileged", and "disconnect". Foundry / Brocade This personality goes by the name of "foundry" and inherits from the "cisco" dictionary. Before connecting to the device you probably want to set the output separator to be: $nci->transport->ors(" "); For users of Net::Appliance::Session this should be: $session_obj->nci->transport->ors(" "); IOS This personality goes by the name of "ios" and inherits from the "cisco" dictionary. Additionally it provides the "paging" Macro to set the terminal page size. HP This personality goes by the name of "hp" and inherits from the "cisco" dictionary. Additionally it provides the "basic" and "user" Prompts. JunOS This personality goes by the name of "junos" and inherits from the "cisco" dictionary. Additionally it provides the "privileged", "configure", and "user" Prompts. Additionally it also provides the "begin_configure" and "paging" Macros. Nortel This personality goes by the name of "nortel" and inherits from the "cisco" dictionary. Additionally it provides the "user" Prompt. PIXOS This personality goes by the name of "pixos" and inherits from the "cisco" dictionary. Additionally it provides the "paging" Macro to set the terminal page size. It can be used in its own right for Cisco PIX firewalls, but is also used as a base for other dictionaries. PIXOS 7 This personality goes by the name of "pixos7" and inherits from the "pixos" dictionary. Additionally it provides the "paging" Macro to set the terminal page size. FWSM This personality goes by the name of "fwsm" and inherits from the "pixos" dictionary. It provides no further functionality, as Cisco FWSM software version 1 and 2 was the same as the PIX OS. FWSM 3 This personality goes by the name of "fwsm3" and inherits from the "pixos" dictionary. Additionally it provides the "paging" Macro to set the terminal page size. perl v5.14.2 2012-06-12 Net::CLI::Interact::Manual::Phrasebook(3pm)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy