Switch Configuration 2
Switch Configuration 2
hostname SW
Enable password cisco
ip default-gateway 192.168.1.10
interface Vlan1
ip address 192.168.1.100 255.255.255.0
!
!
line con 0
password sanfran
logging synchronous
login
history size 25
exec-timeout 0 0
!
line vty 0 4
password sanjose
logging synchronous
login
history size 35
Using accounts to access switch:
username admin1 password ccna1
username admin2 password ccna2
username admin3 password ccna3
hostname SW
Enable password cisco
ip default-gateway 192.168.1.10
interface Vlan1
ip address 192.168.1.100 255.255.255.0
!
!
line con 0
password sanfran
logging synchronous
login local
history size 25
exec-timeout 0 0
!
line vty 0 15
password sanjose
logging synchronous
login local
history size 35
exec-timeout 5 25
Enable SSH and Using accounts to access switch:
hostname SW
ip domain-name nh.com
crypto key generate rsa
Conf t
CDP run
No CDP run
Conf t
Lldp run
No lldp run
Trunk Configuration:
Int gi 0/1
Switchport trunk encapsulation isl/dot1Q/auto
Int gi 0/1
Switchport trunk encapsulation dot1Q
Switchport trunk native vlan 3
Switchport mode trunk
Int gi 0/1
Switchport trunk encapsulation isl
Switchport mode trunk
SW0#sh int trunk
SW2#sh int gi 0/2 switchport
Name: Gig0/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 3 (ccna3)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
Trunk Negotiation Protocol (NDP)
Int gi 0/2
SW2 SW2
SW2#sh int gi 0/2 switchport SW1#sh int gi 0/2 switchport
Name: Gig0/2 Name: Gig0/2
Switchport: Enabled Switchport: Enabled
Administrative Mode: dynamic desirable Administrative Mode: dynamic auto
Operational Mode: trunk Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On Negotiation of Trunking: On
Access Mode VLAN: 1 (default) Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none Voice VLAN: none
Administrative private-vlan host-association: none Administrative private-vlan host-association:
Administrative private-vlan mapping: none none
Administrative private-vlan trunk native VLAN: Administrative private-vlan mapping: none
none Administrative private-vlan trunk native
Administrative private-vlan trunk encapsulation: VLAN: none
dot1q Administrative private-vlan trunk
Administrative private-vlan trunk normal VLANs: encapsulation: dot1q
none Administrative private-vlan trunk normal
Administrative private-vlan trunk private VLANs: VLANs: none
none Administrative private-vlan trunk private
Operational private-vlan: none VLANs: none
Trunking VLANs Enabled: ALL Operational private-vlan: none
Pruning VLANs Enabled: 2-1001 Trunking VLANs Enabled: ALL
Capture Mode Disabled Pruning VLANs Enabled: 2-1001
Capture VLANs Allowed: ALL Capture Mode Disabled
Protected: false Capture VLANs Allowed: ALL
Appliance trust: none Protected: false
SW2# Appliance trust: none
SW1#
Port Security
!
interface FastEthernet0/1
switchport mode access
switchport port-security
switchport port-security mac-address 0090.21D8.42D0
switchport port-security vioalation shutdown
!
Sticky Mac
interface FastEthernet0/2
switchport mode access
switchport port-security
switchport port-security mac-address sticky
ping 192.168.1.2
interface FastEthernet0/2
switchport mode access
switchport port-security
switchport port-security mac-address sticky
switchport port-security mac-address sticky 00D0.BAB6.5B68
!
Maximum address
interface FastEthernet0/4
switchport mode access
switchport port-security
switchport port-security maximum 3
switchport port-security mac-address sticky
switchport port-security violation protect
switchport port-security mac-address sticky 000C.85EC.DE30
switchport port-security mac-address sticky 00E0.B042.4065
switchport port-security mac-address sticky 00E0.F7BE.95D4