小白必看:超简单Trunk小实验,一看就懂
一.实验环境
实验环境:GNS3,路由器c2691
二.实验拓扑图<img src="https://cache.tdyun.com/upload/information/20200309/33/53641.jpg" alt="mark" style="zoom:75%;" />
三.实验步骤
首先进行vlan与接口的配置。先设置好vlan如图。<img src="https://cache.tdyun.com/upload/information/20200309/33/53642.jpg" alt="mark" style="zoom:75%;" />
然后把sw1的接口分给对应的vlan<img src="https://cache.tdyun.com/upload/information/20200309/33/53644.jpg" alt="mark" style="zoom:75%;" />
接着我们对sw2进行同样的操作。如图。<img src="https://cache.tdyun.com/upload/information/20200309/33/53645.jpg" alt="mark" style="zoom:75%;" />
接着我们要对sw1的f1/2接口设置trunk,如图<img src="https://cache.tdyun.com/upload/information/20200309/33/53646.jpg" alt="mark" style="zoom:75%;" />
接下来对sw2的f1/2接口进行同样的设置,如图<img src="https://cache.tdyun.com/upload/information/20200309/33/53647.jpg" alt="mark" style="zoom:75%;" />
最后我们再对pc机设置ip地址就行了。如下图依次是pc1到pc4的设置。<img src="https://cache.tdyun.com/upload/information/20200309/33/53648.jpg" alt="mark" style="zoom:75%;" />
<img src="https://cache.tdyun.com/upload/information/20200309/33/53649.jpg" alt="mark" style="zoom:75%;" />
<img src="https://cache.tdyun.com/upload/information/20200309/33/53650.jpg" alt="mark" style="zoom:75%;" />
<img src="https://cache.tdyun.com/upload/information/20200309/33/53652.jpg" alt="mark" style="zoom:75%;" />
至此实验结束,实验结果如何大家可以自行互ping试试,用wireshark抓包看看实验结果。over!