关于跨路由器连接问题。
这里我们就用到了交换机的Trunk模式。先对pc3、pc4、划分好vlan,然后通过配置trunk就可以于一号交换机里对应的vlan虚拟局域网设备通信。交换机trunk配置如下:
<Huawei>sy //进入系统
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/3 //进入3号端口
[Huawei-GigabitEthernet0/0/3]port link-type trunk //设置为trunk模式
[Huawei-GigabitEthernet0/0/3]
Feb 2 2024 22:00:21-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 4, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all //允许所有vlan通过该链路,如果想指定vlan通过,则填写相应的vlan就行
[Huawei-GigabitEthernet0/0/3]
Feb 2 2024 22:00:51-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 5, th
e change loop count is 0, and the maximum number of records is 4095.
注:trunk不仅要配置本地交换机,也要配置目标交换机,也就是说在本次实验,需要重复操作两次,在两台交换机。