Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

Network Change & Configuration Management

Reply

Infoblox Switch port Manager

Expert
Posts: 17
3737     0

Hi,

 

We are trying to find a way to change the Vlan of all our Dormant Interfaces on our Cisco Swithces, I can see the interfaces on SPM but I cant find a way to run a command on all ports identifed to be "Available" at this stage we are doing it one port at a time. Is there a quick way to re-vlan and rename all these interfaces or would we need to look at creating a script to do this for us? 

 

I am busy trying (With little success) to create a script do do a "show Interface accounting" on the devices and find all interfaces with the following output then attempt to do a vlan change but at this stage i am getting nowhere and i am busy re-visiting the scripting guide.

 

Any help will be appreciated.

 

GigabitEthernet2/0/2
Protocol Pkts In Chars In Pkts Out Chars Out
No traffic sent or received on this interface.
GigabitEthernet2/0/3
Protocol Pkts In Chars In Pkts Out Chars Out
No traffic sent or received on this interface.
GigabitEthernet2/0/4
Protocol Pkts In Chars In Pkts Out Chars Out
No traffic sent or received on this interface.

 

 

 

Regards,

 

Jason

Highlighted

Re: Infoblox Switch port Manager

Authority
Posts: 27
3737     0

Hello,

   I am not sure if this is like NetMRI, but if it can use CCS what you will want to do is create an action that would run the 'show interface accounting' command. Then you would create a trigger with a template of 'No traffic sent or received on this interface.' If it matches the template, you want it to set a variable from off to on. Then create another action with the filter of {variable = 'on'}. This action would run a list of commands to set the interface into whatever vlan you would like. If you need a full blown example, let me know.

 

Thank you,

Jerry

Re: Infoblox Switch port Manager

Adviser
Posts: 86
3738     0

First of all, I hope you have at least ACM licensing and above, not just SPM. ACM licensing and above will allow you to run scripting.

 

If you were trying to determine a "dormant" interface, I probably wouldn't do it based on the packets seen in/out of the interface at any given time - because what is to say a user temporarily vacated that switchport at only that particular time you were checking/running the script?

 

A better method would be to use NetMRI's "last seen" function. You could create a script and use the NetMRI_Easy function for the following:

 

my @interfaces = $easy->broker->interface->search({ DeviceID => $device_id,
ifAdminStatus => 'up',
ifOperStatus =>'down',
xml_filter => "<SetFilter><Expr op='&lt;'><Expr field='ifLastChange'/><Expr type='datetime' value='$days days ago'/></Expr></SetFilter>",
select => \@columns, });

 

That puts all the interfaces under interrogation, checks that it is down, checks for a user input variable $days and if it has not been used/changed since the number of days then you would do something like the following:


foreach my $interface (@interfaces) {
$easy->send_command("config terminal");
$easy->send_command("interface " . $interface->ifName);
$easy->send_command("shutdown");
}

 

 

Re: Infoblox Switch port Manager

[ Edited ]
Expert
Posts: 17
3738     0

 

*Edit* found the script, will look into it and give feedback thanks.

 

 

Hi,

 

Sorry if this is a stupid question but what is "NetMRI_Easy" ? i am running Infoblox 7.0.2.81812 and dont see that anywere on the appliance.

 

Jason

Re: Infoblox Switch port Manager

Adviser
Posts: 86
3738     0

From the admin guide:

 

About NetMRI_Easy.pm
NetMRI_Easy.pm provides an interface to the Network Automation API from perl scripts run on the Network
Automation appliance. NetMRI_Easy.pm offers all of the features of infoblox_jobs.pm, with some safeguards and
object -oriented interfaces that are unavailable when infoblox_jobs.pm is used.

 

NetMRI_Easy.pm is designed to be imported as a library into Network Automation and used by Perl scripts executed in the Sandbox environment.


NetMRI_Easy.pm is also a compatibility layer, allowing writing of Perl scripts that function unaltered with the newer
2.5 Network Automation Perl API, using scripts originally developed for the Network Automation Perl Core API 1.1.

Re: Infoblox Switch port Manager

Adviser
Posts: 57
3738     0

As jchik pointed , you can run the script only if the appliance is licensed for it (ACM or Full NetMRI). If you need to know more about your license, just SSH into the appliance and run the command "show license". You can paste the output of "show license" here if you need any further clarifications

Showing results for 
Search instead for 
Do you mean 

Recommended for You