1 配置802.1x? 实验设备:DES-3526
?
DES-3526:admin#config ipif System ipaddress 192.168.0.1/24
DES-3526:admin#enable 802.1x?
DES-3526:admin#config 802.1x auth_mode mac_based 基于mac模式认证 默认基于端口
DES-3526:admin#config 802.1x capability ports 1-24 authenticator 将1-24口设置为认证模式
DES-3526:admin#config radius add 1 192.168.0.254 key 123456 auth_port 1812 acct_port 1813
DES-3526:admin#show 802.1x auth_state? 查看交换机端口的认证状态
?
基于mac的认证:为了防止多个用户使用同一个账号登陆,特在认证服务器的认证方法的安全选项 上勾选? “拒绝具有相同用户名的并发用户接入”。?
?
?
2 guest vlan?? 实验设备:DGS-3627
?
DGS-3627:4# config vlan default delete 1-24
DGS-3627:4#create vlan vlan10 tag 10
DGS-3627:4#create vlan vlan20 tag 20
DGS-3627:4#config vlan vlan10 untagged 1-12
DGS-3627:4#config vlan vlan20 untagged 13-24
DGS-3627:4#config ipif System ipaddress 192.168.0.1/24 vlan vlan10 设置交换机ip地址并指定到vlan10
DGS-3627:4#enable 802.1x
DGS-3627:4#create 802.1x guest_vlan vlan10
DGS-3627:4#create 802.1x guest_vlan ports 1-12 state enable 开启1-12端口的guest_vlan功能
DGS-3627:4#config 802.1x capability ports 1-8 authentictor
DGS-3627:4#config radius add 1 192.168.0.254 key 123456 auth_port 1812 acct_port 1813
DGS-3627:4# show 802.1x auth_state
DGS-3627:4#show vlan
?
3 gvrp? 实验设备:2*DES-3326SR
创建多个vlan
DES-3326SR:4# enable gvrp
DES-3326SR:4#config gvrp 24 state enable? 把24口作为级联端口,并开启gvrp功能
DES-3326SR:4#config vlan vlan10 advertisement enable? 保证vlan的advertisement 功能开启
?
多个交换机级联可以使用gvrp功能,也可以手工设定
DES-3326SR:4#config vlan vlan10 add tagged 24
?
?
4 ip-mac port 绑定 实验设备:DGS-3627
?
DGS-3627:4#enable address_binding acl_mode 启用acl模式的绑定功能
DGS-3627:4#config address_binding ip_mac ports 1-12 state enable 开启1-12端口的ip-mac绑定功能
DGS-3627:4#create address_binding ip_mac ipaddress 192.168.1.1 mac 00-01-02-03-04-05 port 1-8 mode acl
?
5 DHCP relay? 实验设备:DES-3326SR
?
创建DHCP服务器,创建多个vlan 使每个vlan中的计算机都可以自动获取到ip
DGS-3326SR:4#config vlan default delete 1-24
DGS-3326SR:4#create vlan vlan10 tag 10
DGS-3326SR:4#create vlan vlan20 tag 20
DGS-3326SR:4#config vlan vlan10 add untagged 1-12
DGS-3326SR:4#config vlan aln20 add untagged 13-24
DGS-3326SR:4# create ipif if10 192.168.10.1/24 vlan10给vlan创建虚接口并设置ip地址
192.168.10.254是DHCP服务器的地址
DGS-3326SR:4# create ipif if20 192.168.20.1/24 vlan20
DGS-3326SR:4#enbale bootp_relay
DGS-3326SR:4#config bootp_relay add ipif if20 192.168.10.254
如果有多各接口需要给每一个接口都配置
?
6 SIM?? 实验设备:DES-3526
交换机在 SIM 组中的角色有三个:commander,member,candidate。出厂设 置是 candidate。每个 SIM 组有且仅有一台交换机处于 commander角色,输入下面命令把交换机 1设为commander,并设置SIM 组名为 dlink
DES-3526:4#enable sim
DES-3526:4#config sim commander group dlink
DES-3526:4#show sim
DES-3526:4#show sim candidate???? 可以看到其他的交换机处于candidate 状态
DES-3526:4#config sim_group add 1? 把交换机2变为sim的成员
DES-3526:4# config sim_group delete 1 删除sim成员
Web:10.90.90.90? 点击sim>topology>here?? view>topology
?
?
7 端口镜像? 实验设备:DES-3526
DES-3026:4#enable mirror
DES-3026:4#config mirror ports 24 source ports 1-12 both 使用24口查看1-12口的所有数据
DES-3026:4#show mirror
?
?
8 端口限速 实验设备:DES-3026
DES-3026:4#config bandwidth_control 1-24 tx_rate 128? rx_rate 256
DES-3026:4#show bandwidth_control
?
?
9 公共端口(非对称vlan) 实验设备DES-3226S
?
DES-3226S:4#enable asymmetric_vlan? 启用非对称VLAN 功能
DES-3226S:4#coinfig vlan default delete 1-24
DES-3226S:4#create vlan vlan10 tag 10
DES-3226S:4#create vlan vlan20 tag 20
将公共端口以untagged的方式添加到各个vlan
DES-3226S:4#create vlan vlan30 tag 30
DES-3226S:4#config vlan vlan10 add untagged 1-12
DES-3226S:4#config vlan vlan20 add untagged 12-24
DES-3226S:4#config vlan vlan30 add untagged 1-24
DES-3226S:4#config gvrp 1-11 state enable pvid 10
将公共端口添加到单独创建的vlan中
DES-3226S:4#config gvrp 13-24 state enable pvid 20
DES-3226S:4#config gvrp 12 state enable pvid 30
DES-3226S:4#show gvrp
DES-3226S:4#show vlan
?
?
10 静态路由 实验设备:2*DES-3326SR??
??? 单独一台三层交换机不需要设置静态路由不同网段的pc即可通信
DES-3326SR-1:4#config vlan default delete 1-16 24
DES-3326SR-1:4#create vlan vlan10 tag 10
DES-3326SR-1:4#create vlan vlan20 tag 20
DES-3326SR-1:4#create vlan vlan50 tag 50
DES-3326SR-1:4#config vlan vlan10 add untagged 1-8
DES-3326SR-1:4#config vlan vlan20 add untagged 9-16
DES-3326SR-1:4#config vlan vlan50 add untagged 24
DES-3326SR-1:4#create ipif if10 192.168.1.1/24 vlan10 state enable
DES-3326SR-1:4#create ipif if20 192.168.5.1/24 vlan20 state enable
DES-3326SR-1:4#create ipif if50 192.168.5.1/24 vlan50 state enable
DES-3326SR-1:4#create iproute 192.168.3.0/24 192.168.5.2
DES-3326SR-1:4#create iproute 192.168.4.0/24 192.168.5.2
?
DES-3326SR-2:4#config vlan default delete 1-16 24
DES-3326SR-2:4#create vlan vlan30 tag 30
DES-3326SR-2:4#create vlan vlan40 tag 40
DES-3326SR-2:4#create vlan vlan50 tag 50
DES-3326SR-2:4#config vlan vlan30 add untagged 1-8
DES-3326SR-2:4#config vlan vlan40 add untagged 9-16
DES-3326SR-2:4#config vlan vlan50 add untagged 24
DES-3326SR-2:4#create ipif if30 192.168.3.1/24 vlan30 state enable
DES-3326SR-2:4#create ipif if40 192.168.5.2/24 vlan40 state enable
DES-3326SR-2:4#create ipif if50 192.168.5.2/24 vlan50 state enable
DES-3326SR-2:4#create iproute 192.168.1.0/24 192.168.5.1
DES-3326SR-2:4#create iproute 192.168.2.0/24 192.168.5.1
?
?
11 链路聚合 实验设备:2*DES-3526
?
DES-3526:4# create link_aggregation group_id 1 type static
DES-3526:4# config link_aggregation group_id 1 master_port 1 ports 1,3,5 state enable
DES-3526:4# show link_aggregation
DES-3526:4#show stp ports
?
12 生成树 实验设备:DES-3526
?
DES-3526:4#enable stp
DES-3526:4#show stp ports