在 Controller1 上的配置:
enable
configure terminal
# 配置主机名
hostname Controller1
# 配置管理接口
interface GigabitEthernet1
ip address 192.168.1.2 255.255.255.0
no shutdown
# 配置SSH访问
ip domain-name yourdomain.com
crypto key generate rsa general-keys modulus 2048
aaa new-model
aaa authentication login default local
aaa authorization exec default local
username admin privilege 15 secret YourStrongPassword
line vty 0 15
transport input ssh
login local
exit
# 配置NTP服务器
ntp server pool.ntp.org
# 配置时间区域
clock timezone PST -8
# 配置SNMP
snmp-server community YourSNMPCommunity RO
snmp-server host 192.168.1.10 version 2c YourSNMPCommunity
# 配置日志
logging host 192.168.1.20
logging trap informational
# 保存配置
end
write memory
在 Controller2 上的配置:
enable
configure terminal
# 配置主机名
hostname Controller2
# 配置管理接口
interface GigabitEthernet1
ip address 192.168.1.3 255.255.255.0
no shutdown
# 配置SSH访问
ip domain-name yourdomain.com
crypto key generate rsa general-keys modulus 2048
aaa new-model
aaa authentication login default local
aaa authorization exec default local
username admin privilege 15 secret YourStrongPassword
line vty 0 15
transport input ssh
login local
exit
# 配置NTP服务器
ntp server pool.ntp.org
# 配置时间区域
clock timezone PST -8
# 配置SNMP
snmp-server community YourSNMPCommunity RO
snmp-server host 192.168.1.10 version 2c YourSNMPCommunity
# 配置日志
logging host 192.168.1.20
logging trap informational
# 保存配置
end
write memory