! 设置主机名
hostname NX1
! 配置密码和登录设置
username <your_username> password <your_user_password>
ip domain-name <your_domain_name>
feature telnet
feature ssh
! 配置管理VLAN
vlan configuration 99
vlan name Management_VLAN
state active
exit
interface vlan99
description Management_VLAN
ip address <your_management_ip>/<your_management_subnet_mask>
no shutdown
exit
! 配置交换机端口
interface Ethernet1/1 ! 请根据您的实际设备接口进行修改
description Access_Port
switchport mode access
switchport access vlan <your_access_vlan>
spanning-tree port type edge
no shutdown
exit
! 配置上行链路端口
interface Ethernet1/10 ! 请根据您的实际设备接口进行修改
description Trunk_Port
switchport mode trunk
switchport trunk allowed vlan <your_allowed_vlans>
spanning-tree port type edge trunk
no shutdown
exit
! 保存配置
copy running-config startup-config