This blog was originally started to better help me understand the technologies in the CCIE R&S blueprint; after completing the R&S track I have decided to transition the blog into a technology blog.
CCIE #29033
This blog will continue to include questions, troubleshooting scenarios, and references to existing and new technologies but will grow to include a variety of different platforms and technologies. Currently I have created over 185 questions/answers in regards to the CCIE R&S track!! Note: answers are in the comment field or within "Read More" section.
You can also follow me on twitter @FE80CC1E
Create a macro to configure a host port?
3 comments:
Say you want to create a host port for fas 0/1 - 10 and you wanted the following settings
switchport mode access
switchport access vlan 10
spanning-tree portfast bpduguard
switchport port-security
switchport port-security maximum 1
switchport port-security violation restrict
switchport port-security mac-address sticky
You can create a MACRO to apply this to the interfaces above or other interfaces in the future. This will also allow specify a VLAN
macro name HOSTMACRO
switchport mode access
switchport access vlan $VLAN
spanning-tree portfast bpduguard
switchport port-security
switchport port-security maximum 1
switchport port-security violation restrict
switchport port-security mac-address sticky
no shut
@
To apply it based on the requirement above
interface range fas 0/1 - 10
macro apply HOSTMACRO $VLAN 10
Future use on a different port and vlan
interface inter gig 0/2
macro apply HOSTMACRO $VLAN 222
How about:
Router#define set port host (macro-set-port-host) 0/1,1/1
To execute the macro use "set port host macro (macro-set-port-host)"
I've read that "set port host" is depreciated and to use "switchport host" instead. What do you think? It looks like it does the same thing...
Switch(config)# interface fa 0/1
Switch(config-if-range)# switchport host
switchport mode will be set to access
spanning-tree portfast will be enabled
channel group will be disabled
SET was the main command to configure settings in in the CATOS.
Post a Comment