Ciscoworks UT

Unanswered Question
Feb 14th, 2007

Is there a way to export the hostname discovered by UT, and use it as the description field on a switch ?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Thu, 02/15/2007 - 00:06

There's no way to do this automatically, but you can export the UT data to both CSV and XML. Once you have the data in such a malleable form, you could script a Netconfig job to configure the switches.

For example, you can use the "ut -cli" command to export the User Tracking data into CSV format. Parse that file to get the hostname, switch port, and switch, then use "cwcli netconfig" to deploy the commands to your switches. You can build a user-defined XML task file dynamically that holds the necessary commands. Of course, figuring out the switch type (CatOS, IOS, etc.) will be the tricky part.

If you just have IOS and CatOS switches, you can key off of the sysObjectID provided by "dcrcli exp ft=csv". sysObjectIDs that start with 1.3.6.1.4.1.9.5 are CatOS devices where as those that start with 1.3.6.1.4.1.9.1 are IOS. Once you have the OS type, you can get the MDF ID from the same dcrcli export to use in your Netconfig task file.

lni1 Thu, 02/15/2007 - 00:28

I already arrived at the parse section, I have a file with hostname, switch port & switch. Can you be more specific about the "user-defined xml task" perhaps a small example ? Do I have to write xml myself ?

Many thanks

Lieven Stubbe

Belgian Railways

Joe Clarke Thu, 02/15/2007 - 22:10

Here is the example from the cwc-netconfig man page:

<?xml version="1.0" encoding="UTF-8"?>

parameterized="false">

ip route 0.0.0.1 0.0.0.0 Ethernet0/0

ip route 0.0.0.2 0.0.0.0 Ethernet0/0

ip route 0.0.0.3 0.0.0.0 Ethernet0/0

ip route 0.0.0.4 0.0.0.0 Ethernet0/0

ip route 0.0.0.5 0.0.0.0 Ethernet0/0

ip route 0.0.0.6 0.0.0.0 Ethernet0/0

no ip route 0.0.0.4 0.0.0.0 Ethernet0/0

no ip route 0.0.0.5 0.0.0.0 Ethernet0/0

268438030,273153536,272819655

The MDF IDs can be found with a DCR export.

Actions

This Discussion