2024年5月30日发(作者:)

一.缺省用户名和密码

admin

12345

二。创建VLAN

config //进

入配置模式后

vlan 10,12,17,20,30-416,579,601—700,801,921,1000—1050,

1201—1224,1301-1324,1401—1424,3999 //批量创建VLAN

interface vlan 4000 //单独创建VLAN

ip address 172。31.20。237/24

//给vlan添加IP

ip route—static 0.0。0.0 0。0。0.0 172。31。20。254

//config模式下缺省路由配置

write

//保存当前所有配置

file

三。端口配置

Interface gi 1/0/1 to gi 1/0/48 批量进入端口

S7800—08(config-eth1

//启用端口

)#no shutdown

S7800—08(config)#interface gigaethernet 6/0/1

//进入端口gigaethernet 6/0/1

S7800-08

//设置端口描述

(config—ge6/0/1)#alias huangtan8220

1) access 模式:port link—type access;port default vlan 10 //

access 模式

2) trunk 模式:port link—type trunk;port trunk allow—pass vlan 10,12

//trunk模式

3) hybrid 模式:port link—type hybrid;port hybrid vlan 30—416,1000—1050

tagged;port hybrid vlan 3999 untagged

//hybird模式,内层标为 tag,外层标untag(解标)

建议端口使用hybrid模式,端口默认为hybrid模式。

1。Port hybrid vlan 400 tag //更改端口为tag模式

hybrid vlan 399 untag //更改端口为untag模式,并在下一条中配置