静态和动态端口配置文件
端口配置文件提供了一种手动或自动配置交换机接口的便捷方法。Mist 支持以下类别的端口配置文件:
- 系统定义 — 内置于 Mist 门户中的预配置端口配置文件。可用配置文件:接入点、物联网、上行链路、默认和禁用。
-
用户定义 - 如果系统定义的配置文件不满足您的要求,则创建的自定义端口配置文件。
概括而言,端口配置文件配置包括两个步骤:定义端口配置文件(或使用现有系统定义的配置文件)并将其分配给交换机端口。
根据配置文件分配给交换机端口的方式,Mist 支持静态和动态端口配置文件。
-
静态端口配置文件 — 静态端口配置文件可手动分配给特定交换机端口。这些配置文件用于交换机端口的静态调配。
-
动态端口配置文件 — 动态端口配置文件允许交换机端口使用配置的端口分配规则自动识别连接的设备。然后交换机动态应用适当的配置文件。这支持自动调配“无色”交换机端口,端口的行为会根据检测到的设备进行调整。
定义端口配置文件
您可以使用现有配置文件,也可以定义满足您要求的配置文件。Mist 支持在交换机模板级别或单个交换机级别创建端口配置文件。
要定义端口配置文件:
手动分配端口配置文件
本主题介绍如何为交换机端口分配静态端口配置文件。
定义端口配置文件后,您可以从交换机模板的 Select 交换机 部分的 Port Config 选项卡或交换机详细信息页面的 Port Configuration 部分手动将其分配给特定交换机端口。
要通过交换机模板手动将端口配置文件分配给端口:
您还可以在交换机级别为交换机端口分配端口配置文件。您可以通过交换机详细信息页面上的 Device 部分中的 Port 磁贴进行操作。单击“端口”磁贴上的“添加端口配置”并指定设置。观看以下视频,了解更多信息:
Port profiles provide a convenient way to manually or automatically provision EX switch interfaces. Going into the EX4300, we'll first create VLANs. We'll make a camera network with VLAN ID 30 and an IoT network with VLAN ID 29.
You can create as many networks as needed. You can create the profiles, for example, a camera, and map it to the camera network that we just created. Customize the settings as desired, such as PoE and STP.
We'll repeat this process to create profiles for a corporate device enabling 802.1x authentication, an IoT device configured with PoE, and an access point configured as a trunk port. It's very simple to modify profiles to meet your specific requirements. Then we go into the port configuration section to associate the configurations with port profiles.
Here we map ports 1 through 5 to be with an AP profile, ports 6 through 10 with a corporate device profile, ports 11 through 15 with IoT profiles, and ports 16 to 20 with the camera profile. This is how to create port profiles. We can also create port aggregation uplinks to be associated with the appropriate profiles.
When you save all of your changes, this pushes the configuration to the particular switch. This covers how EX switches are manually provisioned with port profiles from the Juniper MIST Cloud.
配置动态端口配置文件分配
使用本部分中的步骤配置规则,以便将端口配置文件动态分配给接口。当用户使用动态配置文件配置将客户端设备连接到交换机端口时,交换机会识别设备并为端口分配合适的端口配置文件。动态端口分析利用客户端设备的一组设备属性自动将预配置的端口和网络设置与接口相关联。您可以根据各种参数(如 LLDP 名称和 MAC 地址)配置动态端口配置文件。
您可以在模板级别或交换机级别配置动态端口配置文件分配。
要在模板级别设置端口配置文件的动态分配:
识别客户端后,端口配置文件需要几分钟才能应用到端口中,端口配置文件分配状态才会显示在 Mist 门户上。
如果交换机重新启动或大规模链路启动或关闭事件影响交换机上的所有端口,则大约需要 20 分钟才能将所有端口分配到正确的配置文件(假设所有端口都启用了动态端口配置)。
您还可以在交换机级别设置动态端口配置文件分配。您可以从交换机详情页面进行操作。观看以下视频,了解更多信息:
Wired Assurance offers dynamic port profiles, so you can simply plug in your device and it will automatically be assigned the appropriate profile. This is also referred to as the provisioning of colorless ports. In this example, we have a Juniper AP assigned to port 5. We also created a port profile called Minimal Access that has access to a guest network on VLAN 99.
Based on what the devices identify themselves as, we can create rules to assign profiles. We'll use the LLDP chassis ID to identify the device, and if it starts with the octet D420B0, it will be given the AP12 profile. So what we just did is set the dynamic profile assignment for port 5. If the wired device does not register as an AP12, then it will get the Minimal Access profile.
If it shows as an AP12, then it gets the AP12 profile. To verify that the port was assigned the right profile, take a look at the switch events log. You can see that the AP12 profile was correctly identified and automatically applied to port 5. Dynamic port profiles are not just limited to Juniper devices alone.
Anything based on LLDP or RADIUS name also falls under the domain of dynamic port profiles. This means that the days of manually assigning profiles to ports or even a range of ports are no longer necessary.
-
确保动态端口配置中使用的默认或受限 VLAN 没有运行活动的 DHCP 服务器。否则,您可能会在某些旧设备上遇到过时的 IP 地址问题。
-
具有基于端口的网络访问控制 (NAC) 身份验证的交换机不需要动态端口配置,因为 VLAN 分配由 RADIUS 服务器处理。此外,当使用具有 MAC 身份验证旁路 (MAB) 的 RADIUS 服务器时,我们不建议使用动态端口配置文件。
-
当设备支持 LLDP 时,优先选择基于 LLDP 的匹配,而不是基于 MAC 的匹配。
-
请勿在启用了 802.1X 身份验证的端口上使用基于 MAC 的匹配。
-
避免使用
Filter-ID属性。在端口上启用 802.1X 后,应通过 RADIUS 处理 VLAN 分配,而不依赖Filter-ID。 -
交换机上的动态端口配置用于建立与 IoT 设备、接入点和用户端口端点的连接。您不应使用它在交换机、交换机和路由器以及交换机和防火墙之间建立连接。您不应在上行链路端口上启用动态端口配置。
当根据连接的设备将端口配置文件动态分配给交换机端口时,此事件将显示在 Switch Insights 页面的 Switch Events 部分中。您还可以将光标悬停在交换机详细信息页面的“前面板”部分中的端口上,查看交换机端口上的动态端口配置文件详细信息。
Junos 要求端口配置文件中的每个接口范围至少包含一个成员接口。启用动态端口配置后,Junos 会在端口配置文件配置中包括一个虚拟接口 (ge-168/5/X) 作为占位符,这样即使未分配给实际接口,配置也仍然有效。例如,如果接口当前已分配给端口配置文件 A,但端口配置文件 B 预计稍后会动态应用,则使用像 ge-168/5/0 这样的占位符来保持配置文件 B 的接口范围有效。
您还可以使用以下 API 配置和验证动态端口配置详细信息:
GET – https://api.mistsys.com/api/v1/sites/c3b8f61c-c5a2-495d-9a5c-9b129624e9bf/devices/00000000-0000-0000-1000-<device mac addr>
"dynamic": {
"mode": "dynamic",
"rules": [
{
"src": "lldp_chassis_id",
"usage": "wireless",
"equals": "5c:5b:35",
"expression": "[0:8]"
}
]
}
"port_config": {
"ge-0/0/2-3": {
"usage": "restricted_access",
"dynamic_usage": "dynamic"
}
修改端口配置文件
您可以在交换机模板级别和单个交换机级别修改端口配置文件。
-
只能从交换机模板修改系统定义的端口配置文件。但是,Mist 不允许修改以下系统定义的端口配置文件: 默认 和 禁用。
-
如果从交换机模板修改系统定义的端口配置文件,则该配置文件的修改版本仅适用于该模板。
要修改端口配置文件:
删除端口配置文件
您可以在模板级别或单个交换机级别删除端口配置文件。
要删除端口配置文件:
端口配置最佳实践
以下是一些建议您的交换机端口,以便与 Mist 接入点无缝配合:
-
在中继端口上,删除所有不需要的 VLAN。端口上仅应包含所需的 VLAN(基于 WLAN 配置)。由于默认情况下接入点不会保存配置,因此接入点应该能够获取本征 VLAN 上的 IP 地址,以便连接到云并进行配置。
-
不建议使用端口安全(MAC 地址限制),除非所有 WLAN 都以隧道方式连接。
-
您可以随意启用BPDU保护,因为除非是网状底座,否则BPDU通常不会在接入点上从无线连接桥接到有线连接。 BPDU 是在使用生成树协议拓扑的扩展 LAN 内交换机之间交换的数据消息。 BPDU 数据包包含有关端口、地址、优先级和成本的信息,并确保数据最终到达预期位置。





