networking-forum.com
Community BlogCommunity Wiki * Register  * Search  * Login
View unanswered postsView active topics

All times are UTC - 6 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Jan 25, 2012 12:06 pm 
Offline
New Member
New Member
User avatar

Joined: Mon Feb 28, 2011 12:01 pm
Posts: 16
Certs: ccna
I can get a list of MACs mapped to computer names on my network, so I'm looking at a way to import the computer name into the description of an interface. I'm not very familiar with writing to a switch using SNMP, so I'm not sure if this is possible. Is there a better way to do this other than SNMP?

Thanks.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 12:31 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Tue Aug 21, 2007 2:15 pm
Posts: 8260
Location: Frederick MD
Certs: Instanity
use your RW SNMP string and write to the correct MIB.
shouldn't bee a problem.

_________________
"If you're good at anticipating the human mind. It leaves nothing to chance."
-Jigsaw


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 1:10 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 19, 2009 7:22 pm
Posts: 220
Location: VA
Certs: CCNP CCIP CCNA-S
The OID ifAlias can be found in the IF-MIB and it is writeable. Find the index values of the interfaces by doing an snmpwalk, then set the ifAlias.<index> OID. The running config will hold this as the interface description.

snmpset -v1 -c community isr ifAlias.2 s this_is_a_test_description 2>/dev/null
IF-MIB::ifAlias.2 = STRING: this_is_a_test_description

Verify snmpset is written:
snmpget -v 2c -c community isr ifAlias.2 2>/dev/null
IF-MIB::ifAlias.2 = STRING: this_is_a_test_description

_________________
_______________________________________________________________________
There are 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 2:11 pm 
Offline
New Member
New Member
User avatar

Joined: Mon Feb 28, 2011 12:01 pm
Posts: 16
Certs: ccna
Thank you!
That worked perfectly.
Would you happen to know of an Oid that would get the mac address of the computer in each port?


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 3:01 pm 
Offline
Member
Member
User avatar

Joined: Wed Aug 19, 2009 7:22 pm
Posts: 220
Location: VA
Certs: CCNP CCIP CCNA-S
No OID is available. It can be mapped following the procedure listed here:
http://www.cisco.com/en/US/tech/tk648/t ... 9199.shtml

_________________
_______________________________________________________________________
There are 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 3:16 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Thu Apr 29, 2010 6:12 pm
Posts: 2066
Location: Texas
Certs: CCNP, CCDP, CCIP
Im not sure if this is something you are going to script but keep in mind that the Interface Index value for each interface could change apon a reboot of your device. Its annoying as hell and there is a command to lock it down but I hear it dosent work 100%

http://www.cisco.com/en/US/tech/tk648/t ... 4eec.shtml

_________________
http://blog.movingonesandzeros.net/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group