Commands and more Flashcards
Create a vlan
vlan ‘number’
Command to place certain vlans are primary and secondary root
spanning-tree vlan ‘numbers’ root primary/secondary
Name a vlan
vlan ‘number you want to name’
name ‘name’
Make an accept port
Go into interface
switchport mode access
switchport access vlan
Enable PortFast on interface
Go into interface
spanning-tree portfast
Set up VTP
vtp domain ‘domain-name’
vtp mode [client/server/transparent]
vtp password ‘password’ ….for vtpv3
vtp version [1/2/3]
vtp pruning . if you want to prune
Change spanning tree mode
Global config
spanning-tree mode [pvst/rapid-pvst/mst]
Configure an SVI on a certain vlan
interface vlan ‘number’
ip address ~.~.~.~ -.-.-.-
no shutdown
Set up a trunk and etherchannel. Only allow certain vlans. Layer 2.
Must go into interface and piut
no switchport mode access
no switchport access vlan ~
On interface
switchport trunk encapsulation [dot1q/isl]
channel-protocol [lacp/pagp]
channel-group ‘#’ mode [active/auto/desirable/on/passive]
no shutdown
no shutdown
switchport mode trunk
switchport trunk allowed vlan ‘vlans’
switchport trunk native vlan ~
Set up a native vlan
switchport trunk native vlan ‘number’
Verify vtp
show vtp status
Verify spanning-tree
Show spanning-tree summary or show spanning-tree
Verify vlan
Show vlan
Verify etherchannel
show etherchannel summary
Change priority of switch, for root bridge
In global config mode
spanning-tree vlan ~ priority ~
The lowest priority gets to be root bridge
Increments of 4096
How do you change the priority of a port and what gets to be the priority?
In interface
spanning-tree vlan ~ port-priority ~
Increments of 64 and the lowest has traffic go to it
What else can you do affect what port traffic will go to? How do you change it?
You change the cost
In interface
spanning-tree vlan ~ cost ~
Which command gets you default gateways in some scenarios?
ipconfig
AAA and dropping certain filter certain address-ranges on certain vlans
‘aaa new-model’
‘radius-server host ~.~.~.~ key ‘key’’
‘aaa authentication dot1x default group radius’
‘dot1x system-auth-control’ (globally enables 802.1x on switch)
‘interface ~’
‘dot1x port-control {force-authorized/force-unauthorized/auto}’
ip access-list standard boson #permit 180.190.20.0 0.0.0.255 #exit
‘(config)#vlan access-map MYMAP 10
(config-access-map)#match ip address boson
(config-access-map)#action forward/drop
(config-access-map)#vlan access-map MYMAP 20
(config-access-map)#action forward/drop’
Config global
Then apply to certain vlan
‘vlan filter MYMAP vlan-list ‘the one you want to apply to ‘
Everything gets dropped after first
vlan access-map [name] [sequence #] : creates a VACL with name [name] and places switch into access map config mode for sequence [seq. #] of the VACL.