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  [ 19 posts ] 
Author Message
 Post subject: Switch Macros
PostPosted: Thu Jul 01, 2010 2:17 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Mon Dec 06, 2004 6:46 pm
Posts: 10261
Location: McKinney, TX
Certs: CCNA
Comments for Switch Macros.

_________________
Find networking-forum.com on Facebook, LinkedIn, Twitter, Google+,or subscribe to the site's RSS feeds.


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Thu Jul 01, 2010 3:36 pm 
Offline
Senior Member
Senior Member
User avatar

Joined: Fri Mar 27, 2009 2:16 pm
Posts: 423
Location: germany
Certs: CCNA
thats great :) :bowdown:

I wouldnt have noticed this function before. Very nice. I think this will save some time and prevent some human errors, hopefully :)

_________________
kindly regards
Poison Nuke

www.poisonnuke.de


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Thu Jul 01, 2010 4:44 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 11, 2007 9:43 am
Posts: 1858
Location: Irondequiot, NY
Are switch macros in effect after they are run like an active template or is it a one time thing used to set up parameters?


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 2:14 am 
Offline
CCIE #38070
CCIE #38070
User avatar

Joined: Wed Jun 18, 2008 7:49 am
Posts: 12425
Location: London, UK
Certs: CCIE ,CC-NP/IP, JNCIP-SP, JNCIS-ENT, BC-/SPNE/NP
interesting, never used it before.

_________________
www.mellowd.co.uk/ccie/


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 8:11 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
inzeos wrote:
Are switch macros in effect after they are run like an active template or is it a one time thing used to set up parameters?


They are part of the config and always usable. That answer your question?

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 9:34 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jan 17, 2005 11:01 pm
Posts: 5148
Location: Canada eh
Certs: 350-001, CCNP, CXFF, ITILv3F
Interesting... Although not sure where I'd ever use these. If I wanted to apply a config to more than one interface I'd use an interface range. I don't know how often I'd ever need to go back and run the same commands again and again, unless it was a macro of some show commands (that I could record to a text file to view) or a special save to tftp setup to multiple servers.

_________________
blog.brokennetwork.ca


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 9:57 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Mon Dec 06, 2004 6:46 pm
Posts: 10261
Location: McKinney, TX
Certs: CCNA
Might be good for engineering/architecture to hand over to operations. Design macros to configure specific types of switchports and hand that over to your NOC or ops team.

_________________
Find networking-forum.com on Facebook, LinkedIn, Twitter, Google+,or subscribe to the site's RSS feeds.


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 10:58 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
for show commands you would probably be better off with an alias

In this case I beleve the following command will make sr equivalent to running-config
alias exec sr show running-config

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 11:02 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jan 17, 2005 11:01 pm
Posts: 5148
Location: Canada eh
Certs: 350-001, CCNP, CXFF, ITILv3F
Yeh... I'm not really one for aliases either. If you get too lazy with them and forget the real commands when you get on a device without the aliases you have trouble. And with being able to shorten them anyway, "sh run", it's kind of overkill.

_________________
blog.brokennetwork.ca


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 11:06 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
yeah
but if you could make
ta = switchport trunk allowed vlan add
that might be nice

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 11:11 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jan 17, 2005 11:01 pm
Posts: 5148
Location: Canada eh
Certs: 350-001, CCNP, CXFF, ITILv3F
sw tr al v a

Granted not as short, but still a good deal less than the full one.

_________________
blog.brokennetwork.ca


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Fri Jul 02, 2010 11:21 am 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
you ruining my technical solution to a non-existent problem... stop that!!!

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 2:15 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
We are gonna have to re-IP alot of stuff here soon and due to the way we are doing it we have to delete the IP from vlan 1 (management) and put it on another vlan (not vlan 1 management). As this will continue to run once the SSH session dies (cause you removed the management IP address) I think we can use macros for that.

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 2:28 pm 
Offline
Ultimate Member
Ultimate Member

Joined: Sat Oct 09, 2010 2:13 pm
Posts: 592
Certs: CCNA
what's the significance of putting in "macro global" as opposed to just "macro" when executing?


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 2:30 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Tue Aug 21, 2007 2:15 pm
Posts: 8265
Location: Frederick MD
Certs: Instanity
you can text up the config, put the file on an http server and
issue the command
configure replace http://1.1.1.1/switch1.txt
<where 1.1.1.1 is your http server address and switch1.txt is the new config file>

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


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 2:56 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Apr 07, 2008 10:38 am
Posts: 9390
Location: Orlando, FL
Certs: CCNP RS, CCNP DC, CCDP, CCIP
dlots wrote:
We are gonna have to re-IP alot of stuff here soon and due to the way we are doing it we have to delete the IP from vlan 1 (management) and put it on another vlan (not vlan 1 management). As this will continue to run once the SSH session dies (cause you removed the management IP address) I think we can use macros for that.


This is when to use them. Your first example is stupid.

_________________
http://blog.alwaysthenetwork.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 3:00 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
Vito_Corleone wrote:
This is when to use them. Your first example is stupid.


we have more than 1.2k APs on campus and putting more out almost every day.

automating the port config so anyone can do it IMO was well worth it

And that one had a variable in it showing it could be more versital.

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 3:07 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Apr 07, 2008 10:38 am
Posts: 9390
Location: Orlando, FL
Certs: CCNP RS, CCNP DC, CCDP, CCIP
Still stupid. You should have a script shared between engineers. If you deploy this macro across 100 switches and then decide to change the config, you now have to change the macro on every switch. Stupid.

_________________
http://blog.alwaysthenetwork.com


Top
 Profile  
 
 Post subject: Re: Switch Macros
PostPosted: Wed Dec 14, 2011 3:29 pm 
Offline
Post Whore
Post Whore
User avatar

Joined: Mon Jun 15, 2009 9:48 am
Posts: 2878
Location: Lynchburg VA
Certs: CC\NP\DP\IP\NA-Security\NA-Voice
yep... see blog post about mass deployments via SNMP :-P

I did try the script before the macro but it didn't take for whatever reason... but they liked the macro.

_________________
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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