淘宝百度广达pica8交换机配置汇聚接口笔记

1,设置需要通过的的vlan

configure
set vlans vlan-id 2
commit

2,设置汇聚接口

set interface aggregate-ethernet ae1
set interface gigabit-ethernet te-1/1/1 ether-options 802.3ad ae1
set interface gigabit-ethernet te-1/1/2 ether-options 802.3ad ae1
set interface aggregate-ethernet ae1 aggregated-ether-option lacp enable true
set interface aggregate-ethernet ae1 aggregated-ether-option min-selected-port 1
set interface aggregate-ethernet ae1 family ethernet-switching port-mode trunk
commit

3,将vlan加入到汇聚接口

set interface aggregate-ethernet ae1 family ethernet-switching vlan members 2
commit

4,更改端口速度,如果交换机速度不匹配的话

set interface gigabit-ethernet te-1/1/1 speed 1000
commit

5,保存配置,一定记得每次设置了 commit下。不然只能 exit d。命令先后顺序一定不要搞错,先设置trunk,再加vlan。
save running-to-startup

此设置在华为交换机下通过。

这个交换机48口万兆,还有4个40g口。3500极具性价比。

微软AD域活动目录常用命令

1,批量新建用户,在当前目录新建一个testxin.csv的文件,然后运行如下命令

for /f "tokens=1,2,3,4,5 delims=," %a in (testxin.csv) do dsadd user "cn=%c,ou=90,ou=life,ou=90life,dc=life90,dc=com" -samid %d -upn %[email protected] -ln %a -fn %b -pwd %e -disabled no -memberof "cn=lifeadmins,ou=组,ou=90life,dc=life,dc=com"

用 for /f 来提取csv里面的内容 token选取 delims来切片
用dsadd user 来新建用户
用 -memberof 参数来添加到组

2,csvde来导出域用户备份

csvde -d "ou=90life,DC=lif90,DC=com" -r "(&(objectcategory=person)(objectClass=user))" -l "name,sAMAccountName,description,title,department,telephoneNumber,mail,userAccountControl" -f C:\Users\Administrator\Desktop\Users-List.csv -s life90.com -u