RE: SNMP query

From: Weidong Xiao (Weidong.Xiao@vi.net)
Date: Thu Dec 19 2002 - 14:27:05 GMT-3


Neil,

Thanks very much for your reply.

I didn't quite understand why you grep '10.10.10.100'. Does it has something to do with transmission(10)in the MIB tree?

I'd like to poll mac addresses from a switch, then consult router arp table to decide the ip address off each switch port. Here is what I did:

(Linux)snmpwalk HOSTNAME STRING@VLAN# 17.5.1.1.1.1.0
17.5.1.1.1.0.2.179.25.236.92.1 = OCTET STRING: Hex: 00 02 B3 19 EC 5C
17.5.1.1.1.0.2.179.25.239.162.1 = OCTET STRING: Hex: 00 02 B3 19 EF A2
......
On the switch,
Switch#sh mac | e 0/4[7|8]$
Destination Address Address Type VLAN Destination Port
------------------- ------------ ---- --------------------
0002.b319.ec5c Secure 105 FastEthernet0/38
0002.b319.efa2 Secure 105 FastEthernet0/12
......

If I could correlate "17.5.1.1.1.0.2.179.25.236.92.1" to "FastEthernet0/38", then I can easily write a script to do what I want on tens of switches. Spent the whole afternoon, still haven't got a clue.

Can you help?

Cheers,
Weidong

> -----Original Message-----
> From: Neil Moore [mailto:neil@droopy.com]
> Sent: 19 December 2002 14:48
> To: Weidong Xiao; ccielab@groupstudy.com
> Subject: Re: SNMP query
>
>
> Here is my snmpwalk
> %ping 10.10.10.5
> %snmpwalk 10.10.10.5 ccie|grep 10.10.10.100
> at.atTable.atEntry.atIfIndex.1.1.10.10.10.100 = 1
> at.atTable.atEntry.atPhysAddress.1.1.10.10.10.100 = Hex: 00
> 02 2A BE DA 21
> at.atTable.atEntry.atNetAddress.1.1.10.10.10.100 = Network Address:
> 0A:0A:0A:64
> ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.1.1
> 0.10.10.100 =
> 1
> ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress
> .1.10.10.10.10
> 0 = 0:2:2a:be:da:21
> ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaNetAddress.
> 1.10.10.10.100
> = IpAddress: 10.10.10.100
> ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaType.1.10.1
> 0.10.100 =
> dynamic(3)
>
> My mac address is 0:2:2a:be:da:21
>
> Try a similar snmpwalk with a grep of a machine you know is
> in the table to
> find the mib location.
>
> Hope that helps
> ----------------------------------------
> Neil Moore CCIE#10044
> ----- Original Message -----
> From: "Weidong Xiao" <Weidong.Xiao@vi.net>
> To: <ccielab@groupstudy.com>
> Sent: Thursday, December 19, 2002 7:20 AM
> Subject: OT: SNMP query
>
>
> > Hello group,
> >
> > How to get the "sh mac" results from a switch? What is the
> variable-name
> for those mac addresses?
> >
> > I used "snmpwalk <machine> <community-string>" on a Linux
> host and got the
> whole stuff from a switch, but couldn't find anything
> relating to "sh mac"
> results on the switch. Is it feasible to get the those mac
> addresses via
> SNMP?
> >
> > Thanks,
> >
> > Weidong
> > .
.



This archive was generated by hypermail 2.1.4 : Fri Jan 17 2003 - 17:21:49 GMT-3