初始化交换机常用命令
system-view
telnet server enable #开启telnet服务
user-interface vty 0 4
protocol inbound all #允许所有协议登录交换机
system-view
aaa
local-user user password cipher password
local-user user privilege level 15
local-user user service-type telnet terminal ftp
quit
user-interface console 0
authentication-mode aaa
user-interface vty 0 4
authentication-mode aaa
user privilege level 15
quit
snmp-agent community read snmp1
snmp-agent sys-info version v2c
quit
clock timezone bj add 8:00:00
quit
system-view
sysname swname
vlan batch 200 300 to 400 4000
interface Vlanif4000
ip address 192.168.1.2 255.255.255.0
quit
ip route-static 0.0.0.0 0.0.0.0 192.168.1.1 #配置默认路由
interface GigabitEthernet0/0/1
description UP TrunkKou
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 4094
quit
interface Ethernet0/0/5
description accessKou
port link-type access
port default vlan 20
qos lr inbound cir 10000 #接口限速
qos lr outbound cir 10000
quit
quit
save
y
port-group 1
group Ethernet0/0/4 to Ethernet 0/0/24
shutdown