H3C三台路由器做trunk
时间: 2023-11-20 17:04:43 浏览: 167
h3c AR18路由器配置手册
在 H3C 路由器上配置 Trunk 需要使用端口聚合技术,将多个物理端口绑定成一个逻辑端口,形成一个 Trunk。以下是 H3C 路由器上配置三个端口为 Trunk 的示例命令:
1. 创建一个聚合组:
```
[Router] interface Bridge-Aggregation 1
```
2. 将三个端口加入到聚合组中:
```
[Router-Bridge-Aggregation1] interface GigabitEthernet 0/0/1
[Router-Bridge-Aggregation1-GigabitEthernet0/0/1] port link-aggregation group 1
[Router-Bridge-Aggregation1-GigabitEthernet0/0/1] quit
[Router-Bridge-Aggregation1] interface GigabitEthernet 0/0/2
[Router-Bridge-Aggregation1-GigabitEthernet0/0/2] port link-aggregation group 1
[Router-Bridge-Aggregation1-GigabitEthernet0/0/2] quit
[Router-Bridge-Aggregation1] interface GigabitEthernet 0/0/3
[Router-Bridge-Aggregation1-GigabitEthernet0/0/3] port link-aggregation group 1
[Router-Bridge-Aggregation1-GigabitEthernet0/0/3] quit
```
3. 配置聚合组为 Trunk:
```
[Router-Bridge-Aggregation1] port link-type trunk
```
4. 配置 Trunk 的 VLAN 策略:
```
[Router-Bridge-Aggregation1] port trunk pvid vlan 1
[Router-Bridge-Aggregation1] port trunk allow-pass vlan 1 2 3
```
以上命令中,创建的聚合组为 Bridge-Aggregation 1,端口为 GigabitEthernet 0/0/1、GigabitEthernet 0/0/2 和 GigabitEthernet 0/0/3。通过 port link-aggregation group 1 命令将三个端口加入到聚合组中。通过 port link-type trunk 命令将聚合组配置为 Trunk。接着,通过 port trunk pvid vlan 1 配置 Trunk 的 PVID 为 VLAN 1,通过 port trunk allow-pass vlan 1 2 3 命令允许 VLAN 1、2 和 3 的数据通过 Trunk。需要注意的是,这里的 VLAN 策略需要根据实际情况进行配置。
阅读全文