Configuración base de switches Catalyst 9200 y 9300:
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service password-encryption
aaa authentication login default local
aaa session-id common
vtp mode transparent
no ip http server
no ip http secure-server
ip routing
system mtu 9100
diagnostic bootup level minimal
transceiver type all
monitoring
lldp run
logging buffered 20000000 informational
logging persistent url flash:/LOGS size 104857600 filesize 5242880
archive
path flash:CONFIG-HISTORY
maximum 14
log config
login on-success log
General
hostname SWITCH
enable secret CISCO
username localadmin priv 15 secret CISCO
clock timezone UY -3 0
ip domain-name cisco.local
ip ssh version 2
ntp server 192.168.200.1
ntp source XXX
logging x.x.x.x //Syslog-server IP
logging source-interface IF
Management
ip access-list standard ManagementACL
permit 192.168.200.0 0.0.0.255 // Red con acceso administrativo al equipo
deny any log
line con 0
timeout login response 300
line vty 0 4
access-class ManagementACL in vrf-also
transport input ssh
exec-timeout 60 0
line vty 5 15
access-class ManagementACL in vrf-also
transport input ssh
exec-timeout 60 0
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 172.23.84.105 255.255.255.0
negotiation auto
ip route vrf Mgmt-vrf 0.0.0.0 0.0.0.0 172.23.84.1
VLAN
vlan X
name X
STP
spanning-tree mode rapid-pvst
spanning-tree extend system-id
spanning-tree vlan 0-4094 priority 0 // UNICAMENTE SI EL SWITCH ES ROOT DE LA RED (No usar en switches de acceso)
spanning-tree portfast bpduguard default
Interfaces L2
Access
interface GigabitEthernet1/0/1
switchport access vlan XX
switchport mode access
spanning-tree portfast
Trunk
interface GigabitEthernet1/0/1
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree portfast trunk
spanning-tree guard root ! si el switch es root
Trunk to host
interface GigabitEthernet1/0/1
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree portfast trunk
spanning-tree guard root