> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/ip-transit/high-availability/manage-high-availability/switch-primary-standby.md).

# 切换主/备端口

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">此功能仅适用于\*\*主备容灾（Active-Standby）\*\*模式。负载均衡模式下无主备之分，无需切换。</mark>
{% endhint %}

当您需要主动调整流量路径时（例如对主端口进行维护），可手动将备端口切换为主端口。

## 操作步骤

1. 进入实例详情页 → **模式配置** section。
2. 将鼠标悬停在**备端口**行的**变更**按钮上，确认提示文字：*将该端口切换为主端口*。
3. 点击**变更**，在确认弹窗中点击**确定**。

<figure><img src="/files/oqVLx9iVFQNI2GBudVGz" alt=""><figcaption><p>切换主/备端口操作</p></figcaption></figure>

切换完成后，当前备端口升级为**主端口**，原主端口降为**备端口**。

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">此操作控制的是</mark><mark style="color:blue;">**回程（出方向）流量**</mark><mark style="color:blue;">。入方向流量需客户自行通过 BGP 路由策略进行调整。</mark>
{% endhint %}
