华为trunk详细用法
时间: 2023-11-19 20:07:07 浏览: 45
华为Trunk是一种VLAN聚合技术,能够将多个VLAN的数据流汇聚到一条物理链路上,提高网络带宽利用率和灵活性。以下是华为Trunk的详细用法:
1. Trunk的创建
创建Trunk前需先创建VLAN并将端口加入相应的VLAN中。然后使用以下命令创建Trunk:
[Switch] interface Eth-Trunk 1
[Switch-Eth-Trunk1] mode lacp-static
[Switch-Eth-Trunk1] trunkport GigabitEthernet 0/0/1 to 0/0/2
[Switch-Eth-Trunk1] quit
其中,mode lacp-static表示采用静态LACP模式,trunkport命令用于指定Trunk的物理链路。
2. Trunk的配置
可以使用以下命令对Trunk进行配置:
[Switch-Eth-Trunk1] trunkport GigabitEthernet 0/0/3 to 0/0/4
[Switch-Eth-Trunk1] port link-type trunk
[Switch-Eth-Trunk1] port trunk allow-pass vlan 10 20 30
[Switch-Eth-Trunk1] port trunk pvid vlan 10
[Switch-Eth-Trunk1] quit
其中,trunkport命令用于添加物理链路,port link-type trunk命令用于将端口设置为Trunk模式,port trunk allow-pass vlan命令用于允许通过的VLAN,port trunk pvid vlan命令用于指定默认的VLAN。
3. Trunk的管理
可以使用以下命令管理Trunk:
[Switch] display eth-trunk 1
[Switch] display interface eth-trunk 1
[Switch] display trunk
[Switch] display trunkport eth-trunk 1
[Switch] display trunk vlan 10
其中,display eth-trunk命令用于显示Trunk的状态信息,display interface eth-trunk命令用于显示Trunk的接口信息,display trunk命令用于显示所有Trunk的信息,display trunkport eth-trunk命令用于显示Trunk的物理链路信息,display trunk vlan命令用于显示指定VLAN的Trunk信息。
4. Trunk的删除
可以使用以下命令删除Trunk:
[Switch] undo interface Eth-Trunk 1
[Switch] save
其中,undo interface命令用于删除Trunk,save命令用于保存配置。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)