创建vlan
vlan batch 10 20 30 40 50 60 70 90
vlan 10
description F1
#配置交换机IP
interface Vlanif1
ip address 172.16.0.254 255.255.255.0
# VLAn地址池及DNS
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
dhcp select interface
dhcp server excluded-ip-address 192.168.10.1 192.168.10.30
dhcp server dns-list 202.96.128.86 114.114.114.114
#接口绑定
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#链路汇聚
interface Eth-Trunk1
mode lacp
interface GigabitEthernet0/0/27
eth-trunk 1
interface GigabitEthernet0/0/28
eth-trunk 1
#路由
ip route-static 0.0.0.0 0.0.0.0 172.16.0.1
#端口限速
interface GigabitEthernet0/0/21
qos lr outbound cir 50000 cbs 6250000
qos lr inbound cir 50000 cbs 6250000
#开启SSH登录
local-user myroot password irreversible-cipher ******
local-user myroot privilege level 15
local-user myroot service-type ssh
ssh server compatible-ssh1x enable
stelnet ipv4 server enable
stelnet ipv6 server enable
ssh client first-time enable
#上级路由静态路由条目
192.168.0.0 255.255.0.0 (16) 172.16.0.254