Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/wp-file-upload/wordpress_file_upload.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/wp-file-upload/wordpress_file_upload.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 179

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 180

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 181

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 184

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 185

Warning: Cannot modify header information - headers already sent by (output started at /home/circui15/public_html/packetpros.com/index.php:4) in /home/circui15/public_html/packetpros.com/wp-content/plugins/read-offline/lib/phpMobi/MOBIClass/MOBI.php on line 186
Macro's in Switches``BOOKMOBI!"#xW D  MOBId_ @EXTHdColliniSwitchg,

I like using macro's in switches. I find them useful since different customers have different requirements (for example ports that are not used). Here's a couple of examples- macro name UNUSED default interface $interface interface $interface description UNUSED PORT no macro …

j'Tue, 15 Mar 2016 00:25:17 +0000p$http://packetpros.com/?p=522ePacketprosf Copyright packetpros.comMacro's in Switches

I like using macro’s in switches. I find them useful since different customers have different requirements (for example ports that are not used). Here’s a couple of examples-

macro name UNUSED
default interface $interface
interface $interface
description UNUSED PORT
no macro description
no switchport
shutdown
exit
@

macro name AP
default interface $interface
interface $interface
switchport
switchport trunk encaps dot
switchport mode trunk
spanning-tree portfast trunk
no spanning-tree bpduguard enable
power inline auto
switchport trunk allow vlan 200,300,500
no shutdown
@

macro name PRINTER
default interface $interface
interface $interface
switchport
switchport mode access
spanning-tree bpduguard enable
power inline never
switchport access vlan 10
switchport port-security
switchport port-security maximum 1
switchport port-security mac-address sticky
power inline never
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
no shutdown
@

So there’s three macro’s; UNUSED, AP and PRINTER. You’ll notice that each macro has a variable of $interface. We use that variable to determine what port to apply the macro to. For example we want to apply the UNUSED macro to port Gi2/0/24. We want to apply this in Global Configuration mode and not under the interface itself.

PACKET-SW(config)#macro global apply UNUSED $interface Gi2/0/24
Interface GigabitEthernet2/0/24 set to default configuration
PACKET-SW(config)#do sh run int gi2/0/24
Building configuration...

Current configuration : 104 bytes
!
interface GigabitEthernet2/0/24
description UNUSED PORT
no switchport
no ip address
shutdown
end

 

FLIS00 00 00 0800 4100 0000 00 00 00ff ff ff ff00 0100 0300 00 00 0300 00 00 01ff ff ff ffFCIS00 00 00 1400 00 00 1000 00 00 0100 00 00 0000 00 07 ed00 00 00 0000 00 00 2000 00 00 0800 0100 0100 00 00 003918400778